esc_html__( 'Widget for your profile.', 'bizbuzz' ), 'customize_selective_refresh' => true, ); parent::__construct( 'bizbuzz_author_profile_widget', esc_html__( 'Bizbuzz Author', 'bizbuzz' ), $widget_ops ); $this->fields = array( 'title' => array( 'label' => esc_html__( 'Title', 'bizbuzz' ), 'type' => 'text', 'default' => esc_html__( 'About the Author', 'bizbuzz' ), ), 'page_id' => array( 'label' => esc_html__( 'Select Page', 'bizbuzz' ), 'type' => 'dropdown-pages', ), 'sub_title' => array( 'label' => esc_html__( 'Sub Title', 'bizbuzz' ), 'type' => 'text', 'default' => esc_html__( 'Blogger', 'bizbuzz' ), ), 'btn_text' => array( 'label' => esc_html__( 'Button Text', 'bizbuzz' ), 'type' => 'text', 'default' => esc_html__( 'About Me', 'bizbuzz' ), ), 'social_menu' => array( 'label' => esc_html__( 'Select Social Menu', 'bizbuzz' ), 'type' => 'dropdown-menus', ), ); } public function widget( $args, $instance ) { echo $args['before_widget']; // phpcs:ignore $instance = $this->init_defaults( $instance ); $unique_id = uniqid(); ?> ' . $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title'] . ''; // phpcs:ignore $query = new WP_Query( array( 'p' => $instance['page_id'], 'post_type' => 'page', ) ); while ( $query->have_posts() ) { $query->the_post(); $default = sprintf( '%s/assets/images/default-profile.jpg', get_template_directory_uri() ); $src = bizbuzz_get_post_thumbnail_url( get_the_ID(), 'bizbuzz-square-thumbnail-small', $default ); ?>
', '' ); ?>

get_menu( $instance['social_menu'] ); // phpcs:ignore ?>