Tribe__Admin__Notices::maybe_dismiss()

This will allow the user to Dismiss the Notice using JS.

We will dismiss the notice without checking to see if the slug was already registered (via a call to exists()) for the reason that, during dismissal ajax request, some valid notices may not have been registered yet.


Return

(void)


Top ↑

Source

File: src/Tribe/Admin/Notices.php

	public function maybe_dismiss() {
		if ( empty( $_GET[ self::$meta_key ] ) ) {
			wp_send_json( false );
		}

		$slug = sanitize_title_with_dashes( $_GET[ self::$meta_key ] );

		// Send a JSON answer with the status of dimissal
		wp_send_json( $this->dismiss( $slug ) );
	}

Top ↑

Changelog

Changelog
Version Description
4.3 Introduced.