Plugin Directory

Changeset 1709204


Ignore:
Timestamp:
08/06/2017 07:13:59 PM (9 years ago)
Author:
dangub86
Message:

Fix bug with meta box target authors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin-notices-for-team/trunk/admin/class-ant_admin_notices_team-admin.php

    r1709121 r1709204  
    179179    public function add_users_caps() {
    180180
    181         // gets the Author role
    182         $author = get_role( 'author' );
    183 
    184         // Allow Authors to
    185         $author->add_cap( 'read_private_notices' );
    186         $author->add_cap('publish_notices');
    187         $author->add_cap('delete_notices');
    188         $author->add_cap('edit_notices');
    189         //$author->remove_cap('edit_publi_notices');
     181        // gets the Admin role
     182        $admin = get_role( 'administrator' );
     183
     184        // Allow Admin to
     185        $admin->add_cap( 'read_private_notices' );
     186        $admin->add_cap( 'edit_private_notices' );
     187        $admin->add_cap('delete_notices');
     188        $admin->add_cap('edit_notices');
     189        $admin->add_cap('publish_notices');
     190        $admin->add_cap('edit_published_notices');
     191        $admin->add_cap('edit_others_notices');
     192
    190193
    191194        // gets the Editor role
     
    200203        $editor->add_cap('edit_published_notices');
    201204        $editor->add_cap('edit_others_notices');
     205
     206
     207        // gets the Author role
     208        $author = get_role( 'author' );
     209
     210        // Allow Authors to
     211        $author->add_cap( 'read_private_notices' );
     212        $author->add_cap('publish_notices');
     213        $author->add_cap('delete_notices');
     214        $author->add_cap('edit_notices');
     215
     216        // gets the Contributor role
     217        $contributor = get_role( 'contributor' );
     218
     219        // Allow Contributor to
     220        $contributor->add_cap( 'read_private_notices' );
    202221
    203222    }
     
    14801499
    14811500                if (
    1482                  ($authorOptions == '' && $authorOptionGroups == '' && in_array("", $authorCustomGroups)) ||
     1501                 ($authorOptions == '' && $authorOptionGroups == '') ||
     1502                 (in_array("", $authorCustomGroups)) ||
    14831503                 ($authorOptions == $current_user->display_name) ||
    14841504                 ( isset($authorOptionGroups) && in_array($current_user->display_name, $authorOptionGroups) ) ||
Note: See TracChangeset for help on using the changeset viewer.