* @license GPL 2+ GNU GPL licence above 2+ * @link https://anspress.io * @since 2.0.0-alpha2 */ // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { wp_die(); } class AnsPress_Participants_Widget extends WP_Widget { /** * Initialize the class */ public function __construct() { parent::__construct( 'AnsPress_Participants_Widget', __( '(AnsPress) Participants', 'anspress-question-answer' ), array( 'description' => __( 'Show question participants', 'anspress-question-answer' ) ) ); } public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance['title'] ); $avatar_size = $instance['avatar_size']; echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } ap_get_all_parti( $avatar_size ); echo $args['after_widget']; } public function form( $instance ) { $title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : ''; $avatar_size = isset( $instance[ 'avatar_size' ] ) ? $instance[ 'avatar_size' ] : 30; ?>