WPSEO_Admin_Bar_Menu::get_notification_popup()
Gets the notification popup if in a valid context.
Метод класса: WPSEO_Admin_Bar_Menu{}
Хуков нет.
Возвращает
Строку
. Notification popup markup, or empty string if not available.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_notification_popup();
Код WPSEO_Admin_Bar_Menu::get_notification_popup() WPSEO Admin Bar Menu::get notification popup Yoast 22.3
protected function get_notification_popup() { $notification_center = Yoast_Notification_Center::get(); $new_notifications = $notification_center->get_new_notifications(); $new_notifications_count = count( $new_notifications ); if ( ! $new_notifications_count ) { return ''; } $notification = sprintf( _n( 'There is a new notification.', 'There are new notifications.', $new_notifications_count, 'wordpress-seo' ), $new_notifications_count ); return '<div class="yoast-issue-added">' . $notification . '</div>'; }