rutube pets

This commit is contained in:
2024-08-27 14:59:26 +03:00
parent 2cf8c378b0
commit a0d0d880b4
3 changed files with 21 additions and 4 deletions

View File

@@ -52,7 +52,7 @@
<ul class="header-social-pets">
<li>
<a href="https://www.youtube.com/@24Allaboutpets" title="Youtube" target="_blank">
<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"/>

View File

@@ -37,8 +37,8 @@
</div>
<div class="right-info">
<a href="https://www.youtube.com/@24Allaboutpets" target="_blank">
<img src="https://vetandlife.ru/wp-content/uploads/2024/05/pets_480.jpg" width="240" height="200" />
<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" />
</a>
</div>
@@ -255,7 +255,7 @@ window.yaContextCb.push(()=>{
<div class="socials-footer-pets">
<a href="https://www.youtube.com/@24Allaboutpets" target="_blank"><span class="socs soc-youtube"></span></a>
<a href="https://rutube.ru/u/Pets/" target="_blank"><span class="socs soc-youtube"></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>

View File

@@ -18,6 +18,23 @@ add_filter( 'xmlrpc_methods', function( $methods ) {
add_filter('rest_enabled', '__return_false');
add_filter('rest_jsonp_enabled', '__return_false');
function redirect_non_admin_users() {
// Получаем текущего пользователя
$current_user = wp_get_current_user();
// Проверяем, если пользователь не является администратором
if (in_array('subscriber', $current_user->roles) || in_array('author', $current_user->roles)) {
// Если это запрос к административной панели или если пользователь пытается получить доступ к wp-admin
if (is_admin()) {
// Перенаправляем на главную страницу сайта
wp_redirect(home_url());
exit;
}
}
}
add_action('admin_init', 'redirect_non_admin_users');
ini_set('display_errors','off');
use PHPMailer\PHPMailer\PHPMailer;