Post Types Order - Version 1.8.6

Version Description

  • PHP 7 deprecated nottice fix Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;
    • Fix: $_REQUEST['action'] comparison evaluate as Identical instead equal
    • New filter cpto/interface_itme_data to append additional data for items within sortable interface
    • Slight style updates
    • Replaced Socialize FB like page
Download this release

Release Info

Developer nsp-code
Plugin Icon 128x128 Post Types Order
Version 1.8.6
Comparing to
See all releases

Code changes from version 1.8.5 to 1.8.6

css/cpt.css CHANGED
@@ -1,25 +1,26 @@
1
  #order-post-type #sortable { list-style-type: none; margin: 10px 0 0; padding: 0; width: 100%; }
2
  #order-post-type #sortable ul { margin-left:20px; list-style: none; }
3
- #order-post-type #sortable li { padding: 2px 0px; margin: 4px 0px; border: 1px solid #DDDDDD; cursor: move; -moz-border-radius:6px; background-color: #f9f9f9;}
4
  #order-post-type #sortable li:nth-child(2n+1) { background-color: #fff !important;}
5
- #order-post-type #sortable li span { display: block; padding: 5px 10px; color:#555; font-size:13px;}
6
- #order-post-type #sortable li.placeholder{border: dashed 2px #ccc;height:25px; background-color: #FFF;}
7
 
8
  #icon-settings {background-image:url("../images/admin-icon-settings.gif");background-repeat:no-repeat;}
9
  h2.subtitle {font-size: 15px; font-style: italic; font-weight: bold}
10
  .wrap .example { color: #666666; font-size: 11px; font-weight: bold}
11
 
12
- #cpt_info_box {padding: 0 10px; border: 1px dashed #6aadcc; background-color: #FFF; margin-top: 10px;
13
  -webkit-box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);
14
  -moz-box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);
15
  box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);}
16
- #cpt_info_box p {font-size: 12px}
17
- #cpt_info_box a {text-decoration: none}
18
- #cpt_info_box #donate_form {float: right; padding: 10px 0 17px; text-align: center; width: 100%;}
19
  .menu_pto {margin-right: 4px; display: inline; vertical-align: middle; margin-top: -1px;}
20
 
21
- #p_right {float: right; width: 210px; background-color:#f5f5f5; border-left: 1px dashed #dedede; border-right: 1px dashed #dedede}
22
- .p_s_item {float: right; padding: 0px 5px; margin-top: 15px; margin-bottom: 5px; }
23
- .p_s_item.s_gp {padding-top: 2px; margin-left: 5px}
 
24
 
25
  .clear {clear: both}
1
  #order-post-type #sortable { list-style-type: none; margin: 10px 0 0; padding: 0; width: 100%; }
2
  #order-post-type #sortable ul { margin-left:20px; list-style: none; }
3
+ #order-post-type #sortable li { padding: 7px 10px; margin: 4px 0px; border: 1px solid #DDDDDD; cursor: move; -moz-border-radius:6px; background-color: #f9f9f9;}
4
  #order-post-type #sortable li:nth-child(2n+1) { background-color: #fff !important;}
5
+ #order-post-type #sortable li span { display: block; color:#555; font-size:13px;}
6
+ #order-post-type #sortable li.placeholder{border: dashed 2px #ccc;height:18px; background-color: #FFF;}
7
 
8
  #icon-settings {background-image:url("../images/admin-icon-settings.gif");background-repeat:no-repeat;}
9
  h2.subtitle {font-size: 15px; font-style: italic; font-weight: bold}
10
  .wrap .example { color: #666666; font-size: 11px; font-weight: bold}
11
 
12
+ #cpto #cpt_info_box {padding: 0 10px; border: 1px dashed #6aadcc; background-color: #FFF; margin-top: 10px;
13
  -webkit-box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);
14
  -moz-box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);
15
  box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);}
16
+ #cpto #cpt_info_box a {text-decoration: none}
17
+ #cpto #p_socialize {padding: 20px 0px 0 0}
18
+ #cpto #cpt_info_box #donate_form { padding: 20px 0 17px; text-align: center; width: 100%;}
19
  .menu_pto {margin-right: 4px; display: inline; vertical-align: middle; margin-top: -1px;}
20
 
21
+ #cpto #p_right {float: right; width: 230px; background-color:#f5f5f5; border-left: 1px dashed #dedede; border-right: 1px dashed #dedede; margin-left: 10px; text-align: center;}
22
+ #cpto .p_s_item {float: none; padding: 0px 5px; margin: 0px; display: inline-block; vertical-align: middle;}
23
+ #cpto .p_s_item > iframe, #cpto .p_s_item > div {display: block}
24
+ #cpto .p_s_item.s_gp {padding-top: 0px; margin-left: 0px}
25
 
26
  .clear {clear: both}
include/cpto-class.php CHANGED
@@ -4,7 +4,7 @@
4
  {
5
  var $current_post_type = null;
6
 
7
- function CPTO()
8
  {
9
  add_action( 'admin_init', array(&$this, 'registerFiles'), 11 );
10
  add_action( 'admin_init', array(&$this, 'checkPost'), 10 );
@@ -128,7 +128,7 @@
128
  function SortPage()
129
  {
130
  ?>
131
- <div class="wrap">
132
  <div class="icon32" id="icon-edit"><br></div>
133
  <h2><?php echo $this->current_post_type->labels->singular_name . ' - '. __('Re-Order', 'post-types-order') ?></h2>
134
 
4
  {
5
  var $current_post_type = null;
6
 
7
+ function __construct()
8
  {
9
  add_action( 'admin_init', array(&$this, 'registerFiles'), 11 );
10
  add_action( 'admin_init', array(&$this, 'checkPost'), 10 );
128
  function SortPage()
129
  {
130
  ?>
131
+ <div id="cpto" class="wrap">
132
  <div class="icon32" id="icon-edit"><br></div>
133
  <h2><?php echo $this->current_post_type->labels->singular_name . ' - '. __('Re-Order', 'post-types-order') ?></h2>
134
 
include/functions.php CHANGED
@@ -52,6 +52,25 @@
52
  <div id="p_right">
53
 
54
  <div id="p_socialize">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  <div class="p_s_item s_gp">
56
  <!-- Place this tag in your head or just before your close body tag -->
57
  <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
@@ -59,13 +78,6 @@
59
  <!-- Place this tag where you want the +1 button to render -->
60
  <div class="g-plusone" data-size="small" data-annotation="none" data-href="http://nsp-code.com/"></div>
61
  </div>
62
- <div class="p_s_item s_t">
63
- <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.nsp-code.com" data-text="Define custom order for your post types through an easy to use javascript AJAX drag and drop interface. No theme code updates are necessarily, this plugin will take care of query update." data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
64
- </div>
65
-
66
- <div class="p_s_item s_f">
67
- <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nsp-code.com%2F&amp;send=false&amp;layout=button_count&amp;width=82&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:82px; height:21px;" allowTransparency="true"></iframe>
68
- </div>
69
 
70
  <div class="clear"></div>
71
  </div>
52
  <div id="p_right">
53
 
54
  <div id="p_socialize">
55
+
56
+ <div class="p_s_item s_f">
57
+ <div id="fb-root"></div>
58
+ <script>(function(d, s, id) {
59
+ var js, fjs = d.getElementsByTagName(s)[0];
60
+ if (d.getElementById(id)) return;
61
+ js = d.createElement(s); js.id = id;
62
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
63
+ fjs.parentNode.insertBefore(js, fjs);
64
+ }(document, 'script', 'facebook-jssdk'));</script>
65
+
66
+ <div class="fb-like" data-href="https://www.facebook.com/Nsp-Code-190329887674484/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
67
+
68
+ </div>
69
+
70
+ <div class="p_s_item s_t">
71
+ <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.nsp-code.com" data-text="Define custom order for your post types through an easy to use javascript AJAX drag and drop interface. No theme code updates are necessarily, this plugin will take care of query update." data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
72
+ </div>
73
+
74
  <div class="p_s_item s_gp">
75
  <!-- Place this tag in your head or just before your close body tag -->
76
  <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
78
  <!-- Place this tag where you want the +1 button to render -->
79
  <div class="g-plusone" data-size="small" data-annotation="none" data-href="http://nsp-code.com/"></div>
80
  </div>
 
 
 
 
 
 
 
81
 
82
  <div class="clear"></div>
83
  </div>
include/options.php CHANGED
@@ -27,7 +27,7 @@ function cpt_plugin_options()
27
  $queue_data = get_option('ce_queue');
28
 
29
  ?>
30
- <div class="wrap">
31
  <div id="icon-settings" class="icon32"></div>
32
  <h2><?php _e('General Settings', 'post-types-order') ?></h2>
33
 
27
  $queue_data = get_option('ce_queue');
28
 
29
  ?>
30
+ <div id="cpto" class="wrap">
31
  <div id="icon-settings" class="icon32"></div>
32
  <h2><?php _e('General Settings', 'post-types-order') ?></h2>
33
 
include/walkers.php CHANGED
@@ -26,8 +26,13 @@
26
 
27
  extract($args, EXTR_SKIP);
28
 
 
 
 
 
 
 
29
 
30
- $output .= $indent . '<li id="item_'.$page->ID.'"><span>'.apply_filters( 'the_title', $page->post_title, $page->ID ).'</span>';
31
  }
32
 
33
 
26
 
27
  extract($args, EXTR_SKIP);
28
 
29
+ $item_details = apply_filters( 'the_title', $page->post_title, $page->ID );
30
+ $item_details = apply_filters('cpto/interface_itme_data', $item_details, $page);
31
+
32
+ $output .= $indent . '<li id="item_'.$page->ID.'"><span>'. $item_details .'</span>';
33
+
34
+
35
 
 
36
  }
37
 
38
 
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.8.5
9
  Text Domain: post-types-order
10
  Domain Path: /languages/
11
  */
@@ -106,7 +106,7 @@ Domain Path: /languages/
106
 
107
  //temporary ignore ACF group and admin ajax calls, should be fixed within ACF plugin sometime later
108
  if (is_object($post) && $post->post_type == "acf-field-group"
109
- || (defined('DOING_AJAX') && isset($_REQUEST['action']) && strpos($_REQUEST['action'], 'acf/') < 1))
110
  return $orderBy;
111
 
112
  $orderBy = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC";
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.8.6
9
  Text Domain: post-types-order
10
  Domain Path: /languages/
11
  */
106
 
107
  //temporary ignore ACF group and admin ajax calls, should be fixed within ACF plugin sometime later
108
  if (is_object($post) && $post->post_type == "acf-field-group"
109
+ || (defined('DOING_AJAX') && isset($_REQUEST['action']) && strpos($_REQUEST['action'], 'acf/') === 0))
110
  return $orderBy;
111
 
112
  $orderBy = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC";
readme.txt CHANGED
@@ -1,16 +1,16 @@
1
  === Post Types Order ===
2
- Contributors: Nsp Code
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: 4.4
7
- Stable tag: 1.8.5
8
 
9
  Post Order and custom Post Type Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
10
 
11
  == Description ==
12
 
13
- <strong>Over 1.200.000 DOWNLOADS and near PERFECT ratting out of 150 REVIEWS</strong>. <br />
14
  A powerful plugin, Order Posts and Post Types Objects using a Drag and Drop Sortable JavaScript capability.
15
  It allow to reorder the posts for any custom post types you defined, including the default Posts. Also you can have the admin posts interface sorted per your new sort. Post Order has never been easier.
16
 
@@ -50,7 +50,7 @@ If for some reason the post order does not update on your front side, you either
50
 
51
  == Frequently Asked Questions ==
52
 
53
- Feel free to contact me at electronice_delphi@yahoo.com
54
 
55
  = I have no PHP knowledge at all, i will still be able to use this plugin? =
56
 
@@ -72,8 +72,18 @@ All ideas are welcome and i put them on my list to be implemented into the new v
72
 
73
  This can be doe by including the ignore_custom_sort within custom query arguments. An example can be found at http://www.nsp-code.com/advanced-post-types-order-api/sample-usage/
74
 
 
 
 
 
75
 
76
  == Change Log ==
 
 
 
 
 
 
77
 
78
  = 1.8.5 =
79
  - Text domain change to post-types-order to allow translations at https://translate.wordpress.org/projects/wp-plugins/post-types-order
@@ -214,5 +224,5 @@ Make sure you get the latest version.
214
  == Localization ==
215
 
216
  Available in English, Brazilian Portuguese, Spanish, Romanian, Italian, Dusth, Hebrew, German, Norwegian (norsk), Turkish (t?rk?e), Swedish, Hungarian, Portuguese, Chinese, Czech
217
- Want to contribute with a translation to your language? Please contact us at electronice_delphi@yahoo.com
218
  http://www.nsp-code.com
1
  === Post Types Order ===
2
+ Contributors: nsp-code
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: 4.4.2
7
+ Stable tag: 1.8.6
8
 
9
  Post Order and custom Post Type Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
10
 
11
  == Description ==
12
 
13
+ <strong>Over 1.500.000 DOWNLOADS and near PERFECT ratting out of 150 REVIEWS</strong>. <br />
14
  A powerful plugin, Order Posts and Post Types Objects using a Drag and Drop Sortable JavaScript capability.
15
  It allow to reorder the posts for any custom post types you defined, including the default Posts. Also you can have the admin posts interface sorted per your new sort. Post Order has never been easier.
16
 
50
 
51
  == Frequently Asked Questions ==
52
 
53
+ Feel free to contact us at electronice_delphi@yahoo.com
54
 
55
  = I have no PHP knowledge at all, i will still be able to use this plugin? =
56
 
72
 
73
  This can be doe by including the ignore_custom_sort within custom query arguments. An example can be found at http://www.nsp-code.com/advanced-post-types-order-api/sample-usage/
74
 
75
+ = I still need more features like front sorting interface, shortcodes, filters, conditionals, advanced queries, taxonomy/ category sorting etc =
76
+
77
+ Consider upgrading to our advanced version of this plugin at a very resonable price <a target="_blank" href="http://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-post-types-order/">Advanced Post Types Order</a>
78
+
79
 
80
  == Change Log ==
81
+ = 1.8.6 =
82
+ - PHP 7 deprecated nottice fix Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;
83
+ - Fix: $_REQUEST['action'] comparison evaluate as Identical instead equal
84
+ - New filter cpto/interface_itme_data to append additional data for items within sortable interface
85
+ - Slight style updates
86
+ - Replaced Socialize FB like page
87
 
88
  = 1.8.5 =
89
  - Text domain change to post-types-order to allow translations at https://translate.wordpress.org/projects/wp-plugins/post-types-order
224
  == Localization ==
225
 
226
  Available in English, Brazilian Portuguese, Spanish, Romanian, Italian, Dusth, Hebrew, German, Norwegian (norsk), Turkish (t?rk?e), Swedish, Hungarian, Portuguese, Chinese, Czech
227
+ Want to contribute with a translation to your language? Please check at https://translate.wordpress.org/projects/wp-plugins/post-types-order
228
  http://www.nsp-code.com