[wp-hackers] Custom Post Types and Media Attachments

Bill Dennen dennen at gmail.com
Tue Dec 14 04:14:20 UTC 2010

thanks again.


On Mon, Dec 13, 2010 at 10:59 PM, John Blackbourn
<johnbillion+wp at gmail.com> wrote:
> Okay I've just written some code which gets around this problem,
> albeit in a bit of a bizarre way.
> http://pastebin.com/hxnjJC1z
> Basically the function plugin_foo_insert_button_hack() is called when
> you upload a file, and at the top of the media browser. It checks the
> current post's post type for support for 'my_plugin_feature' and adds
> support for 'editor' in order to force the 'Insert Into Post' button
> to show up. It's wholly inelegant but it works and that's all I need
> at this moment in time, so it'll have to do.
> You'll probably need to tweak this to apply to your own
> plugin/situation, but hopefully this will be of help to someone else.
> I'll open a bug report in due course but I think the whole media
> management system is due an overhaul shortly (3.2?) so it might end up
> being a moot issue.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list