• Resolved berkeleypa

    (@berkeleypa)


    Hi there,
    I have More Fields installed and working nicely, however just discovered that the field group I created appears for all User Roles, not just the ones I checked. We have 4 user roles ranging from Contributor to Administrator, and don’t want all of them to be able to edit the settings in the More Fields box.
    Any help would be appreciated – thanks in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter berkeleypa

    (@berkeleypa)

    If anyone is interested I was able to fix this by replacing the following line of code in more-fields-object.php:

    if (!current_user_can($capability)) continue;

    with this:

    $user = wp_get_current_user();
    $userrole = $user->roles[0];
    if (!in_array( $userrole, $box['more_access_cap'])) continue;
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: More Fields] User Role Access settings not working’ is closed to new replies.