Changeset 2541113
- Timestamp:
- 06/02/2021 08:53:05 AM (5 years ago)
- Location:
- editor-menu-and-widget-access
- Files:
-
- 34 added
- 5 edited
-
tags/3.1.2 (added)
-
tags/3.1.2/LICENSE (added)
-
tags/3.1.2/README.md (added)
-
tags/3.1.2/admin (added)
-
tags/3.1.2/admin/adminbar.php (added)
-
tags/3.1.2/admin/caps.php (added)
-
tags/3.1.2/admin/menus.php (added)
-
tags/3.1.2/admin/roles.php (added)
-
tags/3.1.2/editor-menu-and-widget-access.php (added)
-
tags/3.1.2/editor-menu-widget-access.php (added)
-
tags/3.1.2/lang (added)
-
tags/3.1.2/lang/en.mo (added)
-
tags/3.1.2/lang/en.po (added)
-
tags/3.1.2/lang/en_GB.mo (added)
-
tags/3.1.2/lang/en_GB.po (added)
-
tags/3.1.2/lang/en_US.mo (added)
-
tags/3.1.2/lang/en_US.po (added)
-
tags/3.1.2/lang/it.mo (added)
-
tags/3.1.2/lang/it.po (added)
-
tags/3.1.2/lang/it_IT.mo (added)
-
tags/3.1.2/lang/it_IT.po (added)
-
tags/3.1.2/messages.pot (added)
-
tags/3.1.2/options (added)
-
tags/3.1.2/options/adminbar.php (added)
-
tags/3.1.2/options/appearanceMenu.php (added)
-
tags/3.1.2/options/emwa.css (added)
-
tags/3.1.2/options/emwa.less (added)
-
tags/3.1.2/options/help.php (added)
-
tags/3.1.2/options/options.php (added)
-
tags/3.1.2/options/otherMenus.php (added)
-
tags/3.1.2/options/registerSettings.php (added)
-
tags/3.1.2/options/userRoles.php (added)
-
tags/3.1.2/readme.txt (added)
-
tags/3.1.2/screenshot-1.jpg (added)
-
trunk/README.md (modified) (1 diff)
-
trunk/admin/caps.php (modified) (2 diffs)
-
trunk/editor-menu-widget-access.php (modified) (4 diffs)
-
trunk/options/registerSettings.php (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
editor-menu-and-widget-access/trunk/README.md
r2540064 r2541113 3 3 * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YVPWSJB4SPN5N 4 4 5 Allow and control Editors' access to the Menus, Widgets and Customize areas of the Appearance menu. You can also hide custom theme options. 6 5 Allow and control Editor and Shop Manager access to the menus, widgets and appearance menu, plus other menus and adminbar items. 7 6 ## Description 8 7 -
editor-menu-and-widget-access/trunk/admin/caps.php
r2540064 r2541113 1 1 <?php if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { exit; } 2 3 function emwa_reset_caps() {4 get_role('editor') -> remove_cap('edit_theme_options');5 get_role('shop_manager') -> remove_cap('edit_theme_options');6 }7 register_deactivation_hook(__FILE__, 'emwa_reset_caps');8 2 9 3 // Remove access to Themes page. … … 35 29 $shopMan = get_role('shop_manager'); 36 30 $editor -> add_cap('edit_theme_options'); 31 37 32 if (!empty($shopMan)) { 38 33 $shopMan -> add_cap('edit_theme_options'); -
editor-menu-and-widget-access/trunk/editor-menu-widget-access.php
r2540064 r2541113 3 3 * Plugin Name: Editor Menu and Widget Access 4 4 * Plugin URI: https://wordpress.org/plugins/editor-menu-and-widget-access/ 5 * Description: Allow and control Editor s' access to the Menus, Widgets and Customize areas of the Appearance menu. You can also hide custom theme options.5 * Description: Allow and control Editor and Shop Manager access to the menus, widgets and appearance menu, plus other menus and adminbar items. 6 6 * Author: Guy Primavera 7 7 * Author URI: https://guyprimavera.com/ 8 * Version: 3.1.1 8 * Version: 3.1.2 9 * WC requires at least: 3.0.0 10 * WC tested up to: 5.3 9 11 * Text Domain: editor-menu-and-widget-access 10 12 * Domain Path: /lang … … 14 16 15 17 if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { exit; } 18 19 define( 'EMWA_PLUGIN_FILE', basename( __FILE__ ) ); 20 define( 'EMWA_PLUGIN_FULL_PATH', __FILE__ ); 16 21 17 22 include('admin/caps.php'); … … 23 28 // Plugin action links 24 29 add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'emwa_action_links'); 30 add_filter('plugin_row_meta', 'emwa_row_meta', 10, 2); 25 31 26 32 /// i18n … … 31 37 } 32 38 add_action('plugins_loaded', 'emwa_i18n_setup'); 39 40 function emwa_deactivate() { 41 $editor = get_role('editor'); 42 43 if (!empty($editor)) { 44 $editor -> remove_cap('edit_theme_options'); 45 } 46 } 47 register_deactivation_hook(__FILE__, 'emwa_deactivate'); -
editor-menu-and-widget-access/trunk/options/registerSettings.php
r2539694 r2541113 126 126 function emwa_action_links($links) { 127 127 $emwa_links[] = '<a href="' . esc_url(get_admin_url(null, 'themes.php?page=editorMenuWidgetAccess')) . '">' . __('Settings', 'editor-menu-and-widget-access') . '</a>'; 128 128 129 return array_merge($emwa_links, $links); 129 130 } 131 132 function emwa_row_meta($links, $file) { 133 if ($file == plugin_basename(dirname(EMWA_PLUGIN_FULL_PATH) .'/'.EMWA_PLUGIN_FILE)) { 134 $links[] = '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YVPWSJB4SPN5N" target="_blank">' . __('Donate', 'editor-menu-and-widget-access') . '</a>'; 135 $links[] = '<a href="https://wordpress.org/plugins/editor-menu-and-widget-access/#developers" target="_blank">' . __('Changelog', 'editor-menu-and-widget-access') . '</a>'; 136 } 137 138 return $links; 139 } -
editor-menu-and-widget-access/trunk/readme.txt
r2540064 r2541113 5 5 Requires at least: 3.0.1 6 6 Tested up to: 5.7 7 Stable tag: 3.1. 17 Stable tag: 3.1.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Allow and control Editor s' access to the WordPress Appearance menu, and hide other menus and adminbar items.11 Allow and control Editor and Shop Manager access to the menus, widgets and appearance menu, plus other menus and adminbar items. 12 12 13 13 == Description == … … 19 19 This plugin also gives access to the **Customize** submenu and other theme options, but these can be hidden through the options page at **Appearance > Editor Access** if you wish. 20 20 21 You can now select other menus to hide from Editors and Shop Managers (e.g. Custom theme or plugin options pages), as well as hiding **any elements on the Admin Bar**.21 You can also select other menus to hide from Editors and Shop Managers (e.g. custom theme or plugin options pages), as well as hiding **any elements on the Admin Bar**. 22 22 23 23 **Features** … … 63 63 64 64 == Changelog == 65 66 = 3.1.2 = 67 * Capabilities now reset on plugin deactivation. 65 68 66 69 = 3.1.1 = … … 134 137 == Upgrade Notice == 135 138 139 = 3.1.2 = 140 * Capabilities now reset on plugin deactivation. 141 136 142 = 3.1.1 = 137 143 * Bug fixed for WooCommerce shop_manager role.
Note: See TracChangeset
for help on using the changeset viewer.