get_the_ID(), 'number' => -1, 'orderby' => 'default', 'order' => 'ASC', 'itemtag' => 'dl', 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, 'size' => 'thumbnail', 'show_all_players_link' => false, 'link_posts' => get_option( 'sportspress_list_link_players', 'yes' ) == 'yes' ? true : false, ); extract( $defaults, EXTR_SKIP ); $itemtag = tag_escape( $itemtag ); $captiontag = tag_escape( $captiontag ); $icontag = tag_escape( $icontag ); $valid_tags = wp_kses_allowed_html( 'post' ); if ( ! isset( $valid_tags[ $itemtag ] ) ) $itemtag = 'dl'; if ( ! isset( $valid_tags[ $captiontag ] ) ) $captiontag = 'dd'; if ( ! isset( $valid_tags[ $icontag ] ) ) $icontag = 'dt'; $columns = intval( $columns ); $itemwidth = $columns > 0 ? floor(100/$columns) : 100; $size = $size; $float = is_rtl() ? 'right' : 'left'; $selector = 'sp-player-gallery-' . $id; $list = new SP_Player_List( $id ); $data = $list->data(); // The first row should be column labels $labels = $data[0]; // Remove the first row to leave us with the actual data unset( $data[0] ); if ( $orderby != 'default' ): $list->priorities = array( array( 'key' => $orderby, 'order' => $order, ), ); uasort( $data, array( $list, 'sort' ) ); endif; $gallery_style = $gallery_div = ''; if ( apply_filters( 'use_default_gallery_style', true ) ) $gallery_style = " "; $size_class = sanitize_html_class( $size ); $gallery_div = "