Plugin Directory

Changeset 2540064


Ignore:
Timestamp:
05/31/2021 08:55:58 AM (5 years ago)
Author:
GuyPrimavera
Message:

Bug fixed for shop_manager role

Location:
editor-menu-and-widget-access
Files:
34 added
5 edited

Legend:

Unmodified
Added
Removed
  • editor-menu-and-widget-access/trunk/README.md

    r2539694 r2540064  
    11# Editor Menu and Widget Access
    2 * Contributors: GuyPrimavera, designbymito
     2* Contributors: GuyPrimavera
    33* Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YVPWSJB4SPN5N
    44
  • editor-menu-and-widget-access/trunk/admin/caps.php

    r2539694 r2540064  
    3535    $shopMan = get_role('shop_manager');
    3636    $editor -> add_cap('edit_theme_options');
    37     $shopMan -> add_cap('edit_theme_options');
     37    if (!empty($shopMan)) {
     38      $shopMan -> add_cap('edit_theme_options');
     39    }
    3840
    3941    foreach ($caps as $cap) {
  • editor-menu-and-widget-access/trunk/admin/roles.php

    r2539694 r2540064  
    55  $userRoles = get_option('emwa_roles');
    66  $roleString = get_option('emwa_role_string');
     7  $shopMan = get_role('shop_manager');
    78
    89  if (empty($userRoles)) {
    9     $userRoles = array (
    10       'editor' => 1,
    11       'shop_manager' => 1
    12     );
     10    if (!empty($shopMan)) {
     11      $userRoles = array (
     12        'editor' => 1,
     13        'shop_manager' => 1
     14      );
     15    } else {
     16      $userRoles = array (
     17        'editor' => 1
     18      );
     19    }
    1320  }
    1421
  • editor-menu-and-widget-access/trunk/editor-menu-widget-access.php

    r2539694 r2540064  
    66 * Author: Guy Primavera
    77 * Author URI: https://guyprimavera.com/
    8  * Version: 3.1
     8 * Version: 3.1.1
    99 * Text Domain: editor-menu-and-widget-access
    1010 * Domain Path: /lang
  • editor-menu-and-widget-access/trunk/readme.txt

    r2539694 r2540064  
    44Tags: widgets, widget, appearance, menus, menu, navigation, navigation menu, nav menu, admin, editor, editors, shop manager, woocommerce, users, wp-admin, theme options, options, customize, customise, wordpress, plugin
    55Requires at least: 3.0.1
    6 Tested up to: 5.7.2
    7 Stable tag: 3.1
     6Tested up to: 5.7
     7Stable tag: 3.1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6363
    6464== Changelog ==
     65
     66= 3.1.1 =
     67* Bug fixed for WooCommerce shop_manager role.
    6568
    6669= 3.1 =
     
    131134== Upgrade Notice ==
    132135
     136= 3.1.1 =
     137* Bug fixed for WooCommerce shop_manager role.
     138
    133139= 3.1 =
    134140Code refactor and bug fixes.
Note: See TracChangeset for help on using the changeset viewer.