I’ve tried hard to find a way to not let plugin WPML output the following <meta name="generator" content="WPML ver:2.8.1 stt:3,1;0" />
tag in <head>
via help of theme’s function.php
:
It’s called in sitepress.class.php
beginning with line 255
if ( !is_admin() ) {
add_action( 'wp_head', array( $this, 'meta_generator_tag' ) );
}
This specific question has already been asked once in WPML forum.
I’ve tried:
/* ::: Disable WPML Meta Generator Tag ::: */
if ( ! is_admin() ) {
remove_action( 'wp_head', 'meta_generator_tag', 20 );
}
add_filter( 'meta_generator_tag', 'theme_generator_tag' );
function theme_generator_tag() {
return false;
}
— without success
The instance of this class is made global by WPML, so this should work:
Try this (note different
remove_action()
:It worked for versions 2.0.4.1 and before, but not tested for newer ones.