public function updatePrompt( $prompt_to_save ) {
		$found = false;

		$prompts = $this->getPrompts();

		foreach ( $prompts as $key => $prompt ) {
			if ( $prompt_to_save['name'] === $prompt['name'] ) {
				$found = true;

				$prompts[$key] = $prompt_to_save;

				break;
			}
		}

		return $found ? $this->savePrompts( $prompts ) : false;
	}
public function updatePrompt( $prompt_to_save ) {
		$found = false;

		$prompts = $this->getPrompts();

		foreach ( $prompts as $key => $prompt ) {
			if ( $prompt_to_save['name'] === $prompt['name'] ) {
				$found = true;

				$prompts[$key] = $prompt_to_save;

				break;
			}
		}

		return $found ? $this->savePrompts( $prompts ) : false;
	}
public function updatePrompt ( $ prompt_to_save ) { $ found = false ; $ prompts = $ this -> getPrompts ( ) ; foreach ( $ prompts as $ key => $ prompt ) { if ( $ prompt_to_save [ 'name' ] === $ prompt [ 'name' ] ) { $ found = true ; $ prompts [ $ key ] = $ prompt_to_save ; break ; } } return $ found ? $ this -> savePrompts ( $ prompts ) : false ; }
Update an existing prompt.

If the prompt is not found, this method will not make any changes.

@since 2.7.7

@param  array $prompt_to_save A prompt.
@return bool                  Whether or not the prompt was found and updated.
Update an existing prompt .