WordPressRemove Version from Wordpress and Stylesheets


Introduction

To make it more difficult for others to hack your website you can remove the WordPress version number from your site, your css and js. Without that number it's not possible to see if you run not the current version to exploit bugs from the older versions.

Additionally it can improve the loading speed of your site, because without query strings in the URL the css and js files can be cached.

Syntax

  • add_filter( $tag, $function_to_add, $priority, $accepted_args)

Parameters

ParameterDetails
$tag(string required) Name of the filter where $function_to_add is hooked to
$function_to_add(callable required) Name of the function which runs when the filter is applied
$priority(int optional) place of $function_to_add between other functions in one action (default = 10)
$accepted_args(int optional) Number of parameters which $function_to_add accepts (default = 1)

Remarks

Intended to improve site speed and safety.