Opened 12 years ago
Closed 12 years ago
#27367 closed defect (bug) (fixed)
Hook Docs: wp-includes/nav-menu.php
| Reported by: | dustyf | Owned by: | DrewAPicture |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.9 |
| Component: | Menus | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | docs |
Description
Attached patch has docs for the following filters and actions in wp-includes/nav-menu.php:
FILTERS
wp_get_nav_menus
wp_get_nav_menu_items
nav_menu_attr_title
nav_menu_description
wp_setup_nav_menu_item
ACTIONS
wp_delete_nav_menu
wp_create_nav_menu
wp_update_nav_menu
wp_update_nav_menu_item
Attachments (5)
Change History (13)
#1
@
12 years ago
- Keywords has-patch added
- Owner set to
- Status new → reviewing
Nice, thanks for the patch Dusty. We'll try to get you a review soon.
#2
@
12 years ago
- Keywords needs-patch added; has-patch removed
Thanks for the patch. Here are some notes on wp-includes-nav-menu.php.diff:
wp_delete_nav_menu hook:
- Should use a docs-specific variable for the term id, perhaps
$term_id
wp_create_nav_menu hook:
- Again, use a docs-specific variable for the first parameter. You could even use
$term_idagain. - General rule of thumb in core inline docs is to use 'ID', instead 'id' (in most cases).
wp_update_nav_menu hook:
- s/id/ID
wp_update_nav_menu_item hook:
- Add a standalone
@see wp_update_nav_menu_items()between the@sinceand@paramlines (this is actually a reference for the third parameter,$args, inherited from the parent function.
wp_get_nav_menus filter:
- Add an empty line above the docblock
- Maybe add a standalone
@see get_terms()line between the@sinceand@paramlines
nav_menu_attr_title filter:
- Use a docs-specific variable for the parameter, maybe
$titleor$item_titleor something
#5
@
12 years ago
Fixed a bit of code I forgot to take out before diffing. Use the last one instead.
#6
@
12 years ago
27367.4.diff contains changes for language consistency and formatting.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch file for wp-includes/nav-menu.php