User-Profile-Image
hankin
  • 5
  • 首页
  • 仓库
  • 留言
  • 免费下载v1.3.5
  • 分类
    • Yii2
    • wordpress
    • typeecho
    • server
    • qrcode
    • postgresql
    • php
    • jquery
    • javascript
    • html5
    • go
    • css3
    • coding
  • 页面
    • icon图标
    • 专题
    • 建站维护
    • 留言
    • 站点地图
  • 友链
    • 老赵茶馆
    • 淮城一只猫
    • 雨林寒舍
    • 饼子的博客
    • 轩枫阁
    • 广告联盟大事记
    • 主题笔记
    • 八方博客
    • 张维龙的个人博客
    • 瑞课学院
    • BBJ不败君
    • 悠悠吧
    • Heanny Blog
    • 资源谷
    • Yolen
Help?

Please contact us on our email for need any support

Support
    首页   ›   正文
wordpress

WordPress移除仪表盘多余模块

2018-07-10 21:56:34
1414  0 2

在后台我们不免发现有很多模块默认是开启的,导致有的人可能会觉得太杂乱。

/*WordPress移除仪表盘多余模块*/
function example_remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
}
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );
remove_action('welcome_panel', 'wp_welcome_panel');
function remove_dashboard_meta() {
remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');
}
add_action( 'admin_init', 'remove_dashboard_meta' );

如本文“对您有用”,欢迎随意打赏作者,让我们坚持创作!

2 打赏
评论 (0)

点击这里取消回复。

欢迎您 游客  

hankin
smarty_hankin主题 持续为开发者免费开源!
143文章 278评论 671点赞 164484浏览

关注公众号 回复【下载主题】
加QQ群1018841266
最新评论
+195
随机文章
PHP 2019年全球份额到底占多少?来自W3Techs的一项调查
9个月前
5款强大的密码显示/隐藏效果推荐(附源码下载)
9个月前
预警!!!PHP 远程代码执行漏洞
9个月前
PHP To Go 转型手记 (终)
1年前
php中传值与传引用的区别是什么
9个月前
我的作品




tags
css3 html5 javascript php postgresql qrcode typeecho wordpress wordpress主题 Yii2
Copyright © 2021 网站备案号: 浙ICP备20002401号
smarty_hankin 主题. Designed by hankin
主页
页面
  • icon图标
  • 专题
  • 建站维护
  • 留言
  • 站点地图
博主
hankin
hankin 管理员
博客模板_网站模板_HTML模板_博客模板网站免费下载
143 文章 278 评论 164484 浏览
测试
测试
赞赏作者

请通过微信、支付宝 APP 扫一扫

感谢您对作者的支持!

 支付宝 微信支付