#19838 closed enhancement (invalid)
Don't display before_title and after_title if title is empty in widgets
Reported by: | Xarem | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | Widgets | Keywords: | has-patch |
Focuses: | Cc: |
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
@
13 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.
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.