[wp-trac] [WordPress Trac] #12265: wp_list_pages link_before / link_after not working in WP 2.9.2

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 18 02:45:44 UTC 2010


#12265: wp_list_pages link_before / link_after not working in WP 2.9.2
--------------------------+-------------------------------------------------
 Reporter:  mindshare     |       Owner:                   
     Type:  defect (bug)  |      Status:  new              
 Priority:  normal        |   Milestone:  2.9.3            
Component:  Template      |     Version:  2.9.2            
 Severity:  normal        |    Keywords:  reporter-feedback
--------------------------+-------------------------------------------------
Changes (by sivel):

  * keywords:  wp_list_pages,link_before,link_after => reporter-feedback
  * component:  General => Template


Comment:

 I've just tested in 2.9.1 and then again in 2.9.2 and 3.0.

 Here is what I got in each case:

 {{{
 <!-- generator="WordPress/2.9.1" -->
 <li class="page_item page-item-2"><a href="http://wordpress.stable/about/"
 title="About"><span>About</span></a></li>
 }}}

 {{{
 <!-- generator="WordPress/2.9.2" -->
 <li class="page_item page-item-2"><a href="http://wordpress.stable/about/"
 title="About"><span>About</span></a></li>
 }}}

 {{{
 <!-- generator="WordPress/3.0-alpha" -->
 <li class="page_item page-item-2"><a href="http://wordpress.stable/about/"
 title="About"><span>About</span></a></li>
 }}}

 In each case as you can see the {{{<span>}}} and {{{</span>}}} were
 inserted before and after the word "About".

 The code I used was the following:

 {{{
 <?php the_generator('comment'); ?>
 <?php
 wp_list_pages('title_li=&sort_column=menu_order&depth=1&link_before=<span>&link_after=</span>');
 ?>
 }}}

 From the codex page that describes the arguments for this function:

 link_before [[BR]]
 (string) Sets the text or html that proceeds the link text inside <a> tag.
 (This parameter was added with Version 2.7)

 link_after [[BR]]
 (string) Sets the text or html that follows the link text inside <a> tag.
 (This parameter was added with Version 2.7)

 I cannot reproduce this problem.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12265#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list