#8246 closed defect (bug) (fixed)
screen_meta and plugins and columns and 2.7beta3 ???
Reported by: | arena | Owned by: | |
---|---|---|---|
Milestone: | 2.7 | Priority: | high |
Severity: | major | Version: | |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
screen_meta($screen)
3209 if ( !meta_box_prefs($screen) && isset($column_screens[$screen]) ) {
3210 manage_columns_prefs($column_screens[$screen]);
How do i set array $column_screens for my specific screen (in fact page plugin ...)
suggestion :
3189 $column_screens = apply_filters('column_screens', $column_screens, $screen);
thanks
Change History (9)
#1
in reply to:
↑ description
@
16 years ago
#2
@
16 years ago
Or another suggestion could be :
$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 => $screen);
#4
follow-up:
↓ 5
@
16 years ago
If your page registers columns with "manage_$pagehook_columns" screen meta should now recognize it.
#5
in reply to:
↑ 4
@
16 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to 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);
#6
@
16 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Beta3 doesn't have the latest changes. You need to svn update or Tools->Update. The page hook is returned when you register the hook with add_*_page().
Start a thread on wp-hackers with your questions. Trac is not a good place for plugin development discussion.
#7
@
16 years ago
ok ! so i did tweak it but now i am facing another issue :
my hook is toto_page_tata_titi
and in admin-ajax we have :
if ( !preg_match( '/[a-z-]+$/', $page ) ) {
die(-1);
}
so _ is not accepted ...
Replying to arena:
Or another suggestion could be :