public function replace_variables( $str )
	{
		if ( preg_match( "/^\{([A-Z0-9_]+)\}$/", $str, $matches ) ) {
			$key = $matches[1];
			if ( $this->get_variables( $key ) ) {
				return $this->get_variables( $key );
			}
		}
		return $str;
	}
public function replace_variables( $str )
	{
		if ( preg_match( "/^\{([A-Z0-9_]+)\}$/", $str, $matches ) ) {
			$key = $matches[1];
			if ( $this->get_variables( $key ) ) {
				return $this->get_variables( $key );
			}
		}
		return $str;
	}
public function replace_variables ( $ str ) { if ( preg_match ( "/^\{([A-Z0-9_]+)\}$/" , $ str , $ matches ) ) { $ key = $ matches [ 1 ] ; if ( $ this -> get_variables ( $ key ) ) { return $ this -> get_variables ( $ key ) ; } } return $ str ; }
Replace with variables

@param string $str The str or {VARIABLE} format text.
@return string The value of the variable.
Replace with variables