Created
February 10, 2017 10:03
-
-
Save caleuanhopkins/680f00c5a63fd413de9134ea0b8a47a9 to your computer and use it in GitHub Desktop.
disable wordpress json-rest api
This file contains 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
<?php | |
add_action('rest_api_init','disable_api'); | |
function disable_api(){ | |
http_response_code(404); | |
wp_die(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment