[wp-trac] [WordPress Trac] #10335: Kubrick's sidebar.php contains incorrect comments and "echo bloginfo"

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 3 09:04:36 UTC 2009


#10335: Kubrick's sidebar.php contains incorrect comments and "echo bloginfo"
--------------------------+-------------------------------------------------
 Reporter:  JeremyVisser  |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.9      
Component:  Template      |     Version:  2.9      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
 Here is an extract from {{{wp-content/themes/default/sidebar.php}}}:

 {{{
 <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
 <p>You have searched the
 <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name');
 ?></a>
 blog archives for <strong>'<?php the_search_query(); ?>'</strong>.
 If you are unable to find anything in these search results,
 you can try one of these links.</p>
 }}}

 Two errors within this:

  1. The comment at the start is wrong. Probably a copy-and-paste bug.
  1. {{{echo bloginfo()}}} is used, which is redundant. {{{bloginfo()}}}
 already echoes the output -- if you don't want to echo it, use
 {{{get_bloginfo()}}}

 Patch attached.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10335>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list