'', 'title' => '', 'sub_title' => '', 'shortcode' => '', 'page_id' => '', 'single_page_content_from' => 'content', 'single_page_content_number' => -1, 'background_options' => 'default' ); function __construct() { parent::__construct( /*Base ID of your widget*/ 'beauty_studio_contact', /*Widget name will appear in UI*/ esc_html__('AT Contact Section', 'beauty-studio'), /*Widget description*/ array( 'description' => esc_html__( 'Show Contact Section.', 'beauty-studio' ) ) ); } /*Widget Backend*/ public function form( $instance ) { $instance = wp_parse_args( (array) $instance, $this->defaults ); /*default values*/ $unique_id = esc_attr( $instance[ 'unique_id' ] ); $title = esc_attr( $instance[ 'title' ] ); $sub_title = esc_textarea( $instance['sub_title'] ); $shortcode = esc_attr( $instance[ 'shortcode' ] ); $page_id = absint( $instance[ 'page_id' ] ); $single_page_content_from = esc_attr( $instance['single_page_content_from'] ); $single_page_content_number = intval( $instance['single_page_content_number'] ); $background_options = esc_attr( $instance['background_options'] ); ?>


","" ); ?>


$page_id, 'name' => $this->get_field_name( 'page_id' ), 'id' => $this->get_field_id( 'page_id' ), 'class' => 'widefat', 'show_option_none' => esc_html__('Select Page','beauty-studio'), 'option_none_value' => 0 // string ); wp_dropdown_pages( $args ); ?>


defaults); /*default values*/ $unique_id = !empty( $instance[ 'unique_id' ] ) ? esc_attr( $instance[ 'unique_id' ] ) : esc_attr( $this->id ); $title = apply_filters( 'widget_title', !empty( $instance['title'] ) ? $instance['title'] : '', $instance, $this->id_base ); $sub_title = apply_filters( 'widget_text', !empty( $instance['sub_title'] ) ? $instance['sub_title'] : '' , $instance ); $shortcode = wp_kses_post( $instance[ 'shortcode' ] ); $page_id = absint( $instance[ 'page_id' ] ); $single_page_content_from = esc_attr( $instance['single_page_content_from'] ); $single_page_content_number = intval( $instance['single_page_content_number'] ); $background_options = esc_attr( $instance['background_options'] ); $bg_gray_class = $background_options == 'gray'?'at-gray-bg':''; echo $args['before_widget']; $animation = "init-animate zoomIn"; ?>
"; if ( ! empty( $title ) ) { echo $args['before_title'] . esc_html( $title ) . $args['after_title']; } if( !empty( $sub_title ) ) { ?>

"; } $next_col = "col-md-12"; if( !empty ( $page_id ) ) : $beauty_studio_post_in_page_args = array( 'page_id' => $page_id, 'posts_per_page' => 1, 'post_type' => 'page', 'no_found_rows' => true, 'post_status' => 'publish' ); $contact_page_query = new WP_Query( $beauty_studio_post_in_page_args ); /*The Loop*/ if ( $contact_page_query->have_posts() ): while( $contact_page_query->have_posts() ):$contact_page_query->the_post(); ?>
', '' ); if( 0 != $single_page_content_number ){ beauty_studio_advanced_content( $single_page_content_number, $single_page_content_from ); } ?>