Add option to display full time in event details
This commit is contained in:
@@ -65,7 +65,7 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|||||||
array( 'type' => 'event_tabs' ),
|
array( 'type' => 'event_tabs' ),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Display', 'sportspress' ),
|
'title' => __( 'Details', 'sportspress' ),
|
||||||
'desc' => __( 'Date', 'sportspress' ),
|
'desc' => __( 'Date', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_show_date',
|
'id' => 'sportspress_event_show_date',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
@@ -86,6 +86,14 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|||||||
'id' => 'sportspress_event_show_day',
|
'id' => 'sportspress_event_show_day',
|
||||||
'default' => 'no',
|
'default' => 'no',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
|
'checkboxgroup' => '',
|
||||||
|
),
|
||||||
|
|
||||||
|
array(
|
||||||
|
'desc' => __( 'Full Time', 'sportspress' ),
|
||||||
|
'id' => 'sportspress_event_show_full_time',
|
||||||
|
'default' => 'no',
|
||||||
|
'type' => 'checkbox',
|
||||||
'checkboxgroup' => 'end',
|
'checkboxgroup' => 'end',
|
||||||
),
|
),
|
||||||
) ),
|
) ),
|
||||||
@@ -380,8 +388,8 @@ class SP_Settings_Events extends SP_Settings_Page {
|
|||||||
),
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Time', 'sportspress' ),
|
'desc' => __( 'Minutes', 'sportspress' ),
|
||||||
'id' => 'sportspress_event_performance_show_time',
|
'id' => 'sportspress_event_performance_show_minutes',
|
||||||
'default' => 'yes',
|
'default' => 'yes',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'checkboxgroup' => 'end',
|
'checkboxgroup' => 'end',
|
||||||
|
|||||||
@@ -45,6 +45,14 @@ if ( 'yes' === get_option( 'sportspress_event_show_day', 'yes' ) ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( 'yes' === get_option( 'sportspress_event_show_full_time', 'yes' ) ) {
|
||||||
|
$full_time = get_post_meta( $id, 'sp_minutes', true );
|
||||||
|
if ( '' === $full_time ) {
|
||||||
|
$full_time = get_option( 'sportspress_minutes', 90 );
|
||||||
|
}
|
||||||
|
$data[ __( 'Full Time', 'sportspress' ) ] = $full_time . '\'';
|
||||||
|
}
|
||||||
|
|
||||||
$data = apply_filters( 'sportspress_event_details', $data, $id );
|
$data = apply_filters( 'sportspress_event_details', $data, $id );
|
||||||
|
|
||||||
if ( ! sizeof( $data ) ) return;
|
if ( ! sizeof( $data ) ) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user