function __construct()
 {
     $this->widget_description = __('Insert custom text or HTML as a widget', 'gravityview');
     $default_values = array('header' => 1, 'footer' => 1);
     $settings = array('content' => array('type' => 'textarea', 'label' => __('Custom Content', 'gravityview'), 'desc' => __('Enter text or HTML. Also supports shortcodes.', 'gravityview'), 'value' => '', 'class' => 'code', 'merge_tags' => false, 'show_all_fields' => true), 'wpautop' => array('type' => 'checkbox', 'label' => __('Automatically add paragraphs to content', 'gravityview'), 'tooltip' => __('Wrap each block of text in an HTML paragraph tag (recommended for text).', 'gravityview'), 'value' => ''));
     parent::__construct(__('Custom Content', 'gravityview'), 'custom_content', $default_values, $settings);
 }
 function __construct()
 {
     $this->widget_description = __('Summary of the number of visible entries out of the total results.', 'gravityview');
     $default_values = array('header' => 1, 'footer' => 1);
     $settings = array();
     parent::__construct(__('Show Pagination Info', 'gravityview'), 'page_info', $default_values, $settings);
 }
 function __construct()
 {
     $this->widget_description = __('Links to multiple pages of results.', 'gravityview');
     $default_values = array('header' => 1, 'footer' => 1);
     $settings = array('show_all' => array('type' => 'checkbox', 'label' => __('Show each page number', 'gravityview'), 'desc' => __('Show every page number instead of summary (eg: 1 2 3 ... 8 »)', 'gravityview'), 'value' => false));
     parent::__construct(__('Page Links', 'gravityview'), 'page_links', $default_values, $settings);
 }
 /**
  * @todo add support for specifying poll field to display (via AJAX in field settings)
  * @since 1.8
  */
 function __construct()
 {
     $this->widget_description = __('Displays the results of Poll Fields that exist in the form.', 'gravityview');
     $this->widget_subtitle = sprintf(_x('Note: this will display poll results for %sall form entries%s, not only the entries displayed in the View.', 'The string placeholders are for emphasis HTML', 'gravityview'), '<em>', '</em>');
     $default_values = array('header' => 1, 'footer' => 1);
     $settings = array('percentages' => array('label' => __('Display Percentages', 'gravityview'), 'type' => 'checkbox', 'value' => true, 'tooltip' => __('Display results percentages as part of results? Supported values are: true, false. Defaults to "true".', 'gravityview')), 'counts' => array('label' => __('Display Counts', 'gravityview'), 'type' => 'checkbox', 'value' => true, 'tooltip' => __('Display number of times each choice has been selected when displaying results? Supported values are: true, false. Defaults to "true".', 'gravityview')), 'style' => array('type' => 'select', 'label' => __('Style', 'gravityview'), 'tooltip' => __('The Polls Add-On currently supports 4 built in styles: red, green, orange, blue. Defaults to "green".', 'gravityview'), 'value' => 'green', 'choices' => array('green' => __('Green', 'gravityview'), 'blue' => __('Blue', 'gravityview'), 'red' => __('Red', 'gravityview'), 'orange' => __('Orange', 'gravityview'))));
     parent::__construct(__('Poll Results', 'gravityview'), 'poll', $default_values, $settings);
     // frontend - add template path
     add_filter('gravityview_template_paths', array($this, 'add_template_path'));
 }
예제 #5
0
 public function __construct()
 {
     $this->widget_description = esc_html__('Search form for searching entries.', 'gravityview');
     self::$instance =& $this;
     self::$file = plugin_dir_path(__FILE__);
     $default_values = array('header' => 0, 'footer' => 0);
     $settings = array('search_fields' => array('type' => 'hidden', 'label' => '', 'class' => 'gv-search-fields-value'), 'search_layout' => array('type' => 'radio', 'full_width' => true, 'label' => esc_html__('Search Layout', 'gravityview'), 'value' => 'horizontal', 'options' => array('horizontal' => esc_html__('Horizontal', 'gravityview'), 'vertical' => esc_html__('Vertical', 'gravityview'))), 'search_clear' => array('type' => 'checkbox', 'label' => __('Show Clear button', 'gravityview'), 'value' => false));
     parent::__construct(esc_html__('Search Bar', 'gravityview'), 'search_bar', $default_values, $settings);
     // frontend - filter entries
     add_filter('gravityview_fe_search_criteria', array($this, 'filter_entries'), 10, 1);
     // frontend - add template path
     add_filter('gravityview_template_paths', array($this, 'add_template_path'));
     // Add hidden fields for "Default" permalink structure
     add_filter('gravityview_widget_search_filters', array($this, 'add_no_permalink_fields'), 10, 3);
     // admin - add scripts - run at 1100 to make sure GravityView_Admin_Views::add_scripts_and_styles() runs first at 999
     add_action('admin_enqueue_scripts', array($this, 'add_scripts_and_styles'), 1100);
     add_filter('gravityview_noconflict_scripts', array($this, 'register_no_conflict'));
     // ajax - get the searchable fields
     add_action('wp_ajax_gv_searchable_fields', array('GravityView_Widget_Search', 'get_searchable_fields'));
 }