Yoast\WP\SEO\Integrations\Watchers
Auto_Update_Watcher::save_dismissal_status() protected Yoast 1.0
Saves the dismissal status of the notification in an option in wp_usermeta, if the notification gets dismissed.
{} Это метод класса: Auto_Update_Watcher{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->save_dismissal_status();
Код Auto_Update_Watcher::save_dismissal_status() Auto Update Watcher::save dismissal status Yoast 16.1.1
protected function save_dismissal_status() {
// This option exists if the notification has been dismissed at some point.
$notification_dismissed = \get_user_option( 'wp_' . self::NOTIFICATION_ID );
// We wish to have its value in a different option, so we can still access it even when the notification gets removed.
if ( $notification_dismissed && ! \get_user_option( 'wp_' . self::NOTIFICATION_ID . '_dismissed' ) ) {
\update_user_option( \get_current_user_id(), self::NOTIFICATION_ID . '_dismissed', true );
}
}