Post Types Order - Version 1.9.3.5

Version Description

  • Fix: updated capability from switch_theme to manage_options within 'Minimum Level to use this plugin' option
    • Default admin capability changed from install_plugins to manage_options to prevent DISALLOW_FILE_MODS issue. https://wordpress.org/support/topic/plugin-breaks-when-disallow_file_mods-is-set-to-true/
    • Prepare plugin for Composer package
Download this release

Release Info

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

Code changes from version 1.9.3.3 to 1.9.3.5

composer.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name" : "nsp-code/post-types-order",
3
+ "description" : "Posts Order and Post Types Objects Order using a Drag and Drop Sortable javascript capability",
4
+ "keywords" : ["post order" , "posts order", "sort", "post sort", "posts sort", "post type order", "custom order", "admin posts order"],
5
+ "homepage" : "http://www.nsp-code.com/",
6
+ "authors" : [
7
+ {
8
+ "name": "Nsp Code",
9
+ "email": "contact@nsp-code.com",
10
+ "homepage": "http://www.nsp-code.com/"
11
+ }
12
+ ],
13
+ "type" : "wordpress-plugin",
14
+ "require" : {
15
+ "composer/installers": "~1.0"
16
+ }
17
+ }
include/class.cpto.php CHANGED
@@ -459,7 +459,7 @@
459
  }
460
  else
461
  {
462
- $capability = 'install_plugins';
463
  }
464
 
465
  foreach( $post_types as $post_type_name )
459
  }
460
  else
461
  {
462
+ $capability = 'manage_options';
463
  }
464
 
465
  foreach( $post_types as $post_type_name )
include/class.functions.php CHANGED
@@ -46,7 +46,7 @@
46
  'adminsort' => 1,
47
  'use_query_ASC_DESC' => '',
48
  'archive_drag_drop' => 1,
49
- 'capability' => 'install_plugins',
50
  'navigation_sort_apply' => 1,
51
 
52
  );
46
  'adminsort' => 1,
47
  'use_query_ASC_DESC' => '',
48
  'archive_drag_drop' => 1,
49
+ 'capability' => 'manage_options',
50
  'navigation_sort_apply' => 1,
51
 
52
  );
include/class.options.php CHANGED
@@ -106,7 +106,7 @@
106
  <option value="edit_posts" <?php if (isset($options['capability']) && $options['capability'] == "edit_posts") echo 'selected="selected"'?>><?php _e('Contributor', 'post-types-order') ?></option>
107
  <option value="publish_posts" <?php if (isset($options['capability']) && $options['capability'] == "publish_posts") echo 'selected="selected"'?>><?php _e('Author', 'post-types-order') ?></option>
108
  <option value="publish_pages" <?php if (isset($options['capability']) && $options['capability'] == "publish_pages") echo 'selected="selected"'?>><?php _e('Editor', 'post-types-order') ?></option>
109
- <option value="switch_themes" <?php if (!isset($options['capability']) || empty($options['capability']) || (isset($options['capability']) && $options['capability'] == "switch_themes")) echo 'selected="selected"'?>><?php _e('Administrator', 'post-types-order') ?></option>
110
  <?php do_action('pto/admin/plugin_options/capability') ?>
111
  </select>
112
  </td>
106
  <option value="edit_posts" <?php if (isset($options['capability']) && $options['capability'] == "edit_posts") echo 'selected="selected"'?>><?php _e('Contributor', 'post-types-order') ?></option>
107
  <option value="publish_posts" <?php if (isset($options['capability']) && $options['capability'] == "publish_posts") echo 'selected="selected"'?>><?php _e('Author', 'post-types-order') ?></option>
108
  <option value="publish_pages" <?php if (isset($options['capability']) && $options['capability'] == "publish_pages") echo 'selected="selected"'?>><?php _e('Editor', 'post-types-order') ?></option>
109
+ <option value="manage_options" <?php if (!isset($options['capability']) || empty($options['capability']) || (isset($options['capability']) && $options['capability'] == "manage_options")) echo 'selected="selected"'?>><?php _e('Administrator', 'post-types-order') ?></option>
110
  <?php do_action('pto/admin/plugin_options/capability') ?>
111
  </select>
112
  </td>
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.3.3
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.3.5
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: 4.8
7
- Stable tag: 1.9.3.3
8
 
9
  Post Order and custom Post Type Objects (custom post types) using a Drag and Drop Sortable JavaScript AJAX interface or default WordPress dashboard.
10
 
@@ -44,7 +44,7 @@ If for some reason the post order does not update on your front side, you either
44
  1. Upload `post-types-order` folder to your `/wp-content/plugins/` directory.
45
  2. Activate the plugin from Admin > Plugins menu.
46
  3. Once activated you should check with Settings > Post Types Order
47
- 4. Use Re-Order link which appear into each post type section to make your sort.
48
 
49
 
50
  == Screenshots ==
@@ -60,7 +60,8 @@ Feel free to contact us at electronice_delphi@yahoo.com
60
 
61
  = I have no PHP knowledge at all, i will still be able to use this plugin? =
62
 
63
- Absolutely you can! Unlike many 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 (Autosort) to allow customized code usage.
 
64
 
65
  = How to manually apply the sort on queries =
66
 
@@ -80,11 +81,11 @@ All ideas are welcome and i put them on my list to be implemented into the new v
80
 
81
  = Can i make certain queries to ignore the custom sort when Autosort is turned On? =
82
 
83
- This can be done 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/
84
 
85
  = How can i force sort apply for certain queries when Autosort is turned On? =
86
 
87
- A filter can be used to achieve that pto/posts_orderby. An example can be found at http://www.nsp-code.com/ignore-sort-apply-for-certain-query-on-post-types-order/
88
 
89
  = I still need more features like front sorting interface, shortcodes, filters, conditionals, advanced queries, taxonomy/ category sorting etc =
90
 
@@ -93,6 +94,11 @@ Consider upgrading to our advanced version of this plugin at a very resonable pr
93
 
94
  == Change Log ==
95
 
 
 
 
 
 
96
  = 1.9.3.3 =
97
  - Plugin option to include query argument ASC / DESC
98
 
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.8.1
7
+ Stable tag: 1.9.3.5
8
 
9
  Post Order and custom Post Type Objects (custom post types) using a Drag and Drop Sortable JavaScript AJAX interface or default WordPress dashboard.
10
 
44
  1. Upload `post-types-order` folder to your `/wp-content/plugins/` directory.
45
  2. Activate the plugin from Admin > Plugins menu.
46
  3. Once activated you should check with Settings > Post Types Order
47
+ 4. Use Re-Order link which appear into each post type section or use default WordPress interface to make your sorting.
48
 
49
 
50
  == Screenshots ==
60
 
61
  = I have no PHP knowledge at all, i will still be able to use this plugin? =
62
 
63
+ Absolutely, you can!
64
+ Unlike many 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 (Autosort) to allow customized code usage.
65
 
66
  = How to manually apply the sort on queries =
67
 
81
 
82
  = Can i make certain queries to ignore the custom sort when Autosort is turned On? =
83
 
84
+ This can be done by including the ignore_custom_sort within custom query arguments. An example can be found at <a target="_blank" href="http://www.nsp-code.com/advanced-post-types-order-api/sample-usage/">http://www.nsp-code.com/advanced-post-types-order-api/sample-usage/</a>
85
 
86
  = How can i force sort apply for certain queries when Autosort is turned On? =
87
 
88
+ A filter can be used to achieve that pto/posts_orderby. An example can be found at <a target="_blank" href="http://www.nsp-code.com/ignore-sort-apply-for-certain-query-on-post-types-order/">http://www.nsp-code.com/ignore-sort-apply-for-certain-query-on-post-types-order/</a>
89
 
90
  = I still need more features like front sorting interface, shortcodes, filters, conditionals, advanced queries, taxonomy/ category sorting etc =
91
 
94
 
95
  == Change Log ==
96
 
97
+ = 1.9.3.5 =
98
+ - Fix: updated capability from switch_theme to manage_options within 'Minimum Level to use this plugin' option
99
+ - Default admin capability changed from install_plugins to manage_options to prevent DISALLOW_FILE_MODS issue. https://wordpress.org/support/topic/plugin-breaks-when-disallow_file_mods-is-set-to-true/
100
+ - Prepare plugin for Composer package
101
+
102
  = 1.9.3.3 =
103
  - Plugin option to include query argument ASC / DESC
104