[wp-trac] [WordPress Trac] #22186: Backwards compatibility for admin/includes/media.php hooks

WordPress Trac noreply at wordpress.org
Sat Nov 17 10:11:23 UTC 2012


#22186: Backwards compatibility for admin/includes/media.php hooks
--------------------------+------------------
 Reporter:  nacin         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  3.5
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------

Comment (by Chouby):

 Here are some comparison results between WordPress 3.4.2 and WordPress
 3.5-beta3-22613.

 For the "Edit Media" panel:
 * In WP 3.4, the filter attachment_fields_to_edit filter is called
         * $pagenow is set to 'media.php'
         * $screen->base is set to 'media'
 * In WP 3.5, the filter is not called

 For the "library" tab of the "Add media" modal (only the new one for WP
 3.5):
 * in WP 3.4, the filter parse_query is called
         * $pagenow is set to 'media-upload.php'
         * $screen->base is set to 'media-upload'
         * {{{$_REQUEST['post_id']}}} refers to post currently edited
 * In WP 3.5, the filter parse_query is called but
         * $pagenow is set to 'admin-ajax.php'
         * $screen->base is not set
         * {{{$_REQUEST['post_id']}}} is not set
 * In both cases, the attachment_fields_to_edit filter is called for each
 picture in the library

 I will wait for a future nightly build to go on my tests (currently the
 new modal is broken when WP_DEBUG is set to true)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22186#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list