Opened 15 years ago
Closed 14 years ago
#17837 closed defect (bug) (fixed)
Calendar widget title markup displayed when empty
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.5 | Priority: | normal |
| Severity: | trivial | Version: | 3.1.3 |
| Component: | General | Keywords: | has-patch dev-feedback commit |
| Focuses: | Cc: |
Description
For Calendar widgets, the widget title markup is output even if the title field is left empty. For instance, <h2 class="widgettitle"> <h2>
Conversely, when a Text widget title field is left empty, no markup is output.
Attachments (1)
Change History (7)
#3
@
15 years ago
- Cc michael@… added
- Keywords dev-feedback added
I think that this is a great idea! In a few themes, I have had to filter the widget title like:
function mytheme_calendar_widget_title( $title = '', $instance = '', $id_base = '' ) {
if ( 'calendar' == $id_base && ' ' == $title )
$title = '';
return $title;
}
I find that it is always necessary to do when the widget title has a background color applied. In the event that the user leaves the title blank, a weird square will appear above the calendar.
Note: See
TracTickets for help on using
tickets.
here you go