فهرست منبع

Adding admin.php file

Now you can control the Wordpress admin area with it's own file.
eddiemachado 14 سال پیش
والد
کامیت
534d63cc92
1فایلهای تغییر یافته به همراه39 افزوده شده و 0 حذف شده
  1. 39 0
      library/admin.php

+ 39 - 0
library/admin.php

@@ -0,0 +1,39 @@
+<?php
+/* 
+This file handles the admin area and functions.
+You can use this file to make changes to the
+dashboard. Updates to this page are coming soon.
+It's turned off by default, but you can call it
+via the functions file.
+
+Developed by: Eddie Machado
+URL: http://themble.com/bones/
+*/
+
+/************* DASHBOARD WIDGETS *****************/
+
+// disable default dashboard widgets
+function disable_default_dashboard_widgets() {
+	// remove_meta_box('dashboard_right_now', 'dashboard', 'core');    // Right Now Widget
+	remove_meta_box('dashboard_recent_comments', 'dashboard', 'core'); // Comments Widget
+	remove_meta_box('dashboard_incoming_links', 'dashboard', 'core');  // Incoming Links Widget
+	remove_meta_box('dashboard_plugins', 'dashboard', 'core');         // Plugins Widget
+
+	// remove_meta_box('dashboard_quick_press', 'dashboard', 'core');  // Quick Press Widget
+	remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core');   // Recent Drafts Widget
+	remove_meta_box('dashboard_primary', 'dashboard', 'core');         // 
+	remove_meta_box('dashboard_secondary', 'dashboard', 'core');       //
+	
+	/* plugin dashboard boxes */
+	remove_meta_box('yoast_db_widget', 'dashboard', 'normal');         // Yoast's SEO Plugin Widget
+	
+	/* 
+	have more plugin widgets you'd like to remove? 
+	share them with us so we can get a list of 
+	the most commonly used. :D
+	https://github.com/eddiemachado/bones/issues
+	*/
+}
+
+// removing the dashboard widgets
+add_action('admin_menu', 'disable_default_dashboard_widgets');