'aazeen_slider_widget', 'description' => __( 'You can add use this widgte in any section or page. you can add for custom slider', 'aazeen-extension' ), ); parent::__construct( 'aazeen_slider_widget', __( 'Aazeen - Slider widget', 'aazeen-extension' ), $widget_ops ); $this->alt_option_name = 'aazeen_slider_widget'; add_action('wp_enqueue_scripts', array(&$this, 'aazeen_extension_slider_widget_style')); } function widget($args, $instance) { extract($args); $bg_color = isset( $instance['bg_color'] ) ? $instance['bg_color'] : '#BCBDD4'; $content_bgimage = isset( $instance['content_bgimage'] ) ? $instance['content_bgimage'] : ''; $fixed_bg = isset( $instance['fixed_bg'] ) ? $instance['fixed_bg'] : false; $custom_testi = isset( $instance['custom_testi'] ) ? $instance['custom_testi'] : array(); $auto_play = ( ! empty( $instance['auto_play'] ) ) ? wp_kses_post( $instance['auto_play'] ) : ''; $slider_height = ( ! empty( $instance['slider_height'] ) ) ? $instance['slider_height'] : ''; $slider_style = ( ! empty( $instance['slider_style'] ) ) ? wp_kses_post( $instance['slider_style'] ) : ''; $title_fontsize = ( ! empty( $instance['title_fontsize'] ) ) ? absint( $instance['title_fontsize'] ) : ''; $content_fontsize = ( ! empty( $instance['content_fontsize'] ) ) ? absint( $instance['content_fontsize'] ) : ''; echo $before_widget; ?>

'.__('Please Click the "+ Add New" button to create new Carousel','aazeen-extension').'

';} if(!empty($custom_testi)){ /*START CUSTOM Carosel*/ foreach ((array)$custom_testi as $testimony){ echo '
';?>

'; } //CAROUSEL END }?>

'', 'title_color' => '#0a0a0a', 'subtitle_color' => '#747474', 'bg_color' => '#fff', 'auto_play'=>'true', 'slider_height'=>100, 'slider_style'=>'style_one', 'title_fontsize'=>32, 'content_fontsize'=>18 ); $instance = wp_parse_args( (array) $instance, $defaults ); $fixed_bg = isset( $instance['fixed_bg'] ) ? (bool) $instance['fixed_bg'] : false; ?>

%3$s
%12$s %8$s
Remove
', $this->get_field_name( 'custom_testi' ), $customtesti_counter, esc_attr( $testi['title'] ), esc_url( $testi['url'] ), esc_url( $testi['image'] ), __('Slide Title(Required)','aazeen-extension'), __('URL','aazeen-extension'), __('Select Image', 'aazeen-extension'), $this->get_field_id('custom_add_field').'-repeat', $this->get_field_id('custom_testi').'', $this->get_field_id('custom_testi').'-mpick', !empty($testi['image']) ? '': '', wp_kses_post( $testi['content']) ); } $customtesti_counter += 1; } echo '
'.__('Sliders','aazeen-extension').'
' . join( $customtesti_html ); ?> get_field_id('custom_add_field').'" data-widget-fieldname="'.$this->get_field_name('custom_testi').'" data-widget-fieldid="'.$this->get_field_id('custom_testi').'" />';?>

  • id="get_field_id( 'fixed_bg' ); ?>" name="get_field_name( 'fixed_bg' ); ?>" />

    option_name ); if ( empty( $settings ) ) { return; } foreach ( $settings as $instance_id => $instance ) { $id = $this->id_base . '-' . $instance_id; if ( ! is_active_widget( false, $id, $this->id_base ) ) { continue; } $title_fontsize = esc_html($instance['title_fontsize']); $content_fontsize=esc_html($instance['content_fontsize']); $title_color=esc_html($instance['title_color']); $id= $this->id; $inline_css=''; $px ='px'; /* Color calculation for text */ $inline_css .= " #".$id." .separator-center::after { border-bottom-color: $title_color ; }" ; $inline_css .= "@media screen and (min-width: 40em){ #".$id." .Modern-Slider .slider-dsc h3, #".$id." .slider2 .post-header h3 { font-size: $title_fontsize".$px." ; }}" ; $inline_css .= "@media screen and (min-width: 40em){ #".$id." .Modern-Slider .slider-dsc h5, #".$id." .slider2 .post-header p { font-size: $content_fontsize".$px." ; }}" ; wp_add_inline_style( 'aazeen-style', $inline_css ); } } } }