esc_html__( 'Displays brief author detail.', 'alpha-blog' ), ) ); } public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); $author_page = !empty( $instance['author_page'] ) ? $instance['author_page'] : ''; $author_link_title = !empty( $instance['author_link_title'] ) ? $instance['author_link_title'] : ''; $author_args = array( 'post_type' => 'page', 'posts_per_page' => 1, ); if( $author_page > 0 ) { $author_args['page_id'] = absint( $author_page ); } $author = new WP_Query( $author_args ); if( $author->have_posts() ) : while( $author->have_posts() ) : $author->the_post(); ?>
'', 'author_page' => '', 'author_link_title' => '', ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>
esc_attr( $this->get_field_id( 'author_page' ) ), 'class' => 'widefat', 'name' => esc_attr( $this->get_field_name( 'author_page' ) ), 'selected' => esc_attr( $instance[ 'author_page' ] ), 'show_option_none' => esc_html__( '— Select Page —', 'alpha-blog' ), ) ); ?>