File Editor
Directories:
.. (Back)
Files:
abstract-dismissable-alert.php
black-friday-product-editor-checklist-notification.php
black-friday-promotion-notification.php
black-friday-sidebar-checklist-notification.php
trustpilot-review-notification.php
webinar-promo-notification.php
Create New File
Create
Edit File: abstract-dismissable-alert.php
<?php namespace Yoast\WP\SEO\Integrations\Alerts; use Yoast\WP\SEO\Integrations\Integration_Interface; /** * Dismissable_Alert class. */ 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; } }
Save Changes
Rename File
Rename