Version Description
Download this release
Release Info
Developer | machothemes |
Plugin | Simple Custom Post Order |
Version | 2.4.4 |
Comparing to | |
See all releases |
Code changes from version 2.4.3 to 2.4.4
- assets/scporder.js +18 -11
- readme.txt +5 -1
- simple-custom-post-order.php +4 -4
assets/scporder.js
CHANGED
@@ -31,22 +31,29 @@
|
|
31 |
/****
|
32 |
* Fix for table breaking
|
33 |
*/
|
|
|
|
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
38 |
});
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
41 |
});
|
42 |
-
});
|
43 |
|
44 |
-
|
45 |
jQuery('#the-list').parent().find('thead').find('th').each(function () {
|
46 |
-
$(this).
|
47 |
-
|
48 |
-
jQuery('#the-list').find('td').each(function () {
|
49 |
-
$(this).removeAttr('style');
|
50 |
});
|
51 |
});
|
52 |
|
31 |
/****
|
32 |
* Fix for table breaking
|
33 |
*/
|
34 |
+
jQuery(window).load(function () {
|
35 |
+
jQuery('#the-list').width(jQuery('#the-list').width());
|
36 |
|
37 |
+
// make the array for the sizes
|
38 |
+
var td_array = new Array();
|
39 |
+
var i = 0;
|
40 |
+
jQuery('#the-list tr:first-child').find('td').each(function () {
|
41 |
+
td_array[i] = $(this).outerWidth();
|
42 |
+
i += 1;
|
43 |
});
|
44 |
+
|
45 |
+
jQuery('#the-list').find('tr').each(function () {
|
46 |
+
var j = 0;
|
47 |
+
$(this).find('td').each(function () {
|
48 |
+
$(this).width(td_array[j]);
|
49 |
+
j += 1;
|
50 |
+
});
|
51 |
});
|
|
|
52 |
|
53 |
+
var y = 0;
|
54 |
jQuery('#the-list').parent().find('thead').find('th').each(function () {
|
55 |
+
$(this).width(td_array[y]);
|
56 |
+
y += 1;
|
|
|
|
|
57 |
});
|
58 |
});
|
59 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: custom post order, post order, js post order, page order, posts order, cat
|
|
4 |
Requires at least: 4.6
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.1
|
7 |
-
Stable tag: 2.4.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -36,6 +36,10 @@ An answer to that question.
|
|
36 |
|
37 |
== Changelog ==
|
38 |
|
|
|
|
|
|
|
|
|
39 |
= Version 2.4.3 =
|
40 |
* Minor UI update added toggles
|
41 |
|
4 |
Requires at least: 4.6
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 5.1
|
7 |
+
Stable tag: 2.4.4
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
36 |
|
37 |
== Changelog ==
|
38 |
|
39 |
+
= Version 2.4.4 =
|
40 |
+
* Fix for slow javscript in admin( https://github.com/ColorlibHQ/simple-custom-post-order/issues/46 )
|
41 |
+
* Fix database error( https://github.com/ColorlibHQ/simple-custom-post-order/issues/36 )
|
42 |
+
|
43 |
= Version 2.4.3 =
|
44 |
* Minor UI update added toggles
|
45 |
|
simple-custom-post-order.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Simple Custom Post Order
|
4 |
* Plugin URI: https://wordpress.org/plugins-wp/simple-custom-post-order/
|
5 |
* Description: Order Items (Posts, Pages, and Custom Post Types) using a Drag and Drop Sortable JavaScript.
|
6 |
-
* Version: 2.4.
|
7 |
* Author: Colorlib
|
8 |
* Author URI: https://colorlib.com/
|
9 |
* Tested up to: 5.1
|
@@ -36,7 +36,7 @@
|
|
36 |
|
37 |
define('SCPORDER_URL', plugins_url('', __FILE__));
|
38 |
define('SCPORDER_DIR', plugin_dir_path(__FILE__));
|
39 |
-
define('SCPORDER_VERSION', '2.4.
|
40 |
|
41 |
$scporder = new SCPO_Engine();
|
42 |
|
@@ -232,13 +232,13 @@ class SCPO_Engine {
|
|
232 |
// Here's the optimization
|
233 |
$wpdb->query("SET @row_number = 0;");
|
234 |
$wpdb->query("UPDATE $wpdb->posts as pt JOIN (
|
235 |
-
SELECT ID, (@row_number:=@row_number + 1) AS rank
|
236 |
FROM $wpdb->posts
|
237 |
WHERE post_type = '$object' AND post_status IN ( 'publish', 'pending', 'draft', 'private', 'future' )
|
238 |
ORDER BY menu_order ASC
|
239 |
) as pt2
|
240 |
ON pt.id = pt2.id
|
241 |
-
SET pt.menu_order = pt2
|
242 |
|
243 |
}
|
244 |
}
|
3 |
* Plugin Name: Simple Custom Post Order
|
4 |
* Plugin URI: https://wordpress.org/plugins-wp/simple-custom-post-order/
|
5 |
* Description: Order Items (Posts, Pages, and Custom Post Types) using a Drag and Drop Sortable JavaScript.
|
6 |
+
* Version: 2.4.4
|
7 |
* Author: Colorlib
|
8 |
* Author URI: https://colorlib.com/
|
9 |
* Tested up to: 5.1
|
36 |
|
37 |
define('SCPORDER_URL', plugins_url('', __FILE__));
|
38 |
define('SCPORDER_DIR', plugin_dir_path(__FILE__));
|
39 |
+
define('SCPORDER_VERSION', '2.4.4');
|
40 |
|
41 |
$scporder = new SCPO_Engine();
|
42 |
|
232 |
// Here's the optimization
|
233 |
$wpdb->query("SET @row_number = 0;");
|
234 |
$wpdb->query("UPDATE $wpdb->posts as pt JOIN (
|
235 |
+
SELECT ID, (@row_number:=@row_number + 1) AS `rank`
|
236 |
FROM $wpdb->posts
|
237 |
WHERE post_type = '$object' AND post_status IN ( 'publish', 'pending', 'draft', 'private', 'future' )
|
238 |
ORDER BY menu_order ASC
|
239 |
) as pt2
|
240 |
ON pt.id = pt2.id
|
241 |
+
SET pt.menu_order = pt2.`rank`;");
|
242 |
|
243 |
}
|
244 |
}
|