widget_cssclass = 'widget_ajima_call_to_action'; $this->widget_description = __("Adds Call to action section", 'ajima'); $this->widget_id = 'ajima_call_to_action'; $this->widget_name = __('Ajima: Call To Action', 'ajima'); $this->settings = array( 'title' => array( 'type' => 'text', 'label' => __('CTA Title', 'ajima'), ), 'title_text' => array( 'type' => 'text', 'label' => __('CTA Subtitle', 'ajima'), ), 'desc' => array( 'type' => 'textarea', 'label' => __( 'CTA Description', 'ajima' ), 'rows' => 10, ), 'bg_image' => array( 'type' => 'image', 'label' => __( 'Background Image', 'ajima' ), ), 'btn_text' => array( 'type' => 'text', 'label' => __( 'Button Text', 'ajima' ), ), 'btn_link' => array( 'type' => 'url', 'label' => __( 'Link to url', 'ajima' ), 'desc' => __( 'Enter a proper url with http: OR https:', 'ajima' ), ), 'link_target' => array( 'type' => 'checkbox', 'label' => __( 'Open Link in new Tab', 'ajima' ), 'std' => true, ), 'msg' => array( 'type' => 'message', 'label' => __('Additonal Settings', 'ajima'), ), 'height' => array( 'type' => 'number', 'step' => 20, 'min' => 300, 'max' => 700, 'std' => 400, 'label' => __('Height: Between 300px and 700px (Default 400px)', 'ajima'), ), 'text_color_option' => array( 'type' => 'color', 'label' => __( 'Text Color', 'ajima' ), 'std' => '#ffffff', ), 'text_align' => array( 'type' => 'select', 'label' => __('Text Alignment', 'ajima'), 'options' => array( 'left' => __('Left Align', 'ajima'), 'center' => __('Center Align', 'ajima'), 'right' => __('Right Align', 'ajima'), ), 'std' => 'left', ), 'enable_fixed_bg' => array( 'type' => 'checkbox', 'label' => __( 'Enable Fixed Background Image', 'ajima' ), 'std' => true, ), 'bg_overlay_color' => array( 'type' => 'color', 'label' => __( 'Overlay Background Color', 'ajima' ), 'std' => '#000000', ), 'overlay_opacity' => array( 'type' => 'number', 'step' => 10, 'min' => 0, 'max' => 100, 'std' => 50, 'label' => __('Overlay Opacity (Default 50%)', 'ajima'), ), ); 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( 'ajima_before_cta'); ?>