クラス WP_User::remove_role()
2014/12/11
WP_User::remove_role()
定義ファイル :/blog/wp-includes/capabilities.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | /** * Remove role from user. * * @since 2.0.0 * @access public * * @param string $role Role name. */ public function remove_role( $role ) { if ( !in_array($role, $this->roles) ) return; unset( $this->caps[$role] ); update_user_meta( $this->ID, $this->cap_key, $this->caps ); $this->get_role_caps(); $this->update_user_level_from_caps(); } |