| @@ -1,18 +1,18 @@ | ||
| 1 | 1 | <div class="betterdocs-live-search"> |
| 2 | - <?php | |
| 3 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 4 | - exit; | |
| 5 | -} | |
| 6 | -if ( $heading || $subheading ) : ?> | |
| 2 | + <?php if ( $heading || $subheading ) : ?> | |
| 7 | 3 | <div class="betterdocs-search-heading"> |
| 8 | 4 | <?php |
| 9 | 5 | if ( ! empty( $heading ) && in_array( $heading_tag, betterdocs()->template_helper::ALLOWED_HTML_TAGS ) ) { |
| 10 | 6 | echo '<' . esc_attr( $heading_tag ) . ' class="heading"> ' . esc_html( $heading ) . ' </' . esc_attr( $heading_tag ) . '>'; |
| 7 | + } else { | |
| 8 | + echo '<h2 class="heading"> ' . esc_html( $subheading ) . ' </h2>'; | |
| 11 | 9 | } |
| 12 | 10 | |
| 13 | 11 | if ( ! empty( $subheading ) && in_array( $subheading_tag, betterdocs()->template_helper::ALLOWED_HTML_TAGS ) ) { |
| 14 | 12 | echo '<' . esc_attr( $subheading_tag ) . ' class="subheading"> ' . esc_html( $subheading ) . ' </' . esc_attr( $subheading_tag ) . '>'; |
| 13 | + } else { | |
| 14 | + echo '<h3 class="subheading"> ' . esc_html( $subheading ) . ' </h3>'; | |
| 15 | 15 | } |
| 16 | 16 | ?> |
| 17 | 17 | </div> |
| 18 | 18 | <?php |