Copy this code in your theme file (function.php)
add_filter('rest_authentication_errors','disable_rest_access'); // Function to disable REST API and improve WordPress 4.7.0 / 4.7.1 security function disable_rest_access($access) { return new WP_Error( 'rest_cannot_access','The REST API for WordPress is disabled.', array('status' => rest_authorization_required_code()) ); }
0 comments:
Post a Comment