删除WordPress仪表盘
如果想删除WordPress仪表盘,可以将下面的代码添加到您的当前主题的 functions.php 文件: …
如果想删除WordPress仪表盘,可以将下面的代码添加到您的当前主题的 functions.php 文件:
- function disable_dashboard_widgets() {
- global $wp_meta_boxes;
- // wp..
- unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_activity’]);
- unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_right_now’]);
- unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_recent_comments’]);
- unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_incoming_links’]);
- unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_plugins’]);
- unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_primary’]);
- unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_secondary’]);
- unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_quick_press’]);
- unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_recent_drafts’]);
- }
- add_action(‘wp_dashboard_setup’, ‘disable_dashboard_widgets’, 999);
类别:WordPress入门、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!