Created
February 17, 2017 14:24
-
-
Save sander1/e7bd6d5c1445667fbba8991d44cf9f0e to your computer and use it in GitHub Desktop.
WordPress: Disable JSON REST API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('json_enabled', '__return_false'); | |
add_filter('json_jsonp_enabled', '__return_false'); | |
remove_action('wp_head', 'rest_output_link_wp_head', 10); | |
remove_action('template_redirect', 'rest_output_link_header', 11, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment