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