Yoast\WP\SEO\Alerts\Application\Ping_Other_Admins

Ping_Other_Admins_Alert::has_user_installed_yoastprivateYoast 1.0

Returns whether user has installed Yoast SEO themselves.

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

Хуков нет.

Возвращает

true|false. 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 27.7

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;
}