This commit is contained in:
2026-04-18 20:18:31 +03:00
parent d9d56e4fe9
commit 7b24f58aeb
13 changed files with 178 additions and 399 deletions

View File

@@ -6,7 +6,16 @@
* @package Twenty_Twenty_Four
*/
get_header(); ?>
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-blog-page',
'header_action_url' => function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' ),
'header_action_label' => __( 'Корзина', 'twentytwentyfour' ),
'header_mode' => 'link',
);
get_header( 'test1', $test1_header_args );
?>
<?php
$show_blog_posts_image = water_delivery_get_option( 'show_blog_posts_image' );
@@ -45,4 +54,4 @@ get_header(); ?>
<?php
get_sidebar();
get_footer();
get_footer( 'test1' );

View File

@@ -0,0 +1,12 @@
<?php
/**
* Custom footer for the test1 main page template.
*
* @package Twenty_Twenty_Four
*/
require get_theme_file_path( 'template-parts/test1-shared-footer.php' );
wp_footer();
?>
</body>
</html>

View File

@@ -0,0 +1,38 @@
<?php
/**
* Custom header for the test1 main page template.
*
* @package Twenty_Twenty_Four
*/
$args = wp_parse_args(
is_array( $args ) ? $args : array(),
array(
'body_class' => 'test1-landing-page',
'header_mode' => 'cart',
'header_action_url' => '',
'header_action_label' => '',
)
);
$body_class = $args['body_class'];
if ( is_string( $body_class ) ) {
$body_class = trim( $body_class );
}
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( $body_class ); ?>>
<?php wp_body_open(); ?>
<?php
$test1_header_mode = $args['header_mode'];
$test1_header_action_url = $args['header_action_url'];
$test1_header_action_label = $args['header_action_label'];
require get_theme_file_path( 'template-parts/test1-shared-header.php' );
?>

View File

@@ -16,16 +16,16 @@ if ( '' === trim( wp_strip_all_tags( $blog_intro ) ) ) {
$test1_header_action_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' );
$test1_header_action_label = __( 'Корзина', 'twentytwentyfour' );
$test1_header_mode = 'link';
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-shared-shell test1-shared-blog-page' ); ?>>
<?php wp_body_open(); ?>
<?php require get_theme_file_path( 'template-parts/test1-shared-header.php' ); ?>
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-blog-page',
'header_action_url' => $test1_header_action_url,
'header_action_label' => $test1_header_action_label,
'header_mode' => $test1_header_mode,
);
get_header( 'test1', $test1_header_args );
?>
<main class="site-main" role="main">
<section class="section blog-hero" aria-labelledby="blog-page-title">
@@ -100,7 +100,5 @@ $test1_header_mode = 'link';
</section>
</main>
<?php require get_theme_file_path( 'template-parts/test1-shared-footer.php' ); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php
get_footer( 'test1' );

View File

@@ -5,20 +5,14 @@
* @package Twenty_Twenty_Four
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-shared-shell test1-shared-cart-page' ); ?>>
<?php wp_body_open(); ?>
<?php
$test1_header_action_url = function_exists( 'wc_get_checkout_url' ) ? wc_get_checkout_url() : '';
$test1_header_action_label = __( 'Оформление', 'twentytwentyfour' );
$test1_header_mode = 'link';
require get_theme_file_path( 'template-parts/test1-shared-header.php' );
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-cart-page',
'header_action_url' => function_exists( 'wc_get_checkout_url' ) ? wc_get_checkout_url() : '',
'header_action_label' => __( 'Оформление', 'twentytwentyfour' ),
'header_mode' => 'link',
);
get_header( 'test1', $test1_header_args );
?>
<main class="site-main" role="main">
@@ -32,7 +26,5 @@
</div>
</main>
<?php require get_theme_file_path( 'template-parts/test1-shared-footer.php' ); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php
get_footer( 'test1' );

View File

@@ -5,20 +5,14 @@
* @package Twenty_Twenty_Four
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-shared-shell test1-shared-checkout-page' ); ?>>
<?php wp_body_open(); ?>
<?php
$test1_header_action_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : '';
$test1_header_action_label = __( 'Корзина', 'twentytwentyfour' );
$test1_header_mode = 'link';
require get_theme_file_path( 'template-parts/test1-shared-header.php' );
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-checkout-page',
'header_action_url' => function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : '',
'header_action_label' => __( 'Корзина', 'twentytwentyfour' ),
'header_mode' => 'link',
);
get_header( 'test1', $test1_header_args );
?>
<main class="site-main" role="main">
@@ -32,7 +26,5 @@
</div>
</main>
<?php require get_theme_file_path( 'template-parts/test1-shared-footer.php' ); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php
get_footer( 'test1' );

View File

@@ -5,20 +5,14 @@
* @package Twenty_Twenty_Four
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-shared-shell test1-shared-contacts-page' ); ?>>
<?php wp_body_open(); ?>
<?php
$test1_header_action_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' );
$test1_header_action_label = __( 'Корзина', 'twentytwentyfour' );
$test1_header_mode = 'link';
require get_theme_file_path( 'template-parts/test1-shared-header.php' );
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-contacts-page',
'header_action_url' => function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' ),
'header_action_label' => __( 'Корзина', 'twentytwentyfour' ),
'header_mode' => 'link',
);
get_header( 'test1', $test1_header_args );
?>
<main class="site-main" role="main">
@@ -82,7 +76,5 @@
</section>
</main>
<?php require get_theme_file_path( 'template-parts/test1-shared-footer.php' ); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php
get_footer( 'test1' );

View File

@@ -5,20 +5,14 @@
* @package Twenty_Twenty_Four
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-shared-shell test1-shared-delivery-page' ); ?>>
<?php wp_body_open(); ?>
<?php
$test1_header_action_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' );
$test1_header_action_label = __( 'Корзина', 'twentytwentyfour' );
$test1_header_mode = 'link';
require get_theme_file_path( 'template-parts/test1-shared-header.php' );
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-delivery-page',
'header_action_url' => function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' ),
'header_action_label' => __( 'Корзина', 'twentytwentyfour' ),
'header_mode' => 'link',
);
get_header( 'test1', $test1_header_args );
?>
<main class="site-main" role="main">
@@ -129,7 +123,5 @@
</section>
</main>
<?php require get_theme_file_path( 'template-parts/test1-shared-footer.php' ); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php
get_footer( 'test1' );

View File

@@ -5,20 +5,14 @@
* @package Twenty_Twenty_Four
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-shared-shell test1-shared-faq-page' ); ?>>
<?php wp_body_open(); ?>
<?php
$test1_header_action_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' );
$test1_header_action_label = __( 'Корзина', 'twentytwentyfour' );
$test1_header_mode = 'link';
require get_theme_file_path( 'template-parts/test1-shared-header.php' );
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-faq-page',
'header_action_url' => function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' ),
'header_action_label' => __( 'Корзина', 'twentytwentyfour' ),
'header_mode' => 'link',
);
get_header( 'test1', $test1_header_args );
?>
<main class="site-main" role="main">
@@ -101,7 +95,5 @@
</section>
</main>
<?php require get_theme_file_path( 'template-parts/test1-shared-footer.php' ); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php
get_footer( 'test1' );

View File

@@ -5,20 +5,14 @@
* @package Twenty_Twenty_Four
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-shared-shell test1-shared-service-page' ); ?>>
<?php wp_body_open(); ?>
<?php
$test1_header_action_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' );
$test1_header_action_label = __( 'Корзина', 'twentytwentyfour' );
$test1_header_mode = 'link';
require get_theme_file_path( 'template-parts/test1-shared-header.php' );
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-service-page',
'header_action_url' => function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' ),
'header_action_label' => __( 'Корзина', 'twentytwentyfour' ),
'header_mode' => 'link',
);
get_header( 'test1', $test1_header_args );
?>
<main class="site-main" role="main">
@@ -99,7 +93,5 @@
</section>
</main>
<?php require get_theme_file_path( 'template-parts/test1-shared-footer.php' ); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php
get_footer( 'test1' );

View File

@@ -5,20 +5,14 @@
* @package Twenty_Twenty_Four
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-shared-shell test1-shared-shop-page' ); ?>>
<?php wp_body_open(); ?>
<?php
$test1_header_action_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' );
$test1_header_action_label = __( 'Корзина', 'twentytwentyfour' );
$test1_header_mode = 'link';
require get_theme_file_path( 'template-parts/test1-shared-header.php' );
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-shop-page',
'header_action_url' => function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : home_url( '/cart/' ),
'header_action_label' => __( 'Корзина', 'twentytwentyfour' ),
'header_mode' => 'link',
);
get_header( 'test1', $test1_header_args );
?>
<main class="site-main" role="main">
@@ -27,7 +21,5 @@
</div>
</main>
<?php require get_theme_file_path( 'template-parts/test1-shared-footer.php' ); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php
get_footer( 'test1' );

View File

@@ -82,84 +82,8 @@ function twentytwentyfour_test1_catalog_markup() {
return (string) ob_get_clean();
}
$landing_html = <<<'HTML'
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Доставка питьевой воды в Севастополе — 19 л для дома и офиса</title>
<meta name="description" content="Питьевая вода с доставкой по Севастополю для дома и офиса. Бутыли 19 л, компактные форматы, удобные интервалы, подъем на этаж и возвратная тара.">
<meta name="theme-color" content="#0d4fd6">
<meta property="og:title" content="Питьевая вода с доставкой в Севастополе — удобно для дома и офиса">
<meta property="og:description" content="Закажите воду для дома, офиса или небольшого бизнеса: 19 л, 5 л и другие форматы с доставкой по Севастополю.">
<meta property="og:type" content="website">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="index3.css">
</head>
<body>
<header class="site-header">
<div class="container">
<div class="header-row">
<a class="brand" href="#top" aria-label="Перейти в начало страницы">
<span class="brand-mark" aria-hidden="true">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C9 6.1 6 9.4 6 13.2C6 16.9 8.69 20 12 20C15.31 20 18 16.9 18 13.2C18 9.4 15 6.1 12 2Z" fill="currentColor"/>
</svg>
</span>
<span class="brand-text">
<strong>АкваЛиния</strong>
<span>питьевая вода для дома и офиса</span>
</span>
</a>
<nav class="nav" aria-label="Основная навигация">
<a href="#catalog">Каталог</a>
<a href="#delivery">Доставка</a>
<a href="#business">Для дома и офиса</a>
<a href="#faq">FAQ</a>
<a href="#contacts">Контакты</a>
</nav>
<div class="header-actions">
<a class="header-phone" href="tel:+79781234567" aria-label="Позвонить по номеру плюс семь девятьсот семьдесят восемь сто двадцать три сорок пять шестьдесят семь">
<span aria-hidden="true">+7 (978) 123-45-67</span>
</a>
<button class="cart-button" id="cartOpenButton" aria-label="Открыть корзину">
<span aria-hidden="true">Корзина</span>
<span class="cart-count" id="cartCount" aria-live="polite" aria-atomic="true">0</span>
</button>
<button class="mobile-toggle" id="mobileToggle" aria-label="Открыть меню" aria-expanded="false" aria-controls="mobilePanel">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M4 7H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M4 12H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M4 17H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
</div>
</div>
<div class="mobile-panel" id="mobilePanel">
<div class="mobile-card">
<nav class="mobile-nav" aria-label="Мобильная навигация">
<a href="#catalog">Каталог</a>
<a href="#delivery">Условия доставки</a>
<a href="#business">Для дома и офиса</a>
<a href="#faq">FAQ</a>
<a href="#contacts">Контакты</a>
</nav>
<a class="header-phone" href="tel:+79781234567">+7 (978) 123-45-67</a>
<button class="cart-button" id="mobileCartOpenButton" aria-label="Открыть корзину с мобильного меню">
<span>Корзина</span>
<span class="cart-count" id="mobileCartCount" aria-live="polite" aria-atomic="true">0</span>
</button>
</div>
</div>
</div>
</header>
get_header( 'test1' );
?>
<main id="top">
<section class="hero">
<div class="container">
@@ -242,6 +166,13 @@ $landing_html = <<<'HTML'
Можно заказать разово или подключить регулярную доставку, чтобы не следить за остатками.</p>
</div>
<?php
$catalog_markup = twentytwentyfour_test1_catalog_markup();
if ( '' !== $catalog_markup ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $catalog_markup;
} else {
?>
<div class="catalog-grid">
<article class="catalog-card reveal">
<div class="catalog-icon" aria-hidden="true">💧</div>
@@ -303,6 +234,9 @@ $landing_html = <<<'HTML'
<button class="mini-button add-to-cart" data-name="Газированная вода 0.5 л" data-volume="0.5 л" data-price="45">Добавить в корзину</button>
</article>
</div>
<?php
}
?>
</div>
</section>
@@ -753,47 +687,6 @@ $landing_html = <<<'HTML'
</section>
</main>
<footer class="footer">
<div class="container">
<div class="footer-grid">
<div class="footer-card">
<a class="brand" href="#top" aria-label="Перейти в начало страницы">
<span class="brand-mark" aria-hidden="true">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C9 6.1 6 9.4 6 13.2C6 16.9 8.69 20 12 20C15.31 20 18 16.9 18 13.2C18 9.4 15 6.1 12 2Z" fill="currentColor"/>
</svg>
</span>
<span class="brand-text">
<strong>АкваЛиния</strong>
<span>вода с доставкой для Севастополя</span>
</span>
</a>
<p class="footer-description">Питьевая вода для дома, офиса, кафе и небольших коммерческих точек в Севастополе. Удобный заказ на сайте и понятные условия доставки.</p>
</div>
<div class="footer-card">
<h3>Навигация и документы</h3>
<div class="footer-links">
<a href="#catalog">Каталог</a>
<a href="#delivery">Условия доставки</a>
<a href="#business">Для дома и офиса</a>
<a href="#faq">Частые вопросы</a>
<a href="#contacts">Контакты</a>
</div>
<div class="footer-legal">
<a href="#">Политика конфиденциальности</a>
<a href="#">Пользовательское соглашение</a>
<a href="#">Условия использования</a>
</div>
</div>
</div>
<div class="footer-bottom">
<span>© 2026 АкваЛиния. Все права защищены.</span>
<span>Работаем для дома, офиса и небольшого бизнеса</span>
</div>
</div>
</footer>
<div class="cart-drawer" id="cartDrawer" aria-hidden="true">
<div class="cart-panel" role="dialog" aria-modal="true" aria-labelledby="cartTitle">
<div class="drawer-head">
@@ -844,118 +737,5 @@ $landing_html = <<<'HTML'
</form>
</div>
</div>
<script src="index3.js"></script>
</body>
</html>
HTML;
if ( $landing_html ) {
$catalog_markup = twentytwentyfour_test1_catalog_markup();
ob_start();
$test1_header_mode = 'cart';
require get_theme_file_path( 'template-parts/test1-shared-header.php' );
$shared_header_markup = (string) ob_get_clean();
ob_start();
require get_theme_file_path( 'template-parts/test1-shared-footer.php' );
$shared_footer_markup = (string) ob_get_clean();
if ( '' !== $catalog_markup ) {
$catalog_static_markup = <<<'HTML'
<div class="catalog-grid">
<article class="catalog-card reveal">
<div class="catalog-icon" aria-hidden="true">💧</div>
<h3>Вода 19 литров</h3>
<p>Главный формат для кулеров, кухни и офиса. Самая выгодная цена за литр и удобная возвратная тара.</p>
<div class="tag-row">
<span class="chip">хит продаж</span>
<span class="chip">для кулера</span>
</div>
<div class="card-price"><strong>290 ₽</strong><span>за бутыль</span></div>
<button class="mini-button add-to-cart" data-name="Вода артезианская 19 л" data-volume="19 л" data-price="290">Добавить в корзину</button>
</article>
<article class="catalog-card reveal reveal-delay-1">
<div class="catalog-icon" aria-hidden="true">🫙</div>
<h3>Вода 5 литров</h3>
<p>Удобный домашний формат для кухни, поездок и дачи. Легко хранить, просто переносить.</p>
<div class="tag-row">
<span class="chip">домой</span>
<span class="chip">компактно</span>
</div>
<div class="card-price"><strong>95 ₽</strong><span>за бутылку</span></div>
<button class="mini-button add-to-cart" data-name="Питьевая вода 5 л" data-volume="5 л" data-price="95">Добавить в корзину</button>
</article>
<article class="catalog-card reveal reveal-delay-2">
<div class="catalog-icon" aria-hidden="true">🥤</div>
<h3>0.5 / 1.5 литра</h3>
<p>Для тренировок, поездок, мероприятий и ежедневного запаса питьевой воды дома или на работе.</p>
<div class="tag-row">
<span class="chip">спорт</span>
<span class="chip">мероприятия</span>
</div>
<div class="card-price"><strong>39 ₽</strong><span>от 0.5 л</span></div>
<button class="mini-button add-to-cart" data-name="Питьевая вода 1.5 л" data-volume="1.5 л" data-price="49">Добавить в корзину</button>
</article>
<article class="catalog-card reveal reveal-delay-3">
<div class="catalog-icon" aria-hidden="true">⛰️</div>
<h3>Минеральная вода</h3>
<p>Освежающий вариант для гостей, кафе и тех, кто предпочитает яркий минеральный вкус.</p>
<div class="tag-row">
<span class="chip">для кафе</span>
<span class="chip">рестораны</span>
</div>
<div class="card-price"><strong>68 ₽</strong><span>за 1.5 л</span></div>
<button class="mini-button add-to-cart" data-name="Минеральная вода 1.5 л" data-volume="1.5 л" data-price="68">Добавить в корзину</button>
</article>
<article class="catalog-card reveal reveal-delay-4">
<div class="catalog-icon" aria-hidden="true">✨</div>
<h3>Газированная / негазированная</h3>
<p>Соберите микс под привычки семьи или офиса: мягкая вода на каждый день и газированная к столу.</p>
<div class="tag-row">
<span class="chip">микс заказ</span>
<span class="chip">на выбор</span>
</div>
<div class="card-price"><strong>45 ₽</strong><span>за 0.5 л</span></div>
<button class="mini-button add-to-cart" data-name="Газированная вода 0.5 л" data-volume="0.5 л" data-price="45">Добавить в корзину</button>
</article>
</div>
HTML;
$landing_html = str_replace( $catalog_static_markup, $catalog_markup, $landing_html );
}
$landing_html = preg_replace( '/<header class="site-header">.*?<\/header>/is', $shared_header_markup, $landing_html, 1 );
$landing_html = preg_replace( '/<footer class="footer">.*?<\/footer>/is', $shared_footer_markup, $landing_html, 1 );
$landing_html = preg_replace( '/<script[^>]+src=["\'](?:\.\/)?index3\.js["\'][^>]*><\/script>/i', '', $landing_html );
}
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-landing-page' ); ?>>
<?php wp_body_open(); ?>
<?php
if ( $landing_html && preg_match( '/<body[^>]*>(.*)<\/body>/is', $landing_html, $matches ) ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $matches[1];
} else {
?>
<main class="site-main" role="main">
<div style="padding:48px 16px;max-width:1180px;margin:0 auto;">
<p>Не удалось отрендерить шаблон главной страницы.</p>
</div>
</main>
<?php
}
?>
<?php wp_footer(); ?>
</body>
</html>
get_footer( 'test1' );

View File

@@ -39,16 +39,16 @@ if ( ! $blog_url ) {
}
$test1_header_action_label = __( 'Корзина', 'twentytwentyfour' );
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'test1-shared-shell test1-shared-blog-single-page' ); ?>>
<?php wp_body_open(); ?>
<?php require get_theme_file_path( 'template-parts/test1-shared-header.php' ); ?>
$test1_header_args = array(
'body_class' => 'test1-shared-shell test1-shared-blog-single-page',
'header_action_url' => $test1_header_action_url,
'header_action_label' => $test1_header_action_label,
'header_mode' => $test1_header_mode,
);
get_header( 'test1', $test1_header_args );
?>
<main class="site-main" role="main">
<div class="container">
@@ -97,7 +97,5 @@ $test1_header_action_label = __( 'Корзина', 'twentytwentyfour' );
</div>
</main>
<?php require get_theme_file_path( 'template-parts/test1-shared-footer.php' ); ?>
<?php wp_footer(); ?>
</body>
</html>
<?php
get_footer( 'test1' );