Added the default page lenghts and the option for All in the page lenght dropdown

This commit is contained in:
2026-07-21 23:00:49 +02:00
parent abf0b19c0e
commit 3f85ed6f74
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -229,6 +229,8 @@ function wp_jdt_shortcode($atts)
$table_order_sort = (strtolower($atts['order_row_number_sort']) === 'asc') ? 'asc' : 'desc';
$table_searching = ($atts['searching'] === 'true') ? 'true' : 'false';
$table_length_menu = array(10, 25, 50, 100, -1);
// css and js
wp_enqueue_style('jdt-style-data-tables');
wp_enqueue_script('jdt-js-datatables');
@@ -239,6 +241,7 @@ function wp_jdt_shortcode($atts)
$table_info,
$table_paging,
$table_page_length,
$table_length_menu,
$table_paging_type,
$table_b_length_change,
$table_ordering,
@@ -253,6 +256,7 @@ function wp_jdt_shortcode($atts)
'info': <?php echo $table_info; ?>,
'paging': <?php echo $table_paging; ?>,
'pageLength': <?php echo $table_page_length; ?>,
'lengthMenu': <?php echo json_encode($table_length_menu); ?>,
'pagingType': '<?php echo esc_js($table_paging_type); ?>',
'bLengthChange': <?php echo $table_b_length_change; ?>,
'ordering': <?php echo $table_ordering; ?>,