admin管理员组文章数量:1026373
I am currently hiding the screen options tab on a post edit screen with this function...
add_filter('screen_options_show_screen', 'remove_screen_options');
function remove_screen_options(){
return current_user_can( 'manage_options' );
}
This is working well, but if somebody has previously disabled a screen option then it is missing and they have no way of bringing it back.
Is there a way to force all screen options to be checked for all users?
I am currently hiding the screen options tab on a post edit screen with this function...
add_filter('screen_options_show_screen', 'remove_screen_options');
function remove_screen_options(){
return current_user_can( 'manage_options' );
}
This is working well, but if somebody has previously disabled a screen option then it is missing and they have no way of bringing it back.
Is there a way to force all screen options to be checked for all users?
Share Improve this question asked Mar 28, 2019 at 11:43 fightstarr20fightstarr20 1,1358 gold badges26 silver badges47 bronze badges1 Answer
Reset to default 1These are only hidden via CSS, so enqueing your own admin CSS via admin_enqueue_scripts
hook to display them should fix it.
body.js.wp-admin.wp-core-ui #wpbody .hide-if-js {
display: block;
}
I am currently hiding the screen options tab on a post edit screen with this function...
add_filter('screen_options_show_screen', 'remove_screen_options');
function remove_screen_options(){
return current_user_can( 'manage_options' );
}
This is working well, but if somebody has previously disabled a screen option then it is missing and they have no way of bringing it back.
Is there a way to force all screen options to be checked for all users?
I am currently hiding the screen options tab on a post edit screen with this function...
add_filter('screen_options_show_screen', 'remove_screen_options');
function remove_screen_options(){
return current_user_can( 'manage_options' );
}
This is working well, but if somebody has previously disabled a screen option then it is missing and they have no way of bringing it back.
Is there a way to force all screen options to be checked for all users?
Share Improve this question asked Mar 28, 2019 at 11:43 fightstarr20fightstarr20 1,1358 gold badges26 silver badges47 bronze badges1 Answer
Reset to default 1These are only hidden via CSS, so enqueing your own admin CSS via admin_enqueue_scripts
hook to display them should fix it.
body.js.wp-admin.wp-core-ui #wpbody .hide-if-js {
display: block;
}
本文标签: Enable all Screen Options by default
版权声明:本文标题:Enable all Screen Options by default 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745649655a2161238.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论