Add responsiveness to tables

For league tables, event lists, player lists, and box score (player performance).
This commit is contained in:
savvasha
2017-11-29 17:34:37 +02:00
parent 5705d35e5b
commit 70611ac98c
5 changed files with 139 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ $defaults = array(
'show_title' => get_option( 'sportspress_table_show_title', 'yes' ) == 'yes' ? true : false,
'show_team_logo' => get_option( 'sportspress_table_show_logos', 'yes' ) == 'yes' ? true : false,
'link_posts' => null,
'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false,
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false,
'paginated' => get_option( 'sportspress_table_paginated', 'yes' ) == 'yes' ? true : false,
@@ -60,7 +61,10 @@ $data = $table->data();
// The first row should be column labels
$labels = $data[0];
// If responsive tables are enabled then load the inline css code
if ($responsive == true){
responsive_tables_css($labels);
}
// Remove the first row to leave us with the actual data
unset( $data[0] );