Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 10 years ago

#9082 closed defect (bug) (worksforme)

wp_page_menu, home page link isn't use link_before and link_after arguments

Reported by: satranc's profile satranc Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

When I wanted to use this filter;

function aa_wp_page_menu_args($args) {

$argslink_before?='<span>';
$argslink_after?='</span>';
return $args;

}
add_filter('wp_page_menu_args','aa_wp_page_menu_args');

for wp_page_menu, home page didn't took arguments.

Change History (2)

#1 @sivel
16 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Your code produced the following results for me:

<div class="menu">
	<ul>
		<li class="current_page_item">
			<a href="http://wordpress.trunk">
				<span>Home</span>
			</a>
		</li>
		[snip]
	</ul>
</div>

This is the code I used, since your code lost formatting in the description:

function aa_wp_page_menu_args($args) {
        $args['link_before']='<span>';
        $args['link_after']='</span>'; 
        return $args;
}
add_filter('wp_page_menu_args','aa_wp_page_menu_args');

#2 @DrewAPicture
10 years ago

  • Milestone 2.8 deleted
Note: See TracTickets for help on using tickets.