50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Privacy policy page template.
|
|
*
|
|
* @package Twenty_Twenty_Four
|
|
*/
|
|
|
|
$test1_header_args = array(
|
|
'body_class' => 'test1-shared-shell test1-shared-privacy-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">
|
|
<section class="section privacy-policy-section">
|
|
<div class="container">
|
|
<article class="privacy-policy-content">
|
|
<h1 class="section-title"><?php esc_html_e( 'Политика конфиденциальности', 'twentytwentyfour' ); ?></h1>
|
|
|
|
<?php
|
|
$policy_file = get_theme_file_path( 'privacy-policy-content.txt' );
|
|
$policy_text = file_exists( $policy_file ) ? file_get_contents( $policy_file ) : '';
|
|
|
|
if ( '' !== trim( $policy_text ) ) {
|
|
$policy_text = str_replace( array( "\r\n", "\r" ), "\n", $policy_text );
|
|
$paragraphs = preg_split( "/\n{2,}/", trim( $policy_text ) );
|
|
|
|
foreach ( $paragraphs as $paragraph ) {
|
|
$paragraph = trim( $paragraph );
|
|
|
|
if ( '' === $paragraph ) {
|
|
continue;
|
|
}
|
|
|
|
echo '<p>' . nl2br( esc_html( $paragraph ) ) . '</p>';
|
|
}
|
|
}
|
|
?>
|
|
</article>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<?php
|
|
get_footer( 'test1' );
|