[wp-trac] [WordPress Trac] #27367: Hook Docs: wp-includes/nav-menu.php

WordPress Trac noreply at wordpress.org
Wed Mar 12 19:34:50 UTC 2014


#27367: Hook Docs: wp-includes/nav-menu.php
--------------------------+------------------------------
 Reporter:  dustyf        |       Owner:  DrewAPicture
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  docs
--------------------------+------------------------------
Changes (by DrewAPicture):

 * keywords:  has-patch => needs-patch


Comment:

 Thanks for the patch. Here are some notes on [attachment: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_id` again.
 * 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 `@since`
 and `@param` lines (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 `@since` and
 `@param` lines

 `nav_menu_attr_title` filter:
 * Use a docs-specific variable for the parameter, maybe `$title` or
 `$item_title` or something

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27367#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list