[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:03:56 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  |
Changes (by nacin):

 * keywords:  has-patch => has-patch dev-feedback


 [attachment:19080.diff] takes a few different approaches here.

 First, until a WP_Screen object is the current screen, it allows future
 WP_Screen::get() calls to augment the screen object properties that are
 already in the registry. If the current screen is what's in the registry,
 we can assume that as much as possible was gleaned from the global state
 of the page (hook_suffix, GET/POST/REQUEST).

  I find it clever but I wouldn't be surprised if someone else can poke a
 hole in the approach.

 Second, and separately, it introduces WP_Screen::for_meta_box(). This is
 then used in functions that previously could have accepted a post type.
 Better data is then passed to WP_Screen::get() to allow it to realize it
 is dealing with a post type. It should be noted that for other meta box
 "$page" values, "comment," "link," and "nav-menus," are all proper id
 *and* base values for those screens. We only need to trap the post type.

 I think only the second approach fixes the bug here, but the first could
 mitigate future issues.

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

More information about the wp-trac mailing list