Changeset 1379125
- Timestamp:
- 03/26/2016 01:11:24 AM (10 years ago)
- Location:
- hide-noisy-metaboxes/trunk
- Files:
-
- 2 edited
-
hide-noisy-metaboxes.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hide-noisy-metaboxes/trunk/hide-noisy-metaboxes.php
r664053 r1379125 1 <?php 2 /* 3 Plugin Name: Hide Noisy Metaboxes 4 Plugin URI: http://aaronjholbrook.com 5 Description: Hides noisy metaboxes from Dashboard for User 1. Generally used by Developers during site development, cuts down on load time and annoyances from dashboard widgets. 6 Version: 1.0 7 Author: Aaron Holbrook 8 Author URI: http://aaronjholbrook.com 9 License: GPLv2 10 Copyright 2013 Aaron Holbrook (email : [email protected], twitter : @aaronjholbrook) 11 */ 12 1 <?php 2 /** 3 * Plugin Name: Hide Noisy Metaboxes 4 * Plugin URI: http://aaronjholbrook.com 5 * Description: Hides noisy metaboxes from Dashboard for User 1. Generally used by Developers during site development, cuts down on load time and annoyances from dashboard widgets. 6 * Version: 1.0.1 7 * Author: Aaron Holbrook 8 * Author URI: http://aaronjholbrook.com 9 * License: GPLv2 10 * Copyright 2013 Aaron Holbrook 11 */ 13 12 14 13 /** … … 17 16 add_action( 'admin_init', 'hide_noisy_metaboxes' ); 18 17 function hide_noisy_metaboxes() { 19 // Only run this once - allow user to modify metaboxes if desired 20 if ( get_user_option( 'metaboxhidden_dashboard_noisy_runonce', 1) != true ) { 21 $hidden = array( 22 'dashboard_primary', 23 'dashboard_recent_comments', 24 'dashboard_incoming_links', 25 'dashboard_plugins', 26 'dashboard_recent_drafts', 27 'dashboard_secondary' 28 ); 29 update_user_option( 1, 'metaboxhidden_dashboard', $hidden, true ); 30 update_user_option( 1, 'metaboxhidden_dashboard_noisy_runonce', true, true ); 31 update_user_option( 1, 'show_welcome_panel', 0, true ); 32 } 18 // Only run this once - allow user to modify metaboxes if desired 19 if ( get_user_option( 'metaboxhidden_dashboard_noisy_runonce', 1 ) != true ) { 20 $hidden = array( 21 'dashboard_primary', 22 'dashboard_recent_comments', 23 'dashboard_incoming_links', 24 'dashboard_plugins', 25 'dashboard_recent_drafts', 26 'dashboard_secondary' 27 ); 28 29 update_user_option( 1, 'metaboxhidden_dashboard', $hidden, true ); 30 update_user_option( 1, 'metaboxhidden_dashboard_noisy_runonce', true, true ); 31 update_user_option( 1, 'show_welcome_panel', 0, true ); 32 } 33 33 } 34 34 -
hide-noisy-metaboxes/trunk/readme.txt
r664054 r1379125 1 1 === Hide Noisy Metaboxes === 2 2 Contributors: aaronholbrook 3 Donate link:4 3 Tags: clutter, clean, remove-cruft 5 4 Requires at least: 3.3 6 Tested up to: 3.47 Stable tag: 1.0 5 Tested up to: 4.4.2 6 Stable tag: 1.0.1 8 7 License: GPLv2 or later 9 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 23 22 == Changelog == 24 23 24 1.0.1 - Code cleanup and testing on 4.4.2 25 25 1.0 - Initial release
Note: See TracChangeset
for help on using the changeset viewer.