'ascendoor-widget author-info', 'description' => __( 'Retrive Author Information Widget', 'ascendoor-magazine' ), ); parent::__construct( 'ascendoor_magazine_author_info_widget', __( 'Ascendoor Author Info Widget', 'ascendoor-magazine' ), $ascendoor_magazine_author_info_widget_ops ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { if ( ! isset( $args['widget_id'] ) ) { $args['widget_id'] = $this->id; } $section_title = ! empty( $instance['title'] ) ? $instance['title'] : ''; $section_title = apply_filters( 'widget_title', $section_title, $instance, $this->id_base ); $author_name = ! empty( $instance['name'] ) ? $instance['name'] : ''; $author_description = ! empty( $instance['description'] ) ? $instance['description'] : ''; $author_image_url = ! empty( $instance['author_image_url'] ) ? $instance['author_image_url'] : ''; $open_link_new_tab = ! empty( $instance['open_link_new_tab'] ) ? true : false; $target = empty( $open_link_new_tab ) ? '' : 'target="_blank"'; $social_link_number = isset( $instance['social_link_number'] ) ? absint( $instance['social_link_number'] ) : 3; echo $args['before_widget']; if ( ! empty( $section_title ) ) { ?>
:
/>