function Y_add_admin_page(){
add_menu_page(\'Y-07 Theme Options\',\'Y-07\',\'mange_options\',\'y-admin\',\'Y_admin_create\',\'\',110);
}
add_action(\'admin_menu\',\'Y_add_admin_page\');
我使用了is\\u admin函数,即使我是管理员,它也返回false
最合适的回答,由SO网友:kamleshpal 整理而成
Please try this
add_action(\'admin_menu\',\'Y_add_admin_page\');
function Y_add_admin_page(){
add_menu_page(
\'Y-07 Theme Options\'
, \'Y-07\'
, \'manage_options\'
, \'y-admin\'
, \'Y_admin_create\'
, \'\'
, 110
);
}