[wp-trac] [WordPress Trac] #14886: current_screen object lies because of unspecified post_type parameter

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 16 19:59:59 UTC 2010


#14886: current_screen object lies because of unspecified post_type parameter
--------------------------+-------------------------------------------------
 Reporter:  nacin         |       Owner:       
     Type:  defect (bug)  |      Status:  new  
 Priority:  normal        |   Milestone:  3.0.2
Component:  Post Types    |     Version:       
 Severity:  normal        |    Keywords:       
--------------------------+-------------------------------------------------
 When editing a page, you don't usually end up with post_type in the URL.
 That should be fine. But in admin.php, we assume that if no post type is
 specified, then typenow and current_screen ends up with incorrect
 information, and it's difficult to properly detect what's going on.

 One fix would be to detect the post type based on the ID. Or, we can force
 a redirect and force all URLs to contain the proper post_type parameter
 except for post_type = post.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14886>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list