Enable player performance icons instead of values
This commit is contained in:
@@ -79,14 +79,6 @@ class SP_Settings_Events extends SP_Settings_Page {
|
||||
'id' => 'sportspress_event_show_logos',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Venue', 'sportspress' ),
|
||||
'desc' => __( 'Display maps', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_maps',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'start',
|
||||
),
|
||||
|
||||
@@ -96,7 +88,7 @@ class SP_Settings_Events extends SP_Settings_Page {
|
||||
'id' => 'sportspress_event_show_players',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'start',
|
||||
'checkboxgroup' => '',
|
||||
),
|
||||
|
||||
array(
|
||||
@@ -107,6 +99,26 @@ class SP_Settings_Events extends SP_Settings_Page {
|
||||
'checkboxgroup' => 'end',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Player Performance', 'sportspress' ),
|
||||
'id' => 'sportspress_event_performance_mode',
|
||||
'default' => 'values',
|
||||
'type' => 'radio',
|
||||
'options' => array(
|
||||
'values' => __( 'Values', 'sportspress' ),
|
||||
'icons' => __( 'Icons', 'sportspress' ),
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Venue', 'sportspress' ),
|
||||
'desc' => __( 'Display maps', 'sportspress' ),
|
||||
'id' => 'sportspress_event_show_maps',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'start',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Staff', 'sportspress' ),
|
||||
'desc' => __( 'Display staff', 'sportspress' ),
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th class="radio" scope="col"><?php _e( 'Primary', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variables', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
@@ -143,6 +143,7 @@
|
||||
<table class="widefat sp-admin-config-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="icon" scope="col"><?php _e( 'Icon', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Label', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Variable', 'sportspress' ); ?></th>
|
||||
<th scope="col"><?php _e( 'Description', 'sportspress' ); ?></th>
|
||||
@@ -151,6 +152,7 @@
|
||||
</thead>
|
||||
<?php $i = 0; foreach ( $data as $row ): ?>
|
||||
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
|
||||
<td class="icon"><?php if ( has_post_thumbnail( $row->ID ) ) echo get_the_post_thumbnail( $row->ID, 'sportspress-fit-mini' ); ?></td>
|
||||
<td class="row-title"><?php echo $row->post_title; ?></td>
|
||||
<td><?php echo $row->post_name; ?></td>
|
||||
<td><p class="description"><?php echo $row->post_excerpt; ?></p></td>
|
||||
|
||||
@@ -295,7 +295,7 @@ class SP_Post_types {
|
||||
'publicly_queryable' => false,
|
||||
'exclude_from_search' => true,
|
||||
'hierarchical' => false,
|
||||
'supports' => array( 'title', 'page-attributes', 'excerpt' ),
|
||||
'supports' => array( 'title', 'thumbnail', 'page-attributes', 'excerpt' ),
|
||||
'has_archive' => false,
|
||||
'show_in_nav_menus' => false,
|
||||
'can_export' => false,
|
||||
|
||||
@@ -153,6 +153,18 @@ function sportspress_gettext( $translated_text, $untranslated_text, $domain = nu
|
||||
case 'Slug':
|
||||
$translated_text = ( in_array( $typenow, array( 'sp_column', 'sp_statistic' ) ) ) ? __( 'Key', 'sportspress' ) : __( 'Variable', 'sportspress' );
|
||||
break;
|
||||
case 'Featured Image':
|
||||
$translated_text = __( 'Icon', 'sportspress' );
|
||||
break;
|
||||
case 'Set Featured Image':
|
||||
$translated_text = __( 'Select Icon', 'sportspress' );
|
||||
break;
|
||||
case 'Set featured image':
|
||||
$translated_text = __( 'Add icon', 'sportspress' );
|
||||
break;
|
||||
case 'Remove featured image':
|
||||
$translated_text = __( 'Remove icon', 'sportspress' );
|
||||
break;
|
||||
endswitch;
|
||||
endif;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user