Created
March 19, 2014 15:19
-
-
Save johnnyicarus/9643945 to your computer and use it in GitHub Desktop.
Remove WPML Generator Tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Remove <meta name="generator"> tag created by the WPML PLugin. | |
* Wrapped in an if-statement that checks for an instance of the | |
* sitepress-class (made global by WPML) | |
* | |
* @url http://wordpress.stackexchange.com/questions/117469/how-to-remove-wpml-generator-meta-tag-by-themes-functions-php-override-plugin | |
* | |
* @uses add_action | |
* @uses remove_action | |
* @uses current_filter | |
*/ | |
if ( !empty ( $GLOBALS['sitepress'] ) ) { | |
function remove_wpml_generator() { | |
remove_action( | |
current_filter(), | |
array ( $GLOBALS['sitepress'], 'meta_generator_tag' ) | |
); | |
} | |
add_action( 'wp_head', 'remove_wpml_generator', 0 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment