Version Description
- Fix layout change when sorting by drag&drop within default WordPress interface.
- Add placeholder row size by setting a tr colspan of the dragable element.
Download this release
Release Info
Developer | nsp-code |
Plugin | Post Types Order |
Version | 1.9.9 |
Comparing to | |
See all releases |
Code changes from version 1.9.8 to 1.9.9
- css/cpt-archive-dd.css +4 -3
- include/class.cpto.php +1 -1
- js/cpt.js +11 -0
- post-types-order.php +1 -1
- readme.txt +6 -2
css/cpt-archive-dd.css
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
-
#the-list.ui-sortable tr:hover { cursor: move;}
|
2 |
-
#the-list.ui-sortable tr.alternate { background-color: #F9F9F9; }
|
3 |
-
#the-list.ui-sortable tr.ui-sortable-helper { background-color: #ffffff; outline: 1px solid #dfdfdf;}
|
|
1 |
+
#the-list.ui-sortable tr:hover { cursor: move;}
|
2 |
+
#the-list.ui-sortable tr.alternate { background-color: #F9F9F9; }
|
3 |
+
#the-list.ui-sortable tr.ui-sortable-helper { background-color: #ffffff; outline: 1px solid #dfdfdf;}
|
4 |
+
#the-list.ui-sortable .ui-sortable-placeholder td{border-color:#bbb;background-color:#FCFCFC; height:32px; background-image: none; -moz-border-radius: 6px 6px 6px 6px; border: 3px dashed #E6E6E6; -webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px; box-sizing: border-box;}
|
include/class.cpto.php
CHANGED
@@ -528,7 +528,7 @@
|
|
528 |
|
529 |
$required_capability = apply_filters('pto/edit_capability', $capability, $post_type_name);
|
530 |
|
531 |
-
if ($post_type_name == 'post')
|
532 |
add_submenu_page('edit.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
|
533 |
elseif ($post_type_name == 'attachment')
|
534 |
add_submenu_page('upload.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
|
528 |
|
529 |
$required_capability = apply_filters('pto/edit_capability', $capability, $post_type_name);
|
530 |
|
531 |
+
if ( $post_type_name == 'post' )
|
532 |
add_submenu_page('edit.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
|
533 |
elseif ($post_type_name == 'attachment')
|
534 |
add_submenu_page('upload.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
|
js/cpt.js
CHANGED
@@ -20,6 +20,17 @@
|
|
20 |
{
|
21 |
|
22 |
jQuery('table.wp-list-table #the-list').sortable({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
'items': 'tr',
|
24 |
'axis': 'y',
|
25 |
'update' : function(e, ui) {
|
20 |
{
|
21 |
|
22 |
jQuery('table.wp-list-table #the-list').sortable({
|
23 |
+
|
24 |
+
placeholder: {
|
25 |
+
element: function(currentItem) {
|
26 |
+
var cols = jQuery(currentItem).children('td:visible').length + 1;
|
27 |
+
return jQuery('<tr class="ui-sortable-placeholder"><td colspan="' + cols + '"> </td></tr>')[0];
|
28 |
+
},
|
29 |
+
update: function(container, p) {
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
},
|
33 |
+
|
34 |
'items': 'tr',
|
35 |
'axis': 'y',
|
36 |
'update' : function(e, ui) {
|
post-types-order.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.nsp-code.com
|
|
5 |
Description: Posts Order and Post Types Objects Order using a Drag and Drop Sortable javascript capability
|
6 |
Author: Nsp Code
|
7 |
Author URI: http://www.nsp-code.com
|
8 |
-
Version: 1.9.
|
9 |
Text Domain: post-types-order
|
10 |
Domain Path: /languages/
|
11 |
*/
|
5 |
Description: Posts Order and Post Types Objects Order using a Drag and Drop Sortable javascript capability
|
6 |
Author: Nsp Code
|
7 |
Author URI: http://www.nsp-code.com
|
8 |
+
Version: 1.9.9
|
9 |
Text Domain: post-types-order
|
10 |
Domain Path: /languages/
|
11 |
*/
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: nsp-code, tdgu
|
|
3 |
Donate link: http://www.nsp-code.com/donate.php
|
4 |
Tags: post order, posts order, sort, post sort, posts sort, post type order, custom order, admin posts order
|
5 |
Requires at least: 2.8
|
6 |
-
Tested up to: 5.9.
|
7 |
-
Stable tag: 1.9.
|
8 |
|
9 |
Sort Posts and custom Post Type Objects (custom post types) using a Drag and Drop Sortable JavaScript AJAX interface or default WordPress dashboard.
|
10 |
|
@@ -94,6 +94,10 @@ Consider upgrading to our advanced version of this plugin at a very resonable pr
|
|
94 |
|
95 |
== Change Log ==
|
96 |
|
|
|
|
|
|
|
|
|
97 |
= 1.9.8 =
|
98 |
- Readme file updates, typos fixes.
|
99 |
- WordPress 5.9 compatibility tag
|
3 |
Donate link: http://www.nsp-code.com/donate.php
|
4 |
Tags: post order, posts order, sort, post sort, posts sort, post type order, custom order, admin posts order
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 5.9.3
|
7 |
+
Stable tag: 1.9.9
|
8 |
|
9 |
Sort Posts and custom Post Type Objects (custom post types) using a Drag and Drop Sortable JavaScript AJAX interface or default WordPress dashboard.
|
10 |
|
94 |
|
95 |
== Change Log ==
|
96 |
|
97 |
+
= 1.9.9 =
|
98 |
+
- Fix layout change when sorting by drag&drop within default WordPress interface.
|
99 |
+
- Add placeholder row size by setting a tr colspan of the dragable element.
|
100 |
+
|
101 |
= 1.9.8 =
|
102 |
- Readme file updates, typos fixes.
|
103 |
- WordPress 5.9 compatibility tag
|