Yoast\WP\SEO\Routes

First_Time_Configuration_Route::can_edit_user()publicYoast 1.0

Checks if the current user has the capability to edit a specific user.

{} Это метод класса: First_Time_Configuration_Route{}

Хуков нет.

Возвращает

true|false.

Использование

$First_Time_Configuration_Route = new First_Time_Configuration_Route();
$First_Time_Configuration_Route->can_edit_user( $request );
$request(WP_REST_Request) (обязательный)
The request.

Код First_Time_Configuration_Route::can_edit_user() Yoast 19.2

public function can_edit_user( WP_REST_Request $request ) {
	$response = $this->first_time_configuration_action->check_capability( $request->get_param( 'user_id' ) );
	return $response->success;
}