Changeset 2898 for trunk/wp-includes/capabilities.php
- Timestamp:
- 09/20/2005 11:48:28 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r2851 r2898 23 23 } 24 24 25 function add_role($role, $capabilities, $display_name) { 25 function add_role($role, $display_name, $capabilities = '') { 26 if ( isset($this->roles[$role]) ) 27 return; 28 26 29 $this->roles[$role] = array('name' => $display_name, 27 30 'capabilities' => $capabilities); … … 42 45 } 43 46 44 function add_cap($role, $cap, $grant ) {47 function add_cap($role, $cap, $grant = true) { 45 48 $this->roles[$role]['capabilities'][$cap] = $grant; 46 49 update_option($this->role_key, $this->roles); … … 78 81 } 79 82 80 function add_cap($cap, $grant ) {83 function add_cap($cap, $grant = true) { 81 84 global $wp_roles; 82 85
Note: See TracChangeset
for help on using the changeset viewer.