protected function create_error_message( $message_name, $value ) {

		$message = $this->get_message_template( $message_name );

		if ( ! is_scalar( $value ) ) {
			$value = $this->get_value_as_string( $value );
		}

		// replacing the placeholder for the %value%
		$message = str_replace( '%value%', $value, $message );

		// replacing the possible options-placeholder on the message
		foreach ( $this->options as $search => $replace ) {
			$replace = $this->get_value_as_string( $replace );
			$message = str_replace( '%' . $search . '%', $replace, $message );
		}

		return $message;
	}
protected function create_error_message( $message_name, $value ) {

		$message = $this->get_message_template( $message_name );

		if ( ! is_scalar( $value ) ) {
			$value = $this->get_value_as_string( $value );
		}

		// replacing the placeholder for the %value%
		$message = str_replace( '%value%', $value, $message );

		// replacing the possible options-placeholder on the message
		foreach ( $this->options as $search => $replace ) {
			$replace = $this->get_value_as_string( $replace );
			$message = str_replace( '%' . $search . '%', $replace, $message );
		}

		return $message;
	}
protected function create_error_message ( $ message_name , $ value ) { $ message = $ this -> get_message_template ( $ message_name ) ; if ( ! is_scalar ( $ value ) ) { $ value = $ this -> get_value_as_string ( $ value ) ; } // replacing the placeholder for the %value% $ message = str_replace ( '%value%' , $ value , $ message ) ; // replacing the possible options-placeholder on the message foreach ( $ this -> options as $ search => $ replace ) { $ replace = $ this -> get_value_as_string ( $ replace ) ; $ message = str_replace ( '%' . $ search . '%' , $ replace , $ message ) ; } return $ message ; }
Creating an Error-Message for the given messageName from an messageTemplate.

@param   String $message_name
@param   String $value

@return  Null|String

@deprecated
Creating an Error - Message for the given messageName from an messageTemplate .