Remove & Disable Pingbacks

// Disable Pingback method add_filter( ‘xmlrpc_methods’, /** * @param array $methods * @return array */ static function ( $methods ) { unset( $methods[‘pingback.ping’], $methods[‘pingback.extensions.getPingbacks’] ); return $methods; } ); // Remove X-Pingback HTTP header add_filter( ‘wp_headers’, /** * @param array…Continue reading

Remove Gutenberg Blocks CSS

add_action( ‘wp_enqueue_scripts’, function () { wp_dequeue_style( ‘wp-block-library’ ); wp_dequeue_style( ‘wp-block-library-theme’ ); // Remove WooCommerce block CSS wp_dequeue_style( ‘wc-blocks-style’ ); wp_dequeue_style( ‘global-styles’ ); /** * @psalm-suppress UndefinedFunction */ remove_action( ‘wp_body_open’, ‘wp_global_styles_render_svg_filters’ ); } );Continue reading

Disable RSS Links

// Remove Main RSS Feed Link add_filter( ‘feed_links_show_posts_feed’, ‘__return_false’ ); remove_action( ‘wp_head’, ‘feed_links_extra’, 3 ); // Remove Comment RSS Feed Link add_filter( ‘feed_links_show_comments_feed’, ‘__return_false’ );Continue reading

Disable WP REST metadata

// Remove the REST API lines from the HTML Header remove_action(‘ wp_head’, ‘rest_output_link_wp_head’, 10 ); // completely disable json api // Filters for WP-API version 1.x add_filter( ‘json_enabled’, ‘__return_false’ ); add_filter( ‘json_jsonp_enabled’, ‘__return_false’ ); // Filters for WP-API version 2.x…Continue reading