WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта с помощью браузерных PUSH уведомлений
класс не описан

Yoast\WP\SEO\Integrations\Alerts

Abstract_Dismissable_Alert{} Yoast 1.0

Dismissable_Alert class.

Хуков нет.

Возвращает

null. Ничего.

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

$Abstract_Dismissable_Alert = new Abstract_Dismissable_Alert();
// use class methods

Методы

  1. get_conditionals()
  2. register_dismissable_alert( $allowed_dismissable_alerts )
  3. register_hooks()

Код Abstract_Dismissable_Alert{} Yoast 16.1.1

<?php
abstract class Abstract_Dismissable_Alert implements Integration_Interface {

	/**
	 * Holds the alert identifier.
	 *
	 * @var string
	 */
	protected $alert_identifier;

	/**
	 * {@inheritDoc}
	 */
	public static function get_conditionals() {
		return [];
	}

	/**
	 * {@inheritDoc}
	 */
	public function register_hooks() {
		\add_filter( 'wpseo_allowed_dismissable_alerts', [ $this, 'register_dismissable_alert' ] );
	}

	/**
	 * Registers the dismissable alert.
	 *
	 * @param string[] $allowed_dismissable_alerts The allowed dismissable alerts.
	 *
	 * @return string[] The allowed dismissable alerts.
	 */
	public function register_dismissable_alert( $allowed_dismissable_alerts ) {
		$allowed_dismissable_alerts[] = $this->alert_identifier;

		return $allowed_dismissable_alerts;
	}
}