#19838 closed enhancement (invalid)
Don't display before_title and after_title if title is empty in widgets
| Reported by: | Xarem | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Widgets | Version: | |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Hi
it's not necessary displaying before/after_title if $title is empty
Example:
wp-calendar don't have a title, so don't display $before_title and $after_title
Solution suggestion:
return false if filter widget_title notices that $title is empty
Thank you
Attachments (1)
Change History (6)
#3
@
15 years ago
Wait, since $title is always a string, what difference does it make if you use if ( !empty( $title ) ), instead of if ( $title ) ?
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
only about 3 of the defaults had taken this into account. This patch fixes the core widgets. I did not patch or check the occurrences in TwentyEleven or Akismet.
I have updated the Codex, however there are a large number of plugins that probably use the method of not checking that was in the Codex.