| @@ -1,16 +1,16 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | defined( 'ABSPATH' ) || exit; |
| 3 | 3 | |
| 4 | -$is_block_theme = wp_is_block_theme(); | |
| 4 | +$ultp_is_block_theme = wp_is_block_theme(); | |
| 5 | 5 | |
| 6 | 6 | global $ULTP_HEADER_ID; |
| 7 | 7 | global $ULTP_FOOTER_ID; |
| 8 | -$builder_active = ultimate_post()->get_setting( 'ultp_builder' ) != 'false'; | |
| 9 | -$has_header = $builder_active ? $ULTP_HEADER_ID : ''; | |
| 10 | -$has_footer = $builder_active ? $ULTP_FOOTER_ID : ''; | |
| 8 | +$ultp_builder_active = ultimate_post()->get_setting( 'ultp_builder' ) != 'false'; | |
| 9 | +$ultp_has_header = $ultp_builder_active ? $ULTP_HEADER_ID : ''; | |
| 10 | +$ultp_has_footer = $ultp_builder_active ? $ULTP_FOOTER_ID : ''; | |
| 11 | 11 | |
| 12 | -if ( $is_block_theme ) { | |
| 12 | +if ( $ultp_is_block_theme ) { | |
| 13 | 13 | ?><!DOCTYPE html> |
| 14 | 14 | <html <?php language_attributes(); ?>> |
| 15 | 15 | <head> |
| 16 | 16 | <meta charset="<?php bloginfo( 'charset' ); ?>" /> |
| @@ -21,13 +21,13 @@ | ||
| 21 | 21 | <body <?php body_class(); ?>> |
| 22 | 22 | <?php |
| 23 | 23 | wp_body_open(); |
| 24 | 24 | |
| 25 | - if ( ! $has_header ) { | |
| 25 | + if ( ! $ultp_has_header ) { | |
| 26 | 26 | ob_start(); |
| 27 | 27 | block_template_part( 'header' ); |
| 28 | - $header = ob_get_clean(); | |
| 29 | - echo '<header class="wp-block-template-part">' . $header . '</header>'; | |
| 28 | + $ultp_header = ob_get_clean(); | |
| 29 | + echo '<header class="wp-block-template-part">' . $ultp_header . '</header>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Core-rendered block template part. | |
| 30 | 30 | } |
| 31 | 31 | } else { |
| 32 | 32 | get_header(); |
| 33 | 33 | } |
| @@ -33,12 +33,12 @@ | ||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | do_action( 'ultp_before_content' ); |
| 36 | 36 | |
| 37 | -$width = ultimate_post()->get_setting( 'container_width' ); | |
| 38 | -$width = $width ? $width : '1140'; | |
| 37 | +$ultp_width = ultimate_post()->get_setting( 'container_width' ); | |
| 38 | +$ultp_width = $ultp_width ? $ultp_width : '1140'; | |
| 39 | 39 | ?> |
| 40 | -<div class="ultp-template-container" style="margin:0 auto;max-width:<?php echo esc_attr( $width ); ?>px; padding: 0 15px; width: -webkit-fill-available; width: -moz-available;"> | |
| 40 | +<div class="ultp-template-container" style="margin:0 auto;max-width:<?php echo esc_attr( $ultp_width ); ?>px; padding: 0 15px; width: -webkit-fill-available; width: -moz-available;"> | |
| 41 | 41 | <?php |
| 42 | 42 | while ( have_posts() ) : |
| 43 | 43 | the_post(); |
| 44 | 44 | the_content(); |
| @@ -50,18 +50,18 @@ | ||
| 50 | 50 | </div> |
| 51 | 51 | |
| 52 | 52 | <?php |
| 53 | 53 | do_action( 'ultp_after_content' ); |
| 54 | -if ( $is_block_theme ) { | |
| 54 | +if ( $ultp_is_block_theme ) { | |
| 55 | 55 | ?> |
| 56 | 56 | </body> |
| 57 | 57 | </html> |
| 58 | 58 | <?php |
| 59 | - if ( ! $has_footer ) { | |
| 59 | + if ( ! $ultp_has_footer ) { | |
| 60 | 60 | ob_start(); |
| 61 | 61 | block_template_part( 'footer' ); |
| 62 | - $footer = ob_get_clean(); | |
| 63 | - echo '<footer class="wp-block-template-part">' . $footer . '</footer>'; | |
| 62 | + $ultp_footer = ob_get_clean(); | |
| 63 | + echo '<footer class="wp-block-template-part">' . $ultp_footer . '</footer>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Core-rendered block template part. | |
| 64 | 64 | } |
| 65 | 65 | // wp_head(); // all ready wp head declared in header, i can not find any conflict to check that, if you find any conflict for removing then use it |
| 66 | 66 | wp_footer(); |
| 67 | 67 | } else { |