Plugin Directory

Changeset 1470380


Ignore:
Timestamp:
08/08/2016 11:29:06 PM (10 years ago)
Author:
dsader
Message:

WP 4.6 tests OK, cleanup php notices

Location:
toggle-meta-boxes-sitewide/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • toggle-meta-boxes-sitewide/trunk/ds_wp3_toggle_meta_boxes.php

    r862065 r1470380  
    33Plugin Name: Toggle Meta Boxes Sitewide
    44Plugin URI: http://wordpress.org/extend/plugins/toggle-meta-boxes-sitewide/
    5 Version: 3.8.1.1
    6 Description: WP3.7.1 multisite network mu-plugin. Go to Network-->Settings to "Enable Administration Meta Boxes". Meta boxes(post, page, link, and dashboard) are unchecked and disabled by default. Extra options to toggle the Quick Edit buttons, Media buttons, Screen Options and Help links. Toggle to Restrict Comment Editing to Editor+ roles. SuperAdmin comments can only be edited by a SuperAdmin.
     5Version: 4.6
     6Description: WP Multisite network plugin. Go to Network-->Settings to "Enable Administration Meta Boxes". Meta boxes(post, page, link, and dashboard) are unchecked and disabled by default. Extra options to toggle the Quick Edit buttons, Media buttons, Screen Options and Help links. Toggle to Restrict Comment Editing to Editor+ roles. SuperAdmin comments can only be edited by a SuperAdmin.
    77Author: D Sader
    88Author URI: http://dsader.snowotherway.org
     
    2121*/
    2222
    23 class ds_meta {
     23class DS_Meta {
    2424        var $l10n_prefix;
    2525
    26     function ds_meta() {
     26    function __construct() {
    2727            $this->l10n_prefix = 'toggle-meta-boxes-sitewide';
    2828
     
    3030    //---Hooks----------------------------------------------------------------//
    3131    //------------------------------------------------------------------------//
    32     add_action( 'admin_init', array(&$this, 'ds_localization_init' ));
    33     add_action( 'wpmu_options', array(&$this, 'ds_meta_box_option' )); // "Menu Settings->Enable Administration Menus->Plugins"
    34     add_action( 'admin_head', array(&$this, 'ds_toggle_meta_boxes' )); // toggle metaboxes
    35     add_action( 'admin_head', array(&$this, 'ds_extras_remove'  )); // toggle some extras
    36     add_action( 'wp_dashboard_setup', array(&$this, 'ds_remove_dashboard_widgets' ));
    37     add_action( 'wp_network_dashboard_setup', array(&$this, 'ds_remove_network_dashboard_widgets' ));
    38     add_filter( 'comment_row_actions', array(&$this, 'ds_remove_comment_edit'), 1, 2); //Comment Editing Restricition
    39     add_filter( 'map_meta_cap', array(&$this, 'ds_network_admin_restrict_comment_editing'), 10, 4 ); //Comment Editing Restricitons
    40     add_action( 'admin_head-nav-menus.php', array(&$this, 'ds_nav_menus' ));
    41 //  add_filter( 'manage_nav-menus_columns', array(&$this, 'ds_nav_menu_manage_columns'),99 ); //not working yet: TODO
     32    add_action( 'admin_init', array($this, 'ds_localization_init' ));
     33    add_action( 'wpmu_options', array($this, 'ds_meta_box_option' )); // "Menu Settings->Enable Administration Menus->Plugins"
     34    add_action( 'admin_head', array($this, 'ds_toggle_meta_boxes' )); // toggle metaboxes
     35    add_action( 'admin_head', array($this, 'ds_extras_remove'  )); // toggle some extras
     36    add_action( 'wp_dashboard_setup', array($this, 'ds_remove_dashboard_widgets' ));
     37    add_action( 'wp_network_dashboard_setup', array($this, 'ds_remove_network_dashboard_widgets' ));
     38    add_filter( 'comment_row_actions', array($this, 'ds_remove_comment_edit'), 1, 2); //Comment Editing Restricition
     39    add_filter( 'map_meta_cap', array($this, 'ds_network_admin_restrict_comment_editing'), 10, 4 ); //Comment Editing Restricitons
     40    add_action( 'admin_head-nav-menus.php', array($this, 'ds_nav_menus' ));
     41    //add_filter( 'manage_nav-menus_columns', array($this, 'ds_nav_menu_manage_columns'),99 ); //not working yet: TODO
    4242   
    43 }
     43    }
    4444
    4545
    4646    function ds_localization_init() {
    47         // Localization toggle-meta-boxes-sitewide-es_ES.po
    48 //      load_plugin_textdomain( 'toggle-meta-boxes-sitewide', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    4947
    5048                load_plugin_textdomain(
     
    5654
    5755    function ds_nav_menu_manage_columns($array) {
    58         //I want these advanced link properties hidden, better than this
    5956        $menu_perms = get_site_option( "menu_items" );
    6057        if( isset($menu_perms[ 'nav_menu_links_adv' ]) ) {
    6158
    62    
    6359        $array = array(
    6460            '_title' => __('Show advanced menu properties'),
     
    6965            'description' => __('Description'),
    7066        );
    71 //          $user = wp_get_current_user();
    72 //          update_user_option($user->ID, 'managenav-menuscolumnshidden',
    73 //          array( 0 => 'link-target', 1 => 'css-classes', 2 => 'xfn', 3 => 'description', ), true);
    74 
    75     return $array;
    76     }
    77 }
     67        return $array;
     68        }
     69    }
    7870
    7971
     
    404396}
    405397}
    406 if (class_exists("ds_meta")) {
    407     $ds_meta = new ds_meta();   
    408 }
     398new DS_Meta(); 
    409399?>
  • toggle-meta-boxes-sitewide/trunk/readme.txt

    r1470276 r1470380  
    3838
    3939== Changelog ==
    40 = 3.8.1.1 =
    41 * Tested up to: WP 3.8.1, localization ready, comment editing fix
     40= 4.6 =
     41* WP 4.6 tests OK, cleanup php notices
    4242
    4343== Upgrade Notice ==
    44 = 3.8.1.1 =
    45 * Tested up to: WP 3.8.1, localization ready, comment editing fix
     44= 4.6 =
     45* WP 4.6 tests OK, cleanup php notices
Note: See TracChangeset for help on using the changeset viewer.