将以下内容放入functions.php
:
if (is_admin() && ! current_user_can(\'install_plugins\')) {
add_action(\'admin_init\', \'remove_slidedeck_menu_page\');
add_action(\'admin_footer\', \'remove_slidedeck_media_button\');
}
// remove the menu page
function remove_slidedeck_menu_page() {
remove_menu_page(\'slidedeck2-lite.php\');
}
// remove the button
function remove_slidedeck_media_button() {
echo <<<JQUERY
<script>
jQuery(document).ready(function($) {
$(\'#add_slidedeck\').remove();
});
</script>
JQUERY;
}
Note: 我
did 对此进行测试。如果有些事情对你不起作用,请反馈。如果有,请也回来(投票赞成/接受)。)
// EDIT: 菜单页现在正在工作。
// EDIT 2: 还有按钮。