Add drag-and-drop template layout options
This commit is contained in:
@@ -23,9 +23,13 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
public function __construct() {
|
||||
$this->id = 'players';
|
||||
$this->label = __( 'Players', 'sportspress' );
|
||||
|
||||
$this->template = 'player';
|
||||
$this->templates = SP()->templates->player;
|
||||
|
||||
add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
||||
add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) );
|
||||
add_action( 'sportspress_admin_field_player_layout', array( $this, 'layout_setting' ) );
|
||||
add_action( 'sportspress_settings_save_' . $this->id, array( $this, 'save' ) );
|
||||
}
|
||||
|
||||
@@ -37,12 +41,13 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
public function get_settings() {
|
||||
|
||||
$settings = array_merge(
|
||||
|
||||
array(
|
||||
array( 'title' => __( 'Player Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'player_options' ),
|
||||
),
|
||||
|
||||
apply_filters( 'sportspress_player_options', array(
|
||||
array( 'type' => 'player_layout' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'Link', 'sportspress' ),
|
||||
'desc' => __( 'Link players', 'sportspress' ),
|
||||
@@ -51,39 +56,6 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Display', 'sportspress' ),
|
||||
'desc' => __( 'Photo', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_photo',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'start',
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Details', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_details',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => '',
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Statistics', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_statistics',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => '',
|
||||
),
|
||||
|
||||
array(
|
||||
'desc' => __( 'Total', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_total',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
'checkboxgroup' => 'end',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Details', 'sportspress' ),
|
||||
'desc' => __( 'Nationality', 'sportspress' ),
|
||||
@@ -156,6 +128,14 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Total', 'sportspress' ),
|
||||
'desc' => __( 'Display total', 'sportspress' ),
|
||||
'id' => 'sportspress_player_show_total',
|
||||
'default' => 'no',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Nationality', 'sportspress' ),
|
||||
'desc' => __( 'Display national flags', 'sportspress' ),
|
||||
|
||||
Reference in New Issue
Block a user