Make event list and blocks pagination independent

This commit is contained in:
Brian Miyaji
2014-08-24 16:45:03 +10:00
parent 2df651a7de
commit 5f0a93a8af
3 changed files with 33 additions and 8 deletions

View File

@@ -130,19 +130,19 @@ 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' => __( 'Event List', 'sportspress' ), 'type' => 'title', 'id' => 'event_list_options' ),
array(
'title' => __( 'Pagination', 'sportspress' ),
'desc' => __( 'Paginate', 'sportspress' ),
'id' => 'sportspress_calendar_paginated',
'id' => 'sportspress_event_list_paginated',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Limit', 'sportspress' ),
'id' => 'sportspress_calendar_rows',
'id' => 'sportspress_event_list_rows',
'class' => 'small-text',
'default' => '10',
'desc' => __( 'events', 'sportspress' ),
@@ -153,7 +153,32 @@ class SP_Settings_Events extends SP_Settings_Page {
),
),
array( 'type' => 'sectionend', 'id' => 'calendar_options' ),
array( 'type' => 'sectionend', 'id' => 'event_list_options' ),
array( 'title' => __( 'Event Blocks', 'sportspress' ), 'type' => 'title', 'id' => 'event_blocks_options' ),
array(
'title' => __( 'Pagination', 'sportspress' ),
'desc' => __( 'Paginate', 'sportspress' ),
'id' => 'sportspress_event_blocks_paginated',
'default' => 'yes',
'type' => 'checkbox',
),
array(
'title' => __( 'Limit', 'sportspress' ),
'id' => 'sportspress_event_blocks_rows',
'class' => 'small-text',
'default' => '10',
'desc' => __( 'events', 'sportspress' ),
'type' => 'number',
'custom_attributes' => array(
'min' => 1,
'step' => 1
),
),
array( 'type' => 'sectionend', 'id' => 'event_list_options' ),
)); // End event settings
}

View File

@@ -16,8 +16,8 @@ $defaults = array(
'date' => 'default',
'number' => -1,
'link_teams' => get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false,
'paginated' => get_option( 'sportspress_calendar_paginated', 'yes' ) == 'yes' ? true : false,
'rows' => get_option( 'sportspress_calendar_rows', 10 ),
'paginated' => get_option( 'sportspress_event_blocks_paginated', 'yes' ) == 'yes' ? true : false,
'rows' => get_option( 'sportspress_event_blocks_rows', 10 ),
'order' => 'default',
'show_all_events_link' => false,
);

View File

@@ -21,8 +21,8 @@ $defaults = array(
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false,
'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false,
'paginated' => get_option( 'sportspress_calendar_paginated', 'yes' ) == 'yes' ? true : false,
'rows' => get_option( 'sportspress_calendar_rows', 10 ),
'paginated' => get_option( 'sportspress_event_list_paginated', 'yes' ) == 'yes' ? true : false,
'rows' => get_option( 'sportspress_event_list_rows', 10 ),
'order' => 'default',
'columns' => null,
'show_all_events_link' => false,