//Disable REST API add_filter( 'rest_authentication_errors', 'wp_snippet_disable_rest_api' ); function wp_snippet_disable_rest_api( $access ) { return new WP_Error( 'rest_disabled', __('The WordPress REST API has been disabled.'), array( 'status' => rest_authorization_required_code())); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter