widget_cssclass = 'widget_applica_call_to_action'; $this->widget_description = __("Adds Call to action section", 'applica'); $this->widget_id = 'applica_call_to_action'; $this->widget_name = __('Applica: Call To Action', 'applica'); $this->settings = array( 'title' => array( 'type' => 'text', 'label' => __('CTA Title', 'applica'), ), 'title_text' => array( 'type' => 'text', 'label' => __('CTA Subtitle', 'applica'), ), 'desc' => array( 'type' => 'textarea', 'label' => __('CTA Description', 'applica'), 'rows' => 10, ), 'bg_image' => array( 'type' => 'image', 'label' => __('Background Image', 'applica'), ), 'btn_text' => array( 'type' => 'text', 'label' => __('Button Text', 'applica'), ), 'btn_link' => array( 'type' => 'url', 'label' => __('Link to url', 'applica'), 'desc' => __('Enter a proper url with http: OR https:', 'applica'), ), 'link_target' => array( 'type' => 'checkbox', 'label' => __('Open Link in new Tab', 'applica'), 'std' => true, ), 'msg' => array( 'type' => 'message', 'label' => __('Additonal Settings', 'applica'), ), 'height' => array( 'type' => 'number', 'step' => 20, 'min' => 300, 'max' => 700, 'std' => 400, 'label' => __('Height: Between 300px and 700px (Default 400px)', 'applica'), ), 'text_color_option' => array( 'type' => 'color', 'label' => __('Text Color', 'applica'), 'std' => '#ffffff', ), 'text_align' => array( 'type' => 'select', 'label' => __('Text Alignment', 'applica'), 'options' => array( 'left' => __('Left Align', 'applica'), 'center' => __('Center Align', 'applica'), 'right' => __('Right Align', 'applica'), ), 'std' => 'left', ), 'enable_fixed_bg' => array( 'type' => 'checkbox', 'label' => __('Enable Fixed Background Image', 'applica'), 'std' => true, ), 'bg_overlay_color' => array( 'type' => 'color', 'label' => __('Overlay Background Color', 'applica'), 'std' => '#000000', ), 'overlay_opacity' => array( 'type' => 'number', 'step' => 10, 'min' => 0, 'max' => 100, 'std' => 50, 'label' => __('Overlay Opacity (Default 50%)', 'applica'), ), ); parent::__construct(); } /** * Output widget. * * @see WP_Widget * * @param array $args * @param array $instance */ public function widget($args, $instance) { ob_start(); echo $args['before_widget']; do_action('applica_before_cta'); ?>