Post Types Order - Version 1.5.4

Version Description

  • Updates/Fixes
Download this release

Release Info

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

Code changes from version 1.5.1 to 1.5.4

Files changed (5) hide show
  1. css/cpt.css +1 -1
  2. include/functions.php +2 -3
  3. post-types-order.php +12 -4
  4. readme.txt +31 -9
  5. screenshot-1.png +0 -0
css/cpt.css CHANGED
@@ -14,7 +14,7 @@ h2.subtitle {font-size: 15px; font-style: italic; font-weight: bold}
14
 
15
  .menu_pto {margin-bottom: -2px; display: inline; padding-right: 2px}
16
 
17
- #p_right {float: right; width: 170px; }
18
  .p_s_item {float: left; padding: 0px 5px; margin-top: 15px; margin-bottom: 5px}
19
  .p_s_item.s_gp {padding-top: 2px; margin-left: 10px}
20
 
14
 
15
  .menu_pto {margin-bottom: -2px; display: inline; padding-right: 2px}
16
 
17
+ #p_right {float: right; width: 200px; }
18
  .p_s_item {float: left; padding: 0px 5px; margin-top: 15px; margin-bottom: 5px}
19
  .p_s_item.s_gp {padding-top: 2px; margin-left: 10px}
20
 
include/functions.php CHANGED
@@ -38,12 +38,11 @@
38
  </div>
39
 
40
  <div class="p_s_item s_f">
41
- <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=50&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:50px; height:21px;" allowTransparency="true"></iframe>
42
  </div>
43
 
44
  <div class="clear"></div>
45
  </div>
46
- <div class="clear"></div>
47
 
48
  <div id="donate_form">
49
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
@@ -56,7 +55,7 @@
56
  </div>
57
 
58
  <p>Did you found useful this plug-in? Please support our work with a donation or write an article about this plugin in your blog with a link to our site <strong>http://www.nsp-code.com/</strong>.</p>
59
- <h4>Did you know there is available a more advanced version of this plug-in? <a target="_blank" href="http://www.nsp-code.com/wordpress-plugins/post-types-order">Read more</a></h4>
60
  <p>Check our <a target="_blank" href="http://wordpress.org/extend/plugins/taxonomy-terms-order/">Category Order - Taxonomy Terms Order</a> plugin which allow to custom sort all categories and custom taxonomies terms </p>
61
  </div>
62
 
38
  </div>
39
 
40
  <div class="p_s_item s_f">
41
+ <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=75&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:75px; height:21px;" allowTransparency="true"></iframe>
42
  </div>
43
 
44
  <div class="clear"></div>
45
  </div>
 
46
 
47
  <div id="donate_form">
48
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
55
  </div>
56
 
57
  <p>Did you found useful this plug-in? Please support our work with a donation or write an article about this plugin in your blog with a link to our site <strong>http://www.nsp-code.com/</strong>.</p>
58
+ <h4>Did you know there is available an Advanced version of this plug-in? <a target="_blank" href="http://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-post-types-order/">Read more</a></h4>
59
  <p>Check our <a target="_blank" href="http://wordpress.org/extend/plugins/taxonomy-terms-order/">Category Order - Taxonomy Terms Order</a> plugin which allow to custom sort all categories and custom taxonomies terms </p>
60
  </div>
61
 
post-types-order.php CHANGED
@@ -5,11 +5,15 @@ Plugin URI: http://www.nsp-code.com
5
  Description: Order Posts and Post Types Objects using a Drag and Drop Sortable javascript capability
6
  Author: NSP CODE
7
  Author URI: http://www.nsp-code.com
8
- Version: 1.5.1
9
  */
10
 
11
- define('CPTPATH', ABSPATH.'wp-content/plugins/post-types-order');
12
- define('CPTURL', get_option('siteurl').'/wp-content/plugins/post-types-order');
 
 
 
 
13
 
14
  register_deactivation_hook(__FILE__, 'CPTO_deactivated');
15
  register_activation_hook(__FILE__, 'CPTO_activated');
@@ -25,7 +29,7 @@ function CPTO_activated()
25
  $options['adminsort'] = '1';
26
 
27
  if (!isset($options['level']))
28
- $options['level'] = 0;
29
 
30
  update_option('cpto_options', $options);
31
  }
@@ -152,6 +156,7 @@ function cpto_get_previous_post_where($where)
152
 
153
  $join = '';
154
  $posts_in_ex_cats_sql = '';
 
155
  if ( $in_same_cat || !empty($excluded_categories) )
156
  {
157
  $join = " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
@@ -196,6 +201,7 @@ function cpto_get_previous_post_where($where)
196
  function cpto_get_previous_post_sort($sort)
197
  {
198
  global $post, $wpdb;
 
199
 
200
  $current_menu_order = $post->menu_order;
201
 
@@ -226,6 +232,7 @@ function cpto_get_next_post_where($where)
226
 
227
  $join = '';
228
  $posts_in_ex_cats_sql = '';
 
229
  if ( $in_same_cat || !empty($excluded_categories) )
230
  {
231
  $join = " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
@@ -271,6 +278,7 @@ function cpto_get_next_post_where($where)
271
  function cpto_get_next_post_sort($sort)
272
  {
273
  global $post, $wpdb;
 
274
 
275
  $current_menu_order = $post->menu_order;
276
 
5
  Description: Order Posts and Post Types Objects using a Drag and Drop Sortable javascript capability
6
  Author: NSP CODE
7
  Author URI: http://www.nsp-code.com
8
+ Version: 1.5.4
9
  */
10
 
11
+ define('CPTPATH', plugin_dir_path(__FILE__));
12
+ define('CPTURL', plugins_url('', __FILE__));
13
+ /*
14
+ define('CPTPATH', WP_PLUGIN_DIR .'/post-types-order');
15
+ define('CPTURL', WP_PLUGIN_URL .'/post-types-order');
16
+ */
17
 
18
  register_deactivation_hook(__FILE__, 'CPTO_deactivated');
19
  register_activation_hook(__FILE__, 'CPTO_activated');
29
  $options['adminsort'] = '1';
30
 
31
  if (!isset($options['level']))
32
+ $options['level'] = 8;
33
 
34
  update_option('cpto_options', $options);
35
  }
156
 
157
  $join = '';
158
  $posts_in_ex_cats_sql = '';
159
+ if (isset($in_same_cat))
160
  if ( $in_same_cat || !empty($excluded_categories) )
161
  {
162
  $join = " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
201
  function cpto_get_previous_post_sort($sort)
202
  {
203
  global $post, $wpdb;
204
+ $posts_in_ex_cats_sql = '';
205
 
206
  $current_menu_order = $post->menu_order;
207
 
232
 
233
  $join = '';
234
  $posts_in_ex_cats_sql = '';
235
+ if (isset($in_same_cat))
236
  if ( $in_same_cat || !empty($excluded_categories) )
237
  {
238
  $join = " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
278
  function cpto_get_next_post_sort($sort)
279
  {
280
  global $post, $wpdb;
281
+ $posts_in_ex_cats_sql = '';
282
 
283
  $current_menu_order = $post->menu_order;
284
 
readme.txt CHANGED
@@ -1,17 +1,35 @@
1
  === Post Types Order ===
2
  Contributors: Nsp Code
3
  Donate link: http://www.nsp-code.com/donate.php
4
- Tags: posts order, post order, post type order, custom post type order, post types order, pages order, admin posts order
5
  Requires at least: 2.8
6
- Tested up to: 3.2.1
7
- Stable tag: 1.5.1
8
 
9
- Order Post Types Objects (posts, pages, custom post types) using a Drag and Drop Sortable javascript capability
10
 
11
  == Description ==
12
 
13
- <strong>Over 42000 downloads in couple months and 100% ratting out of 50 reviews</strong>. A powerfull plugin, Order Posts and Post Types Objects using a Drag and Drop Sortable javascript capability
14
- It allow to reorder the posts for any custom post types you defined, including the default Posts and Pages. Also you can have the admin posts interface sorted per your new sort.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  <br />This plugin it's developed by <a target="_blank" href="http://www.nsp-code.com">Nsp-Code</a>
16
 
17
  == Installation ==
@@ -32,15 +50,15 @@ Feel free to contact me at electronice_delphi@yahoo.com
32
 
33
  = I have no PHP knowledge at all, i will still be able to use this plugin? =
34
 
35
- Yes you can. There's an option to autoupdate the wordpress queries so the posts will be returned in the required order. Anyway this can be turned off to allow customized code usage.
36
 
37
  = What kind of posts/pages this plugin allow me to sort? =
38
 
39
- You can sort ALL post types that you have defined into your wordpress. Posts, Pages, Movies, Reviews, Data etc..
40
 
41
  = Ok, i understand about the template post types order, how about the admin interface? =
42
 
43
- There's a option you can trigger, to see the post types as you defined in the sort list.
44
 
45
  = There is a feature that i want it implemented, can you do something about it? =
46
 
@@ -48,6 +66,9 @@ All ideas are welcome and i put them on my list to be implemented into the new v
48
 
49
  == Change Log ==
50
 
 
 
 
51
  = 1.5.1 =
52
  - Updates/Fixes
53
 
@@ -59,6 +80,7 @@ All ideas are welcome and i put them on my list to be implemented into the new v
59
 
60
  = 1.4.1 =
61
  - Re-Order Menu Item Appearance fix for update versions
 
62
 
63
  = 1.3.9 =
64
  - Re-Order Menu Item Appearance fix
1
  === Post Types Order ===
2
  Contributors: Nsp Code
3
  Donate link: http://www.nsp-code.com/donate.php
4
+ Tags: post order, post type order, custom order, admin posts order
5
  Requires at least: 2.8
6
+ Tested up to: 3.4.2
7
+ Stable tag: 1.5.4
8
 
9
+ Order Post Types Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
10
 
11
  == Description ==
12
 
13
+ <strong>Over 130.000 DOWNLOADS in couple months and near PERFECT ratting out of 130 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
+
17
+ = Usage =
18
+ This was built considering for everyone to be able to use no matter the WordPress experience, so it's very easy:
19
+
20
+ * Install the plugin through the Install Plugins interface or by uploading the `post-types-order` folder to your `/wp-content/plugins/` directory.
21
+ * Activate the Post Order plugin.
22
+ * A new setting page will be created within Settings > Post Types Order, you should check with that, and make a first options save.
23
+ * Using the AutoSort option as ON you don't need to worry about any code changes, the plugin will do the post order update on fly.
24
+ * Use the Re-Order interface which appear to every custom post type (non-hierarchical) to change the post order to a new one.
25
+
26
+ = Example of Usage =
27
+ [youtube http://www.youtube.com/watch?v=VEbNKFSfhCc]
28
+
29
+ As you can see just a matter of drag and drop and post ordering will change on front side right away.
30
+ If for some reason the post order does not update on your front side, you either do something wrong or the theme code you are using does not use a standard query per WordPress Codex rules and regulations. But we can still help, use the forum to report your issue as there are many peoples who gladly help or get in touch with us.
31
+
32
+ <br />
33
  <br />This plugin it's developed by <a target="_blank" href="http://www.nsp-code.com">Nsp-Code</a>
34
 
35
  == Installation ==
50
 
51
  = I have no PHP knowledge at all, i will still be able to use this plugin? =
52
 
53
+ Absolutely you can! Unlike many of other plugins, you don't have to do any code changes to make your post order to change accordingly to custom defined post order. There is an option to autoupdate the WordPress queries so the posts order will be returned in the required order. Anyway this can be turned off to allow customized code usage.
54
 
55
  = What kind of posts/pages this plugin allow me to sort? =
56
 
57
+ You can sort ALL post types that you have defined into your wordpress as long they are not hierarhically defined: Posts (default WordPress custom post type), Movies, Reviews, Data etc..
58
 
59
  = Ok, i understand about the template post types order, how about the admin interface? =
60
 
61
+ There's a option you can trigger, to see the post types order as you defined in the sort list, right into the main admin post list interface.
62
 
63
  = There is a feature that i want it implemented, can you do something about it? =
64
 
66
 
67
  == Change Log ==
68
 
69
+ = 1.5.4 =
70
+ - Updates/Fixes
71
+
72
  = 1.5.1 =
73
  - Updates/Fixes
74
 
80
 
81
  = 1.4.1 =
82
  - Re-Order Menu Item Appearance fix for update versions
83
+ - Improved post order code
84
 
85
  = 1.3.9 =
86
  - Re-Order Menu Item Appearance fix
screenshot-1.png CHANGED
Binary file