__( 'Display current logged in users detail and menu.', 'anspress-question-answer' ) ) ); } public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance['title'] ); echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } global $ap_user_query; echo '
'; if ( is_user_logged_in() ) { $ap_user_query = ap_has_users( array( 'ID' => ap_get_displayed_user_id() ) ); if ( $ap_user_query->has_users() ) { while ( ap_users() ) : ap_the_user(); ap_get_template_part( 'widgets/user' ); endwhile; } } else { _e( 'Login to see your profile links', 'anspress-question-answer' ); } echo '
'; echo $args['after_widget']; } public function form( $instance ) { if ( isset( $instance[ 'title' ] ) ) { $title = $instance[ 'title' ]; } else { $title = __( 'My profile', 'anspress-question-answer' ); } ?>