Yoast\WP\SEO\Actions

Alert_Dismissal_Action::all_dismissed()publicYoast 1.0

Returns an object with all alerts dismissed by current user.

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

Хуков нет.

Возвращает

Массив|false. An array with the keys of all Alerts that have been dismissed by the current user or false.

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

$Alert_Dismissal_Action = new Alert_Dismissal_Action();
$Alert_Dismissal_Action->all_dismissed();

Код Alert_Dismissal_Action::all_dismissed() Yoast 19.11

public function all_dismissed() {
	$user_id = $this->user->get_current_user_id();
	if ( $user_id === 0 ) {
		return false;
	}

	$dismissed_alerts = $this->get_dismissed_alerts( $user_id );
	if ( $dismissed_alerts === false ) {
		return false;
	}

	return $dismissed_alerts;
}