mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 22:57:20 +00:00
Use API to set the user's role. see #11781
git-svn-id: https://develop.svn.wordpress.org/trunk@12770 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -508,11 +508,16 @@ class WP_User {
|
||||
* used.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param string $cap_key Optional capability key
|
||||
* @access protected
|
||||
*/
|
||||
function _init_caps() {
|
||||
function _init_caps( $cap_key = '' ) {
|
||||
global $wpdb;
|
||||
$this->cap_key = $wpdb->prefix . 'capabilities';
|
||||
if ( empty($cap_key) )
|
||||
$this->cap_key = $wpdb->prefix . 'capabilities';
|
||||
else
|
||||
$this->cap_key = $cap_key;
|
||||
$this->caps = &$this->{$this->cap_key};
|
||||
if ( ! is_array( $this->caps ) )
|
||||
$this->caps = array();
|
||||
|
||||
Reference in New Issue
Block a user