This commit is contained in:
argoexpert press
2024-08-27 01:07:35 +03:00
parent 92e1eef21e
commit 79ee038c9c
2 changed files with 27 additions and 2 deletions

View File

@@ -64,11 +64,11 @@
'image' => 'https://vetandlife.ru/wp-content/uploads/2021/12/plonsky_107.jpg' 'image' => 'https://vetandlife.ru/wp-content/uploads/2021/12/plonsky_107.jpg'
], ],
'11' => [ /** '11' => [
'name' => 'Алла Орехова', 'name' => 'Алла Орехова',
'position' => 'Менеджер по рекламе', 'position' => 'Менеджер по рекламе',
'image' => 'https://agroexpert.press/wp-content/uploads/2024/07/alla-orehova.jpg' 'image' => 'https://agroexpert.press/wp-content/uploads/2024/07/alla-orehova.jpg'
], ], */
'12' => [ '12' => [
'name' => 'Юлия Дерябина', 'name' => 'Юлия Дерябина',

View File

@@ -1,6 +1,19 @@
<?php <?php
setlocale(LC_TIME, 'ru_RU.UTF-8'); setlocale(LC_TIME, 'ru_RU.UTF-8');
// Полностью отключить XML-RPC
add_filter( 'xmlrpc_enabled', '__return_false' );
// Отключение методов XML-RPC, требующих авторизации
add_filter( 'xmlrpc_methods', function( $methods ) {
unset( $methods['pingback.ping'] );
return $methods;
} );
// Полное отключение REST API
add_filter('rest_enabled', '__return_false');
add_filter('rest_jsonp_enabled', '__return_false');
define('ENPART', 740); define('ENPART', 740);
define('EN_PARTS', '746,741,742,743,744,745'); define('EN_PARTS', '746,741,742,743,744,745');
@@ -1145,3 +1158,15 @@ function change_author_name($author) {
} }
add_filter('the_author', 'change_author_name'); add_filter('the_author', 'change_author_name');
// подписчики на главную
add_action('admin_init', 'restrict_subscriber_admin_access');
function restrict_subscriber_admin_access() {
// Проверяем, что пользователь вошел в систему и имеет роль 'subscriber'
if (current_user_can('subscriber')) {
// Перенаправляем на главную страницу сайта
wp_redirect(home_url());
exit;
}
}