Merge branch 'master' into feature-gutenberg

This commit is contained in:
Brian Miyaji
2018-09-18 09:12:53 +10:00
2 changed files with 11 additions and 4 deletions

View File

@@ -39,8 +39,11 @@ class SP_Meta_Box_Calendar_Data {
$title_format = get_option( 'sportspress_event_list_title_format', 'title' );
$time_format = get_option( 'sportspress_event_list_time_format', 'combined' );
if ( is_array( $usecolumns ) )
if ( is_array( $usecolumns ) ) {
$usecolumns = array_filter( $usecolumns );
}else{
$usecolumns = array();
}
?>
<div class="sp-data-table-container">
<table class="widefat sp-data-table sp-calendar-table">

View File

@@ -21,7 +21,11 @@ class SP_Meta_Box_Player_Statistics {
public static function output( $post ) {
$player = new SP_Player( $post );
$leagues = $player->get_terms_sorted_by_sp_order( 'sp_league' );
$league_num = sizeof( $leagues );
if ( is_array ( $leagues ) ) {
$league_num = sizeof( $leagues );
}else{
$league_num =0;
}
$sections = get_option( 'sportspress_player_performance_sections', -1 );
$show_career_totals = 'yes' === get_option( 'sportspress_player_show_career_total', 'no' ) ? true : false;