Yoast_Dismissable_Notice_Ajax::save_dismissed()privateYoast 1.0

Storing the dismissed value in the database. The target location is based on the set notification type.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Код Yoast_Dismissable_Notice_Ajax::save_dismissed() Yoast 22.4

private function save_dismissed() {
	if ( $this->notice_type === self::FOR_SITE ) {
		update_option( 'wpseo_dismiss_' . $this->notice_name, 1 );

		return;
	}

	if ( $this->notice_type === self::FOR_NETWORK ) {
		update_site_option( 'wpseo_dismiss_' . $this->notice_name, 1 );

		return;
	}

	update_user_meta( get_current_user_id(), 'wpseo_dismiss_' . $this->notice_name, 1 );
}