Yoast\WP\SEO\Alerts\Application\Ping_Other_Admins

Ping_Other_Admins_Alert::has_user_installed_yoast │ private │ Yoast 1.0

Returns whether user has installed Yoast SEO themselves.

Метод класса: Ping_Other_Admins_Alert{}

Хуков нет.

Возвращает

bool. Whether the user has installed Yoast SEO themselves.

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

// private - только в коде основоного (родительского) класса
$result = $this->has_user_installed_yoast(): bool;

Код Ping_Other_Admins_Alert::has_user_installed_yoast() Yoast 28.9

private function has_user_installed_yoast(): bool {
	$first_activated_by = $this->options_helper->get( 'first_activated_by', 0 );

	if ( $first_activated_by === 0 ) {
		return true; // We cannot be sure, so we assume they did.
	}

	if ( \get_current_user_id() === $first_activated_by ) {
		return true;
	}

	return false;
}