Opened 16 years ago
Last modified 2 months ago
#14439 new defect (bug)
Unable to get a post associated menu items for a specific menu
| Reported by: | DreadLox | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Menus | Version: | 3.1 |
| Severity: | major | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
Hello,
The actual wp_get_associated_nav_menu_items function works well but gets menu items associated with an object from ANY menu. So a parameter needs to be added to specify a specific menu to get menu items associated with an object from a specific menu.
Patch is attached. The use of get_term() is needed because of the bug #14438
Attachments (2)
Change History (8)
#1
@
16 years ago
- Milestone Awaiting Review → Future Release
Clever fix. Ultimately, you can do post-processing on this for now to fetch the menus for which the the meta items are assigned.
#2
@
16 years ago
- Keywords has-patch added
- Version → 3.1
Any reason that 6 months old patch hasn't made it's way to 3.1 ?
#4
@
12 years ago
- Keywords has-patch added; needs-refresh removed
This can be useful in some situations, so I believe it should go into the core.
I've just refreshed the patch. The new patch is compatible with the latest function version (a $taxonomy parameter was added in #15264), and in addition to the previous patch takes care of the following:
- Check for invalid menu ID
- Updated documentation
- Unit test case for correct usage of the new
$menu_idparameter. - Unit test case for incorrect usage of the new
$menu_idparameter.
This ticket was mentioned in PR #12956 on WordPress/wordpress-develop by skikken.
2 months ago
#6
- Keywords has-unit-tests added; needs-refresh removed
Trac ticket: https://core.trac.wordpress.org/ticket/14439
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude
Model(s): Sonnet
Used for: Writing test cases
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch to solve the bug