[wp-trac] [WordPress Trac] #37136: 'nav_menu_link_attributes' filter is called with $args as an object instead of an array

WordPress Trac noreply at wordpress.org
Mon Jul 3 17:03:43 UTC 2017


#37136: 'nav_menu_link_attributes' filter is called with $args as an object instead
of an array
--------------------------+------------------------------
 Reporter:  Fab1en        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:  docs, template
--------------------------+------------------------------
Changes (by milana_cap):

 * keywords:   => dev-feedback


Comment:

 Hi @Fab1en,

 The documentation page you're referring to is deprecated. The new, updated
 and correct one is
 [https://developer.wordpress.org/reference/hooks/nav_menu_link_attributes/
 | here], where, as you have correctly noticed, it says that `$args` param
 is, in fact, an `object` of wp_nav_menu() arguments.

 The `codex.wordpress.org` will be retired and replaced by
 `developer.wordpress.org`. Some pages (like this one) still exist on both
 places and some are already redirected to `developer` one. Please keep
 this in mind when you find some deprecated or incorrect information on
 `codex`. It is worth checking the data on the same page on `developer`. If
 data is incorrect there as well then, indeed, we have a bug in
 documentation.

 I know this all is not quite clear from the message at the top of the
 page, but that message is suppose to inform visitors about codex being in
 process of retiring:

 [[Image(https://box.everhelper.me/attachment/995929/e9bf1cba-9f9c-
 4a50-bd91-d20dcaeb4186/654956-9Yh77OA9iEu2w1sw/screen.jpeg)]]

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


More information about the wp-trac mailing list