Simple Custom Post Order - Version 2.5.4

Version Description

Download this release

Release Info

Developer giucu91
Plugin Icon wp plugin Simple Custom Post Order
Version 2.5.4
Comparing to
See all releases

Code changes from version 2.5.3 to 2.5.4

assets/scporder.css DELETED
@@ -1,10 +0,0 @@
1
- .ui-sortable tr:hover {
2
- cursor: move;
3
- }
4
- .ui-sortable tr.alternate {
5
- background-color: #F9F9F9;
6
- }
7
- .ui-sortable tr.ui-sortable-helper {
8
- background-color: #F9F9F9;
9
- border-top: 1px solid #DFDFDF;
10
- }
 
 
 
 
 
 
 
 
 
 
assets/scporder.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(s){s("table.posts #the-list, table.pages #the-list").sortable({items:"tr",axis:"y",helper:void 0,update:function(t,e){s.post(ajaxurl,{action:"update-menu-order",order:s("#the-list").sortable("serialize")})}}),s("table.tags #the-list").sortable({items:"tr",axis:"y",helper:void 0,update:function(t,e){s.post(ajaxurl,{action:"update-menu-order-tags",order:s("#the-list").sortable("serialize")})}});jQuery(window).on("load",function(){var i=new Array,t=0;jQuery("#the-list tr:first-child").find("td").each(function(){i[t]=s(this).outerWidth(),t+=1}),jQuery("#the-list").find("tr").each(function(){var e=0;s(this).find("td").each(function(){var t=parseInt(s(this).css("padding-left").replace("px",""))+parseInt(s(this).css("padding-right").replace("px",""));s(this).width(i[e]-t),e+=1})});var e,a=0;0==jQuery("#the-list > tr.no-items").length&&(jQuery("#the-list").parent().find("thead").find("th").each(function(){var t=parseInt(s(this).css("padding-left").replace("px",""))+parseInt(s(this).css("padding-right").replace("px",""));s(this).width(i[a]-t),a+=1}),e=0,jQuery("#the-list").parent().find("tfoot").find("th").each(function(){var t=parseInt(s(this).css("padding-left").replace("px",""))+parseInt(s(this).css("padding-right").replace("px",""));s(this).width(i[e]-t),e+=1}))})}(jQuery);
assets/taxonomy_order.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(e){function s(n){var t=e(".tablenav .actions");0===t.find(".spinner").length&&!0===n?t.prepend('<div class="spinner" style="display: inline;" />'):!0===n?t.find(".spinner").show():t.find(".spinner").hide()}"edit-tags-php"==adminpage&&e(".wp-list-table.tags tbody").sortable({items:"tr:not(.inline-edit-row)",cursor:"move",axis:"y",containment:"table.widefat",scrollSensitivity:40,stop:function(n,t){var i=new Array([]);s(!0),e(".wp-list-table.tags tbody tr:not(.inline-edit-row)").each(function(n,t){t=parseInt(e(t).attr("id").substr(4));i[n]=t}),e.post(ajaxurl,{rows:i,action:"get_inline_boxes"},function(n){s(!1)})}})});
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: silkalns
3
  Tags: custom post order, post order, js post order, page order, posts order, category order, sort posts, sort pages, sort custom posts
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
- Tested up to: 5.6
7
- Stable tag: 2.5.3
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -36,6 +36,9 @@ An answer to that question.
36
 
37
  == Changelog ==
38
 
 
 
 
39
  = Version 2.5.3 =
40
  * Modified deprecated jQuery functions.
41
 
3
  Tags: custom post order, post order, js post order, page order, posts order, category order, sort posts, sort pages, sort custom posts
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
+ Tested up to: 5.7
7
+ Stable tag: 2.5.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.5.4 - 05.03.2021 =
40
+ Changed: Improved Performance ( https://github.com/ColorlibHQ/simple-custom-post-order/issues/105 )
41
+
42
  = Version 2.5.3 =
43
  * Modified deprecated jQuery functions.
44
 
simple-custom-post-order.php CHANGED
@@ -3,10 +3,10 @@
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.5.3
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/
9
- * Tested up to: 5.6
10
  * Requires: 4.6 or higher
11
  * License: GPLv3 or later
12
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -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.5.3');
40
 
41
  $scporder = new SCPO_Engine();
42
 
@@ -195,6 +195,7 @@ class SCPO_Engine {
195
  }
196
 
197
  public function _check_load_script_css() {
 
198
  $active = false;
199
 
200
  $objects = $this->get_scporder_options_objects();
@@ -228,8 +229,8 @@ class SCPO_Engine {
228
  if ($this->_check_load_script_css()) {
229
  wp_enqueue_script('jquery');
230
  wp_enqueue_script('jquery-ui-sortable');
231
- wp_enqueue_script('scporderjs', SCPORDER_URL . '/assets/scporder.js', array('jquery'), SCPORDER_VERSION, true);
232
- wp_enqueue_style('scporder', SCPORDER_URL . '/assets/scporder.css', array(), SCPORDER_VERSION );
233
 
234
  }
235
  }
@@ -659,6 +660,30 @@ class SCPO_Engine {
659
  }
660
  }
661
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
662
  }
663
 
664
  function scporder_doing_ajax(){
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.5.4
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/
9
+ * Tested up to: 5.7
10
  * Requires: 4.6 or higher
11
  * License: GPLv3 or later
12
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
36
 
37
  define('SCPORDER_URL', plugins_url('', __FILE__));
38
  define('SCPORDER_DIR', plugin_dir_path(__FILE__));
39
+ define('SCPORDER_VERSION', '2.5.4');
40
 
41
  $scporder = new SCPO_Engine();
42
 
195
  }
196
 
197
  public function _check_load_script_css() {
198
+
199
  $active = false;
200
 
201
  $objects = $this->get_scporder_options_objects();
229
  if ($this->_check_load_script_css()) {
230
  wp_enqueue_script('jquery');
231
  wp_enqueue_script('jquery-ui-sortable');
232
+ wp_enqueue_script('scporderjs', SCPORDER_URL . '/assets/scporder.min.js', array('jquery'), SCPORDER_VERSION, true);
233
+ add_action( 'admin_print_styles', array( $this, 'print_scpo_style' ) );
234
 
235
  }
236
  }
660
  }
661
  }
662
 
663
+ /**
664
+ * Print inline admin style
665
+ *
666
+ * @since 2.5.4
667
+ */
668
+ public function print_scpo_style(){
669
+ ?>
670
+ <style>
671
+ .ui-sortable tr:hover {
672
+ cursor : move;
673
+ }
674
+
675
+ .ui-sortable tr.alternate {
676
+ background-color : #F9F9F9;
677
+ }
678
+
679
+ .ui-sortable tr.ui-sortable-helper {
680
+ background-color : #F9F9F9;
681
+ border-top : 1px solid #DFDFDF;
682
+ }
683
+ </style>
684
+ <?php
685
+ }
686
+
687
  }
688
 
689
  function scporder_doing_ajax(){