Add player statistics to template selector
This commit is contained in:
@@ -69,9 +69,9 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Career Total', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_total',
|
||||
'default' => 'no',
|
||||
'desc' => __( 'Statistics', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_statistics',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'end',
|
||||
),
|
||||
@@ -98,3 +98,20 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
endif;
|
||||
|
||||
return new SP_Settings_Players();
|
||||
|
||||
/*
|
||||
array(
|
||||
'title' => __( 'Templates', 'sportspress' ),
|
||||
'type' => 'templates',
|
||||
'options' => array(
|
||||
'details' => array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'default' => 'yes',
|
||||
),
|
||||
'statistics' => array(
|
||||
'title' => __( 'Statistics', 'sportspress' ),
|
||||
'default' => 'yes',
|
||||
),
|
||||
),
|
||||
),
|
||||
*/
|
||||
@@ -4,10 +4,11 @@
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @package SportsPress/Templates
|
||||
* @version 1.6
|
||||
* @version 1.7.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
if ( get_option( 'sportspress_player_show_statistics', 'yes' ) === 'no' ) return;
|
||||
|
||||
if ( ! isset( $id ) )
|
||||
$id = get_the_ID();
|
||||
|
||||
Reference in New Issue
Block a user