'widget_sportspress widget_staff widget_sp_staff', 'description' => esc_attr__( 'Display a single staff member.', 'sportspress' ), ); parent::__construct( 'sportspress-staff', esc_attr__( 'Staff', 'sportspress' ), $widget_ops ); } function widget( $args, $instance ) { extract( $args ); $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? null : $instance['title'], $instance, $this->id_base ); $id = empty( $instance['id'] ) ? null : $instance['id']; do_action( 'sportspress_before_widget', $args, $instance, 'staff' ); echo wp_kses_post( $before_widget ); if ( $title ) { echo wp_kses_post( $before_title . $title . $after_title ); } // Action to hook into do_action( 'sportspress_before_widget_template', $args, $instance, 'staff' ); echo '
'sp_staff', 'name' => $this->get_field_name( 'id' ), 'id' => $this->get_field_id( 'id' ), 'selected' => $id, 'values' => 'ID', 'class' => 'widefat', ); if ( ! sp_dropdown_pages( $args ) ) : sp_post_adder( 'sp_staff', esc_attr__( 'Add New', 'sportspress' ) ); endif; ?>