| @@ -1,22 +1,32 @@ | ||
| 1 | 1 | <?php |
| 2 | - if( ! is_singular( 'docs' ) ) { | |
| 3 | - return; | |
| 4 | - } | |
| 2 | + | |
| 3 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 4 | + exit; | |
| 5 | +} | |
| 6 | +if ( ! is_singular( 'docs' ) ) { | |
| 7 | + return; | |
| 8 | +} | |
| 5 | 9 | ?> |
| 6 | 10 | |
| 7 | 11 | <div |
| 8 | - <?php echo $wrapper_attr; ?>> | |
| 9 | - <?php | |
| 10 | - if( $widget_type != 'blocks' ) { | |
| 11 | - betterdocs()->views->get( 'templates/parts/print-icon', [ | |
| 12 | - 'enable' => (bool) $enable | |
| 13 | - ] ); | |
| 14 | - } | |
| 12 | + <?php echo $wrapper_attr; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> | |
| 13 | + <?php | |
| 14 | + if ( isset( $widget_type ) && $widget_type != 'blocks' ) { | |
| 15 | + betterdocs()->views->get( | |
| 16 | + 'templates/parts/print-icon', | |
| 17 | + [ | |
| 18 | + 'enable' => (bool) $enable | |
| 19 | + ] | |
| 20 | + ); | |
| 21 | + } | |
| 15 | 22 | |
| 16 | - // The Content For A Docs | |
| 17 | - $view_object->get( 'templates/parts/content', [ | |
| 18 | - 'htags' => $htags, | |
| 19 | - 'enable_toc' => $enable_toc | |
| 20 | - ] ); | |
| 21 | - ?> | |
| 23 | + // The Content For A Docs | |
| 24 | + $view_object->get( | |
| 25 | + 'templates/parts/content', | |
| 26 | + [ | |
| 27 | + 'htags' => $htags, | |
| 28 | + 'enable_toc' => $enable_toc | |
| 29 | + ] | |
| 30 | + ); | |
| 31 | + ?> | |
| 22 | 32 | </div> |