Отключить wp-json и oembed в WordPress
Как отключить wp-json и oembed в WordPress. Нужно добавить в файл functions.php вашей темы следующий код: // Отключаем сам 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’…
Читать дальше