Simple Custom Post Order - Version 2.4.2

Version Description

Download this release

Release Info

Developer machothemes
Plugin Icon wp plugin Simple Custom Post Order
Version 2.4.2
Comparing to
See all releases

Code changes from version 2.4.1 to 2.4.2

Files changed (3) hide show
  1. assets/scporder.js +57 -31
  2. readme.txt +5 -1
  3. simple-custom-post-order.php +7 -6
assets/scporder.js CHANGED
@@ -1,31 +1,57 @@
1
- (function($){
2
- $('table.posts #the-list, table.pages #the-list').sortable({
3
- 'items': 'tr',
4
- 'axis': 'y',
5
- 'helper': fixHelper,
6
- 'update' : function(e, ui) {
7
- $.post( ajaxurl, {
8
- action: 'update-menu-order',
9
- order: $('#the-list').sortable('serialize'),
10
- });
11
- }
12
- });
13
- $('table.tags #the-list').sortable({
14
- 'items': 'tr',
15
- 'axis': 'y',
16
- 'helper': fixHelper,
17
- 'update' : function(e, ui) {
18
- $.post( ajaxurl, {
19
- action: 'update-menu-order-tags',
20
- order: $('#the-list').sortable('serialize'),
21
- });
22
- }
23
- });
24
- var fixHelper = function(e, ui) {
25
- ui.children().children().each(function() {
26
- $(this).width($(this).width());
27
- });
28
- return ui;
29
- };
30
-
31
- })(jQuery)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ $('table.posts #the-list, table.pages #the-list').sortable({
3
+ 'items': 'tr',
4
+ 'axis': 'y',
5
+ 'helper': fixHelper,
6
+ 'update': function (e, ui) {
7
+ $.post(ajaxurl, {
8
+ action: 'update-menu-order',
9
+ order: $('#the-list').sortable('serialize'),
10
+ });
11
+ }
12
+ });
13
+ $('table.tags #the-list').sortable({
14
+ 'items': 'tr',
15
+ 'axis': 'y',
16
+ 'helper': fixHelper,
17
+ 'update': function (e, ui) {
18
+ $.post(ajaxurl, {
19
+ action: 'update-menu-order-tags',
20
+ order: $('#the-list').sortable('serialize'),
21
+ });
22
+ }
23
+ });
24
+ var fixHelper = function (e, ui) {
25
+ ui.children().children().each(function () {
26
+ $(this).width($(this).width());
27
+ });
28
+ return ui;
29
+ };
30
+
31
+ /****
32
+ * Fix for table breaking
33
+ */
34
+
35
+ $('#the-list').on('mousedown', function () {
36
+ jQuery('#the-list').parent().find('thead').find('th').each(function () {
37
+ $(this).width($(this).width())
38
+ });
39
+ jQuery('#the-list').find('td').each(function () {
40
+ $(this).width($(this).width())
41
+ });
42
+ });
43
+
44
+ $('#the-list').on('mouseup', function () {
45
+ jQuery('#the-list').parent().find('thead').find('th').each(function () {
46
+ $(this).removeAttr('style');
47
+ });
48
+ jQuery('#the-list').find('td').each(function () {
49
+ $(this).removeAttr('style');
50
+ });
51
+ });
52
+
53
+ /*****
54
+ * End table breaking fix
55
+ */
56
+
57
+ })(jQuery)
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.1
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.1 =
40
  * Fixed translations
41
 
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
  Tested up to: 5.1
7
+ Stable tag: 2.4.2
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.2 =
40
+ * Fixed potential bug with other plugins
41
+ * Fixed table breaking on re-ordering when Yoast SEO installed
42
+
43
  = Version 2.4.1 =
44
  * Fixed translations
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.1
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/
9
  * Tested up to: 5.1
@@ -36,6 +36,7 @@
36
 
37
  define('SCPORDER_URL', plugins_url('', __FILE__));
38
  define('SCPORDER_DIR', plugin_dir_path(__FILE__));
 
39
 
40
  $scporder = new SCPO_Engine();
41
 
@@ -69,10 +70,10 @@ class SCPO_Engine {
69
  add_action( 'admin_notices', array( $this, 'scporder_notice_not_checked' ) );
70
  add_action( 'wp_ajax_scporder_dismiss_notices', array( $this, 'dismiss_notices' ) );
71
 
72
- add_action( 'plugins_loaded', array( $this, 'load_plugin_textdomain' ) );
73
  }
74
 
75
- public function load_plugin_textdomain(){
76
  load_plugin_textdomain( 'simple-custom-post-order', false, basename( dirname( __FILE__ ) ) . '/languages/' );
77
  }
78
 
@@ -206,9 +207,9 @@ class SCPO_Engine {
206
  if ($this->_check_load_script_css()) {
207
  wp_enqueue_script('jquery');
208
  wp_enqueue_script('jquery-ui-sortable');
209
- wp_enqueue_script('scporderjs', SCPORDER_URL . '/assets/scporder.js', array('jquery'), null, true);
210
 
211
- wp_enqueue_style('scporder', SCPORDER_URL . '/assets/scporder.css', array(), null);
212
  }
213
  }
214
 
@@ -589,4 +590,4 @@ function scporder_uninstall_db() {
589
  delete_option('scporder_install');
590
  }
591
 
592
- ?>
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.2
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.2');
40
 
41
  $scporder = new SCPO_Engine();
42
 
70
  add_action( 'admin_notices', array( $this, 'scporder_notice_not_checked' ) );
71
  add_action( 'wp_ajax_scporder_dismiss_notices', array( $this, 'dismiss_notices' ) );
72
 
73
+ add_action( 'plugins_loaded', array( $this, 'load_scpo_textdomain' ) );
74
  }
75
 
76
+ public function load_scpo_textdomain(){
77
  load_plugin_textdomain( 'simple-custom-post-order', false, basename( dirname( __FILE__ ) ) . '/languages/' );
78
  }
79
 
207
  if ($this->_check_load_script_css()) {
208
  wp_enqueue_script('jquery');
209
  wp_enqueue_script('jquery-ui-sortable');
210
+ wp_enqueue_script('scporderjs', SCPORDER_URL . '/assets/scporder.js', array('jquery'), SCPORDER_VERSION, true);
211
 
212
+ wp_enqueue_style('scporder', SCPORDER_URL . '/assets/scporder.css', array(), SCPORDER_VERSION );
213
  }
214
  }
215
 
590
  delete_option('scporder_install');
591
  }
592
 
593
+ ?>