function __construct($field, $parent) { parent::__construct($field, $parent); $this->args = array_merge(array('taxonomy' => 'category', 'class' => '', 'hide_empty' => 0), $this->args); $this->args['class'] .= ' cuztom-input cuztom-select cuztom-term-select'; $this->args['echo'] = 0; }
function __construct($field, $parent) { parent::__construct($field, $parent); $this->args = array_merge(array('orderby' => 'ID', 'class' => ''), $this->args); $this->args['class'] .= ' cuztom-input cuztom-select cuztom-user-select'; $this->args['echo'] = 0; }
function __construct($field, $parent) { parent::__construct($field, $parent); $this->args = array_merge(array('taxonomy' => 'category'), $this->args); $this->default_value = (array) $this->default_value; add_action('init', array(&$this, 'get_taxonomy_terms')); $this->after .= '[]'; }
function __construct($field, $parent) { parent::__construct($field, $parent); $this->args = array_merge(array('post_type' => 'post', 'posts_per_page' => -1), $this->args); $this->default_value = (array) $this->default_value; $this->posts = get_posts($this->args); $this->after .= '[]'; }
function __construct($field, $meta_box) { parent::__construct($field, $meta_box); $this->options = array_merge(array('taxonomy' => 'category', 'class' => ''), $this->options); $this->options['class'] .= ' cuztom_input'; $this->options['name'] = 'cuztom[' . $this->id_name . ']' . ($this->repeatable ? '[]' : ''); $this->options['echo'] = 0; }
function __construct($field, $parent) { parent::__construct($field, $parent); $this->default_value = (array) $this->default_value; $this->after .= '[]'; }
function __construct($field, $parent) { parent::__construct($field, $parent); $this->data_attributes['default-value'] = $this->default_value; }
function __construct($field, $parent) { parent::__construct($field, $parent); $this->data_attributes['date-format'] = $this->parse_date_format(isset($this->args['date_format']) ? $this->args['date_format'] : 'm/d/Y'); $this->data_attributes['time-format'] = $this->parse_date_format(isset($this->args['time_format']) ? $this->args['time_format'] : 'H:i'); }
function __construct($field, $parent) { parent::__construct($field, $parent); $this->args = array_merge(array('post_type' => 'post', 'posts_per_page' => -1, 'cache_results' => false, 'no_found_rows' => true), $this->args); $this->posts = get_posts($this->args); }
/** * This array builds the complete array with the right key => value pairs * * @param array $data * @return array * * @author Gijs Jorissen * @since 1.1 * */ function _build_arrays($data) { $return = array(); if (!is_array($data[0]) && ($data[0] == 'tabs' || $data[0] == 'accordion')) { $return[0] = $data[0]; foreach ($data[1] as $tab) { $title = $tab[0]; $return[$title] = array(); foreach ($tab[1] as $field) { $field = Cuztom_Field::_build_array($field); $field_id_name = Cuztom_Field::_build_id_name($field, $this->box_title); $return[$title][$field_id_name] = $field; } } } else { if (is_array($data)) { foreach ($data as $field) { $field = Cuztom_Field::_build_array($field); $field_id_name = Cuztom_Field::_build_id_name($field, $this->box_title); $return[$field_id_name] = $field; } } } return $return; }
/** * Used to add the column content to the column head * * @param string $column * @param int $post_id * @return mixed * * @author Gijs Jorissen * @since 1.1 * */ function add_column_content($column, $post_id) { $meta = get_post_meta($post_id, $column, true); if (isset($this->meta_data[0]) && !is_array($this->meta_data[0]) && ($this->meta_data[0] == 'tabs' || $this->meta_data[0] == 'accordion')) { $tabs = array_slice($this->meta_data, 1); foreach ($tabs as $tab => $fields) { foreach ($fields as $field_id_name => $field) { if ($column == $field_id_name) { echo $field['repeatable'] && Cuztom_Field::_supports_repeatable($field) ? implode($meta, ', ') : get_post_meta($post_id, $column, true); break; } } } } else { $field = isset($this->meta_data[$column]) ? $this->meta_data[$column] : null; echo $field['repeatable'] && Cuztom_Field::_supports_repeatable($field) ? implode($meta, ', ') : get_post_meta($post_id, $column, true); } }
function __construct($field, $meta_box) { parent::__construct($field, $meta_box); $this->options = array_merge(array('textarea_name' => 'cuztom[' . $this->id_name . ']', 'media_buttons' => false, 'editor_class' => ''), $this->options); $this->options['editor_class'] .= ' cuztom_input'; }
function _cuztom_field_supports_repeatable($field) { return Cuztom_Field::_supports_repeatable($field); }
function __construct($field, $meta_box) { parent::__construct($field, $meta_box); $this->options = array_merge(array('post_type' => 'post'), $this->options); $this->posts = get_posts($this->options); }
function _cuztom_field_supports_bundle($field) { return Cuztom_Field::_supports_bundle($field); }
function __construct($field, $parent) { parent::__construct($field, $parent); $this->args = array_merge(array('textarea_name' => 'cuztom[' . $this->id . ']', 'editor_class' => ''), $this->args); $this->args['editor_class'] .= ' cuztom-input'; }
function __construct($field, $meta_box) { parent::__construct($field, $meta_box); $this->options = array_merge(array('taxonomy' => 'category'), $this->options); $this->terms = get_terms($this->options['taxonomy'], $this->options); }