Yoast\WP\SEO\Alerts\Application\Ping_Other_Admins
Ping_Other_Admins_Alert::add_notifications
Adds notification when user has not installed Yoast SEO themselves and has not resolved the notification yet.
Метод класса: Ping_Other_Admins_Alert{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Ping_Other_Admins_Alert = new Ping_Other_Admins_Alert(); $Ping_Other_Admins_Alert->add_notifications();
Код Ping_Other_Admins_Alert::add_notifications() Ping Other Admins Alert::add notifications Yoast 27.8
public function add_notifications() {
if ( $this->has_user_installed_yoast() ) {
$this->notification_center->remove_notification_by_id( self::NOTIFICATION_ID );
return;
}
if ( $this->has_notification_been_resolved() ) {
$this->notification_center->remove_notification_by_id( self::NOTIFICATION_ID );
return;
}
$notification = $this->get_ping_other_admins_notification();
$this->notification_center->add_notification( $notification );
}