Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#10335 closed defect (bug) (fixed)

Kubrick's sidebar.php contains incorrect comments and "echo bloginfo"

Reported by: JeremyVisser Owned by: ryan
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.9
Component: Template Keywords: has-patch commit
Focuses: Cc:


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.
  2. 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.

Attachments (1)

echo-bloginfo.diff (2.5 KB) - added by JeremyVisser 12 years ago.
Fixes for sidebar.php

Download all attachments as: .zip

Change History (3)

12 years ago

Fixes for sidebar.php

#1 @JeremyVisser
12 years ago

  • Keywords commit added
  • Owner set to ryan
  • Status changed from new to assigned

#2 @westi
12 years ago

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

(In [11791]) Correct comments and remove unecessary echos from the default themes sidebar templete file. Fixes #10335 props JeremyVisser.

Note: See TracTickets for help on using tickets.