Exemplo n.º 1
0
 /**
  * Field configuration
  *
  * This is used by CTFW_Widget class for automatic field output, filtering, sanitization and saving.
  *
  * @since 0.9
  * @return array Fields for widget
  */
 function ctc_fields()
 {
     // prefix in case WP core adds method with same name
     // Fields
     $fields = array('title' => array('name' => _x('Title', 'posts widget', 'church-theme-framework'), 'after_name' => '', 'desc' => '', 'type' => 'text', 'checkbox_label' => '', 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => _x('Posts', 'posts widget title default', 'church-theme-framework'), 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'category' => array('name' => _x('Category', 'posts widget', 'church-theme-framework'), 'after_name' => '', 'desc' => '', 'type' => 'select', 'checkbox_label' => '', 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => ctc_term_options('category', array('all' => _x('All Categories', 'posts widget', 'church-theme-framework'))), 'default' => 'all', 'no_empty' => true, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'orderby' => array('name' => _x('Order By', 'posts widget', 'church-theme-framework'), 'after_name' => '', 'desc' => '', 'type' => 'select', 'checkbox_label' => '', 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array('title' => _x('Title', 'posts widget order by', 'church-theme-framework'), 'publish_date' => _x('Date', 'posts widget order by', 'church-theme-framework'), 'comment_count' => _x('Comment Count', 'posts widget order by', 'church-theme-framework')), 'default' => 'publish_date', 'no_empty' => true, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'order' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'radio', 'checkbox_label' => '', 'radio_inline' => true, 'number_min' => '', 'number_max' => '', 'options' => array('asc' => _x('Low to High', 'posts widget order', 'church-theme-framework'), 'desc' => _x('High to Low', 'posts widget order', 'church-theme-framework')), 'default' => 'desc', 'no_empty' => true, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'limit' => array('name' => _x('Limit', 'posts widget', 'church-theme-framework'), 'after_name' => '', 'desc' => '', 'type' => 'number', 'checkbox_label' => '', 'radio_inline' => false, 'number_min' => '1', 'number_max' => '50', 'options' => array(), 'default' => '5', 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_image' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'checkbox_label' => _x('Show image', 'posts widget', 'church-theme-framework'), 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => true, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_date' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'checkbox_label' => _x('Show date', 'posts widget', 'church-theme-framework'), 'options' => array(), 'default' => true, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_author' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'checkbox_label' => _x('Show author', 'posts widget', 'church-theme-framework'), 'options' => array(), 'default' => false, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_excerpt' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'checkbox_label' => _x('Show excerpt', 'posts widget', 'church-theme-framework'), 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => false, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()));
     return $fields;
 }
Exemplo n.º 2
0
 /**
  * Field configuration
  *
  * This is used by CTFW_Widget class for automatic field output, filtering, sanitization and saving.
  *
  * @since 0.9
  * @return array Fields for widget
  */
 function ctc_fields()
 {
     // prefix in case WP core adds method with same name
     // Fields
     $fields = array('title' => array('name' => _x('Title', 'people widget', 'church-theme-framework'), 'after_name' => '', 'desc' => '', 'type' => 'text', 'checkbox_label' => '', 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => _x('People', 'people widget title default', 'church-theme-framework'), 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'group' => array('name' => _x('Group', 'people widget', 'church-theme-framework'), 'after_name' => '', 'desc' => '', 'type' => 'select', 'checkbox_label' => '', 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => ctc_term_options('ctc_person_group', array('all' => _x('All Groups', 'people widget', 'church-theme-framework'))), 'default' => 'all', 'no_empty' => true, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array('ctc_person_group')), 'orderby' => array('name' => _x('Order By', 'people widget', 'church-theme-framework'), 'after_name' => '', 'desc' => '', 'type' => 'select', 'checkbox_label' => '', 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array('menu_order' => _x('Custom Order', 'people widget order by', 'church-theme-framework'), 'title' => _x('Name', 'people widget order by', 'church-theme-framework')), 'default' => 'menu_order', 'no_empty' => true, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'order' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'radio', 'checkbox_label' => '', 'radio_inline' => true, 'number_min' => '', 'number_max' => '', 'options' => array('asc' => _x('Low to High', 'people widget order', 'church-theme-framework'), 'desc' => _x('High to Low', 'people widget order', 'church-theme-framework')), 'default' => 'asc', 'no_empty' => true, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'limit' => array('name' => _x('Limit', 'people widget', 'church-theme-framework'), 'after_name' => '', 'desc' => '', 'type' => 'number', 'checkbox_label' => '', 'radio_inline' => false, 'number_min' => '1', 'number_max' => '50', 'options' => array(), 'default' => '5', 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_image' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'checkbox_label' => _x('Show photo', 'people widget', 'church-theme-framework'), 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => true, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_position' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'checkbox_label' => _x('Show position', 'people widget', 'church-theme-framework'), 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => true, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_phone' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'checkbox_label' => _x('Show phone', 'people widget', 'church-theme-framework'), 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => true, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_email' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'checkbox_label' => _x('Show email', 'people widget', 'church-theme-framework'), 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => false, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_icons' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'checkbox_label' => _x('Show icons', 'people widget', 'church-theme-framework'), 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => false, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => 'ctc-widget-no-bottom-margin', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()), 'show_excerpt' => array('name' => '', 'after_name' => '', 'desc' => '', 'type' => 'checkbox', 'checkbox_label' => _x('Show excerpt', 'posts widget', 'church-theme-framework'), 'radio_inline' => false, 'number_min' => '', 'number_max' => '', 'options' => array(), 'default' => false, 'no_empty' => false, 'allow_html' => false, 'attributes' => array(), 'class' => '', 'field_attributes' => array(), 'field_class' => '', 'custom_sanitize' => '', 'custom_field' => '', 'page_templates' => array(), 'taxonomies' => array()));
     // Return config
     return $fields;
 }