Opened 14 years ago
Closed 11 years ago
#16632 closed defect (bug) (fixed)
Template title tags shouldn't ignore the prefix,even if 'display' is false
Reported by: | yoavf | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | minor | Version: | 3.1 |
Component: | Template | Keywords: | has-patch |
Focuses: | Cc: |
Description
Some template title tags that accept both the $prefix and $display paramater ignore the prefix if the display is set to false, i.e. single_post_title(), single_term_title().
Some don't, i.e. single_month_title().
It doesn't make sense to ignore the prefix - if the developer doesn't want it, he can leave it empty.
Attachments (2)
Change History (8)
#2
@
11 years ago
- Cc vaxace added
- Keywords needs-refresh added
This is still an issue in WordPress V3.5.2.
In wp-includes/general-template.php at line 635 there is an if statement testing the $display argument. If $display is true, $prefix and $title are echoed. If $display is false, only $title is echoed.
if ( $display )
echo $prefix . $title;
else
return $title; // Should be return $prefix . $title;
This is also the case in wp-includes/general-template.php at line 660
Note: See
TracTickets for help on using
tickets.
Yes, I have detected the same bug. The prefix must be also included if display is set to false.