예제 #1
0
 /**
  * prints a single record called by [pdb_single] shortcode
  * 
  * @param array $params the parameters passed in by the shortcode
  * @return string the output HTML
  */
 public static function print_single_record($params)
 {
     // alias the 'id' attribute for backwards compatibility
     if (isset($params['id']) & !isset($params['record_id'])) {
         $params['record_id'] = $params['id'];
         unset($params['id']);
     }
     if (isset($params['record_id'])) {
         $params['record_id'] = self::get_record_id_by_term('id', $params['record_id']);
     }
     return PDb_Single::print_record($params);
 }
예제 #2
0
 /**
  * prints a signup form called by a shortcode
  *
  * this function is called statically to instantiate the Signup object,
  * which captures the output and returns it for display
  *
  * @param array $params parameters passed by the shortcode
  * @return string form HTML
  */
 public static function print_record($params)
 {
     self::$instance = new PDb_Single($params);
     return self::$instance->output;
 }