Upload Media Buttons disappared
-
Hi, I’m using the Custom Post Widget Plugin and encounted a problem in the Post Edition Page.
The Button used to add a new content block is shown but the media buttons does not appear now.
Looking inside the code of your Widget it appears that you are using a deprecated WordPress filter (deprecated since WordPress 3.3) ‘media_buttons_context’.
Since WordPress 3.3 we now have to use the ‘media_buttons’ filter. So, this is why the media buttons disappeared in my case under WordPress 3.4.1.
If you want to fix this problem you can replace the ‘check_post_type_and_remove_media_buttons’ declare in ‘post-widget.php’ by :
// Only add content_block icon above posts and pages function check_post_type_and_remove_media_buttons() { global $current_screen; if( 'content_block' != $current_screen->post_type ) { $wordpressVersion = get_bloginfo('version'); // See: https://core.trac.www.ads-software.com/ticket/22891 and https://core.trac.www.ads-software.com/ticket/22559 if(floatval($wordpressVersion) >= 3.3) { add_filter('media_buttons', 'add_content_block_icon' ); } else { add_filter('media_buttons_context', 'add_content_block_icon' ); } } }
Hope this helps,
Baptiste
https://www.ads-software.com/extend/plugins/custom-post-widget/
- The topic ‘Upload Media Buttons disappared’ is closed to new replies.