Browse Source

rm x-ping and xmlrpc

windhamdavid 5 months ago
parent
commit
5521b1d22c
1 changed files with 9 additions and 0 deletions
  1. 9 0
      functions.php

+ 9 - 0
functions.php

@@ -5,6 +5,15 @@ function lps24_enqueue_assets() {
 }
 }
 add_action( 'wp_enqueue_scripts', 'lps24_enqueue_assets' );
 add_action( 'wp_enqueue_scripts', 'lps24_enqueue_assets' );
 
 
+// Disable XML-RPC
+add_filter( 'xmlrpc_enabled', '__return_false' );
+
+// Disable X-Pingback
+add_filter( 'wp_headers', 'lps24_disable_x_pingback' );
+function lps24_disable_x_pingback( $headers ) {
+  unset( $headers['X-Pingback'] );
+return $headers;
+}
 
 
 /***********************************************************
 /***********************************************************
 ###################### BrowserSync #########################
 ###################### BrowserSync #########################