Yoast_Notification::display_for_current_user()publicYoast 1.0

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 21.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();