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

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 26 09:30:15 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.1
Component:  Post Types    |     Version:     
 Severity:  normal        |    Keywords:     
--------------------------+-------------------------------------------------

Comment(by nacin):

 Another instance of the current_screen object being ill-informed.

 The object on edit-tags.php provides no information about the parent
 screen. Specifically, the value of $typenow. But if $typenow isn't set it
 should default to 'post' on screens where that is indeed valid. For
 example, edit-tags.php?taxnomy=post_tag where post_type is omitted. This
 also makes it pretty much impossible to check $typenow unless of course
 you know the default. While the default isn't going to change, it also
 isn't intuitive.

 I think we need to be more explicit in how this object's properties get
 set, and prevent the need for it to be manipulated later with more
 accurate information.

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


More information about the wp-trac mailing list