Size: a a a

2020 April 17

AT

Alexander Teshabaev in AnyComment
Подозрительные:
- Remove Yoast SEO Comments
- LuckyWP Scripts Control
- Imsanity
источник

IF

Ilya Falei in AnyComment
не помогло(
источник

AT

Alexander Teshabaev in AnyComment
Проверьте доступность /wp-json/ как гость
источник

IF

Ilya Falei in AnyComment
сейчас
источник

IF

Ilya Falei in AnyComment
извиняюсь, глуповат(
источник

IF

Ilya Falei in AnyComment
нашел в functions такой код, только вот не пойму, он блокирует или наоборот открывает:
источник

IF

Ilya Falei in AnyComment
// Отключение сам REST API
// ====================
add_filter('rest_enabled', '__return_false');

// Отключение фильтра REST API
// ====================
remove_action( 'xmlrpc_rsd_apis', 'rest_output_rsd' );
remove_action( 'wp_head', 'rest_output_link_wp_head', 10, 0 );
remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
remove_action( 'auth_cookie_malformed', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_expired', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_bad_username', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_bad_hash', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_valid', 'rest_cookie_collect_status' );
remove_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );

// Отключение события REST API
// ====================
remove_action( 'init', 'rest_api_init' );
remove_action( 'rest_api_init', 'rest_api_default_filters', 10, 1 );
remove_action( 'parse_request', 'rest_api_loaded' );

// Отключение Embeds связанные с REST API
// ====================
remove_action( 'rest_api_init', 'wp_oembed_register_route' );
remove_filter( 'rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4 );
источник

MK

Mikhail Kobzarev in AnyComment
Ilya Falei
// Отключение сам REST API
// ====================
add_filter('rest_enabled', '__return_false');

// Отключение фильтра REST API
// ====================
remove_action( 'xmlrpc_rsd_apis', 'rest_output_rsd' );
remove_action( 'wp_head', 'rest_output_link_wp_head', 10, 0 );
remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
remove_action( 'auth_cookie_malformed', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_expired', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_bad_username', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_bad_hash', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_valid', 'rest_cookie_collect_status' );
remove_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );

// Отключение события REST API
// ====================
remove_action( 'init', 'rest_api_init' );
remove_action( 'rest_api_init', 'rest_api_default_filters', 10, 1 );
remove_action( 'parse_request', 'rest_api_loaded' );

// Отключение Embeds связанные с REST API
// ====================
remove_action( 'rest_api_init', 'wp_oembed_register_route' );
remove_filter( 'rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4 );
уберите его еликом
источник

IF

Ilya Falei in AnyComment
ок, сейчас попробую.
источник

IF

Ilya Falei in AnyComment
не помогло.
источник

IF

Ilya Falei in AnyComment
нашел еще, что ругается на total_count
источник

IF

Ilya Falei in AnyComment
n.meta.total_count
источник

IF

Ilya Falei in AnyComment
TypeError: Cannot read property 'total_count' of undefined
источник

AT

Alexander Teshabaev in AnyComment
Ilya Falei
не помогло.
А зачем вы этот код вставляли? Можете прислать файл целиком мне в личку?
источник

AT

Alexander Teshabaev in AnyComment
Ilya Falei
n.meta.total_count
Ругается, потому что у вас отключен рест апи
источник

IF

Ilya Falei in AnyComment
я этот код не вставляю. я вставляю шорткод
источник

AT

Alexander Teshabaev in AnyComment
Ilya Falei
// Отключение сам REST API
// ====================
add_filter('rest_enabled', '__return_false');

// Отключение фильтра REST API
// ====================
remove_action( 'xmlrpc_rsd_apis', 'rest_output_rsd' );
remove_action( 'wp_head', 'rest_output_link_wp_head', 10, 0 );
remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
remove_action( 'auth_cookie_malformed', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_expired', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_bad_username', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_bad_hash', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_valid', 'rest_cookie_collect_status' );
remove_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );

// Отключение события REST API
// ====================
remove_action( 'init', 'rest_api_init' );
remove_action( 'rest_api_init', 'rest_api_default_filters', 10, 1 );
remove_action( 'parse_request', 'rest_api_loaded' );

// Отключение Embeds связанные с REST API
// ====================
remove_action( 'rest_api_init', 'wp_oembed_register_route' );
remove_filter( 'rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4 );
functions.php мне пришлите в личку
источник

IF

Ilya Falei in AnyComment
ок, ща
источник

AT

Alexander Teshabaev in AnyComment
Зайдите на вашсайт/wp-json/
источник

AT

Alexander Teshabaev in AnyComment
Что видите?
источник