Skip to content

Conversation

@mattradford-sage
Copy link

Hi @swissspidy

Would you please consider merging this PR to allow removing the generator meta tag from the <head>? The plugin is working well for us but we always remove plugin version information for security, so I've added a filter modelled on Yoast's filter for version removal.

Usage: add_filter( 'performant_translations_hide_version', '__return_true' );

Thanks, Matt

@swissspidy
Copy link
Owner

Have you tried just using remove_action( 'wp_head', array( 'Performant_Translations', 'add_generator_tag' ) )?

I don't see the need to add a filter inside an action that can already be easily removed.

This works just fine:

// Inside your plugin or wherever
add_action(
	'init',
	static function() {
		remove_action( 'wp_head', array( 'Performant_Translations', 'add_generator_tag' ) );
	}
);

@mattradford-sage
Copy link
Author

Thanks for the feedback, that works as expected. Closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants