Add paginate option to tables close #18
This commit is contained in:
@@ -44,7 +44,7 @@ class SP_Settings_Events extends SP_Settings_Page {
|
||||
array(
|
||||
'title' => __( 'Number of Teams', 'sportspress' ),
|
||||
'id' => 'sportspress_event_num_teams',
|
||||
'css' => 'width:50px;',
|
||||
'class' => 'small-text',
|
||||
'default' => '2',
|
||||
'type' => 'number',
|
||||
'custom_attributes' => array(
|
||||
@@ -82,6 +82,31 @@ class SP_Settings_Events extends SP_Settings_Page {
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'event_options' ),
|
||||
|
||||
array( 'title' => __( 'Calendars', 'sportspress' ), 'type' => 'title', 'id' => 'calendar_options' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'Pagination', 'sportspress' ),
|
||||
'desc' => __( 'Paginate', 'sportspress' ),
|
||||
'id' => 'sportspress_calendar_paginated',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Limit', 'sportspress' ),
|
||||
'id' => 'sportspress_calendar_rows',
|
||||
'class' => 'small-text',
|
||||
'default' => '10',
|
||||
'desc' => __( 'events', 'sportspress' ),
|
||||
'type' => 'number',
|
||||
'custom_attributes' => array(
|
||||
'min' => 1,
|
||||
'step' => 1
|
||||
),
|
||||
),
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'calendar_options' ),
|
||||
|
||||
array( 'title' => __( 'Text', 'sportspress' ), 'type' => 'title', 'desc' => __( 'The following options affect how words are displayed on the frontend.', 'sportspress' ), 'id' => 'text_options' ),
|
||||
|
||||
);
|
||||
|
||||
@@ -48,15 +48,40 @@ class SP_Settings_Players extends SP_Settings_Page {
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'player_options' ),
|
||||
|
||||
array( 'title' => __( 'Player Lists', 'sportspress' ), 'type' => 'title', 'id' => 'list_options' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'Player Lists', 'sportspress' ),
|
||||
'title' => __( 'Players', 'sportspress' ),
|
||||
'desc' => __( 'Link players', 'sportspress' ),
|
||||
'id' => 'sportspress_list_link_players',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'player_options' ),
|
||||
array(
|
||||
'title' => __( 'Pagination', 'sportspress' ),
|
||||
'desc' => __( 'Paginate', 'sportspress' ),
|
||||
'id' => 'sportspress_list_paginated',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Limit', 'sportspress' ),
|
||||
'id' => 'sportspress_list_rows',
|
||||
'class' => 'small-text',
|
||||
'default' => '10',
|
||||
'desc' => __( 'players', 'sportspress' ),
|
||||
'type' => 'number',
|
||||
'custom_attributes' => array(
|
||||
'min' => 1,
|
||||
'step' => 1
|
||||
),
|
||||
),
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'list_options' ),
|
||||
|
||||
array( 'title' => __( 'Text', 'sportspress' ), 'type' => 'title', 'desc' => __( 'The following options affect how words are displayed on the frontend.', 'sportspress' ), 'id' => 'text_options' ),
|
||||
|
||||
|
||||
@@ -39,9 +39,13 @@ class SP_Settings_Teams extends SP_Settings_Page {
|
||||
$settings = array(
|
||||
|
||||
array( 'title' => __( 'Team Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'team_options' ),
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'team_options' ),
|
||||
|
||||
array( 'title' => __( 'League Tables', 'sportspress' ), 'type' => 'title', 'id' => 'table_options' ),
|
||||
|
||||
array(
|
||||
'title' => __( 'League Tables', 'sportspress' ),
|
||||
'title' => __( 'Teams', 'sportspress' ),
|
||||
'desc' => __( 'Display logos', 'sportspress' ),
|
||||
'id' => 'sportspress_table_show_logos',
|
||||
'default' => 'yes',
|
||||
@@ -57,7 +61,28 @@ class SP_Settings_Teams extends SP_Settings_Page {
|
||||
'checkboxgroup' => 'end',
|
||||
),
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'team_options' ),
|
||||
array(
|
||||
'title' => __( 'Pagination', 'sportspress' ),
|
||||
'desc' => __( 'Paginate', 'sportspress' ),
|
||||
'id' => 'sportspress_table_paginated',
|
||||
'default' => 'yes',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
|
||||
array(
|
||||
'title' => __( 'Limit', 'sportspress' ),
|
||||
'id' => 'sportspress_table_rows',
|
||||
'class' => 'small-text',
|
||||
'default' => '10',
|
||||
'desc' => __( 'teams', 'sportspress' ),
|
||||
'type' => 'number',
|
||||
'custom_attributes' => array(
|
||||
'min' => 1,
|
||||
'step' => 1
|
||||
),
|
||||
),
|
||||
|
||||
array( 'type' => 'sectionend', 'id' => 'table_options' ),
|
||||
|
||||
array( 'title' => __( 'Text', 'sportspress' ), 'type' => 'title', 'desc' => __( 'The following options affect how words are displayed on the frontend.', 'sportspress' ), 'id' => 'text_options' ),
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class SP_Frontend_Scripts {
|
||||
wp_enqueue_script( 'sportspress', plugin_dir_url( SP_PLUGIN_FILE ) .'assets/js/sportspress.js', array( 'jquery' ), time(), true );
|
||||
|
||||
// Localize scripts.
|
||||
wp_localize_script( 'sportspress', 'localized_strings', array( 'days' => __( 'days', 'sportspress' ), 'hrs' => __( 'hrs', 'sportspress' ), 'mins' => __( 'mins', 'sportspress' ), 'secs' => __( 'secs', 'sportspress' ) ) );
|
||||
wp_localize_script( 'sportspress', 'localized_strings', array( 'days' => __( 'days', 'sportspress' ), 'hrs' => __( 'hrs', 'sportspress' ), 'mins' => __( 'mins', 'sportspress' ), 'secs' => __( 'secs', 'sportspress' ), 'previous' => __( 'Previous', 'sportspress' ), 'next' => __( 'Next', 'sportspress' ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user