Changeset 12
- Timestamp:
- 05/25/2013 10:39:47 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/handbook.php
r10 r12 22 22 } 23 23 24 static function editor_caps() { 25 return array( 26 'delete_handbook_pages', 'delete_others_handbook_pages', 27 'delete_published_handbook_pages', 'delete_private_handbook_pages', 28 'edit_private_handbook_pages', 'read_private_handbook_pages', 29 ); 30 } 31 24 32 function __construct() { 25 33 add_filter( 'user_has_cap', array( $this, 'grant_handbook_caps' ) ); … … 37 45 foreach ( self::caps() as $cap ) { 38 46 $caps[ $cap ] = true; 47 } 48 if ( current_user_can( 'edit_pages' ) ) { 49 foreach ( self::editor_caps() as $cap ) { 50 $caps[ $cap ] = true; 51 } 39 52 } 40 53 return $caps;
Note: See TracChangeset
for help on using the changeset viewer.