Tribe__Admin__Notices::undismiss_for_all( string $slug )

Undismisses the specified notice for all users.


Parameters

$slug

(string) (Required)


Top ↑

Return

(int)


Top ↑

Source

File: src/Tribe/Admin/Notices.php

	public function undismiss_for_all( $slug ) {
		$user_query = new WP_User_Query( array(
			'meta_key'   => self::$meta_key,
			'meta_value' => $slug,
		) );

		$affected = 0;

		foreach ( $user_query->get_results() as $user ) {
			if ( $this->undismiss( $slug, $user->ID ) ) {
				$affected++;
			}
		}

		return $affected;
	}

Top ↑

Changelog

Changelog
Version Description
4.3 Introduced.