[wp-hackers] screen_meta and 2.7beta3
andré renaut
andre.renaut at gmail.com
Tue Nov 18 18:40:59 GMT 2008
Hi,
i am still struggling to add the screen options to my plugin pages.
So i manage to get the $page_hook everywhere i needed it. even in javascript
to post to admin-ajax the right values but ....
the $page_hook is that type : toto_page_xyz
and in admin-ajax.php there is this :
case 'closed-postboxes' :
check_ajax_referer( 'closedpostboxes', 'closedpostboxesnonce' );
$closed = isset( $_POST['closed'] )? $_POST['closed'] : '';
$closed = explode( ',', $_POST['closed'] );
$hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : '';
$hidden = explode( ',', $_POST['hidden'] );
$page = isset( $_POST['page'] )? $_POST['page'] : '';
* if ( !preg_match( '/^[a-z-]+$/', $page ) ) {
die(-1);
}*
$current_user = wp_get_current_user();
if ( is_array($closed) )
update_usermeta($current_user->ID, 'closedpostboxes_'.$page,
$closed);
if ( is_array($hidden) )
update_usermeta($current_user->ID, 'meta-box-hidden_'.$page,
$hidden);
break;
so no chance to have my indivudual settings for a metabox or a column to be
saved ...
any ideas ?
More information about the wp-hackers
mailing list