WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #19080, comment 14


Ignore:
Timestamp:
10/29/11 06:04:13 (3 years ago)
Author:
nacin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19080, comment 14

    initial v1  
    33First, 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).  
    44 
    5  I find it clever but I wouldn't be surprised if someone else can poke a hole in the approach. 
     5I find it clever but I wouldn't be surprised if someone else can poke a hole in the approach. 
    66 
    77Second, 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.