Changeset 1470380
- Timestamp:
- 08/08/2016 11:29:06 PM (10 years ago)
- Location:
- toggle-meta-boxes-sitewide/trunk
- Files:
-
- 2 edited
-
ds_wp3_toggle_meta_boxes.php (modified) (6 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
toggle-meta-boxes-sitewide/trunk/ds_wp3_toggle_meta_boxes.php
r862065 r1470380 3 3 Plugin Name: Toggle Meta Boxes Sitewide 4 4 Plugin URI: http://wordpress.org/extend/plugins/toggle-meta-boxes-sitewide/ 5 Version: 3.8.1.16 Description: WP 3.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.5 Version: 4.6 6 Description: 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. 7 7 Author: D Sader 8 8 Author URI: http://dsader.snowotherway.org … … 21 21 */ 22 22 23 class ds_meta {23 class DS_Meta { 24 24 var $l10n_prefix; 25 25 26 function ds_meta() {26 function __construct() { 27 27 $this->l10n_prefix = 'toggle-meta-boxes-sitewide'; 28 28 … … 30 30 //---Hooks----------------------------------------------------------------// 31 31 //------------------------------------------------------------------------// 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 metaboxes35 add_action( 'admin_head', array( &$this, 'ds_extras_remove' )); // toggle some extras36 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 Restricition39 add_filter( 'map_meta_cap', array( &$this, 'ds_network_admin_restrict_comment_editing'), 10, 4 ); //Comment Editing Restricitons40 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: TODO32 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 42 42 43 }43 } 44 44 45 45 46 46 function ds_localization_init() { 47 // Localization toggle-meta-boxes-sitewide-es_ES.po48 // load_plugin_textdomain( 'toggle-meta-boxes-sitewide', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );49 47 50 48 load_plugin_textdomain( … … 56 54 57 55 function ds_nav_menu_manage_columns($array) { 58 //I want these advanced link properties hidden, better than this59 56 $menu_perms = get_site_option( "menu_items" ); 60 57 if( isset($menu_perms[ 'nav_menu_links_adv' ]) ) { 61 58 62 63 59 $array = array( 64 60 '_title' => __('Show advanced menu properties'), … … 69 65 'description' => __('Description'), 70 66 ); 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 } 78 70 79 71 … … 404 396 } 405 397 } 406 if (class_exists("ds_meta")) { 407 $ds_meta = new ds_meta(); 408 } 398 new DS_Meta(); 409 399 ?> -
toggle-meta-boxes-sitewide/trunk/readme.txt
r1470276 r1470380 38 38 39 39 == Changelog == 40 = 3.8.1.1=41 * Tested up to: WP 3.8.1, localization ready, comment editing fix40 = 4.6 = 41 * WP 4.6 tests OK, cleanup php notices 42 42 43 43 == Upgrade Notice == 44 = 3.8.1.1 =45 * Tested up to: WP 3.8.1, localization ready, comment editing fix44 = 4.6 = 45 * WP 4.6 tests OK, cleanup php notices
Note: See TracChangeset
for help on using the changeset viewer.