Opened 3 years ago
Closed 3 years ago
#13447 closed task (blessed) (fixed)
Allow new pages to be assigned to a menu
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Menus | Version: | |
| Severity: | normal | Keywords: | needs-patch |
| Cc: |
Description
Attachments (2)
Change History (15)
Add an "Automatically add new pages to this menu" checkbox to each menu tab. When new pages are created, they are added to the end of any menu that has this checked. Also considered was having a dropdown or list of menus in the edit page form, but since adding new pages to a menu is a one time action rather than a state the UX for that would be cumbersome.
- Owner changed from nacin/koopersmith to nacin
- Status changed from new to accepted
Checkbox is done on my local install. Just need to get the right callback in place on the publish_page hook.
I'm finding that this reveals a bug (I think) in automatic positioning handled in wp_update_nav_menu_item, but we can iterate. (It adds them to the bottom, but above ones added previously through auto-add.)
- Keywords needs-patch added; has-patch removed
We're also not removing old menus from the auto_add list. We can do that either on save or on the publish hook by doing a get_objects_in_term and intersecting them.
Add post_status to wp_update_nav_menu_item, allowing us to directly publish a new menu item. Also, check for draft menu items too when deciding menu order.
comment:10
nacin — 3 years ago
- Resolution set to fixed
- Status changed from accepted to closed
comment:11
nacin — 3 years ago
Thanks to filosofo for helping me review that.
We're going to handle UX for this in #13525, where discussion has already started on the exact placement of the checkbox added here. Thus, resolved as fixed.
comment:12
nacin — 3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Forgot about post_parent.
comment:13
nacin — 3 years ago
- Resolution set to fixed
- Status changed from reopened to closed

Could you elaborate?