Files
dostavka_vodi/wp-content/themes/water-delivery/privacy-policy.php
2026-07-05 16:17:44 +03:00

45 lines
1.1 KiB
PHP

<?php
/**
* Template for the privacy policy page.
*
* @package Water Delivery
*/
get_header();
?>
<div id="primary" class="content-area privacy-policy-page">
<main id="main" class="site-main" role="main">
<article class="privacy-policy-content">
<header class="entry-header">
<h1 class="entry-title"><?php esc_html_e( 'Политика конфиденциальности', 'water-delivery' ); ?></h1>
</header>
<div class="entry-content">
<?php
$policy_file = get_template_directory() . '/privacy-policy-content.txt';
$policy_text = file_exists( $policy_file ) ? file_get_contents( $policy_file ) : '';
if ( ! empty( $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>';
}
}
?>
</div>
</article>
</main>
</div>
<?php
get_footer();