Merge pull request #125 from MounirHamani/MounirHamani-patch-Filter-teams-by-competition-and-season-when-creating-an-event
Filter teams by competition and season when creating an event.
This commit is contained in:
@@ -55,6 +55,10 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
</p>
|
</p>
|
||||||
<p class="sp-tab-select sp-title-generator">
|
<p class="sp-tab-select sp-title-generator">
|
||||||
<?php
|
<?php
|
||||||
|
$league = get_term( $league_id, 'sp_league' );
|
||||||
|
$league_slug = $league->slug;
|
||||||
|
$season = get_term( $season_id, 'sp_season' );
|
||||||
|
$season_slug = $season->slug;
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'sp_team[]',
|
'name' => 'sp_team[]',
|
||||||
@@ -63,6 +67,8 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
'values' => 'ID',
|
'values' => 'ID',
|
||||||
'selected' => $team,
|
'selected' => $team,
|
||||||
'chosen' => true,
|
'chosen' => true,
|
||||||
|
'sp_league' => $league_slug,
|
||||||
|
'sp-season' => $season_slug,
|
||||||
);
|
);
|
||||||
sp_dropdown_pages( $args );
|
sp_dropdown_pages( $args );
|
||||||
?>
|
?>
|
||||||
@@ -97,4 +103,4 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user