function add_fields($fields) { foreach ($fields as $field) { if (!is_a($field, 'PECF_Field')) { pecf_conf_error("Trying to add non PECF object ot PECF panel field"); } PECF_Panels_static_add_field_name($field->name); } $this->fields =& $fields; }
function render() { if ($this->popup_row_label === false) { pecf_conf_error("Media field's labels have not been setup."); } $input_atts = $this->build_html_atts(array('type' => 'hidden', 'name' => $this->name, 'value' => $this->value)); $field_html = $this->build_tag('input', $input_atts); ob_start(); include 'tpls/media.php'; $field_html .= ob_get_clean(); return $this->render_row($field_html); }