admin管理员组文章数量:1414900
I want to restrict all admin pages except theme customise. I am wp_set_auth_cookie()
for auto login. I don't need any other admin pages.
I write code in my plugin
add_action( 'wp_loaded', 'my_theme_customization' );
function my_theme_customization()
{
global $pagenow;
if ($pagenow !== 'customize.php' && is_admin()) {
header('Location:' . site_url());
exit;
}
}
But I am not able publish with what I changed. Is there any other way to do this? Thanks in advance
本文标签: Is it possible to restrict all admin pages except theme customisation and storefront using plugin
版权声明:本文标题:Is it possible to restrict all admin pages except theme customisation and storefront using plugin? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745155332a2645136.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论