* @license Apache License, Version 2.0 */ /** * Template function: Tests if the current merchant truly has an answer * * @return boolean * @since 1.6 */ function pzdc_has_answer() { global $PraizedCommunity; return $PraizedCommunity->tpt_has_answer(); } /** * Template function: Current answer pid (defaults to echo) * * @param boolean $echo Defines if the output should be echoed or simpy returned, defaults to TRUE * @return string * @since 1.6 */ function pzdc_answer_pid($echo = TRUE) { global $PraizedCommunity; return $PraizedCommunity->tpt_attribute_helper('answer', 'pid', $echo); } /** * Template function: Current answer permalink (defaults to echo) * * @param boolean $echo Defines if the output should be echoed or simpy returned, defaults to TRUE * @return string * @since 1.6 */ function pzdc_answer_permalink($echo = TRUE) { global $PraizedCommunity; return $PraizedCommunity->tpt_attribute_helper('answer', 'permalink', $echo); } /** * Template function: Current answer content (defaults to echo) * * @param boolean $echo Defines if the output should be echoed or simpy returned, defaults to TRUE * @return string * @since 1.6 */ function pzdc_answer_content($echo = TRUE) { global $PraizedCommunity; return $PraizedCommunity->tpt_answer_content($echo); } /** * Template function: Current answer creation date (defaults to echo) * * @param boolean $echo Defines if the output should be echoed or simpy returned * @param string $format strftime type format string * @return string * @since 1.6 */ function pzdc_answer_created_at($echo = TRUE, $format = NULL) { global $PraizedCommunity; $out = $PraizedCommunity->tpt_attribute_helper('answer', 'created_at', FALSE); if ( strstr($format, '%')) $out = pzdc_date($out, $format); if ( $echo ) echo $out; return $out; } /** * Template function: Current answer update date (defaults to echo) * * @param boolean $echo Defines if the output should be echoed or simpy returned * @param string $format strftime type format string * @return string * @since 1.6 */ function pzdc_answer_updated_at($echo = TRUE, $format = NULL) { global $PraizedCommunity; $out = $PraizedCommunity->tpt_attribute_helper('answer', 'updated_at', FALSE); if ( strstr($format, '%')) $out = pzdc_date($out, $format); if ( $echo ) echo $out; return $out; } /** * Template function: Returns the list of merchants/places associated with an answer as