-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ Navigation Screen ] Enables the new navigation screen to set up menus that auto add new pages #22697
Conversation
Size Change: +223 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change you add a unit test for this and I will review when there is a test.
2e91f3f
to
64fd304
Compare
Howdy @spacedmonkey is this enough? I just set the new param true and check for that. |
@draganescu Do you mind if I jump in and rewrite the php here ? |
Howdy @spacedmonkey I don't mind :) but this is the 1st thing I do that's related to this part of WP (ever) so I fear I'll never learn like that. Lot's of copy pasta in there I know. I'll address your review and then if you still want to you can take over? Thank you 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good, a couple of changes I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Updated - WordPress/wordpress-develop#319 |
a38f5d3
to
1c08545
Compare
also implements an UI to set auto_add in the new menu editor
Co-authored-by: Timothy Jacobs <[email protected]>
Co-authored-by: Timothy Jacobs <[email protected]>
Co-authored-by: Timothy Jacobs <[email protected]>
Co-authored-by: Timothy Jacobs <[email protected]>
1c08545
to
d211cf9
Compare
Closes #21311
Description
This PR adds a new
auto_add
property to the__experimental/menus
REST endpoint. This property is the same as the one in the currentwp_nav_menu_update_menu_items
.It also adds a checkbox to each menu that sets
auto_add
How has this been tested?
Tested locally by:
nav-menus.php
Screenshots
Types of changes
Non breaking changes, adds
auto_add
to the schema of Menu and a checkbox with state to theBlockEditorPanel
component.cc @TimothyBJacobs @spacedmonkey