BSF_Admin_Notices::add_notice( array $args = array() )

Add Notice.


Description


Parameters

$args

(array) (Optional) Notice arguments.

Default value: array()


Return

(void)


Source

File: inc/lib/astra-notices/class-bsf-admin-notices.php

		public static function add_notice( $args = array() ) {
			self::$notices[] = $args;

			if ( ! isset( $args['id'] ) ) {
				return;
			}

			$notice_id = sanitize_key( $args['id'] ); // Notice ID.
			$notices   = get_option( 'allowed_BSF_Admin_Notices', array() );
			if ( ! in_array( $notice_id, $notices, true ) ) {
				$notices[] = $notice_id; // Add notice id to the array.
				update_option( 'allowed_BSF_Admin_Notices', $notices ); // Update the option.
			}
		}

Changelog

Changelog
Version Description
1.2.0 Introduced.


User Contributed Notes

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