Skip to content

Still displays title HTML tag even if title is actually empty #8

@stanozr

Description

@stanozr

In line 213, variable $title is defined like so :

$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);

So $title is never actually empty (there's at least one space).

And then, in line 228, it checks $title and therefore always displays a heading tag :

if (!empty($title)) echo $before_title . $title . $after_title;

I believe you should leave $title as an empty string if none is provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions