Gocodebox_Banner_Notifier::get_max_notification_priority()

Get the max notification priority allowed on this site.


Description Description

Priority is a value from 1 to 5, or 0.
0: No notifications at all.
1: Security notifications.
2: Core plugin updates.
3: Updates to plugins already installed.
4: Suggestions based on existing plugins and settings.
5: Informative.


Top ↑

Source Source

File: libraries/banner-notifications/src/notifications.php

	function get_max_notification_priority() {
		static $max_priority = null;

		if ( ! isset( $max_priority ) ) {
			$max_priority = get_option( "{$this->prefix}_maxnotificationpriority" );

			if ( empty( $max_priority ) ) {
				$max_priority = 5;
			}

			// filter allows for max priority 0 to turn them off entirely.
			$max_priority = apply_filters( "{$this->prefix}_max_notification_priority", $max_priority );
		}

		return $max_priority;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.