diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ce6529d --- /dev/null +++ b/.gitignore @@ -0,0 +1,55 @@ +# Игнорировать папку frontend +/frontend/ + +# Игнорировать системные файлы macOS +.DS_Store +.AppleDouble +.LSOverride + +# Игнорировать файлы Windows +Thumbs.db +ehthumbs.db +Desktop.ini + +# Игнорировать файлы редакторов +*.sublime-project +*.sublime-workspace +*.komodoproject +.vscode/ +.idea/ +*.swp +*.swo + +# Игнорировать файлы сборки и зависимостей +/node_modules/ +/bower_components/ + +# Игнорировать файлы логов +*.log + +# Игнорировать файлы кэша +*.cache + +# Игнорировать временные файлы +*.tmp +*.temp + +# Игнорировать файлы конфигурации +wp-config.php + +# Игнорировать загруженные файлы WordPress +/uploads/ + +# Игнорировать компилированные файлы (если есть) +*.min.css +*.min.js + +# Игнорировать файлы резервных копий +*~ +*.bak + +# Игнорировать файлы с секретами (если есть) +.env + +# Игнорировать файлы с настройками локальной разработки (если есть) +local-config.php diff --git a/footer-pets.php b/footer-pets.php index abb0d8b..7e03854 100644 --- a/footer-pets.php +++ b/footer-pets.php @@ -70,18 +70,7 @@ window.yaContextCb.push(()=>{ -
-
-
- -
-
- - - -
-
-
+ @@ -322,11 +311,6 @@ document.write(' - - - - - diff --git a/footer.php b/footer.php index 996bc88..8efa44f 100644 --- a/footer.php +++ b/footer.php @@ -76,19 +76,9 @@ window.yaContextCb.push(()=>{ -
-
-
+ + -
-
- - - -
-
-
- @@ -324,11 +314,6 @@ document.write(' - - - - - diff --git a/functions.php b/functions.php index 54ffb08..52205c2 100644 --- a/functions.php +++ b/functions.php @@ -1,7 +1,22 @@ _draft_post; } +function adddr_hash(){ + + $key = '378Hjkuhuzv'; + + if ( isset($_SERVER['REMOTE_ADDR']) ) { + $user_api = $_SERVER['REMOTE_ADDR']; + } else { + return null; + } + + return md5($key.'-'.$user_api); + + +} + diff --git a/header.php b/header.php index 018cd85..bca088e 100644 --- a/header.php +++ b/header.php @@ -7,16 +7,7 @@ <?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?> - - - - - - - - - - + @@ -74,8 +65,7 @@ _tmr.push({id: "3493038", type: "pageView", start: (new Date()).getTime()}); - - + diff --git a/page-subscript.php b/page-subscript.php index 35abb81..e3487c5 100644 --- a/page-subscript.php +++ b/page-subscript.php @@ -1,6 +1,6 @@ - +get_header(); +?>
@@ -8,6 +8,7 @@ get_header();?>
Спасибо, мы включили Ваш e-mail!

Наши письма могут оказаться в разделе "Рассылки" Вашего почтового приложения или сайта.

'; -} elseif (isset($_POST['email'])) { + +} + + +elseif ( !isset($_POST['subscription_nonce']) || !wp_verify_nonce($_POST['subscription_nonce'], 'subscription_form_nonce') ) { + echo ('

Неверный запрос. Пожалуйста, повторите попытку.

'); +} + +elseif( !isset($_POST['addrr']) || $_POST['addrr'] !== adddr_hash() ){ + echo '

Не можем опеределить ваши данные. Пожалуйста, повторите попытку.

'; +} + +elseif (isset($_POST['email'])) { + $email = strtolower(trim($_POST['email'])); $email = sanitize_text_field($email); diff --git a/partials/formsubscript.php b/partials/formsubscript.php new file mode 100755 index 0000000..ca00d96 --- /dev/null +++ b/partials/formsubscript.php @@ -0,0 +1,16 @@ +
+
+
+
+
+ + + + + + + +
+
+
\ No newline at end of file diff --git a/single.php b/single.php index 6ba7336..37d1ba8 100644 --- a/single.php +++ b/single.php @@ -139,14 +139,25 @@ window.yaContextCb.push(()=>{ }) + + (function() { + var sc = document.createElement('script'); sc.type = 'text/javascript'; sc.async = true; + sc.src = '//smi2.ru/data/js/102382.js'; sc.charset = 'utf-8'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sc, s); + }()); + + +
+ +
+ + + + diff --git a/vite.config.php b/vite.config.php new file mode 100755 index 0000000..e3cd616 --- /dev/null +++ b/vite.config.php @@ -0,0 +1,46 @@ +'; + echo ''; + } + add_action( 'wp_head', 'vite_head_module_hook' ); + } else { + + $fstyle = '/frontend/dist/assets/style.css'; + $fscript = '/frontend/dist/assets/main.js'; + + // Production version + $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); + wp_enqueue_script('vij-script', get_template_directory_uri() . $fscript, array(), $script_ver, 5); + + } +}); + + + + + +