Yoast_Notification::display_for_current_user()
Check if the notification is relevant for the current user.
Метод класса: Yoast_Notification{}
Хуков нет.
Возвращает
true|false
. True if a user needs to see this notification, false if not.
Использование
$Yoast_Notification = new Yoast_Notification(); $Yoast_Notification->display_for_current_user();
Код Yoast_Notification::display_for_current_user() Yoast Notification::display for current user Yoast 23.5
public function display_for_current_user() { // If the notification is for the current page only, always show. if ( ! $this->is_persistent() ) { return true; } // If the current user doesn't match capabilities. return $this->match_capabilities(); }