[wp-trac] [WordPress Trac] #22588: Back compat $_REQUEST['post_id'] for media XHR requests

WordPress Trac noreply at wordpress.org
Mon Nov 26 04:07:47 UTC 2012


#22588: Back compat $_REQUEST['post_id'] for media XHR requests
--------------------------+--------------------
 Reporter:  nacin         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Media         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------
Description changed by nacin:

Old description:

> query-attachments, save-attachments, and save-attachments-compat should
> all pass back 'post_id', for consistency with the old media-upload.php
> dialog, as plugins may be doing $_REQUEST['post_id'] checks in
> conjunction with parse_query, save_post, attachment_fields_to_save, or
> other filters.
>
> We should consider also calling set_current_screen( 'media-upload' ) for
> these three requests, or for at least query-attachments, to allow the
> current screen object to be accurate. It's kind of hacky, and doesn't
> handle $pagenow, but it is something to consider.

New description:

 query-attachments, save-attachments, and save-attachments-compat should
 all pass back 'post_id', for consistency with the old media-upload.php
 dialog, as plugins may be doing `$_REQUEST['post_id']` checks in
 conjunction with parse_query, save_post, attachment_fields_to_save, or
 other filters.

 We should consider also calling set_current_screen( 'media-upload' ) for
 these three requests, or for at least query-attachments, to allow the
 current screen object to be accurate. It's kind of hacky, and doesn't
 handle $pagenow, but it is something to consider.

--

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


More information about the wp-trac mailing list