Closed peterwilsoncc closed 8 months ago
Some shell commands for getting a bunch of posts with the same ID in the title as the post ID.
Warning: it empties the entire post table.
wp site empty
wp post generate --post_type=page
for i in {1..100}; do wp post update $i --post_title="Page $i"; done;
# To set menu order to the ID too
for i in {1..100}; do wp post update $i --post_title="Page $i" --menu_order=$i; done;
Hello hi!
After some noodling, I think the best option is Nest page
and Un-nest page
(could be nest/un-nest if the page part make it too long, but I'd leave the page part if possible to be super clear).
Make subpage
is another option, but I think it's too complicated because there's no succinct opposite and because nesting it further isn't as intuitive with this command.
Rank
page higher/lower could be another option, but I don't think "rank" is intuitive and it's long.
Order
or level
page up/down are also possibilities, but again, not as intuitive as nest
.
Lmk if any of these feel right or if you'd like me to keep thinking on it!
Hello @peterwilsoncc, I have just tested this new edition, and it works well for me. I was wondering if we could implement a similar behavior for moving in and out of pages by using drag and drop? similar to how we navigate up and down pages.
I am not familiar with the technical aspects of this change, but I wanted to share the idea and get your feedback.
I noticed a similar flow in menu ordering as well:
@ankitguptaindia I had an attempt at that but couldn't get it working in an intuitive fashion. As the pages use tables rather than lists, the jQuery UI library only expects items to move up or down, I attempted to fake it but the drop targets' behaviour wasn't great.
@peterwilsoncc besides tweaking the copy, is there anything else needed here before this can move forward towards review/release?
@jeffpaul That should do.
I'm worried un nest
implies that it moves the page to the top level (ie without a parent) but I can push the change and we can get some real-world feedback and improve if required.
@peterwilsoncc I'm fine with you YOLOing the decision on the copy and we can iterate as needed if there's a consensus in the community for something different
@jeffpaul I've just pushed some changes that alter the copy to match that of the native menu pages in WordPress Core.
"Move Under Page Name" sets the page as a child of page name "Move Out from under Parent Page name" sets the page as a child of it's grandparent or top level if no grandparent exists.
I think the copy is clearer than move in/move out and matching existing core text is probably the best thing to do here.
@faisal-alvi I've updated the description with the new link text.
Description of the Change
Adds row actions to move a page up or down the page hierarchy.
The "Move Out from under Parent Page name" action:
The "Move Under Page Name" action
At the moment this always triggers a full page refresh.
Closes #25.
How to test the Change
wp post generate --post_type=page
Changelog Entry
Credits
Props @peterwilsoncc.
Checklist: