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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745155333a4614085.html
评论列表(0条)