correct cookie footer

This commit is contained in:
2025-06-04 11:21:09 +03:00
parent b1697d2b5a
commit b6fdef315f
4 changed files with 12 additions and 14 deletions

View File

@@ -321,7 +321,9 @@ document.write('<img src="'+pr+'?uid=18820&ref='+r+'&rd='+rd+'" width="88" heigh
</div>
<?php if (!isset($_COOKIE['cookie_consent_accepted'])) {
get_template_part('cookie-consent');
}?>
</footer>
<?php get_template_part( 'partials/formhash' );?>

View File

@@ -312,7 +312,9 @@ document.write('<img src="'+pr+'?uid=18820&ref='+r+'&rd='+rd+'" width="88" heigh
</div>
<?php if (!isset($_COOKIE['cookie_consent_accepted'])) {
get_template_part('cookie-consent');
}?>
</footer>
<?php get_template_part( 'partials/formhash' );?>

View File

@@ -44,14 +44,16 @@ ini_set('display_errors','off');
use PHPMailer\PHPMailer\PHPMailer;
require_once 'vite.config.php';
//add jquery
function theme_enqueue_scripts() {
wp_enqueue_script('jquery');
}
add_action('wp_enqueue_scripts', 'theme_enqueue_scripts', 1);
require_once 'vite.config.php';
//setlocale(LC_ALL, 'ru_RU', 'ru_RU.UTF-8', 'ru', 'russian');
@@ -268,14 +270,6 @@ add_filter( 'single_template', function ( $single_template ) {
}, PHP_INT_MAX, 2 );
//куки
function add_cookie_consent() {
if (!isset($_COOKIE['cookie_consent_accepted'])) {
get_template_part('cookie-consent');
}
}
add_action('wp_footer', 'add_cookie_consent');
#search
function my_search_order( $query ) {

View File

@@ -33,8 +33,8 @@ add_action( 'wp_enqueue_scripts', function () {
$style_ver = filemtime(get_template_directory() . $fstyle);
$script_ver = filemtime(get_template_directory() . $fscript);
wp_enqueue_style('vij-style', get_template_directory_uri() . $fstyle, array(), $style_ver.'10');
wp_enqueue_script('vij-script', get_template_directory_uri() . $fscript, array(), $script_ver, 5);
wp_enqueue_style('vij-style', get_template_directory_uri() . $fstyle, array(), $style_ver.'17');
wp_enqueue_script('vij-script', get_template_directory_uri() . $fscript, array(), $script_ver.'10', 5);
}
});