add new ver
This commit is contained in:
@@ -53,10 +53,7 @@
|
||||
|
||||
<li>
|
||||
<a href="https://rutube.ru/u/Pets/" title="Rutube ПИТОМЦЫ" target="_blank">
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="20" cy="20" r="19.5" stroke="#7A7A7A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.0568 26.5864C11.7002 26.478 11.3748 26.2853 11.1081 26.0245C10.8415 25.7637 10.6413 25.4424 10.5245 25.0878C9.8572 23.2549 9.65948 15.6011 10.9446 14.0902C11.3724 13.5987 11.9763 13.2961 12.6252 13.248C16.0729 12.8765 26.725 12.926 27.9484 13.3719C28.2924 13.4838 28.6068 13.6722 28.8679 13.9232C29.129 14.1741 29.33 14.481 29.456 14.8209C30.185 16.7158 30.2097 23.6016 29.3571 25.4222C29.1309 25.8961 28.7522 26.28 28.282 26.5121C26.9968 27.1561 13.7621 27.1437 12.0568 26.5864ZM17.5311 22.9948L23.7098 19.7748L17.5311 16.53V22.9948Z" fill="#7A7A7A"/>
|
||||
</svg>
|
||||
<span class="socs soc-rutube-white"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<a href="https://vk.com/vizhuvizh" target="_blank"><span class="socs soc-vk"></span></a>
|
||||
<a href="https://t.me/ViZHuvizh" target="_blank"><span class="socs soc-tg"></span></a>
|
||||
<a href="hhttps://www.youtube.com/c/ВетеринарияиЖизнь" target="_blank"><span class="socs soc-youtube"></span></a>
|
||||
<a href="https://www.youtube.com/c/ВетеринарияиЖизнь" target="_blank"><span class="socs soc-rutube"></span></a>
|
||||
|
||||
<!-- <div class="btn soc_vk"></div>
|
||||
<div class="soc_btn soc_fb"></div>
|
||||
|
||||
@@ -30,12 +30,6 @@
|
||||
<?php //get_template_part( '/blocks/events');?>
|
||||
<?php //include VIJ_CACHE.'events.html';?>
|
||||
|
||||
<div class="right-info">
|
||||
<a href="https://www.youtube.com/channel/UCOXOjXmMNl8eVO4ldrv5c5Q" target="_blank">
|
||||
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/melano-live.png" width="240" height="200" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="right-info">
|
||||
<a href="https://rutube.ru/u/Pets/" target="_blank">
|
||||
<img src="https://vetandlife.ru/wp-content/uploads/2024/08/pets_rutube.jpg" width="240" height="200" />
|
||||
@@ -255,7 +249,7 @@ window.yaContextCb.push(()=>{
|
||||
|
||||
|
||||
<div class="socials-footer-pets">
|
||||
<a href="https://rutube.ru/u/Pets/" target="_blank"><span class="socs soc-youtube"></span></a>
|
||||
<a href="https://rutube.ru/u/Pets/" target="_blank"><span class="socs soc-rutube"></span></a>
|
||||
<a href="https://vk.com/pitomcy_vetandlife" target="_blank"><span class="socs soc-vk"></span></a>
|
||||
<a href="https://t.me/pitomcy_vetandlife" target="_blank"><span class="socs soc-tg"></span></a>
|
||||
</div>
|
||||
|
||||
@@ -26,14 +26,9 @@
|
||||
|
||||
<?php //include VIJ_CACHE.'opinion.html';?>
|
||||
<?php //get_template_part( '/blocks/citata', null, ['subclass' => '']);?>
|
||||
<?php get_template_part( '/blocks/events');?>
|
||||
<?php //get_template_part( '/blocks/events');?>
|
||||
<?php //include VIJ_CACHE.'events.html';?>
|
||||
|
||||
<div class="right-info">
|
||||
<a href="https://www.youtube.com/channel/UCOXOjXmMNl8eVO4ldrv5c5Q" target="_blank">
|
||||
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/melano-live.png" width="240" height="200" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="right-info">
|
||||
<!-- Yandex.RTB R-A-4145099-1 -->
|
||||
@@ -62,7 +57,7 @@ window.yaContextCb.push(()=>{
|
||||
<div id="socials">
|
||||
<a href="https://vk.com/vizhuvizh" target="_blank"><span class="socs soc-vk"></span></a>
|
||||
<a href="https://t.me/ViZHuvizh" target="_blank"><span class="socs soc-tg"></span></a>
|
||||
<a href="https://www.youtube.com/c/ВетеринарияиЖизнь" target="_blank"><span class="socs soc-youtube"></span></a>
|
||||
<a href="https://rutube.ru/channel/42943284/" target="_blank"><span class="socs soc-rutube"></span></a>
|
||||
</div>
|
||||
|
||||
<?php include get_template_directory().'/blocks/archive.php';?>
|
||||
|
||||
@@ -4,6 +4,9 @@ if (! defined( 'ABSPATH' )) {
|
||||
exit;
|
||||
}
|
||||
|
||||
define('YA_TOKEN', 'y0_AgAAAAA5ZMbXAAjnxwAAAADXZGKqufBi9E2_TnG4n9l_K0OjYOAukmk');
|
||||
define('YA_COUNTER', '56480275');
|
||||
|
||||
// Полностью отключить XML-RPC
|
||||
add_filter( 'xmlrpc_enabled', '__return_false' );
|
||||
|
||||
@@ -23,7 +26,7 @@ function redirect_non_admin_users() {
|
||||
$current_user = wp_get_current_user();
|
||||
|
||||
// Проверяем, если пользователь не является администратором
|
||||
if (in_array('subscriber', $current_user->roles) || in_array('author', $current_user->roles)) {
|
||||
if ( in_array('subscriber', $current_user->roles) ) {
|
||||
// Если это запрос к административной панели или если пользователь пытается получить доступ к wp-admin
|
||||
if (is_admin()) {
|
||||
// Перенаправляем на главную страницу сайта
|
||||
@@ -1066,7 +1069,7 @@ add_filter('the_content', 'convert_images_to_amp');
|
||||
|
||||
|
||||
// подписчики на главную
|
||||
add_action('admin_init', 'restrict_subscriber_admin_access');
|
||||
//add_action('admin_init', 'restrict_subscriber_admin_access');
|
||||
function restrict_subscriber_admin_access() {
|
||||
// Проверяем, что пользователь вошел в систему и имеет роль 'subscriber'
|
||||
if (current_user_can('subscriber')) {
|
||||
@@ -1076,3 +1079,16 @@ function restrict_subscriber_admin_access() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#авторы сохраняют только в черновики
|
||||
function restrict_author_publish_posts( $data ) {
|
||||
// Проверяем, что текущий пользователь - автор
|
||||
if ( current_user_can( 'author' ) && $data['post_status'] == 'publish' ) {
|
||||
// Отключаем публикацию для авторов
|
||||
$data['post_status'] = 'draft'; // Сохраняем как черновик
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
add_filter( 'wp_insert_post_data', 'restrict_author_publish_posts' );
|
||||
|
||||
|
||||
|
||||
@@ -9,10 +9,12 @@ function number_info($title){
|
||||
//echo $number;
|
||||
|
||||
$name = 'vizh_'.$number.'_'.ru2enmonths($items[3]).'_'.$items[4];
|
||||
//echo '<p>'.$name.'</p>';
|
||||
|
||||
$findpdf = db_get("SELECT * FROM `wp_posts` WHERE `post_name` = '$name' ORDER BY `post_modified` DESC LIMIT 1");
|
||||
|
||||
if (isset($findpdf ['guid'])){
|
||||
//echo "SELECT * FROM `wp_posts` WHERE `post_name` = '$name' ORDER BY `post_modified` DESC LIMIT 1";
|
||||
|
||||
if (isset($findpdf['guid'])){
|
||||
$res['guid'] = $findpdf['guid'];
|
||||
$res['year'] = $items[4];
|
||||
$res['number'] = $number;
|
||||
|
||||
@@ -36,6 +36,7 @@ elseif( !isset($_POST['addrhash']) || $_POST['addrhash'] !== adddr_hash() ){
|
||||
elseif (isset($_POST['email'])) {
|
||||
|
||||
|
||||
|
||||
$email = strtolower(trim($_POST['email']));
|
||||
$email = sanitize_text_field($email);
|
||||
|
||||
@@ -46,7 +47,7 @@ elseif (isset($_POST['email'])) {
|
||||
|
||||
$add_sub_sql = "INSERT INTO {$wpdb->prefix}subusers (mail, status, hash, date) VALUES ('$email', '0', '$hash', '$date_insert')";
|
||||
|
||||
$result = $wpdb->get_results($add_sub_sql);
|
||||
//$result = $wpdb->get_results($add_sub_sql);
|
||||
|
||||
$hash_link = home_url().'/subscript?id='.$hash;
|
||||
$to = $email;
|
||||
@@ -60,7 +61,7 @@ $hash_link.\n\n
|
||||
$headers = array('Content-Type: text/plain; charset=UTF-8');
|
||||
|
||||
// Отправка письма
|
||||
wp_mail($to, $subject, $message, $headers);
|
||||
//wp_mail($to, $subject, $message, $headers);
|
||||
|
||||
echo '<p>Благодарим за интерес к нашему изданию!</p>
|
||||
<p>На Вашу почту отправлено письмо для подтверждения подписки.</p>';
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<?php
|
||||
session_start();
|
||||
$num1 = rand(1, 10);
|
||||
$num2 = rand(1, 10);
|
||||
$_SESSION['captcha'] = $num1 + $num2;
|
||||
?>
|
||||
|
||||
<div id="subscript_box">
|
||||
<div id="convert"></div>
|
||||
<div class="right_title"><?=vij_lang('email_title', LANG_VERSION);?></div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="socials_footer">
|
||||
<a href="https://vk.com/vizhuvizh" target="_blank"><span class="socs soc-vk"></span></a>
|
||||
<a href="https://t.me/ViZHuvizh" target="_blank"><span class="socs soc-tg"></span></a>
|
||||
<a href="https://www.youtube.com/c/ВетеринарияиЖизнь" target="_blank"><span class="socs soc-youtube"></span></a>
|
||||
<a href="https://rutube.ru/channel/42943284/" target="_blank"><span class="socs soc-rutube"></span></a>
|
||||
</div>
|
||||
@@ -33,7 +33,7 @@ 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);
|
||||
wp_enqueue_style('vij-style', get_template_directory_uri() . $fstyle, array(), $style_ver.'8');
|
||||
wp_enqueue_script('vij-script', get_template_directory_uri() . $fscript, array(), $script_ver, 5);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user