Skip to content

Commit

Permalink
add missing docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona committed Oct 18, 2024
1 parent 7af6e7a commit a923ddd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions inc/Engine/Support/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ public function add_meta_generator( $html ): string {
return $this->remove_features_comments( $html );
}

/**
* Filters whether to disable the WP Rocket meta generator tag.
*
* @since 3.17.2
*
* @param bool $disable True to disable, false otherwise.
*/
if ( wpm_apply_filters_typed( 'boolean', 'rocket_disable_meta_generator', false ) ) {
return $html;
}
Expand Down Expand Up @@ -82,6 +89,7 @@ public function add_meta_generator( $html ): string {
* @return string
*/
private function get_meta_tag( array $features = [] ): string {
// This filter is documented in inc/classes/Buffer/class-cache.php.
if ( wpm_apply_filters_typed( 'boolean', 'do_rocket_generate_caching_files', true ) ) {
$features[] = 'wpr_cached';

Expand All @@ -104,6 +112,13 @@ private function get_meta_tag( array $features = [] ): string {

$content = '';

/**
* Filters the display of the content attribute in 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', '' ) . '"';
}
Expand Down

0 comments on commit a923ddd

Please sign in to comment.