Plugin Directory

Changeset 1379125


Ignore:
Timestamp:
03/26/2016 01:11:24 AM (10 years ago)
Author:
aaronholbrook
Message:

Code formatting, cleanup

Location:
hide-noisy-metaboxes/trunk
Files:
2 edited

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 */
    1312
    1413/**
     
    1716add_action( 'admin_init', 'hide_noisy_metaboxes' );
    1817function 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    }
    3333}
    3434
  • hide-noisy-metaboxes/trunk/readme.txt

    r664054 r1379125  
    11=== Hide Noisy Metaboxes ===
    22Contributors: aaronholbrook
    3 Donate link:
    43Tags: clutter, clean, remove-cruft
    54Requires at least: 3.3
    6 Tested up to: 3.4
    7 Stable tag: 1.0
     5Tested up to: 4.4.2
     6Stable tag: 1.0.1
    87License: GPLv2 or later
    98License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2322== Changelog ==
    2423
     241.0.1 - Code cleanup and testing on 4.4.2
    25251.0 - Initial release
Note: See TracChangeset for help on using the changeset viewer.