クラス WP_Roles::remove_role()
2014/12/11
WP_Roles::remove_role()
定義ファイル :/blog/wp-includes/capabilities.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | public function remove_role( $role ) { if ( ! isset( $this->role_objects[$role] ) ) return; unset( $this->role_objects[$role] ); unset( $this->role_names[$role] ); unset( $this->roles[$role] ); if ( $this->use_db ) update_option( $this->role_key, $this->roles ); if ( get_option( 'default_role' ) == $role ) update_option( 'default_role', 'subscriber' ); } |