Skip to content

Commit

Permalink
fix(widget): Display default title if its empty
Browse files Browse the repository at this point in the history
  • Loading branch information
etcinit committed Oct 21, 2016
1 parent ed42b58 commit 495a013
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/views/snagshout-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

if (!$hide_title) {
echo $before_title;
echo apply_filters('widget_title', $title);
echo apply_filters(
'widget_title',
$title ? $title : 'Featured Coupon Codes'
);
echo $after_title;
}

Expand Down
1 change: 1 addition & 0 deletions src/widget/snagshout-widget-class.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function widget($args, $instance) {
[
'title' => 'Featured Coupon Codes',
'response' => $response,
'hide_title' => false,
],
$args,
$instance
Expand Down

0 comments on commit 495a013

Please sign in to comment.