private function getwidgettitle( $settings, $query, $query_results ) {
$text = $settings['widget_title']; $total = ! empty( $query_results->total ) ? $query_results->total : 0; if ( ! empty( $query->fallback_filter ) ) { $text = $settings['widget_fallback_title']; } if ( 0 === (int) $total ) { return; } echo "<h2 class='raven-wc-products-title'>{$text}</h2>";}I think it is useless to add h2 if it is empty
private function getwidgettitle( $settings, $query, $query_results ) {
$text = !empty($settings['widget_title']) ? $settings['widget_title'] : '';$total = !empty($query_results->total) ? $query_results->total : 0;if (!empty($query->fallback_filter)) { $text = !empty($settings['widget_fallback_title']) ? $settings['widget_fallback_title'] : '';}if ((int)$total === 0 || empty($text)) { return;}echo "<h2 class='raven-wc-products-title'>{$text}</h2>";}
Please authenticate to join the conversation.
In Review
Feature Request
Almost 2 years ago

Enri
Get notified by email when there are changes.
In Review
Feature Request
Almost 2 years ago

Enri
Get notified by email when there are changes.