[wp-hackers] Re: 2.8 Changes in meta boxes ?

Andrew Ozz admin at laptoptips.ca
Wed May 6 18:05:47 GMT 2009


Malaiac wrote:
> Besides, I have to switch the admin url
> from wp-admin/admin.php?page=zelist/admin/link.php
> to wp-admin/admin.php?page=zelist/admin/link.php&noheader=1
> in order to have the meta boxes loaded before the screen_meta is called
> 
> Is there a way to force them to appear on every proper page ?
> They are added with
> add_meta_box('linkcategorydiv', __('Categories'),
> 'link_categories_meta_box', 'link', 'side', 'core');
> add_meta_box('tagsdiv', __('Tags'), 'link_tags_meta_box', 'link', 'side',
> 'core'); (yes tags for links, why not ? :) )
> etc.

So you're adding them on a custom plugin page 
(admin.php?page=zelist/admin/link.php), not on the wp-admin/link.php. 
The user prefs for column, open/closed and hidden for each metabox are 
stored according to the page they are on. Think you have to init them 
with the proper page as the 4th argument in add_meta_box().

Perhaps have a look at meta_box_prefs() and screen_meta() in 
wp-admin/includes/template.php.


More information about the wp-hackers mailing list