Changeset 1709204
- Timestamp:
- 08/06/2017 07:13:59 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin-notices-for-team/trunk/admin/class-ant_admin_notices_team-admin.php
r1709121 r1709204 179 179 public function add_users_caps() { 180 180 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 190 193 191 194 // gets the Editor role … … 200 203 $editor->add_cap('edit_published_notices'); 201 204 $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' ); 202 221 203 222 } … … 1480 1499 1481 1500 if ( 1482 ($authorOptions == '' && $authorOptionGroups == '' && in_array("", $authorCustomGroups)) || 1501 ($authorOptions == '' && $authorOptionGroups == '') || 1502 (in_array("", $authorCustomGroups)) || 1483 1503 ($authorOptions == $current_user->display_name) || 1484 1504 ( isset($authorOptionGroups) && in_array($current_user->display_name, $authorOptionGroups) ) ||
Note: See TracChangeset
for help on using the changeset viewer.