[wp-trac] [WordPress Trac] #19080: CPT identifier class name missing from #icon-edit DIV

WordPress Trac wp-trac at lists.automattic.com
Sat Oct 29 06:45:32 UTC 2011


#19080: CPT identifier class name missing from #icon-edit DIV
------------------------------------+-----------------------
 Reporter:  fjarrett                |       Owner:  nacin
     Type:  defect (bug)            |      Status:  accepted
 Priority:  normal                  |   Milestone:  3.3
Component:  UI                      |     Version:  3.3
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------

Comment (by nacin):

 [attachment:19080.2.diff] introduces two other changes. One, $typenow and
 $taxnow will only be set to the screen's post_type and taxonomy if the
 base is 'post', 'edit-tags', or 'edit' -- three situations where the
 screen object shines, and tries to set these values inclusively and
 accurately.

 The problem here is that plugin pages (say one added as a submenu page to
 edit.php?post_type=page) then don't get the proper treatment in
 get_screen_icon(). Since $typenow will be set from the generic $_GET check
 in admin.php, we can fall back there.

 I'm not a huge fan at the moment of how WP_Screen handles plugin pages.
 While it *may* be safe to set the screen's post_type and taxonomy off of
 $_GET['post_type'] and $_GET['taxonomy'], that seems like it could pretty
 easily conflict with other things and poison some unrelated screen objects
 that happen to have a GET var on the page. On the other hand, with the
 menu code already relying so much on $typenow already, it's probably fine
 to just have the screen object reflect these on instantiation. In order to
 do that, we wouldn't apply the diff here at all, and we'd make another
 tweak to WP_Screen::get().

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


More information about the wp-trac mailing list