HEX
Server: Apache
System: Linux vps.rockyroadprinting.net 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: rockyroadprintin (1011)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/rockyroadprintin/public_html/wp-content/plugins/wp-rocket/inc/Engine/Support/CommentTrait.php
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\Support;

trait CommentTrait {
	/**
	 * Add a comment to the HTML
	 *
	 * @param string $feature The feature name.
	 * @param string $html The HTML content.
	 *
	 * @return string
	 */
	public function add_meta_comment( $feature, $html ) {
		// This filter is documented in inc/Engine/Support/Meta.php.
		if ( wpm_apply_filters_typed( 'boolean', 'rocket_disable_meta_generator', false ) ) {
			return $html;
		}

		$result = preg_replace( '#</html>#', '</html><!-- wpr_' . $feature . ' -->', $html, 1 );

		if ( null === $result ) {
			return $html;
		}

		return $result;
	}
}