WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#12618 closed defect (bug) (fixed)

Argument Continuity in wp_nav_menu

Reported by: thee17 Owned by: ptahdunbar
Milestone: 3.0 Priority: high
Severity: normal Version: 3.0
Component: Menus Keywords: accepted
Focuses: Cc:

Description

the new function wp_nav_menu() uses inconsistent $arg names to the rest of the wp_list_ functions.

before_link - Output text before the link.
after_link - Output text after the link.
before_title - Output text before the link text.
after_title - Output text after the link text.

elsewhere it is

before - Output text before the link.
after - Output text after the link.
link_before - Output text before the link text.
link_after - Output text after the link text.

Change History (3)

#1 @ptahdunbar
10 years ago

  • Keywords accepted added
  • Owner changed from ryan to ptahdunbar
  • Status changed from new to assigned

Looking over the wp_lists_* functions, there's no args for text before and after links. link_before/after are used for before/after the actual link text. I'll just use before/after for text before and after the links.

New args:

  • before - Text before the link.
  • after - Text after the link.
  • link_before - Text before the link text.
  • link_after - Text after the link text.

#2 @thee17
10 years ago

in wp_list_bookmarks, and a few others , and eventually all lists some are not coded as nice to fix, it goes like

(before)<a>(link_before)text1(link_after)</a>(after)

#3 @ptahdunbar
10 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in r13802

Note: See TracTickets for help on using tickets.