Yoast\WP\SEO\Alerts\Application\Indexables_Disabled

Indexables_Disabled_Alert::add_notificationspublicYoast 1.0

Adds or removes notification based on whether indexables are disabled.

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

Хуков нет.

Возвращает

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

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

$Indexables_Disabled_Alert = new Indexables_Disabled_Alert();
$Indexables_Disabled_Alert->add_notifications();

Код Indexables_Disabled_Alert::add_notifications() Yoast 27.7

public function add_notifications() {
	if ( $this->indexable_helper->should_index_indexables() ) {
		$this->notification_center->remove_notification_by_id( self::NOTIFICATION_ID );
		return;
	}

	$notification = $this->get_indexables_disabled_notification();

	$this->notification_center->add_notification( $notification );
}