- /*
- * DISABLE REST ENDPOINTS
- * need to be enabled for wordpress blocks to function
- */
- /*
- add_filter( 'rest_endpoints', 'remove_default_endpoints' );
- function remove_default_endpoints( $endpoints ) {
- return array( );
- }
- */
- // REST API - change default rest access route from wp-json
- function rest_url_prefix() {
- return 'api';
- }
- add_filter( 'rest_url_prefix', 'rest_url_prefix' );
-
- // REDIRECT AUTHORS
- function author_page_redirect() {
- if ( is_author() ) {
- wp_redirect( home_url() );
- }
- }
- add_action( 'template_redirect', 'author_page_redirect' );
-
- // REMOVE XMLRPC
- add_filter( 'xmlrpc_enabled', '__return_false' );
-
- function remove_xmlrpc_pingback( $headers ) {
- return $headers;
- }
- add_filter( 'wp_headers', 'remove_xmlrpc_pingback' );
- /*
- * WP CONFIG
- * Block externals
- */
Recent Pastes