10up / simple-page-ordering

Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.
https://wordpress.org/plugins/simple-page-ordering/
GNU General Public License v2.0
144 stars 22 forks source link

Only check for page-attributes support #103

Closed dhanendran closed 1 year ago

dhanendran commented 1 year ago

Description of the Change

Enable ordering support only when the post type supports page-attributes.

Closes #96

How to test the Change

  1. Disable this plugin
  2. Enable a hierarchical CPT without page-attributes support. I've created a gist with a mini plugin.
  3. Create 20 CPT posts via wp-cli: wp post generate --count=20 --post_type=pwcc_test_type
  4. Edit one of the CPTs in the WP Dashboard
  5. Observe you can't modify the menu position via the page attributes setting
  6. Enable this plugin
  7. Visit the CPTs post list table
  8. Observe you can't modify the menu position via drag and drop
  9. Add page-attributes support in the code
  10. Visit the CPTs post list table
  11. Observe you can modify the menu position via drag and drop

Changelog Entry

Fix - Disable reordering for CPTs without support for page attributes

Credits

Props @dhanendran

Checklist:

followalter commented 1 year ago

Why was this implemented? A lot of my sites now have post types that can't be ordered anymore. These post types don't need any of the Page Attributes functionalities.

danielshields commented 1 year ago

Same as @followalter ... what was the point of this update? I'm receiving emails from a number of sites that I've used this plugin on over the years that the order is now broken on their sites.

dkotter commented 1 year ago

@followalter @danielshields Note we've just pushed out a 2.4.3 release that brings the original functionality back.