Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rmove only the version in the meta generator content attribute #7079

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions inc/Engine/Support/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,20 @@ private function get_meta_tag( array $features = [] ): string {
return '';
}

$content = '';
$version = '';

/**
* Filters the display of the content attribute in the meta generator tag.
* Filters the display of WP Rocket version in the content attribute of the meta generator tag.
*
* @since 3.17.2
*
* @param bool $display True to display, false otherwise.
*/
if ( wpm_apply_filters_typed( 'boolean', 'rocket_display_meta_generator_content', true ) ) {
$content = ' content="WP Rocket ' . rocket_get_constant( 'WP_ROCKET_VERSION', '' ) . '"';
if ( wpm_apply_filters_typed( 'boolean', 'rocket_display_meta_generator_content_version', true ) ) {
$version = ' ' . rocket_get_constant( 'WP_ROCKET_VERSION', '' );
}

$meta = '<meta name="generator"' . $content . ' data-wpr-features="' . implode( ' ', $features ) . '" />';
$meta = '<meta name="generator" content="WP Rocket' . $version . '" data-wpr-features="' . implode( ' ', $features ) . '" />';

return $meta;
}
Expand Down
Loading