wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_destroy_other_sessions › WordPress Function

Since4.0.0
已弃用n/a
wp_destroy_other_sessions ( 没有参数 )
定义在:
文档:

Removes all but the current session token for the current user for the database.



源码

function wp_destroy_other_sessions() {
	$token = wp_get_session_token();
	if ( $token ) {
		$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
		$manager->destroy_others( $token );
	}
}