off api
This commit is contained in:
@@ -316,24 +316,7 @@ document.write('<img src="'+pr+'?uid=18820&ref='+r+'&rd='+rd+'" width="88" heigh
|
||||
|
||||
</footer>
|
||||
<?php get_template_part( 'partials/formhash' );?>
|
||||
<!-- Yandex.RTB R-A-4145099-7 -->
|
||||
<script>
|
||||
(function renderInImage(images) {
|
||||
if (!images.length) {
|
||||
return
|
||||
}
|
||||
const image = images.shift()
|
||||
image.id = `yandex_rtb_R-A-4145099-7-${Math.random().toString(16).slice(2)}`
|
||||
window.yaContextCb.push(() => {
|
||||
Ya.Context.AdvManager.render({
|
||||
"renderTo": image.id,
|
||||
"blockId": "R-A-4145099-7",
|
||||
"type": "inImage"
|
||||
})
|
||||
})
|
||||
renderInImage(images)
|
||||
})(Array.from(document.querySelectorAll("#post-img")))
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
19
footer.php
19
footer.php
@@ -321,24 +321,7 @@ document.write('<img src="'+pr+'?uid=18820&ref='+r+'&rd='+rd+'" width="88" heigh
|
||||
</footer>
|
||||
|
||||
<?php get_template_part( 'partials/formhash' );?>
|
||||
<!-- Yandex.RTB R-A-4145099-7 -->
|
||||
<script>
|
||||
(function renderInImage(images) {
|
||||
if (!images.length) {
|
||||
return
|
||||
}
|
||||
const image = images.shift()
|
||||
image.id = `yandex_rtb_R-A-4145099-7-${Math.random().toString(16).slice(2)}`
|
||||
window.yaContextCb.push(() => {
|
||||
Ya.Context.AdvManager.render({
|
||||
"renderTo": image.id,
|
||||
"blockId": "R-A-4145099-7",
|
||||
"type": "inImage"
|
||||
})
|
||||
})
|
||||
renderInImage(images)
|
||||
})(Array.from(document.querySelectorAll("#post-img")))
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -4,6 +4,20 @@ if (! defined( 'ABSPATH' )) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Полностью отключить 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');
|
||||
|
||||
ini_set('display_errors','off');
|
||||
|
||||
use PHPMailer\PHPMailer\PHPMailer;
|
||||
@@ -1033,3 +1047,15 @@ function convert_images_to_amp($content) {
|
||||
}
|
||||
add_filter('the_content', 'convert_images_to_amp');
|
||||
|
||||
|
||||
// подписчики на главную
|
||||
add_action('admin_init', 'restrict_subscriber_admin_access');
|
||||
function restrict_subscriber_admin_access() {
|
||||
// Проверяем, что пользователь вошел в систему и имеет роль 'subscriber'
|
||||
if (current_user_can('subscriber')) {
|
||||
// Перенаправляем на главную страницу сайта
|
||||
wp_redirect(home_url());
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user