-
Notifications
You must be signed in to change notification settings - Fork 220
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
Use meta generator to display options enabled #6879
Comments
I am putting back this issue in Also, I'm sharing a beginning of grooming: Scope a Solution:
<?php
declare(strict_types=1);
namespace WP_Rocket\Engine\MetaGenerator;
use WP_Rocket\Event_Management\Subscriber_Interface;
class Subscriber implements Subscriber_Interface {
/**
* Return an array of events that this subscriber listens to.
*
* @return array
*/
public static function get_subscribed_events(): array {
return [
'rocket_buffer' => 'add_meta_generator_tag',
];
}
public function add_meta_generator_tag(string $html): string {
return $html;
}
}
<?php
declare(strict_types=1);
namespace WP_Rocket\Engine\MetaGenerator;
use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
class ServiceProvider extends AbstractServiceProvider {
/**
* Array of services provided by this service provider
*
* @var array
*/
protected $provides = [
'meta_generator_subscriber',
];
/**
* Check if the service provider provides a specific service.
*
* @param string $id The id of the service.
*
* @return bool
*/
public function provides( string $id ): bool {
return in_array( $id, $this->provides, true );
}
/**
* Registers items with the container
*
* @return void
*/
public function register(): void {
$this->getContainer()->addShared('meta_generator_subscriber', Subscriber::class);
}
}
|
Scope a solution ✅In each class featuring changes in the front-end (list in the related Notion doc):
In
In
In
Add new tests to cover, update existing ones Estimate the effort ✅Effort [M] |
LGTM |
Describe the solution you'd like
We would like to have options enabled of WP Rocket being displayed in a meta generator.
We can use the same system than Elementor :
<meta name="generator" content="Elementor 3.23.4; features: e_optimized_css_loading, e_font_icon_svg, additional_custom_breakpoints, e_optimized_control_loading, e_lazyload; settings: css_print_method-external, google_font-enabled, font_display-swap">
This will allow us to to get useful informations (provided by http archive and queryable with Google studio) and for example :
To discuss with product & engineering about how to format the list of features (and maybe exclusion)
To note we will use regex then to parse/generate informations
The text was updated successfully, but these errors were encountered: