add frontend

This commit is contained in:
2024-06-16 16:42:46 +03:00
parent 1a5320ad33
commit bd8cab9b43
9 changed files with 187 additions and 55 deletions

View File

@@ -1,7 +1,22 @@
<?php
if (! defined( 'ABSPATH' )) {
exit;
}
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);
//setlocale(LC_ALL, 'ru_RU', 'ru_RU.UTF-8', 'ru', 'russian');
define('IMGURL', 'http://img.vetandlife.ru/');
@@ -10,6 +25,7 @@ define("COOK_VALUE", "7896");
define('VIJ_CACHE', ABSPATH.'wp-content/themes/vij/cache/');
define('BASE_VIJ', ABSPATH.'wp-content/themes/vij/');
define('IMGSERVER', 'https://img.vetandlife.ru/');
require ABSPATH.'/vendor/autoload.php';
@@ -957,3 +973,18 @@ remove_filter( 'the_posts', 'show_draft_post', null, 2 );
return $query->_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);
}