[wp-trac] Re: [WordPress Trac] #8246: screen_meta and plugins and columns and 2.7beta3 ???

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 18 12:56:36 GMT 2008


#8246: screen_meta and plugins and columns and 2.7beta3 ???
----------------------------+-----------------------------------------------
 Reporter:  arena           |        Owner:  anonymous
     Type:  defect          |       Status:  reopened 
 Priority:  high            |    Milestone:  2.7      
Component:  Administration  |      Version:           
 Severity:  major           |   Resolution:           
 Keywords:                  |  
----------------------------+-----------------------------------------------
Changes (by arena):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 Replying to [comment:4 ryan]:
 > If your page registers columns with "manage_$pagehook_columns" screen
 meta should now recognize it.



 From 2.7beta3

 1) Sorry, i don't get it, here is the beginning of screen_meta :

 {{{
 $column_screens = array('edit' => 'post', 'edit-pages' => 'page', 'edit-
 tags' => 'tag', 'categories' => 'category', 'edit-link-categories' =>
 'link-category', 'link-manager' => 'link', 'users' => 'user', 'upload' =>
 'media', 'edit-comments' => 'comment');

         $screen = str_replace('-new', '', $screen);
         $screen = str_replace('-add', '', $screen);
         $meta_screens = array('index' => 'dashboard');

         if ( isset($meta_screens[$screen]) )
                 $screen = $meta_screens[$screen];
         $show_screen = false;
         if ( !empty($wp_meta_boxes[$screen]) ||
 !empty($column_screens[$screen]) )
                 $show_screen = true;
 }}}

 so how $column_screens can have my page hook ?

 2) The other problem is that pagehook value varies
   . if you have your own top menu or not ...
   . if your page is (due to role and capabilities) in first place as a
 submenu or not (toplevel) ...
   . if it is translated ... (page name)

 3) btw in admin-header in the following code :


 {{{
 $hook_suffix = '';
 if ( isset($page_hook) )
         $hook_suffix = "$page_hook";
 else if ( isset($plugin_page) )
         $hook_suffix = "$plugin_page";
 else if ( isset($pagenow) )
         $hook_suffix = "$pagenow";
 }}}



 else if ( isset($plugin_page) ) is never reached because in admin.php you
 have this code :


 {{{
 if (isset($plugin_page)) {
         if( ! $page_hook = get_plugin_page_hook($plugin_page, $pagenow) )
 {
                 $page_hook = get_plugin_page_hook($plugin_page,
 $plugin_page);
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8246#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list