Tribe__Admin__Notices::undismiss( string $slug, int|null $user_id = null )

Removes the User meta holding if a notice was dimissed


Parameters #

$slug

(string) (Required) The Name of the Notice

$user_id

(int|null) (Optional) The user ID

Default value: null


Top ↑

Return #

(boolean)


Top ↑

Source #

File: src/Tribe/Admin/Notices.php

	public function undismiss( $slug, $user_id = null ) {
		if ( is_null( $user_id ) ) {
			$user_id = get_current_user_id();
		}

		// If this user has dimissed we don't care either
		if ( ! $this->has_user_dimissed( $slug, $user_id ) ) {
			return false;
		}

		return delete_user_meta( $user_id, self::$meta_key, $slug );
	}