WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 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:

Description

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 5 years ago.
Fixes for sidebar.php

Download all attachments as: .zip

Change History (3)

JeremyVisser5 years ago

Fixes for sidebar.php

comment:1 JeremyVisser5 years ago

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

comment:2 westi5 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.