'aazeen_callout_widget aazeen_widgtes', 'description' => __( 'You can add use this widgte in any section or page', 'aazeen-extension' ), 'customize_selective_refresh' => true, ); parent::__construct( 'aazeen_callout_widget', __( 'Aazeen - Callout widget', 'aazeen-extension' ), $widget_ops ); $this->alt_option_name = 'aazeen_callout_widget'; add_action('wp_enqueue_scripts', array(&$this, 'aazeen_callout_widget_style')); $defaults = apply_filters('aazeen_callout_widget_modify_defaults', array( 'title1'=>'Need To Grow Your Creative Site', 'content1'=>'You will save a lot of time. It is easy to purchase and enjoy these wonderful feelings!', 'link_text1'=>'LEARN MORE', 'url1'=>'https://www.themezwp.com/aazeen/', 'bg_color' => '#70e1e9', 'button_one_style'=> 'regu', 'button_two_style'=>'btn-round', 'button1_color' => '#e91e63', 'button2_color' => '#000', 'padding_top_bottom'=> 1, 'padding_right_left'=>1, 'content_color' =>'#fff' , 'title_color'=> '#fff', )); $this->defaults = $defaults; } function widget($args, $instance) { $new_tab = isset( $instance['new_tab'] ) ? $instance['new_tab'] : false; $widget_text = ! empty( $instance['content1'] ) ? $instance['content1'] : ''; $text = apply_filters( 'widget_text', $widget_text, $instance, $this ); $bg_color = isset( $instance['bg_color'] ) ? $instance['bg_color'] : '#70e1e9'; $button1_color = isset( $instance['button1_color'] ) ? $instance['button1_color'] : '#e91e63'; $button2_color = isset( $instance['button2_color'] ) ? $instance['button2_color'] : '#000'; $content_color = isset( $instance['content_color'] ) ? $instance['content_color'] : '#fff'; $padding_top_bottom = ( ! empty( $instance['padding_top_bottom'] ) ) ? absint( $instance['padding_top_bottom'] ) : 1; $padding_right_left = ( ! empty( $instance['padding_right_left'] ) ) ? absint( $instance['padding_right_left'] ) : 1; if ( 225 > ariColor::newColor( $button1_color )->luminance ) { // Our background color is dark, so we need to create a light text color. $button1_color_bg = '#fff'; } else { // Our background color is light, so we need to create a dark text color $button1_color_bg = '#000' ; } $button1_color_bg = esc_attr( $button1_color_bg ); if ( 125 > ariColor::newColor( $button2_color )->luminance ) { // Our background color is dark, so we need to create a light text color. $button2_color_bg = '#fff'; } else { // Our background color is light, so we need to create a dark text color $button2_color_bg = '#000' ; } $button2_color_bg = esc_attr( $button2_color_bg ); extract($args); $instance = wp_parse_args((array) $instance, $this->defaults); echo $before_widget; ?> id; //Stylesheet-loaded in Customizer Only. if(is_customize_preview()){ $id= $this->id; echo ""; } ?> id.'">';?>

target="_blank" > target="_blank" >
defaults); $new_tab = isset( $instance['new_tab'] ) ? (bool) $instance['new_tab'] : false; $padding_top_bottom = isset( $instance['padding_top_bottom'] ) ? absint( $instance['padding_top_bottom'] ) : 1; $padding_right_left = isset( $instance['padding_right_left'] ) ? absint( $instance['padding_right_left'] ) : 1; ?>

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; } $button1_color= '#e91e63'; $button2_color= '#000'; $content_color='#fff'; if ( ! empty( $instance['button1_color'] ) ) { $button1_color = esc_attr($instance['button1_color']); } if ( ! empty( $instance['button2_color'] ) ) { $button2_color = esc_attr($instance['button2_color']); } if ( ! empty( $instance['content_color'] ) ) { $content_color = esc_attr($instance['content_color']); } $id= $this->id; $inline_css=''; /*content Color for text */ $inline_css .= "#".$id." .text-center p { color: $content_color; }" ; /* Color calculation for text */ /*----------- button one -----------*/ $inline_css .= " #".$id." .btn.btn-rose.one { background-color: $button1_color ; border-color:$button1_color; box-shadow:0 2px 2px 0 " . Kirki_Color::get_rgba($button1_color, .14) . ",0 3px 1px -2px " . Kirki_Color::get_rgba($button1_color, .2) . ",0 1px 5px 0 " . Kirki_Color::get_rgba($button1_color, .12) . "; } #".$id." .btn.btn-rose.one:hover { box-shadow: 0 14px 26px -12px " . Kirki_Color::get_rgba($button1_color, .42) . ", 0 4px 23px 0 rgba(0, 0, 0, .12), 0 8px 10px -5px " . Kirki_Color::get_rgba($button1_color, .2) . "; }" ; if ( 225 > ariColor::newColor( $button1_color )->luminance ) { // Our background color is dark, so we need to create a light text color. $button1_color_bg = '#fff'; } else { // Our background color is light, so we need to create a dark text color $button1_color_bg = '#000' ; } $button1_color_bg = esc_attr( $button1_color_bg ); /* Color calculation for text */ $inline_css .= "#".$id." .btn.btn-rose.one { color: $button1_color_bg; }" ; /*----------- button two -----------*/ $inline_css .= " #".$id." .btn.btn-rose.two { background-color: $button2_color ; border-color:$button2_color; box-shadow:0 2px 2px 0 " . Kirki_Color::get_rgba($button2_color, .14) . ",0 3px 1px -2px " . Kirki_Color::get_rgba($button2_color, .2) . ",0 1px 5px 0 " . Kirki_Color::get_rgba($button2_color, .12) . "; } #".$id." .btn.btn-rose.two:hover { box-shadow: 0 14px 26px -12px " . Kirki_Color::get_rgba($button2_color, .42) . ", 0 4px 23px 0 rgba(0, 0, 0, .12), 0 8px 10px -5px " . Kirki_Color::get_rgba($button2_color, .2) . "; }" ; if ( 225 > ariColor::newColor( $button2_color )->luminance ) { // Our background color is dark, so we need to create a light text color. $button2_color_bg = '#fff'; } else { // Our background color is light, so we need to create a dark text color $button2_color_bg = '#000' ; } $button2_color_bg = esc_attr( $button2_color_bg ); /* Color calculation for text */ $inline_css .= "#".$id." .btn.btn-rose.two { color: $button2_color_bg; }" ; wp_add_inline_style( 'aazeen-style', $inline_css ); } } } } // register aazeen_ex dual category posts widget function aazeen_ex_callout_widget() { register_widget( 'aazeen_callout_widget' ); } add_action( 'widgets_init', 'aazeen_ex_callout_widget' );