Adjust player statistics meta box
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
* @author ThemeBoy
|
* @author ThemeBoy
|
||||||
* @category Admin
|
* @category Admin
|
||||||
* @package SportsPress/Admin/Meta_Boxes
|
* @package SportsPress/Admin/Meta_Boxes
|
||||||
* @version 1.1.4
|
* @version 1.3.2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||||
@@ -84,37 +84,41 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<?php if ( $league_id ): ?>
|
<?php if ( $league_id ): ?>
|
||||||
<td>
|
<?php if ( $div_id == 0 ): ?>
|
||||||
<?php
|
<td> </td>
|
||||||
$value = sp_array_value( $leagues, $div_id, '-1' );
|
<?php else: ?>
|
||||||
$args = array(
|
<td>
|
||||||
'post_type' => 'sp_team',
|
<?php
|
||||||
'name' => 'sp_leagues[' . $league_id . '][' . $div_id . ']',
|
$value = sp_array_value( $leagues, $div_id, '-1' );
|
||||||
'show_option_none' => __( '— None —', 'sportspress' ),
|
$args = array(
|
||||||
'sort_order' => 'ASC',
|
'post_type' => 'sp_team',
|
||||||
'sort_column' => 'menu_order',
|
'name' => 'sp_leagues[' . $league_id . '][' . $div_id . ']',
|
||||||
'selected' => $value,
|
'show_option_none' => __( '— None —', 'sportspress' ),
|
||||||
'values' => 'ID',
|
'sort_order' => 'ASC',
|
||||||
'include' => $teams,
|
'sort_column' => 'menu_order',
|
||||||
'tax_query' => array(
|
'selected' => $value,
|
||||||
'relation' => 'AND',
|
'values' => 'ID',
|
||||||
array(
|
'include' => $teams,
|
||||||
'taxonomy' => 'sp_league',
|
'tax_query' => array(
|
||||||
'terms' => $league_id,
|
'relation' => 'AND',
|
||||||
'field' => 'id',
|
array(
|
||||||
|
'taxonomy' => 'sp_league',
|
||||||
|
'terms' => $league_id,
|
||||||
|
'field' => 'id',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'taxonomy' => 'sp_season',
|
||||||
|
'terms' => $div_id,
|
||||||
|
'field' => 'id',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
array(
|
);
|
||||||
'taxonomy' => 'sp_season',
|
if ( ! sp_dropdown_pages( $args ) ):
|
||||||
'terms' => $div_id,
|
_e( 'No results found.', 'sportspress' );
|
||||||
'field' => 'id',
|
endif;
|
||||||
),
|
?>
|
||||||
),
|
</td>
|
||||||
);
|
<?php endif; ?>
|
||||||
if ( ! sp_dropdown_pages( $args ) ):
|
|
||||||
_e( 'No results found.', 'sportspress' );
|
|
||||||
endif;
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php foreach ( $columns as $column => $label ): if ( $column == 'team' ) continue;
|
<?php foreach ( $columns as $column => $label ): if ( $column == 'team' ) continue;
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user