On latest wp version
]]>Hi,
On line 178, get_current_screen() function undefined.
tried to insert this code and it works.
if ( function_exists( ‘get_current_screen’ ) )
$screen = get_current_screen();
would this cause any issue with the plugin?
]]>How should the user slug be written for a user with the username” Test User”?
Also, I created “Test User” as a 2nd Admin and then added this code to the child theme functions file:
if (is_admin()) {
// Make sure plugin is active
if (class_exists(‘\GlobalMetaBoxOrder\Config’)) {
// Make a long name short.
class_alias(‘\GlobalMetaBoxOrder\Config’, ‘MetaBoxConfig’);
// Settings
MetaBoxConfig::$filter = array(‘post’, ‘dashboard’); // default
MetaBoxConfig::$include_cpts = true; // default
MetaBoxConfig::$getBlueprintUserId = function () {
$user = get_user_by(‘slug’, ‘Test User’);
return $user ? $user->ID : false;
};
MetaBoxConfig::$exclude = array(‘acme_product’);
MetaBoxConfig::$remove_screen_options = true;
MetaBoxConfig::$lock_meta_box_order = true;
}
}
I have a lot of users and when I switched to a few of the Post Edit pages, I noticed that:
1. the meta boxes are not displaying in the order I setup as the “Test User” Admin.
2. the Screen Options box was still visible
3. the metaboxes were all still unlocked.
Can you provide help with why this may be happening. Thanks!
]]>Hello, please add a extra check on line 173 if the current request is a ajax request. Something like this: if ( is_ajax() ) { return false; }
The get_current_screen() function only works if it’s not a ajax request. ??
Thanks!
Thomas
The plugin seems to be working in that the metaboxes I want are showing and those I don’t want are not, but the blueprint user (admin) has a 1 column layout but the other users do not? Am I missing something? Is there a way to “force” a 1 column layout through the functions.php modifications?
Thank you
]]>HI There,
Your plugin works great but an editor ( or another role ) cant upload a featured image.
Hope you have a solution for this prob because this is a great plugin..
hope to here you
thanks
rick
]]>Parse error: syntax error, unexpected T_STRING in /home4/ebayrevi/public_html/secondchance/wp-content/plugins/global-meta-box-order/index.php on line 27