esc_html__( 'Display your Profile Page with Social Media Links.', 'bosa' ), 'customize_selective_refresh' => true ); parent::__construct( 'bosa_author_widget', esc_html__( 'Bosa Author', 'bosa' ), $widget_ops ); $this->fields = array( 'title' => array( 'label' => esc_html__( 'Widget Title', 'bosa' ), 'type' => 'text', 'default' => esc_html__( 'About Author', 'bosa' ) ), 'page_id' => array( 'label' => esc_html__( 'Select Page', 'bosa' ), 'type' => 'dropdown-pages', ), 'full-square-thumb' => array( 'label' => esc_html__( 'Enable Full Size Feature Image', 'bosa' ), 'type' => 'checkbox', 'default' => false, ), 'page_title' => array( 'label' => esc_html__( 'Enable Page Title', 'bosa' ), 'type' => 'checkbox', 'default' => true, ), 'excerpt_count' => array( 'label' => esc_html__( 'Excerpt Words count to show.', 'bosa' ), 'type' => 'number', 'default' => 20, ), 'sub_title' => array( 'label' => esc_html__( 'Sub Title', 'bosa' ), 'type' => 'text', 'default' => esc_html__( 'Lifestyle Blogger','bosa' ) ), 'content_alignment' => array( 'label' => esc_html__( 'Content Alignment', 'bosa' ), 'type' => 'select', 'choices' => array( 'center' => esc_html__( 'Center', 'bosa' ), 'left' => esc_html__( 'Left', 'bosa' ), 'right' => esc_html__( 'Right', 'bosa' ), ), ), 'social_title' => array( 'label' => esc_html__( '= Social Icons =', 'bosa' ), 'type' => 'description', ), 'social_desc' => array( 'label' => esc_html__( 'Input Icon name. For Example:- fab fa-facebook For more icons https://fontawesome.com/icons?d=gallery&m=free', 'bosa' ), 'type' => 'description', ), 'social_menu_icon_1' => array( 'label' => esc_html__( 'Social Icon 1', 'bosa' ), 'type' => 'text', ), 'social_menu_link_1' => array( 'label' => esc_html__( 'Social Icon Link 1', 'bosa' ), 'type' => 'text', ), 'social_menu_icon_2' => array( 'label' => esc_html__( 'Social Icon 2', 'bosa' ), 'type' => 'text', ), 'social_menu_link_2' => array( 'label' => esc_html__( 'Social Icon Link 2', 'bosa' ), 'type' => 'text', ), 'social_menu_icon_3' => array( 'label' => esc_html__( 'Social Icon 3', 'bosa' ), 'type' => 'text', ), 'social_menu_link_3' => array( 'label' => esc_html__( 'Social Icon Link 3', 'bosa' ), 'type' => 'text', ), 'social_menu_icon_4' => array( 'label' => esc_html__( 'Social Icon 4', 'bosa' ), 'type' => 'text', ), 'social_menu_link_4' => array( 'label' => esc_html__( 'Social Icon Link 4', 'bosa' ), 'type' => 'text', ), 'social_menu_icon_5' => array( 'label' => esc_html__( 'Social Icon 5', 'bosa' ), 'type' => 'text', ), 'social_menu_link_5' => array( 'label' => esc_html__( 'Social Icon Link 5', 'bosa' ), 'type' => 'text', ), 'social_menu_icon_6' => array( 'label' => esc_html__( 'Social Icon 6', 'bosa' ), 'type' => 'text', ), 'social_menu_link_6' => array( 'label' => esc_html__( 'Social Icon Link 6', 'bosa' ), 'type' => 'text', ), 'social_menu_icon_7' => array( 'label' => esc_html__( 'Social Icon 7', 'bosa' ), 'type' => 'text', ), 'social_menu_link_7' => array( 'label' => esc_html__( 'Social Icon Link 7', 'bosa' ), 'type' => 'text', ), 'social_menu_icon_8' => array( 'label' => esc_html__( 'Social Icon 8', 'bosa' ), 'type' => 'text', ), 'social_menu_link_8' => array( 'label' => esc_html__( 'Social Icon Link 8', 'bosa' ), 'type' => 'text', ), 'social_menu_icon_9' => array( 'label' => esc_html__( 'Social Icon 9', 'bosa' ), 'type' => 'text', ), 'social_menu_link_9' => array( 'label' => esc_html__( 'Social Icon Link 9', 'bosa' ), 'type' => 'text', ), 'social_menu_icon_10' => array( 'label' => esc_html__( 'Social Icon 10', 'bosa' ), 'type' => 'text', ), 'social_menu_link_10' => array( 'label' => esc_html__( 'Social Icon Link 10', 'bosa' ), 'type' => 'text', ), ); } public function widget( $args, $instance ) { echo $args[ 'before_widget' ]; $instance = $this->init_defaults( $instance ); $unique_id = uniqid(); ?>
' . $args[ 'before_title'] . esc_html( $instance[ 'title' ] ) . $args[ 'after_title' ] . ''; $query = new WP_Query( array( 'p' => $instance[ 'page_id' ], 'post_type' => 'page' ) ); while( $query->have_posts() ){ $query->the_post(); if( $instance[ 'full-square-thumb' ] ){ $src = get_the_post_thumbnail_url( get_the_ID(), 'medium' ); }else { $src = get_the_post_thumbnail_url( get_the_ID(), 'thumbnail' ); } $image_id = get_post_thumbnail_id(); $alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true); ?>