Change wp compability with 4_9

This commit is contained in:
biztechc
2017-11-22 09:39:49 +00:00
parent 676cc27c2b
commit f6da73d22c
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
Contributors: biztechc
Tags: WP jQuery DataTable, jQuery, jQuery DataTable, Table
Requires at least: 3.6.1
Tested up to: 4.8.0
Tested up to: 4.9
Stable tag: 1.0.2
License: GPLv2 or later
+7 -7
View File
@@ -275,14 +275,14 @@ function wp_jdt_shortcode( $atts, $content = "" ) {
'searching' => "$wp_jdt_searching",
), $atts, 'wp_jdt' );
$wp_jdt_script .= "";
$wp_jdt_script = "";
$wp_jdt_script .= "<script type='text/javascript' language='javascript' class='init'> \n";
$wp_jdt_script .= "jQuery(document).ready(function() { \n";
$wp_jdt_script .= "jQuery('#$atts[id]').DataTable({ \n";
$wp_jdt_script .= "'info': $atts[info], \n";
$wp_jdt_script .= "'paging': $atts[paging], \n";
if($atts[page_length] > 0) {
$wp_jdt_script .= "'info': '$atts[info]', \n";
$wp_jdt_script .= "'paging': '$atts[paging]', \n";
if($atts['page_length'] > 0) {
$wp_jdt_script .= "'pageLength': $atts[page_length], \n";
}
else {
@@ -290,10 +290,10 @@ function wp_jdt_shortcode( $atts, $content = "" ) {
}
$wp_jdt_script .= "'pagingType': '$atts[paging_type]', \n";
$wp_jdt_script .= "'bLengthChange': $atts[b_length_change], \n";
$wp_jdt_script .= "'ordering': $atts[ordering], \n";
$wp_jdt_script .= "'bLengthChange': '$atts[b_length_change]', \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 .= "'searching': $atts[searching], \n";
$wp_jdt_script .= "'searching': '$atts[searching]', \n";
$wp_jdt_script .= "} ); \n";
$wp_jdt_script .= "jQuery('#$atts[id]_wrapper select').prepend('<option value=$atts[page_length]>Select</option>').val('');