function __construct()
 {
     $settings['id'] = 'hoot-content-blocks-widget';
     $settings['name'] = __('Hoot > Content Blocks', 'chromatic');
     $settings['widget_options'] = array('description' => __('Display Styled Content Blocks.', 'chromatic'), 'class' => 'hoot-content-blocks-widget');
     $settings['control_options'] = array();
     $settings['form_options'] = array(array('name' => __('Blocks Style', 'chromatic'), 'id' => 'style', 'type' => 'images', 'std' => 'style1', 'options' => array('style1' => trailingslashit(HOOT_THEMEURI) . 'admin/images/content-block-style-1.png', 'style2' => trailingslashit(HOOT_THEMEURI) . 'admin/images/content-block-style-2.png', 'style3' => trailingslashit(HOOT_THEMEURI) . 'admin/images/content-block-style-3.png', 'style4' => trailingslashit(HOOT_THEMEURI) . 'admin/images/content-block-style-4.png')), array('name' => __('No. Of Columns', 'chromatic'), 'id' => 'columns', 'type' => 'select', 'std' => '3', 'options' => array('1' => __('1', 'chromatic'), '2' => __('2', 'chromatic'), '3' => __('3', 'chromatic'), '4' => __('4', 'chromatic'), '5' => __('5', 'chromatic'))), array('name' => __('Icon Style', 'chromatic'), 'desc' => __("Not applicable if 'Featured Image' is seected below.", 'chromatic'), 'id' => 'icon_style', 'type' => 'select', 'std' => 'circle', 'options' => array('none' => __('None', 'chromatic'), 'circle' => __('Circle', 'chromatic'), 'square' => __('Square', 'chromatic'))), array('name' => __('Border', 'chromatic'), 'desc' => __('Top and bottom borders.', 'chromatic'), 'id' => 'border', 'type' => 'select', 'std' => 'none none', 'options' => array('line line' => __('Top - Line || Bottom - Line', 'chromatic'), 'line shadow' => __('Top - Line || Bottom - Shadow', 'chromatic'), 'line none' => __('Top - Line || Bottom - None', 'chromatic'), 'shadow line' => __('Top - Shadow || Bottom - Line', 'chromatic'), 'shadow shadow' => __('Top - Shadow || Bottom - Shadow', 'chromatic'), 'shadow none' => __('Top - Shadow || Bottom - None', 'chromatic'), 'none line' => __('Top - None || Bottom - Line', 'chromatic'), 'none shadow' => __('Top - None || Bottom - Shadow', 'chromatic'), 'none none' => __('Top - None || Bottom - None', 'chromatic'))), array('name' => __("Use 'Featured Image' of page instead of icons.", 'chromatic'), 'id' => 'image', 'type' => 'checkbox'), array('name' => __("Display excerpt instead of full content (Read More link will be automatically inserted if no Custom Link URL is provided below)", 'chromatic'), 'id' => 'excerpt', 'type' => 'checkbox'), array('name' => __('Content Boxes', 'chromatic'), 'id' => 'boxes', 'type' => 'group', 'options' => array('item_name' => __('Content Box', 'chromatic')), 'fields' => array(array('name' => __('Icon', 'chromatic'), 'desc' => __("Not applicable if 'Featured Image' is selected above.", 'chromatic'), 'id' => 'icon', 'type' => 'icon'), array('name' => __('Page', 'chromatic'), 'id' => 'page', 'type' => 'select', 'options' => Hoot_WP_Widget::get_wp_list('page')), array('name' => __('Link Text (optional)', 'chromatic'), 'id' => 'link', 'type' => 'text'), array('name' => __('Link URL (optional)', 'chromatic'), 'id' => 'url', 'std' => 'http://', 'type' => 'text', 'sanitize' => 'url'))));
     $settings = apply_filters('hoot_content_blocks_widget_settings', $settings);
     parent::__construct($settings['id'], $settings['name'], $settings['widget_options'], $settings['control_options'], $settings['form_options']);
 }
Exemple #2
0
 function __construct()
 {
     parent::__construct('hoot-cta-widget', __('Hoot > Call To Action', 'dispatch'), array('description' => __('Display Call To Action block.', 'dispatch'), 'class' => 'hoot-cta-widget'), array(), array(array('name' => __('Headline/Description', 'dispatch'), 'id' => 'page_id', 'type' => 'select', 'options' => Hoot_WP_Widget::get_wp_list('page')), array('name' => __('Button Text', 'dispatch'), 'desc' => __('Leave empty if you dont want to show button', 'dispatch'), 'id' => 'button_text', 'type' => 'text', 'std' => __('-- LEARN MORE --', 'dispatch')), array('name' => __('URL', 'dispatch'), 'desc' => __('Leave empty if you dont want to show button', 'dispatch'), 'id' => 'url', 'type' => 'text', 'sanitize' => 'url'), array('name' => __('Border', 'dispatch'), 'desc' => __('Top and bottom borders.', 'dispatch'), 'id' => 'border', 'type' => 'select', 'std' => 'none none', 'options' => array('line line' => __('Top - Line || Bottom - Line', 'dispatch'), 'line shadow' => __('Top - Line || Bottom - StrongDash', 'dispatch'), 'line none' => __('Top - Line || Bottom - None', 'dispatch'), 'shadow line' => __('Top - StrongDash || Bottom - Line', 'dispatch'), 'shadow shadow' => __('Top - StrongDash || Bottom - StrongDash', 'dispatch'), 'shadow none' => __('Top - StrongDash || Bottom - None', 'dispatch'), 'none line' => __('Top - None || Bottom - Line', 'dispatch'), 'none shadow' => __('Top - None || Bottom - StrongDash', 'dispatch'), 'none none' => __('Top - None || Bottom - None', 'dispatch')))));
 }