forked from Michel2/wp-jquery-datatable
Change wp compability with 4_9
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
Contributors: biztechc
|
Contributors: biztechc
|
||||||
Tags: WP jQuery DataTable, jQuery, jQuery DataTable, Table
|
Tags: WP jQuery DataTable, jQuery, jQuery DataTable, Table
|
||||||
Requires at least: 3.6.1
|
Requires at least: 3.6.1
|
||||||
Tested up to: 4.8.0
|
Tested up to: 4.9
|
||||||
Stable tag: 1.0.2
|
Stable tag: 1.0.2
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
|
|
||||||
|
|||||||
@@ -275,14 +275,14 @@ function wp_jdt_shortcode( $atts, $content = "" ) {
|
|||||||
'searching' => "$wp_jdt_searching",
|
'searching' => "$wp_jdt_searching",
|
||||||
), $atts, 'wp_jdt' );
|
), $atts, 'wp_jdt' );
|
||||||
|
|
||||||
$wp_jdt_script .= "";
|
$wp_jdt_script = "";
|
||||||
$wp_jdt_script .= "<script type='text/javascript' language='javascript' class='init'> \n";
|
$wp_jdt_script .= "<script type='text/javascript' language='javascript' class='init'> \n";
|
||||||
$wp_jdt_script .= "jQuery(document).ready(function() { \n";
|
$wp_jdt_script .= "jQuery(document).ready(function() { \n";
|
||||||
|
|
||||||
$wp_jdt_script .= "jQuery('#$atts[id]').DataTable({ \n";
|
$wp_jdt_script .= "jQuery('#$atts[id]').DataTable({ \n";
|
||||||
$wp_jdt_script .= "'info': $atts[info], \n";
|
$wp_jdt_script .= "'info': '$atts[info]', \n";
|
||||||
$wp_jdt_script .= "'paging': $atts[paging], \n";
|
$wp_jdt_script .= "'paging': '$atts[paging]', \n";
|
||||||
if($atts[page_length] > 0) {
|
if($atts['page_length'] > 0) {
|
||||||
$wp_jdt_script .= "'pageLength': $atts[page_length], \n";
|
$wp_jdt_script .= "'pageLength': $atts[page_length], \n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -290,10 +290,10 @@ function wp_jdt_shortcode( $atts, $content = "" ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$wp_jdt_script .= "'pagingType': '$atts[paging_type]', \n";
|
$wp_jdt_script .= "'pagingType': '$atts[paging_type]', \n";
|
||||||
$wp_jdt_script .= "'bLengthChange': $atts[b_length_change], \n";
|
$wp_jdt_script .= "'bLengthChange': '$atts[b_length_change]', \n";
|
||||||
$wp_jdt_script .= "'ordering': $atts[ordering], \n";
|
$wp_jdt_script .= "'ordering': '$atts[ordering]', \n";
|
||||||
$wp_jdt_script .= "'order': [$atts[order_row_number],'$atts[order_row_number_sort]'], \n";
|
$wp_jdt_script .= "'order': [$atts[order_row_number],'$atts[order_row_number_sort]'], \n";
|
||||||
$wp_jdt_script .= "'searching': $atts[searching], \n";
|
$wp_jdt_script .= "'searching': '$atts[searching]', \n";
|
||||||
$wp_jdt_script .= "} ); \n";
|
$wp_jdt_script .= "} ); \n";
|
||||||
|
|
||||||
$wp_jdt_script .= "jQuery('#$atts[id]_wrapper select').prepend('<option value=$atts[page_length]>Select</option>').val('');
|
$wp_jdt_script .= "jQuery('#$atts[id]_wrapper select').prepend('<option value=$atts[page_length]>Select</option>').val('');
|
||||||
|
|||||||
Reference in New Issue
Block a user