Yoast\WP\SEO\Actions\Configuration

First_Time_Configuration_Action::check_capability()publicYoast 1.0

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

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

Хуков нет.

Возвращает

Объект. The response object.

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

$First_Time_Configuration_Action = new First_Time_Configuration_Action();
$First_Time_Configuration_Action->check_capability( $user_id );
$user_id(int) (обязательный)
The id of the user to be edited.

Код First_Time_Configuration_Action::check_capability() Yoast 19.2

public function check_capability( $user_id ) {
	if ( $this->social_profiles_helper->can_edit_profile( $user_id ) ) {
		return (object) [
			'success' => true,
			'status'  => 200,
		];
	}

	return (object) [
		'success' => false,
		'status'  => 403,
	];
}