Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stanozr opened this issue Oct 14, 2019 · 0 comments
Open

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

stanozr opened this issue Oct 14, 2019 · 0 comments

Comments

@stanozr
Copy link

stanozr commented Oct 14, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant