diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php index 1f2c4ae2..b716f382 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin/Meta Boxes - * @version 0.8.4 + * @version 0.8.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -19,39 +19,41 @@ class SP_Meta_Box_Event_Teams { * Output the metabox */ public static function output( $post ) { - $teams = (array)get_post_meta( $post->ID, 'sp_team', false ); - foreach ( $teams as $key => $value ): - ?> + $limit = get_option( 'sportspress_event_teams', 2 ); + $teams = (array) get_post_meta( $post->ID, 'sp_team', false ); + for ( $i = 0; $i < $limit; $i ++ ): + $team = array_shift( $teams ); + ?>

- 'sp_team', - 'name' => 'sp_team[]', - 'class' => 'sportspress-pages', - 'show_option_none' => sprintf( __( '— None —', 'sportspress' ), 'Team' ), - 'selected' => $value - ); - wp_dropdown_pages( $args ); - ?> + 'sp_team', + 'name' => 'sp_team[]', + 'class' => 'sportspress-pages', + 'show_option_none' => sprintf( __( '— None —', 'sportspress' ), 'Team' ), + 'selected' => $team + ); + wp_dropdown_pages( $args ); + ?>

ID, 'sp_player', 'block', 'sp_current_team', $key ); - sp_post_checklist( $post->ID, 'sp_staff', 'none', 'sp_current_team', $key ); + sp_post_checklist( $post->ID, 'sp_player', 'block', 'sp_current_team', $i ); + sp_post_checklist( $post->ID, 'sp_staff', 'none', 'sp_current_team', $i ); ?>
- Import and choose == Changelog == += 0.8.6 = +* Fix - Issue adding teams to events. + = 0.8.5 = * Fix - Issue saving new venues. diff --git a/sportspress.php b/sportspress.php index 4396e1b1..ddb8492a 100644 --- a/sportspress.php +++ b/sportspress.php @@ -3,7 +3,7 @@ * Plugin Name: SportsPress * Plugin URI: http://wordpress.org/plugins/sportspress * Description: Manage your club and its players, staff, events, league tables, and player lists. - * Version: 0.8.5 + * Version: 0.8.6 * Author: ThemeBoy * Author URI: http://themeboy.com * Requires at least: 3.8 @@ -26,14 +26,14 @@ if ( ! class_exists( 'SportsPress' ) ) : * Main SportsPress Class * * @class SportsPress - * @version 0.8.5 + * @version 0.8.6 */ final class SportsPress { /** * @var string */ - public $version = '0.8.5'; + public $version = '0.8.6'; /** * @var SporsPress The single instance of the class