public function addPrompt( $prompt ) {
		$added = false;

		/*
		 * Determine whether to add the new prompt or not.
		 *
		 * If we've already a prompt for user_did_this_x_times, don't add another prompt for the
		 * same thing.
		 *
		 * If a plugin has already been dismissed, no need to add any additional rating prompts,
		 * they will never be showing.
		 */
		if ( ! $this->isPrompt( $prompt['name'] ) && ! $this->isPluginDismissed( $prompt['plugin'] ) ) {
			$prompt['time_added'] = time();

			$prompts = $this->getPrompts();

			$prompts[] = $prompt;

			$added = $this->savePrompts( $prompts );
		}

		return $added;
	}
public function addPrompt( $prompt ) {
		$added = false;

		/*
		 * Determine whether to add the new prompt or not.
		 *
		 * If we've already a prompt for user_did_this_x_times, don't add another prompt for the
		 * same thing.
		 *
		 * If a plugin has already been dismissed, no need to add any additional rating prompts,
		 * they will never be showing.
		 */
		if ( ! $this->isPrompt( $prompt['name'] ) && ! $this->isPluginDismissed( $prompt['plugin'] ) ) {
			$prompt['time_added'] = time();

			$prompts = $this->getPrompts();

			$prompts[] = $prompt;

			$added = $this->savePrompts( $prompts );
		}

		return $added;
	}
public function addPrompt ( $ prompt ) { $ added = false ; /*
		 * Determine whether to add the new prompt or not.
		 *
		 * If we've already a prompt for user_did_this_x_times, don't add another prompt for the
		 * same thing.
		 *
		 * If a plugin has already been dismissed, no need to add any additional rating prompts,
		 * they will never be showing.
		 */ if ( ! $ this -> isPrompt ( $ prompt [ 'name' ] ) && ! $ this -> isPluginDismissed ( $ prompt [ 'plugin' ] ) ) { $ prompt [ 'time_added' ] = time ( ) ; $ prompts = $ this -> getPrompts ( ) ; $ prompts [ ] = $ prompt ; $ added = $ this -> savePrompts ( $ prompts ) ; } return $ added ; }
Add a prompt.

This only adds a prompt if it doesn't already exist by name.

@since 2.7.7

@param  array $prompt An array of configs for a prompt.
@return bool          Whether or not the prompt was added.
Add a prompt .