Display all event performance columns by default
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Meta_Boxes
|
||||
* @version 1.1
|
||||
* @version 1.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -64,7 +64,7 @@ class SP_Meta_Box_Event_Performance {
|
||||
<th>
|
||||
<?php if ( $has_checkboxes ): ?>
|
||||
<label for="sp_columns_position">
|
||||
<input type="checkbox" name="sp_columns[]" value="position" id="sp_columns_position" <?php checked( is_array( $columns ) && in_array( 'position', $columns ) ); ?>>
|
||||
<input type="checkbox" name="sp_columns[]" value="position" id="sp_columns_position" <?php checked( ! is_array( $columns ) || in_array( 'position', $columns ) ); ?>>
|
||||
<?php _e( 'Position', 'sportspress' ); ?>
|
||||
</label>
|
||||
<?php else: ?>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* The SportsPress event class handles individual event data.
|
||||
*
|
||||
* @class SP_Event
|
||||
* @version 1.2.3
|
||||
* @version 1.3
|
||||
* @package SportsPress/Classes
|
||||
* @category Class
|
||||
* @author ThemeBoy
|
||||
@@ -98,13 +98,13 @@ class SP_Event extends SP_Custom_Post{
|
||||
else:
|
||||
// Add position to performance labels
|
||||
$labels = array_merge( array( 'position' => __( 'Position', 'sportspress' ) ), $labels );
|
||||
if ( ! is_array( $columns ) )
|
||||
$columns = array();
|
||||
foreach ( $labels as $key => $label ):
|
||||
if ( ! in_array( $key, $columns ) ):
|
||||
unset( $labels[ $key ] );
|
||||
endif;
|
||||
endforeach;
|
||||
if ( is_array( $columns ) ):
|
||||
foreach ( $labels as $key => $label ):
|
||||
if ( ! in_array( $key, $columns ) ):
|
||||
unset( $labels[ $key ] );
|
||||
endif;
|
||||
endforeach;
|
||||
endif;
|
||||
$performance[0] = $labels;
|
||||
return $performance;
|
||||
endif;
|
||||
|
||||
@@ -129,7 +129,7 @@ if ( is_array( $teams ) ):
|
||||
|
||||
echo '<td class="data-name">' . $name . '</td>';
|
||||
|
||||
if ( $mode == 'icons' ); echo '<td class="sp-performance-icons">';
|
||||
if ( $mode == 'icons' ) echo '<td class="sp-performance-icons">';
|
||||
|
||||
foreach( $labels as $key => $label ):
|
||||
if ( $key == 'name' )
|
||||
@@ -162,7 +162,7 @@ if ( is_array( $teams ) ):
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
if ( $mode == 'icons' ); echo '</td>';
|
||||
if ( $mode == 'icons' ) echo '</td>';
|
||||
|
||||
echo '</tr>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user