From 5887986d23b6cdefb7f9a2179c27a1bd73f90410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 16 Oct 2023 07:49:21 -0400 Subject: [PATCH 001/167] Add service provider --- inc/Engine/Media/AboveTheFold/ServiceProvider | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 inc/Engine/Media/AboveTheFold/ServiceProvider diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider b/inc/Engine/Media/AboveTheFold/ServiceProvider new file mode 100644 index 0000000000..18c60b6a72 --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider @@ -0,0 +1,28 @@ + Date: Mon, 16 Oct 2023 07:51:52 -0400 Subject: [PATCH 002/167] missing extension --- .../Media/AboveTheFold/{ServiceProvider => ServiceProvider.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename inc/Engine/Media/AboveTheFold/{ServiceProvider => ServiceProvider.php} (100%) diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider b/inc/Engine/Media/AboveTheFold/ServiceProvider.php similarity index 100% rename from inc/Engine/Media/AboveTheFold/ServiceProvider rename to inc/Engine/Media/AboveTheFold/ServiceProvider.php From 596d515f34609efb1f70d951087fdd7cf02ac493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 16 Oct 2023 15:33:14 -0400 Subject: [PATCH 003/167] Add Database classes for Above the fold optimization (#6208) --- .../Common/Database/Queries/AbstractQuery.php | 413 ++++++++++++++++++ .../Database/Queries/AboveTheFold.php | 74 ++++ .../Database/Rows/AboveTheFold.php | 131 ++++++ .../Database/Schemas/AboveTheFold.php | 165 +++++++ .../Database/Tables/AboveTheFold.php | 87 ++++ .../Media/AboveTheFold/ServiceProvider.php | 6 + .../RUCSS/Database/Queries/UsedCSS.php | 410 +---------------- inc/Engine/WPRocketUninstall.php | 97 ++-- inc/Plugin.php | 2 + .../Engine/WPRocketUninstall/uninstall.php | 3 +- uninstall.php | 9 +- 11 files changed, 919 insertions(+), 478 deletions(-) create mode 100644 inc/Engine/Common/Database/Queries/AbstractQuery.php create mode 100644 inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php create mode 100644 inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php create mode 100644 inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php create mode 100644 inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php diff --git a/inc/Engine/Common/Database/Queries/AbstractQuery.php b/inc/Engine/Common/Database/Queries/AbstractQuery.php new file mode 100644 index 0000000000..250d7c84d2 --- /dev/null +++ b/inc/Engine/Common/Database/Queries/AbstractQuery.php @@ -0,0 +1,413 @@ +table_exists() ) { + return false; + } + + $query = $this->query( + [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + ] + ); + + if ( empty( $query[0] ) ) { + return false; + } + + return $query[0]; + } + + /** + * Get all rows with the same url (desktop and mobile versions). + * + * @param string $url Page url. + * + * @return array|false + */ + public function get_rows_by_url( string $url ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + $query = $this->query( + [ + 'url' => untrailingslashit( $url ), + ] + ); + + if ( empty( $query ) ) { + return false; + } + + return $query; + } + + /** + * Create new DB row for specific url. + * + * @param string $url Current page url. + * @param string $job_id API job_id. + * @param string $queue_name API Queue name. + * @param bool $is_mobile if the request is for mobile page. + * + * @return bool + */ + public function create_new_job( string $url, string $job_id, string $queue_name, bool $is_mobile = false ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + $item = [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + 'job_id' => $job_id, + 'queue_name' => $queue_name, + 'status' => 'pending', + 'retries' => 0, + 'last_accessed' => current_time( 'mysql', true ), + ]; + return $this->add_item( $item ); + } + + /** + * Get pending jobs. + * + * @param int $count Number of rows. + * + * @return array + */ + public function get_pending_jobs( int $count = 100 ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return []; + } + + $inprogress_count = $this->query( + [ + 'count' => true, + 'status' => 'in-progress', + ] + ); + + if ( $inprogress_count >= $count ) { + return []; + } + + return $this->query( + [ + 'number' => ( $count - $inprogress_count ), + 'status' => 'pending', + 'fields' => [ + 'id', + 'url', + ], + 'job_id__not_in' => [ + 'not_in' => '', + ], + 'orderby' => 'modified', + 'order' => 'asc', + ] + ); + } + + /** + * Increment retries number and change status back to pending. + * + * @param int $id DB row ID. + * @param int $retries Current number of retries. + * + * @return bool + */ + public function increment_retries( $id, $retries = 0 ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + $update_data = [ + 'retries' => $retries + 1, + 'status' => 'pending', + ]; + return $this->update_item( $id, $update_data ); + } + + /** + * Update Job ID. + * + * @param int $id DB row ID. + * @param int $new_job_id new job id. + * + * @return bool + */ + public function update_job_id( $id, $new_job_id ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + $update_data['job_id'] = $new_job_id; + return $this->update_item( $id, $update_data ); + } + + /** + * Change the status to be in-progress. + * + * @param int $id DB row ID. + * + * @return bool + */ + public function make_status_inprogress( int $id ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + return $this->update_item( + $id, + [ + 'status' => 'in-progress', + ] + ); + } + + /** + * Reset the job and add new job_id pending. + * + * @param int $id DB row ID. + * @param string $job_id API job_id. + * + * @return bool + */ + public function reset_job( int $id, string $job_id ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + return $this->update_item( + $id, + [ + 'job_id' => $job_id, + 'status' => 'pending', + 'error_code' => '', + 'error_message' => '', + 'retries' => 0, + 'modified' => current_time( 'mysql', true ), + ] + ); + } + + /** + * Change the status to be failed. + * + * @param int $id DB row ID. + * @param string $error_code error code. + * @param string $error_message error message. + * + * @return bool + */ + public function make_status_failed( int $id, string $error_code, string $error_message ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + return $this->update_item( + $id, + [ + 'status' => 'failed', + 'error_code' => $error_code, + 'error_message' => $error_message, + ] + ); + } + + /** + * Update row last_accessed date to current date. + * + * @param int $id Used CSS id. + * + * @return bool + */ + public function update_last_accessed( int $id ): bool { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + return (bool) $this->update_item( + $id, + [ + 'last_accessed' => current_time( 'mysql', true ), + ] + ); + } + + /** + * Delete DB row by url. + * + * @param string $url Page url to be deleted. + * + * @return bool + */ + public function delete_by_url( string $url ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + $items = $this->get_rows_by_url( $url ); + + if ( ! $items ) { + return false; + } + + $deleted = true; + foreach ( $items as $item ) { + $deleted = $deleted && $this->delete_item( $item->id ); + } + + return $deleted; + } + + /** + * Get the count of not completed rows. + * + * @return int + */ + public function get_not_completed_count() { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return 0; + } + + return $this->query( + [ + 'count' => true, + 'status__in' => [ 'pending', 'in-progress' ], + ] + ); + } + + /** + * Get the count of completed rows. + * + * @return int + */ + public function get_completed_count() { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return 0; + } + + return $this->query( + [ + 'count' => true, + 'status' => 'completed', + ] + ); + } + + /** + * Get all failed rows. + * + * @param float $delay delay before the urls are deleted. + * @param string $unit unit from the delay. + * @return array|false + */ + public function get_failed_rows( float $delay = 3, string $unit = 'days' ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + $query = $this->query( + [ + 'status' => 'failed', + 'date_query' => [ + [ + 'column' => 'modified', + 'before' => "$delay $unit ago", + 'inclusive' => true, + ], + ], + ], + false + ); + + if ( empty( $query ) ) { + return false; + } + + return $query; + } + + /** + * Revert status to pending. + * + * @param integer $id Used CSS id. + * @return boolean + */ + public function revert_to_pending( int $id ): bool { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + return (bool) $this->update_item( + $id, + [ + 'error_code' => '', + 'error_message' => '', + 'retries' => 0, + 'status' => 'pending', + 'modified' => current_time( 'mysql', true ), + ] + ); + } + + /** + * Returns the current status of the table; true if it exists, false otherwise. + * + * @return boolean + */ + protected function table_exists(): bool { + if ( self::$table_exists ) { + return true; + } + + // Get the database interface. + $db = $this->get_db(); + + // Bail if no database interface is available. + if ( empty( $db ) ) { + return false; + } + + // Query statement. + $query = 'SHOW TABLES LIKE %s'; + $like = $db->esc_like( $db->{$this->table_name} ); + $prepared = $db->prepare( $query, $like ); + $result = $db->get_var( $prepared ); + + // Does the table exist? + $exists = $this->is_success( $result ); + + if ( $exists ) { + self::$table_exists = $exists; + } + + return $exists; + } +} diff --git a/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php new file mode 100644 index 0000000000..6a0e202ea7 --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php @@ -0,0 +1,74 @@ +id = (int) $this->id; + $this->url = (string) $this->url; + $this->lcp = (string) $this->lcp; + $this->viewport = (string) $this->viewport; + $this->error_code = (string) $this->error_code; + $this->error_message = (string) $this->error_message; + $this->retries = (int) $this->retries; + $this->is_mobile = (bool) $this->is_mobile; + $this->job_id = (string) $this->job_id; + $this->queue_name = (string) $this->queue_name; + $this->status = (string) $this->status; + $this->submitted_at = empty( $this->submitted_at ) ? 0 : strtotime( $this->submitted_at ); + $this->modified = empty( $this->modified ) ? 0 : strtotime( $this->modified ); + $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( $this->last_accessed ); + } +} diff --git a/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php new file mode 100644 index 0000000000..6908bbf109 --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php @@ -0,0 +1,165 @@ + 'id', + 'type' => 'bigint', + 'length' => '20', + 'unsigned' => true, + 'extra' => 'auto_increment', + 'primary' => true, + 'sortable' => true, + ], + + // URL column. + [ + 'name' => 'url', + 'type' => 'varchar', + 'length' => '2000', + 'default' => '', + 'cache_key' => true, + 'searchable' => true, + 'sortable' => true, + ], + + // LCP column. + [ + 'name' => 'lcp', + 'type' => 'longtext', + 'default' => '', + 'cache_key' => false, + 'searchable' => true, + 'sortable' => true, + ], + + // Viewport column. + [ + 'name' => 'viewport', + 'type' => 'longtext', + 'default' => '', + 'cache_key' => false, + 'searchable' => true, + 'sortable' => true, + ], + + // IS_MOBILE column. + [ + 'name' => 'is_mobile', + 'type' => 'tinyint', + 'length' => '1', + 'default' => 0, + 'cache_key' => true, + 'searchable' => true, + 'sortable' => true, + ], + + // error_code column. + [ + 'name' => 'error_code', + 'type' => 'varchar', + 'length' => '32', + 'default' => null, + 'cache_key' => false, + 'searchable' => true, + 'sortable' => true, + ], + + // error_message column. + [ + 'name' => 'error_message', + 'type' => 'longtext', + 'default' => null, + 'cache_key' => false, + 'searchable' => true, + 'sortable' => true, + ], + + // RETRIES column. + [ + 'name' => 'retries', + 'type' => 'tinyint', + 'length' => '1', + 'default' => 1, + 'cache_key' => false, + 'searchable' => true, + 'sortable' => true, + ], + + // JOB_ID column. + [ + 'name' => 'job_id', + 'type' => 'varchar', + 'length' => '255', + 'default' => null, + 'cache_key' => true, + 'searchable' => false, + 'sortable' => false, + ], + + // QUEUE_NAME column. + [ + 'name' => 'queue_name', + 'type' => 'varchar', + 'length' => '255', + 'default' => null, + 'cache_key' => true, + 'searchable' => false, + 'sortable' => false, + ], + + // STATUS column. + [ + 'name' => 'status', + 'type' => 'varchar', + 'length' => '255', + 'default' => null, + 'cache_key' => true, + 'searchable' => true, + 'sortable' => false, + ], + + // Submitted_at column. + [ + 'name' => 'submitted_at', + 'type' => 'timestamp', + 'default' => '0000-00-00 00:00:00', + 'created' => true, + 'date_query' => true, + 'sortable' => true, + ], + + // MODIFIED column. + [ + 'name' => 'modified', + 'type' => 'timestamp', + 'default' => '0000-00-00 00:00:00', + 'created' => true, + 'date_query' => true, + 'sortable' => true, + ], + + // LAST_ACCESSED column. + [ + 'name' => 'last_accessed', + 'type' => 'timestamp', + 'default' => '0000-00-00 00:00:00', + 'created' => true, + 'date_query' => true, + 'sortable' => true, + ], + ]; +} diff --git a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php new file mode 100644 index 0000000000..7b2d1a8bd8 --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php @@ -0,0 +1,87 @@ + value array of versions => methods. + * + * @var array + */ + protected $upgrades = []; + + /** + * Instantiate class. + */ + public function __construct() { + parent::__construct(); + add_action( 'admin_init', [ $this, 'maybe_trigger_recreate_table' ], 9 ); + add_action( 'init', [ $this, 'maybe_upgrade' ] ); + } + + /** + * Setup the database schema + * + * @return void + */ + protected function set_schema() { + $this->schema = " + id bigint(20) unsigned NOT NULL AUTO_INCREMENT, + url varchar(2000) NOT NULL default '', + is_mobile tinyint(1) NOT NULL default 0, + lcp longtext default '', + viewport longtext default '', + error_code varchar(32) NULL default NULL, + error_message longtext NULL default NULL, + retries tinyint(1) NOT NULL default 1, + job_id varchar(255) NOT NULL default '', + queue_name varchar(255) NOT NULL default '', + status varchar(255) NOT NULL default '', + submitted_at timestamp NOT NULL default '0000-00-00 00:00:00', + modified timestamp NOT NULL default '0000-00-00 00:00:00', + last_accessed timestamp NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (id), + KEY url (url(150), is_mobile), + KEY modified (modified), + KEY last_accessed (last_accessed), + INDEX `status_index` (`status`(191)), + INDEX `error_code_index` (`error_code`(32))"; + } + + /** + * Trigger recreation of cache table if not exist. + * + * @return void + */ + public function maybe_trigger_recreate_table() { + if ( $this->exists() ) { + return; + } + + delete_option( $this->db_version_key ); + } +} diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index 18c60b6a72..9165b45f95 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -4,6 +4,8 @@ namespace WP_Rocket\Engine\Media\AboveTheFold; use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider; +use WP_Rocket\Engine\Media\AboveTheFold\Database\Tables\AboveTheFold as ATFTable; +use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; class ServiceProvider extends AbstractServiceProvider { /** @@ -16,6 +18,8 @@ class ServiceProvider extends AbstractServiceProvider { * @var array */ protected $provides = [ + 'atf_table', + 'atf_query', ]; /** @@ -24,5 +28,7 @@ class ServiceProvider extends AbstractServiceProvider { * @return void */ public function register() { + $this->getContainer()->share( 'atf_table', ATFTable::class ); + $this->getContainer()->add( 'atf_query', ATFQuery::class ); } } diff --git a/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php b/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php index af8c612feb..269bdee9b0 100644 --- a/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php +++ b/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php @@ -2,12 +2,12 @@ namespace WP_Rocket\Engine\Optimization\RUCSS\Database\Queries; -use WP_Rocket\Dependencies\Database\Query; +use WP_Rocket\Engine\Common\Database\Queries\AbstractQuery; /** * RUCSS UsedCSS Query. */ -class UsedCSS extends Query { +class UsedCSS extends AbstractQuery { /** * Name of the database table to query. @@ -67,187 +67,6 @@ class UsedCSS extends Query { */ protected $item_shape = '\\WP_Rocket\\Engine\\Optimization\\RUCSS\\Database\\Row\\UsedCSS'; - /** - * Table status. - * - * @var boolean - */ - public static $table_exists = false; - - /** - * Get pending jobs. - * - * @param int $count Number of rows. - * - * @return array - */ - public function get_pending_jobs( int $count = 100 ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return []; - } - - $inprogress_count = $this->query( - [ - 'count' => true, - 'status' => 'in-progress', - ] - ); - - if ( $inprogress_count >= $count ) { - return []; - } - - return $this->query( - [ - 'number' => ( $count - $inprogress_count ), - 'status' => 'pending', - 'fields' => [ - 'id', - 'url', - ], - 'job_id__not_in' => [ - 'not_in' => '', - ], - 'orderby' => 'modified', - 'order' => 'asc', - ] - ); - } - - /** - * Increment retries number and change status back to pending. - * - * @param int $id DB row ID. - * @param int $retries Current number of retries. - * - * @return bool - */ - public function increment_retries( $id, $retries = 0 ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $update_data = [ - 'retries' => $retries + 1, - 'status' => 'pending', - ]; - return $this->update_item( $id, $update_data ); - } - - /** - * Update Job ID. - * - * @param int $id DB row ID. - * @param int $new_job_id new job id. - * - * @return bool - */ - public function update_job_id( $id, $new_job_id ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $update_data['job_id'] = $new_job_id; - return $this->update_item( $id, $update_data ); - } - - /** - * Create new DB row for specific url. - * - * @param string $url Current page url. - * @param string $job_id API job_id. - * @param string $queue_name API Queue name. - * @param bool $is_mobile if the request is for mobile page. - * - * @return bool - */ - public function create_new_job( string $url, string $job_id, string $queue_name, bool $is_mobile = false ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $item = [ - 'url' => untrailingslashit( $url ), - 'is_mobile' => $is_mobile, - 'job_id' => $job_id, - 'queue_name' => $queue_name, - 'status' => 'pending', - 'retries' => 0, - 'last_accessed' => current_time( 'mysql', true ), - ]; - return $this->add_item( $item ); - } - - /** - * Change the status to be in-progress. - * - * @param int $id DB row ID. - * - * @return bool - */ - public function make_status_inprogress( int $id ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return $this->update_item( - $id, - [ - 'status' => 'in-progress', - ] - ); - } - - /** - * Reset the job and add new job_id pending. - * - * @param int $id DB row ID. - * @param string $job_id API job_id. - * - * @return bool - */ - public function reset_job( int $id, string $job_id ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return $this->update_item( - $id, - [ - 'job_id' => $job_id, - 'status' => 'pending', - 'error_code' => '', - 'error_message' => '', - 'retries' => 0, - 'modified' => current_time( 'mysql', true ), - ] - ); - } - - /** - * Change the status to be failed. - * - * @param int $id DB row ID. - * @param string $error_code error code. - * @param string $error_message error message. - * - * @return bool - */ - public function make_status_failed( int $id, string $error_code, string $error_message ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return $this->update_item( - $id, - [ - 'status' => 'failed', - 'error_code' => $error_code, - 'error_message' => $error_message, - ] - ); - } - /** * Complete a job. * @@ -270,58 +89,6 @@ public function make_status_completed( int $id, string $hash = '' ) { ); } - /** - * Get Used CSS for specific url. - * - * @param string $url Page Url. - * @param bool $is_mobile if the request is for mobile page. - * - * @return false|mixed - */ - public function get_row( string $url, bool $is_mobile = false ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $query = $this->query( - [ - 'url' => untrailingslashit( $url ), - 'is_mobile' => $is_mobile, - ] - ); - - if ( empty( $query[0] ) ) { - return false; - } - - return $query[0]; - } - - /** - * Get all rows with the same url (desktop and mobile versions). - * - * @param string $url Page url. - * - * @return array|false - */ - public function get_rows_by_url( string $url ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $query = $this->query( - [ - 'url' => untrailingslashit( $url ), - ] - ); - - if ( empty( $query ) ) { - return false; - } - - return $query; - } - /** * Get number of rows with the same hash value. * @@ -341,177 +108,4 @@ public function count_rows_by_hash( string $hash ): int { ] ); } - - /** - * Update UsedCSS Row last_accessed date to current date. - * - * @param int $id Used CSS id. - * - * @return bool - */ - public function update_last_accessed( int $id ): bool { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return (bool) $this->update_item( - $id, - [ - 'last_accessed' => current_time( 'mysql', true ), - ] - ); - } - - /** - * Delete DB row by url. - * - * @param string $url Page url to be deleted. - * - * @return bool - */ - public function delete_by_url( string $url ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $items = $this->get_rows_by_url( $url ); - - if ( ! $items ) { - return false; - } - - $deleted = true; - foreach ( $items as $item ) { - $deleted = $deleted && $this->delete_item( $item->id ); - } - - return $deleted; - } - - /** - * Get the count of not completed rows. - * - * @return int - */ - public function get_not_completed_count() { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return 0; - } - - return $this->query( - [ - 'count' => true, - 'status__in' => [ 'pending', 'in-progress' ], - ] - ); - } - - /** - * Get the count of completed rows. - * - * @return int - */ - public function get_completed_count() { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return 0; - } - - return $this->query( - [ - 'count' => true, - 'status' => 'completed', - ] - ); - } - - /** - * Get all failed rows. - * - * @param float $delay delay before the urls are deleted. - * @param string $unit unit from the delay. - * @return array|false - */ - public function get_failed_rows( float $delay = 3, string $unit = 'days' ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $query = $this->query( - [ - 'status' => 'failed', - 'date_query' => [ - [ - 'column' => 'modified', - 'before' => "$delay $unit ago", - 'inclusive' => true, - ], - ], - ], - false - ); - - if ( empty( $query ) ) { - return false; - } - - return $query; - } - - /** - * Revert status to pending. - * - * @param integer $id Used CSS id. - * @return boolean - */ - public function revert_to_pending( int $id ): bool { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return (bool) $this->update_item( - $id, - [ - 'error_code' => '', - 'error_message' => '', - 'retries' => 0, - 'status' => 'pending', - 'modified' => current_time( 'mysql', true ), - ] - ); - } - - /** - * Returns the current status of `wpr_rucss_used_css` table; true if it exists, false otherwise. - * - * @return boolean - */ - private function table_exists(): bool { - - if ( self::$table_exists ) { - return true; - } - - // Get the database interface. - $db = $this->get_db(); - - // Bail if no database interface is available. - if ( empty( $db ) ) { - return false; - } - - // Query statement. - $query = 'SHOW TABLES LIKE %s'; - $like = $db->esc_like( $db->{$this->table_name} ); - $prepared = $db->prepare( $query, $like ); - $result = $db->get_var( $prepared ); - - // Does the table exist? - $exists = $this->is_success( $result ); - - if ( $exists ) { - self::$table_exists = $exists; - } - - return $exists; - } } diff --git a/inc/Engine/WPRocketUninstall.php b/inc/Engine/WPRocketUninstall.php index 8d5f04e12d..d943f20c64 100644 --- a/inc/Engine/WPRocketUninstall.php +++ b/inc/Engine/WPRocketUninstall.php @@ -1,8 +1,8 @@ cache_path = trailingslashit( $cache_path ); - $this->config_path = $config_path; - $this->rucss_usedcss_table = $rucss_usedcss_table; - $this->rocket_cache = $rocket_cache; + public function __construct( $cache_path, $config_path, $rucss_usedcss_table, $rocket_cache, $atf_table ) { + $this->cache_path = trailingslashit( $cache_path ); + $this->config_path = $config_path; + $this->tables = [ + $rucss_usedcss_table, + $rocket_cache, + $atf_table, + ]; } /** * Deletes all plugin data and files on uninstall. * * @since 3.5.2 - * @author Remy Perona * * @return void */ @@ -160,18 +156,23 @@ public function uninstall() { $this->delete_plugin_data(); $this->delete_cache_files(); $this->delete_config_files(); - $this->drop_rucss_database_tables(); - $this->delete_preload_table(); + + foreach ( $this->tables as $table ) { + $this->delete_table( $table ); + } } /** - * Drop RUCSS database tables. + * Deletes a table + * + * @param Table $table Table instance. * * @return void */ - private function drop_rucss_database_tables() { - // If the table exist, then drop the table. - $this->drop_rucss_current_site_tables(); + private function delete_table( $table ) { + if ( $table->exists() ) { + $table->uninstall(); + } if ( ! is_multisite() ) { return; @@ -180,26 +181,18 @@ private function drop_rucss_database_tables() { foreach ( get_sites( [ 'fields' => 'ids' ] ) as $site_id ) { switch_to_blog( $site_id ); - $this->drop_rucss_current_site_tables(); + if ( $table->exists() ) { + $table->uninstall(); + } restore_current_blog(); } } - /** - * Drop RUCSS tables for current active site. - */ - private function drop_rucss_current_site_tables() { - if ( $this->rucss_usedcss_table->exists() ) { - $this->rucss_usedcss_table->uninstall(); - } - } - /** * Deletes WP Rocket options, transients and events. * * @since 3.5.2 - * @author Remy Perona * * @return void */ @@ -226,7 +219,6 @@ private function delete_plugin_data() { * Deletes all WP Rocket cache files. * * @since 3.5.2 - * @author Remy Perona * * @return void */ @@ -240,7 +232,6 @@ private function delete_cache_files() { * Deletes all WP Rocket config files. * * @since 3.5.2 - * @author Remy Perona * * @return void */ @@ -248,36 +239,10 @@ private function delete_config_files() { $this->delete( $this->config_path ); } - /** - * Drop preload tables. - */ - private function delete_preload_table() { - // If the table exist, then drop the table. - - if ( $this->rocket_cache->exists() ) { - $this->rocket_cache->uninstall(); - } - - if ( ! is_multisite() ) { - return; - } - - foreach ( get_sites( [ 'fields' => 'ids' ] ) as $site_id ) { - switch_to_blog( $site_id ); - - if ( $this->rocket_cache->exists() ) { - $this->rocket_cache->uninstall(); - } - - restore_current_blog(); - } - } - /** * Recursively deletes files and directories. * * @since 3.5.2 - * @author Remy Perona * * @param string $file Path to file or directory. */ diff --git a/inc/Plugin.php b/inc/Plugin.php index 0c1e6571f5..505a9b3019 100644 --- a/inc/Plugin.php +++ b/inc/Plugin.php @@ -28,6 +28,7 @@ use WP_Rocket\Engine\Heartbeat\ServiceProvider as HeartbeatServiceProvider; use WP_Rocket\Engine\License\ServiceProvider as LicenseServiceProvider; use WP_Rocket\Engine\Media\ServiceProvider as MediaServiceProvider; +use WP_Rocket\Engine\Media\AboveTheFold\ServiceProvider as ATFServiceProvider; use WP_Rocket\Engine\Optimization\AdminServiceProvider as OptimizationAdminServiceProvider; use WP_Rocket\Engine\Optimization\DeferJS\ServiceProvider as DeferJSServiceProvider; use WP_Rocket\Engine\Optimization\DelayJS\ServiceProvider as DelayJSServiceProvider; @@ -289,6 +290,7 @@ private function init_common_subscribers() { $this->container->addServiceProvider( APIServiceProvider::class ); $this->container->addServiceProvider( CommmonExtractCSSServiceProvider::class ); $this->container->addServiceProvider( LazyloadCSSServiceProvider::class ); + $this->container->addServiceProvider( ATFServiceProvider::class ); $common_subscribers = [ 'license_subscriber', diff --git a/tests/Integration/inc/Engine/WPRocketUninstall/uninstall.php b/tests/Integration/inc/Engine/WPRocketUninstall/uninstall.php index 087b72b9d1..b30272515c 100644 --- a/tests/Integration/inc/Engine/WPRocketUninstall/uninstall.php +++ b/tests/Integration/inc/Engine/WPRocketUninstall/uninstall.php @@ -119,8 +119,9 @@ public function testShouldDeleteAll() { $container = apply_filters( 'rocket_container', null ); $rucss_usedcss_table = $container->get( 'rucss_usedcss_table' ); $preload_table = $container->get( 'preload_caches_table' ); + $atf_table = $container->get( 'atf_table' ); - $uninstall = new WPRocketUninstall( $cache_path, $config_path, $rucss_usedcss_table, $preload_table ); + $uninstall = new WPRocketUninstall( $cache_path, $config_path, $rucss_usedcss_table, $preload_table, $atf_table ); $uninstall->uninstall(); diff --git a/uninstall.php b/uninstall.php index cfa6442f0a..885f146663 100755 --- a/uninstall.php +++ b/uninstall.php @@ -23,15 +23,18 @@ require_once __DIR__ . '/inc/Dependencies/Database/Queries/Date.php'; require_once __DIR__ . '/inc/Dependencies/Database/Queries/Compare.php'; require_once __DIR__ . '/inc/Engine/Optimization/RUCSS/Database/Tables/UsedCSS.php'; - require_once __DIR__ . '/inc/Engine/Preload/Database/Tables/Cache.php'; +require_once __DIR__ . '/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php'; + $rocket_rucss_usedcss_table = new WP_Rocket\Engine\Optimization\RUCSS\Database\Tables\UsedCSS(); -$rocket_cache_table = new \WP_Rocket\Engine\Preload\Database\Tables\Cache(); +$rocket_cache_table = new WP_Rocket\Engine\Preload\Database\Tables\Cache(); +$rocket_atf_table = new WP_Rocket\Engine\Media\AboveTheFold\Database\Tables\AboveTheFold(); $rocket_uninstall = new WPRocketUninstall( WP_ROCKET_CACHE_ROOT_PATH, WP_ROCKET_CONFIG_PATH, $rocket_rucss_usedcss_table, - $rocket_cache_table + $rocket_cache_table, + $rocket_atf_table ); $rocket_uninstall->uninstall(); From 274e72a9af625170f06feb2f093e3e8670a9c046 Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Wed, 6 Dec 2023 17:57:51 +0100 Subject: [PATCH 004/167] Frontend module for LCP & Above the fold Optimization (#6244) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémy Perona --- .../Common/Database/Queries/AbstractQuery.php | 152 +++++- .../Media/AboveTheFold/Context/Context.php | 23 + .../Database/Queries/AboveTheFold.php | 4 +- .../AboveTheFold/Frontend/Controller.php | 303 +++++++++++ .../AboveTheFold/Frontend/Subscriber.php | 58 +++ .../Media/AboveTheFold/ServiceProvider.php | 15 + .../RUCSS/Database/Queries/UsedCSS.php | 488 +----------------- inc/Plugin.php | 1 + .../Frontend/Controller/addExclusions.php | 80 +++ .../AboveTheFold/Frontend/Controller/lcp.php | 203 ++++++++ .../Frontend/Controller/addExclusions.php | 79 +++ .../AboveTheFold/Frontend/Controller/lcp.php | 79 +++ 12 files changed, 986 insertions(+), 499 deletions(-) create mode 100644 inc/Engine/Media/AboveTheFold/Context/Context.php create mode 100644 inc/Engine/Media/AboveTheFold/Frontend/Controller.php create mode 100644 inc/Engine/Media/AboveTheFold/Frontend/Subscriber.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php create mode 100644 tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php create mode 100644 tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php diff --git a/inc/Engine/Common/Database/Queries/AbstractQuery.php b/inc/Engine/Common/Database/Queries/AbstractQuery.php index 250d7c84d2..889378b021 100644 --- a/inc/Engine/Common/Database/Queries/AbstractQuery.php +++ b/inc/Engine/Common/Database/Queries/AbstractQuery.php @@ -65,6 +65,49 @@ public function get_rows_by_url( string $url ) { return $query; } + /** + * Fetch on submit jobs. + * + * @param int $count Number of jobs to fetch. + * @return array|int + */ + public function get_on_submit_jobs( int $count = 100 ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return []; + } + + $in_progress_count = $this->query( + [ + 'count' => true, + 'status' => [ 'in-progress' ], + ] + ); + $pending_count = $this->query( + [ + 'count' => true, + 'status' => [ 'pending' ], + ] + ); + + $processing_count = $in_progress_count + $pending_count; + + if ( 0 !== $count && $processing_count >= $count ) { + return []; + } + + $query_params = [ + 'status' => 'to-submit', + 'orderby' => 'modified', + 'order' => 'asc', + ]; + + if ( 0 !== $count ) { + $query_params['number'] = ( $count - $processing_count ); + } + + return $this->query( $query_params ); + } + /** * Create new DB row for specific url. * @@ -75,7 +118,7 @@ public function get_rows_by_url( string $url ) { * * @return bool */ - public function create_new_job( string $url, string $job_id, string $queue_name, bool $is_mobile = false ) { + public function create_new_job( string $url, string $job_id = '', string $queue_name = '', bool $is_mobile = false ) { if ( ! self::$table_exists && ! $this->table_exists() ) { return false; } @@ -85,7 +128,7 @@ public function create_new_job( string $url, string $job_id, string $queue_name, 'is_mobile' => $is_mobile, 'job_id' => $job_id, 'queue_name' => $queue_name, - 'status' => 'pending', + 'status' => 'to-submit', 'retries' => 0, 'last_accessed' => current_time( 'mysql', true ), ]; @@ -122,6 +165,7 @@ public function get_pending_jobs( int $count = 100 ) { 'fields' => [ 'id', 'url', + 'next_retry_time', ], 'job_id__not_in' => [ 'not_in' => '', @@ -135,20 +179,33 @@ public function get_pending_jobs( int $count = 100 ) { /** * Increment retries number and change status back to pending. * - * @param int $id DB row ID. - * @param int $retries Current number of retries. + * @param int $id DB row ID. + * @param int $error_code error code. + * @param string $error_message error message. * * @return bool */ - public function increment_retries( $id, $retries = 0 ) { + public function increment_retries( $id, int $error_code, string $error_message ) { if ( ! self::$table_exists && ! $this->table_exists() ) { return false; } + $old = $this->get_item( $id ); + + $retries = 0; + $previous_message = ''; + + if ( $old ) { + $retries = $old->retries; + $previous_message = $old->error_message; + } + $update_data = [ - 'retries' => $retries + 1, - 'status' => 'pending', + 'retries' => $retries + 1, + 'status' => 'pending', + 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$error_code}: {$error_message}", ]; + return $this->update_item( $id, $update_data ); } @@ -197,7 +254,7 @@ public function make_status_inprogress( int $id ) { * * @return bool */ - public function reset_job( int $id, string $job_id ) { + public function reset_job( int $id, string $job_id = '' ) { if ( ! self::$table_exists && ! $this->table_exists() ) { return false; } @@ -206,11 +263,12 @@ public function reset_job( int $id, string $job_id ) { $id, [ 'job_id' => $job_id, - 'status' => 'pending', + 'status' => 'to-submit', 'error_code' => '', 'error_message' => '', 'retries' => 0, 'modified' => current_time( 'mysql', true ), + 'submitted_at' => current_time( 'mysql', true ), ] ); } @@ -229,12 +287,16 @@ public function make_status_failed( int $id, string $error_code, string $error_m return false; } + $old = $this->get_item( $id ); + + $previous_message = $old ? $old->error_message : ''; + return $this->update_item( $id, [ 'status' => 'failed', 'error_code' => $error_code, - 'error_message' => $error_message, + 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$error_code}: {$error_message}", ] ); } @@ -410,4 +472,74 @@ protected function table_exists(): bool { return $exists; } + + /** + * Update the error message. + * + * @param int $job_id Job ID. + * @param int $code Response code. + * @param string $message Response message. + * @param string $previous_message Previous saved message. + * + * @return int|bool + */ + public function update_message( int $job_id, int $code, string $message, string $previous_message = '' ) { + return $this->update_item( + $job_id, + [ + 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$code}: {$message}", + ] + ); + } + + /** + * Updates the next_retry_time field + * + * @param mixed $job_id the job id. + * @param string|int $next_retry_time timestamp or mysql format date. + * + * @return int|bool either it is saved or not. + */ + public function update_next_retry_time( $job_id, $next_retry_time ) { + if ( is_string( $next_retry_time ) && strtotime( $next_retry_time ) ) { + // If $next_retry_time is a valid date string, convert it to a timestamp. + $next_retry_time = strtotime( $next_retry_time ); + } elseif ( ! is_numeric( $next_retry_time ) ) { + // If it's not numeric and not a valid date string, return false. + return false; + } + + return $this->update_item( + $job_id, + [ + 'next_retry_time' => gmdate( 'Y-m-d H:i:s', $next_retry_time ), + ] + ); + } + + /** + * Change the status to be pending. + * + * @param int $id DB row ID. + * @param string $job_id API job_id. + * @param string $queue_name API Queue name. + * @param bool $is_mobile if the request is for mobile page. + * @return bool + */ + public function make_status_pending( int $id, string $job_id = '', string $queue_name = '', bool $is_mobile = false ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + return $this->update_item( + $id, + [ + 'job_id' => $job_id, + 'queue_name' => $queue_name, + 'status' => 'pending', + 'is_mobile' => $is_mobile, + 'submitted_at' => current_time( 'mysql', true ), + ] + ); + } } diff --git a/inc/Engine/Media/AboveTheFold/Context/Context.php b/inc/Engine/Media/AboveTheFold/Context/Context.php new file mode 100644 index 0000000000..24a0582bac --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Context/Context.php @@ -0,0 +1,23 @@ +options = $options; + $this->query = $query; + $this->context = $context; + } + + /** + * Optimize the LCP image + * + * @param string $html HTML content. + * + * @return string + */ + public function lcp( $html ): string { + if ( ! $this->context->is_allowed() ) { + return $html; + } + + global $wp; + + $url = untrailingslashit( home_url( add_query_arg( [], $wp->request ) ) ); + + $row = $this->query->get_row( $url, $this->is_mobile() ); + + if ( empty( $row ) ) { + return $html; + } + + if ( empty( $row->lcp ) ) { + return $html; + } + + $html = $this->preload_lcp( $html, $row ); + + return $html; + } + + /** + * Preload the LCP image + * + * @param string $html HTML content. + * @param object $row Corresponding DB row. + * + * @return string + */ + private function preload_lcp( $html, $row ) { + $preload = ''; + + $lcp = json_decode( $row->lcp ); + + $preload .= $this->preload_tag( $lcp ); + + $replace = preg_replace( '##', $preload, $html, 1 ); + $replace = $this->set_fetchpriority( $lcp, $replace ); + + return $replace; + } + + /** + * Builds the preload tag + * + * @param object $lcp LCP object. + * + * @return string + */ + private function preload_tag( $lcp ): string { + $tags = $this->generate_lcp_link_tag_with_sources( $lcp ); + return $tags['tags']; + } + + /** + * Alters the preload element tag (img|img-srcset) + * + * @param object $lcp LCP object. + * @param string $html HTML content. + * @return string + */ + private function set_fetchpriority( $lcp, string $html ): string { + $allowed_types = [ + 'img', + 'img-srcset', + 'picture', + ]; + + if ( ! in_array( $lcp->type, $allowed_types, true ) ) { + return $html; + } + + $url = preg_quote( $lcp->src, '/' ); + $html = preg_replace_callback( + '/]*\s+src=[\'"]' . $url . '[\'"].+>$/', + function ( $matches ) { + // Check if the fetchpriority attribute already exists. + if ( preg_match( '/fetchpriority=[\'"]([^\'"]+)[\'"]/', $matches[0] ) ) { + // If it exists, don't modify the tag. + return $matches[0]; + } + + // If it doesn't exist, add the fetchpriority attribute. + return preg_replace( '/context->is_allowed() ) { + return $exclusions; + } + + list($atf, $lcp) = [ [], [] ]; + + global $wp; + + $url = untrailingslashit( home_url( add_query_arg( [], $wp->request ) ) ); + + $row = $this->query->get_row( $url, $this->is_mobile() ); + + if ( ! $row ) { + return $exclusions; + } + + if ( $row->lcp ) { + $lcp = $this->generate_lcp_link_tag_with_sources( json_decode( $row->lcp ) ); + $lcp = $lcp['sources']; + } + + if ( $row->viewport ) { + $atf = $this->get_atf_sources( json_decode( $row->viewport ) ); + } + + $exclusions = array_merge( $exclusions, $lcp, $atf ); + + // Remove lcp candidate from the atf array. + $exclusions = array_unique( $exclusions ); + + return $exclusions; + } + + /** + * Generate preload link tags with sources for LCP. + * + * @param object $lcp LCP Object. + * @return array + */ + private function generate_lcp_link_tag_with_sources( $lcp ): array { + $pairs = [ + 'tags' => '', + 'sources' => [], + ]; + + if ( ! $lcp && ! is_object( $lcp ) ) { + return $pairs; + } + + $tag = ''; + $start_tag = 'type ) { + case 'img': + $sources[] = $lcp->src; + $tag .= $start_tag . 'href="' . $lcp->src . '"' . $end_tag; + break; + case 'img-srcset': + $sources[] = $lcp->src; + $tag .= $start_tag . 'href="' . $lcp->src . '" imagesrcset="' . $lcp->srcset . '" imagesizes="' . $lcp->sizes . '"' . $end_tag; + break; + case 'bg-img-set': + foreach ( $lcp->bg_set as $set ) { + $sources[] = $set->src; + } + + $tag .= $start_tag . 'imagesrcset="' . implode( ',', $sources ) . '"' . $end_tag; + break; + case 'bg-img': + foreach ( $lcp->bg_set as $set ) { + $sources[] = $set->src; + + $tag .= $start_tag . 'href="' . $set->src . '"' . $end_tag; + } + break; + case 'picture': + if ( ! empty( $lcp->sources ) ) { + foreach ( $lcp->sources as $source ) { + $sources[] = $source->srcset; + $tag .= $start_tag . 'href="' . $source->srcset . '" media="' . $source->media . '"' . $end_tag; + } + } + $sources[] = $lcp->src; + $tag .= $start_tag . 'href="' . $lcp->src . '"' . $end_tag; + break; + } + + $pairs['tags'] = $tag; + $pairs['sources'] = $sources; + + return $pairs; + } + + /** + * Get above the fold images sources. + * + * @param array $atfs Above the fold object. + * @return array + */ + private function get_atf_sources( array $atfs ): array { + if ( ! $atfs && ! is_array( $atfs ) ) { + return []; + } + + $sources = []; + + foreach ( $atfs as $atf ) { + switch ( $atf->type ) { + case 'img': + case 'img-srcset': + $sources[] = $atf->src; + break; + case 'bg-img-set': + case 'bg-img': + foreach ( $atf->bg_set as $set ) { + $sources[] = $set->src; + } + break; + case 'picture': + if ( ! empty( $atf->sources ) ) { + foreach ( $atf->sources as $source ) { + $sources[] = $source->srcset; + } + } + $sources[] = $atf->src; + break; + } + } + + return $sources; + } + + /** + * Determines if the page is mobile and separate cache for mobile files is enabled. + * + * @return bool + */ + private function is_mobile(): bool { + return $this->options->get( 'cache_mobile', 0 ) + && $this->options->get( 'do_caching_mobile_files', 0 ) + && wp_is_mobile(); + } +} diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Subscriber.php b/inc/Engine/Media/AboveTheFold/Frontend/Subscriber.php new file mode 100644 index 0000000000..17acbec472 --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Frontend/Subscriber.php @@ -0,0 +1,58 @@ +controller = $controller; + } + + /** + * Array of events to listen to + * + * @return array + */ + public static function get_subscribed_events() { + return [ + 'rocket_buffer' => [ 'lcp', 17 ], + 'rocket_lazyload_excluded_src' => 'add_exclusions', + ]; + } + + /** + * Optimize the LCP image + * + * @param string $html HTML content. + * + * @return string + */ + public function lcp( $html ): string { + return $this->controller->lcp( $html ); + } + + /** + * Add above the fold images to lazyload exclusions + * + * @param array $exclusions Array of excluded patterns. + * + * @return array + */ + public function add_exclusions( $exclusions ): array { + return $this->controller->add_exclusions( $exclusions ); + } +} diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index 9165b45f95..16dc494d27 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -4,8 +4,11 @@ namespace WP_Rocket\Engine\Media\AboveTheFold; use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider; +use WP_Rocket\Engine\Media\AboveTheFold\Context\Context; use WP_Rocket\Engine\Media\AboveTheFold\Database\Tables\AboveTheFold as ATFTable; use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; +use WP_Rocket\Engine\Media\AboveTheFold\Frontend\Controller as FrontController; +use WP_Rocket\Engine\Media\AboveTheFold\Frontend\Subscriber as FrontSubscriber; class ServiceProvider extends AbstractServiceProvider { /** @@ -20,6 +23,9 @@ class ServiceProvider extends AbstractServiceProvider { protected $provides = [ 'atf_table', 'atf_query', + 'atf_context', + 'atf_controller', + 'atf_subscriber', ]; /** @@ -30,5 +36,14 @@ class ServiceProvider extends AbstractServiceProvider { public function register() { $this->getContainer()->share( 'atf_table', ATFTable::class ); $this->getContainer()->add( 'atf_query', ATFQuery::class ); + $this->getContainer()->add( 'atf_context', Context::class ); + + $this->getContainer()->get( 'atf_table' ); + $this->getContainer()->add( 'atf_controller', FrontController::class ) + ->addArgument( $this->getContainer()->get( 'options' ) ) + ->addArgument( $this->getContainer()->get( 'atf_query' ) ) + ->addArgument( $this->getContainer()->get( 'atf_context' ) ); + $this->getContainer()->share( 'atf_subscriber', FrontSubscriber::class ) + ->addArgument( $this->getContainer()->get( 'atf_controller' ) ); } } diff --git a/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php b/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php index 2830f2db65..37ddef0637 100644 --- a/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php +++ b/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php @@ -2,7 +2,7 @@ namespace WP_Rocket\Engine\Optimization\RUCSS\Database\Queries; -use WP_Rocket\Dependencies\Database\Query; +use WP_Rocket\Engine\Common\Database\Queries\AbstractQuery; use WP_Rocket\Engine\Optimization\RUCSS\Database\Row\UsedCSS as UsedCSSRow; use WP_Rocket\Engine\Optimization\RUCSS\Database\Schemas\UsedCSS as UsedCSSSchema; @@ -69,249 +69,6 @@ class UsedCSS extends AbstractQuery { */ protected $item_shape = UsedCSSRow::class; - /** - * Table status. - * - * @var boolean - */ - public static $table_exists = false; - - /** - * Get pending jobs. - * - * @param int $count Number of rows. - * - * @return array - */ - public function get_pending_jobs( int $count = 100 ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return []; - } - - $inprogress_count = $this->query( - [ - 'count' => true, - 'status' => 'in-progress', - ] - ); - - if ( $inprogress_count >= $count ) { - return []; - } - - return $this->query( - [ - 'number' => ( $count - $inprogress_count ), - 'status' => 'pending', - 'fields' => [ - 'id', - 'url', - 'next_retry_time', - ], - 'job_id__not_in' => [ - 'not_in' => '', - ], - 'orderby' => 'modified', - 'order' => 'asc', - ] - ); - } - - /** - * Fetch on submit jobs. - * - * @param int $count Number of jobs to fetch. - * @return array|int - */ - public function get_on_submit_jobs( int $count = 100 ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return []; - } - - $in_progress_count = $this->query( - [ - 'count' => true, - 'status' => [ 'in-progress' ], - ] - ); - $pending_count = $this->query( - [ - 'count' => true, - 'status' => [ 'pending' ], - ] - ); - - $processing_count = $in_progress_count + $pending_count; - - if ( 0 !== $count && $processing_count >= $count ) { - return []; - } - - $query_params = [ - 'status' => 'to-submit', - 'orderby' => 'modified', - 'order' => 'asc', - ]; - - if ( 0 !== $count ) { - $query_params['number'] = ( $count - $processing_count ); - } - - return $this->query( $query_params ); - } - - /** - * Increment retries number and change status back to pending. - * - * @param int $id DB row ID. - * @param int $error_code error code. - * @param string $error_message error message. - * - * @return bool - */ - public function increment_retries( $id, int $error_code, string $error_message ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $old = $this->get_item( $id ); - - $retries = 0; - $previous_message = ''; - - if ( $old ) { - $retries = $old->retries; - $previous_message = $old->error_message; - } - - $update_data = [ - 'retries' => $retries + 1, - 'status' => 'pending', - 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$error_code}: {$error_message}", - ]; - - return $this->update_item( $id, $update_data ); - } - - /** - * Update Job ID. - * - * @param int $id DB row ID. - * @param int $new_job_id new job id. - * - * @return bool - */ - public function update_job_id( $id, $new_job_id ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $update_data['job_id'] = $new_job_id; - return $this->update_item( $id, $update_data ); - } - - /** - * Create new DB row for specific url. - * - * @param string $url Current page url. - * @param string $job_id API job_id. - * @param string $queue_name API Queue name. - * @param bool $is_mobile if the request is for mobile page. - * - * @return bool - */ - public function create_new_job( string $url, string $job_id = '', string $queue_name = '', bool $is_mobile = false ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $item = [ - 'url' => untrailingslashit( $url ), - 'is_mobile' => $is_mobile, - 'job_id' => $job_id, - 'queue_name' => $queue_name, - 'status' => 'to-submit', - 'retries' => 0, - 'last_accessed' => current_time( 'mysql', true ), - ]; - return $this->add_item( $item ); - } - - /** - * Change the status to be in-progress. - * - * @param int $id DB row ID. - * - * @return bool - */ - public function make_status_inprogress( int $id ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return $this->update_item( - $id, - [ - 'status' => 'in-progress', - ] - ); - } - - /** - * Reset the job and add new job_id pending. - * - * @param int $id DB row ID. - * @param string $job_id API job_id. - * - * @return bool - */ - public function reset_job( int $id, string $job_id = '' ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return $this->update_item( - $id, - [ - 'job_id' => $job_id, - 'status' => 'to-submit', - 'error_code' => '', - 'error_message' => '', - 'retries' => 0, - 'modified' => current_time( 'mysql', true ), - 'submitted_at' => current_time( 'mysql', true ), - ] - ); - } - - /** - * Change the status to be failed. - * - * @param int $id DB row ID. - * @param string $error_code error code. - * @param string $error_message error message. - * - * @return bool - */ - public function make_status_failed( int $id, string $error_code, string $error_message ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $old = $this->get_item( $id ); - - $previous_message = $old ? $old->error_message : ''; - - return $this->update_item( - $id, - [ - 'status' => 'failed', - 'error_code' => $error_code, - 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$error_code}: {$error_message}", - ] - ); - } - /** * Complete a job. * @@ -353,247 +110,4 @@ public function count_rows_by_hash( string $hash ): int { ] ); } - - /** - * Update UsedCSS Row last_accessed date to current date. - * - * @param int $id Used CSS id. - * - * @return bool - */ - public function update_last_accessed( int $id ): bool { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return (bool) $this->update_item( - $id, - [ - 'last_accessed' => current_time( 'mysql', true ), - ] - ); - } - - /** - * Delete DB row by url. - * - * @param string $url Page url to be deleted. - * - * @return bool - */ - public function delete_by_url( string $url ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $items = $this->get_rows_by_url( $url ); - - if ( ! $items ) { - return false; - } - - $deleted = true; - foreach ( $items as $item ) { - $deleted = $deleted && $this->delete_item( $item->id ); - } - - return $deleted; - } - - /** - * Get the count of not completed rows. - * - * @return int - */ - public function get_not_completed_count() { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return 0; - } - - return $this->query( - [ - 'count' => true, - 'status__in' => [ 'pending', 'in-progress' ], - ] - ); - } - - /** - * Get the count of completed rows. - * - * @return int - */ - public function get_completed_count() { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return 0; - } - - return $this->query( - [ - 'count' => true, - 'status' => 'completed', - ] - ); - } - - /** - * Get all failed rows. - * - * @param float $delay delay before the urls are deleted. - * @param string $unit unit from the delay. - * @return array|false - */ - public function get_failed_rows( float $delay = 3, string $unit = 'days' ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - $query = $this->query( - [ - 'status' => 'failed', - 'date_query' => [ - [ - 'column' => 'modified', - 'before' => "$delay $unit ago", - 'inclusive' => true, - ], - ], - ], - false - ); - - if ( empty( $query ) ) { - return false; - } - - return $query; - } - - /** - * Revert status to pending. - * - * @param integer $id Used CSS id. - * @return boolean - */ - public function revert_to_pending( int $id ): bool { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return (bool) $this->update_item( - $id, - [ - 'error_code' => '', - 'error_message' => '', - 'retries' => 0, - 'status' => 'pending', - 'modified' => current_time( 'mysql', true ), - ] - ); - } - - /** - * Returns the current status of `wpr_rucss_used_css` table; true if it exists, false otherwise. - * - * @return boolean - */ - private function table_exists(): bool { - - if ( self::$table_exists ) { - return true; - } - - // Get the database interface. - $db = $this->get_db(); - - // Bail if no database interface is available. - if ( empty( $db ) ) { - return false; - } - - // Query statement. - $query = 'SHOW TABLES LIKE %s'; - $like = $db->esc_like( $db->{$this->table_name} ); - $prepared = $db->prepare( $query, $like ); - $result = $db->get_var( $prepared ); - - // Does the table exist? - $exists = $this->is_success( $result ); - - if ( $exists ) { - self::$table_exists = $exists; - } - - return $exists; - } - - /** - * Update the error message. - * - * @param int $job_id Job ID. - * @param int $code Response code. - * @param string $message Response message. - * @param string $previous_message Previous saved message. - * - * @return bool - */ - public function update_message( int $job_id, int $code, string $message, string $previous_message = '' ): bool { - return $this->update_item( - $job_id, - [ - 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$code}: {$message}", - ] - ); - } - - /** - * Updates the next_retry_time field - * - * @param mixed $job_id the job id. - * @param string|int $next_retry_time timestamp or mysql format date. - * - * @return bool either it is saved or not. - */ - public function update_next_retry_time( $job_id, $next_retry_time ): bool { - if ( is_string( $next_retry_time ) && strtotime( $next_retry_time ) ) { - // If $next_retry_time is a valid date string, convert it to a timestamp. - $next_retry_time = strtotime( $next_retry_time ); - } elseif ( ! is_numeric( $next_retry_time ) ) { - // If it's not numeric and not a valid date string, return false. - return false; - } - - return $this->update_item( - $job_id, - [ - 'next_retry_time' => gmdate( 'Y-m-d H:i:s', $next_retry_time ), - ] - ); - } - - /** - * Change the status to be pending. - * - * @param int $id DB row ID. - * @param string $job_id API job_id. - * @param string $queue_name API Queue name. - * @param bool $is_mobile if the request is for mobile page. - * @return bool - */ - public function make_status_pending( int $id, string $job_id = '', string $queue_name = '', bool $is_mobile = false ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { - return false; - } - - return $this->update_item( - $id, - [ - 'job_id' => $job_id, - 'queue_name' => $queue_name, - 'status' => 'pending', - 'is_mobile' => $is_mobile, - 'submitted_at' => current_time( 'mysql', true ), - ] - ); - } } diff --git a/inc/Plugin.php b/inc/Plugin.php index 055b83da3b..d1002e1bd3 100644 --- a/inc/Plugin.php +++ b/inc/Plugin.php @@ -383,6 +383,7 @@ private function init_common_subscribers() { 'lazyload_css_subscriber', 'shoptimizer', 'weglot', + 'atf_subscriber', ]; $host_type = HostResolver::get_host_service(); diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php new file mode 100644 index 0000000000..990f0959c1 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php @@ -0,0 +1,80 @@ + [ + 'config' => [ + 'filter' => false, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => (object) [ + 'lcp' => '', + 'viewport' => '', + ], + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'exclusions' => [ + 'foo', + ], + 'expected' => [ + 'foo', + ], + ], + 'testShouldReturnSameWhenEmptyRow' => [ + 'config' => [ + 'filter' => true, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => false, + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'exclusions' => [ + 'foo', + ], + 'expected' => [ + 'foo', + ], + ], + 'testShouldReturnUpdatedWhenRowExists' => [ + 'config' => [ + 'filter' => true, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => (object) [ + 'lcp' => json_encode( (object) [ + 'type' => 'img', + 'src' => 'bar', + ] ), + 'viewport' => json_encode( [ + 0 => (object) [ + 'type' => 'img', + 'src' => 'foobar', + ], + ] ), + ], + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'exclusions' => [ + 'foo', + ], + 'expected' => [ + 'foo', + 'bar', + 'foobar', + ], + ], +]; diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php new file mode 100644 index 0000000000..814c400884 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php @@ -0,0 +1,203 @@ +'; +$html_lcp = ''; + +$html_srcset = ''; +$html_srcset_lcp = ''; + +$html_picture = ''; +$html_picture_lcp = ''; + +$html_bg_img = '
'; +$html_bg_img_lcp = '
'; +$html_bg_img_set_lcp = '
'; + +return [ + 'testShouldReturnSameWhenFeatureDisabled' => [ + 'config' => [ + 'filter' => false, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => (object) [ + 'lcp' => '', + 'viewport' => '', + ], + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'html' => $html, + 'expected' => $html, + ], + 'testShouldReturnSameWhenEmptyRow' => [ + 'config' => [ + 'filter' => true, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => false, + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'html' => $html, + 'expected' => $html, + ], + 'testShouldReturnSameWhenMissingLCP' => [ + 'config' => [ + 'filter' => true, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => (object) [ + 'viewport' => '', + ], + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'html' => $html, + 'expected' => $html, + ], + 'testShouldReturnUpdatedWhenImgLCP' => [ + 'config' => [ + 'filter' => true, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => (object) [ + 'lcp' => json_encode( (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image.jpg', + ] ), + 'viewport' => json_encode( [ + 0 => (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image.jpg', + ], + ] ), + ], + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'html' => $html, + 'expected' => $html_lcp, + ], + 'testShouldReturnUpdatedWhenImgSrcsetLCP' => [ + 'config' => [ + 'filter' => true, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => (object) [ + 'lcp' => json_encode( (object) [ + 'type' => 'img-srcset', + 'src' => 'http://example.org/wp-content/uploads/image.jpg', + 'srcset' => 'http://example.org/wp-content/uploads/image-640x400.jpg 640w', + 'sizes' => '50vw', + ] ), + 'viewport' => json_encode( [] ), + ], + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'html' => $html_srcset, + 'expected' => $html_srcset_lcp, + ], + 'testShouldReturnUpdatedWhenPictureLCP' => [ + 'config' => [ + 'filter' => true, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => (object) [ + 'lcp' => json_encode( (object) [ + 'type' => 'picture', + 'src' => 'http://example.org/wp-content/uploads/image.jpg', + 'sources' => [ + (object) [ + 'srcset' => 'http://example.org/wp-content/uploads/image-640x400.jpg', + 'media' => '(max-width: 640px)', + ], + ], + ] ), + 'viewport' => json_encode( [] ), + ], + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'html' => $html_picture, + 'expected' => $html_picture_lcp, + ], + 'testShouldReturnUpdatedBGImgLCP' => [ + 'config' => [ + 'filter' => true, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => (object) [ + 'lcp' => json_encode( (object) [ + 'type' => 'bg-img', + 'bg_set' => [ + (object) [ + 'src' => 'http://example.org/wp-content/uploads/image.jpg', + ], + ], + ] ), + 'viewport' => json_encode( [] ), + ], + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'html' => $html_bg_img, + 'expected' => $html_bg_img_lcp, + ], + 'testShouldReturnUpdatedBGImgSetLCP' => [ + 'config' => [ + 'filter' => true, + 'wp' => (object) [ + 'request' => '', + ], + 'url' => 'http://example.org', + 'is_mobile' => false, + 'row' => (object) [ + 'lcp' => json_encode( (object) [ + 'type' => 'bg-img-set', + 'bg_set' => [ + (object) [ + 'src' => 'http://example.org/wp-content/uploads/image.jpg', + ], + (object) [ + 'src' => 'http://example.org/wp-content/uploads/image-640x400.jpg', + ], + ], + ] ), + 'viewport' => json_encode( [] ), + ], + 'cache_mobile' => 0, + 'do_caching_mobile_files' => 0, + 'wp_is_mobile' => false, + ], + 'html' => $html_bg_img, + 'expected' => $html_bg_img_set_lcp, + ], +]; diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php new file mode 100644 index 0000000000..aeac1355c5 --- /dev/null +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php @@ -0,0 +1,79 @@ +options = Mockery::mock( Options_Data::class ); + $this->query = $this->createPartialMock( AboveTheFold::class, [ 'get_row' ] ); + $this->context = Mockery::mock( Context::class ); + + $this->controller = new Controller( $this->options, $this->query, $this->context ); + } + + protected function tearDown(): void { + unset( $GLOBALS['wp'] ); + + parent::tearDown(); + } + + /** + * @dataProvider configTestData + */ + public function testShouldReturnExpected( $config, $exclusions, $expected ) { + $this->context->shouldReceive( 'is_allowed' ) + ->atMost() + ->once() + ->andReturn( $config['filter'] ); + + $GLOBALS['wp'] = $config['wp']; + + Functions\when( 'home_url' )->justReturn( 'http://example.org' ); + Functions\when( 'add_query_arg' )->returnArg( 2 ); + + $this->query->method( 'get_row' ) + ->with( $config['url'], $config['is_mobile'] ) + ->willReturn( $config['row'] ); + + $this->options->shouldReceive( 'get' ) + ->with( 'cache_mobile', 0 ) + ->atMost() + ->once() + ->andReturn( $config['cache_mobile'] ); + + $this->options->shouldReceive( 'get' ) + ->with( 'do_caching_mobile_files', 0 ) + ->atMost() + ->once() + ->andReturn( $config['do_caching_mobile_files'] ); + + Functions\when( 'wp_is_mobile' ) + ->justReturn( $config['wp_is_mobile'] ); + + $this->assertSame( + $expected, + $this->controller->add_exclusions( $exclusions ) + ); + } +} diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php new file mode 100644 index 0000000000..e33d379c3a --- /dev/null +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php @@ -0,0 +1,79 @@ +options = Mockery::mock( Options_Data::class ); + $this->query = $this->createPartialMock( AboveTheFold::class, [ 'get_row' ] ); + $this->context = Mockery::mock( Context::class ); + + $this->controller = new Controller( $this->options, $this->query, $this->context ); + } + + protected function tearDown(): void { + unset( $GLOBALS['wp'] ); + + parent::tearDown(); + } + + /** + * @dataProvider configTestData + */ + public function testShouldReturnExpected( $config, $html, $expected ) { + $this->context->shouldReceive( 'is_allowed' ) + ->atMost() + ->once() + ->andReturn( $config['filter'] ); + + $GLOBALS['wp'] = $config['wp']; + + Functions\when( 'home_url' )->justReturn( 'http://example.org' ); + Functions\when( 'add_query_arg' )->returnArg( 2 ); + + $this->query->method( 'get_row' ) + ->with( $config['url'], $config['is_mobile'] ) + ->willReturn( $config['row'] ); + + $this->options->shouldReceive( 'get' ) + ->with( 'cache_mobile', 0 ) + ->atMost() + ->once() + ->andReturn( $config['cache_mobile'] ); + + $this->options->shouldReceive( 'get' ) + ->with( 'do_caching_mobile_files', 0 ) + ->atMost() + ->once() + ->andReturn( $config['do_caching_mobile_files'] ); + + Functions\when( 'wp_is_mobile' ) + ->justReturn( $config['wp_is_mobile'] ); + + $this->assertSame( + $this->format_the_html( $expected ), + $this->format_the_html( $this->controller->lcp( $html ) ) + ); + } +} From b3392c0e40606adaf6383d0b1aaaf86f0a3c27ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 14 Dec 2023 09:24:51 -0500 Subject: [PATCH 005/167] Closes #6284 LCP & ATF: admin part (#6285) Co-authored-by: Michael Lee --- .../Media/AboveTheFold/Admin/Controller.php | 113 ++++++++++++++++++ .../Media/AboveTheFold/Admin/Subscriber.php | 74 ++++++++++++ .../Database/Tables/AboveTheFold.php | 34 ++++++ .../Media/AboveTheFold/ServiceProvider.php | 12 +- inc/Plugin.php | 1 + .../Admin/Controller/deletePostAtf.php | 28 +++++ .../Admin/Controller/deleteTermAtf.php | 28 +++++ .../Admin/Controller/truncateAtf.php | 25 ++++ .../Admin/Controller/deletePostAtf.php | 55 +++++++++ .../Admin/Controller/deleteTermAtf.php | 56 +++++++++ .../Admin/Controller/truncateAtf.php | 60 ++++++++++ 11 files changed, 484 insertions(+), 2 deletions(-) create mode 100644 inc/Engine/Media/AboveTheFold/Admin/Controller.php create mode 100644 inc/Engine/Media/AboveTheFold/Admin/Subscriber.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php create mode 100644 tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php create mode 100644 tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php create mode 100644 tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php diff --git a/inc/Engine/Media/AboveTheFold/Admin/Controller.php b/inc/Engine/Media/AboveTheFold/Admin/Controller.php new file mode 100644 index 0000000000..7eb7735579 --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Admin/Controller.php @@ -0,0 +1,113 @@ +table = $table; + $this->query = $query; + $this->context = $context; + } + + /** + * Truncate delete ATF DB table. + * + * @return void + */ + public function truncate_atf() { + if ( ! $this->context->is_allowed() ) { + return; + } + + $this->delete_rows(); + } + + /** + * Deletes the rows from the table + * + * @return void + */ + private function delete_rows() { + if ( 0 < $this->query->get_not_completed_count() ) { + $this->table->remove_all_completed_rows(); + return; + } + + $this->table->truncate(); + } + + /** + * Delete ATF row on update Post or delete post. + * + * @param int $post_id The post ID. + * + * @return void + */ + public function delete_post_atf( $post_id ) { + if ( ! $this->context->is_allowed() ) { + return; + } + + $url = get_permalink( $post_id ); + + if ( false === $url ) { + return; + } + + $this->query->delete_by_url( untrailingslashit( $url ) ); + } + + /** + * Deletes the ATF when updating a term + * + * @param int $term_id the term ID. + * + * @return void + */ + public function delete_term_atf( $term_id ) { + if ( ! $this->context->is_allowed() ) { + return; + } + + $url = get_term_link( (int) $term_id ); + + if ( is_wp_error( $url ) ) { + return; + } + + $this->query->delete_by_url( untrailingslashit( $url ) ); + } +} diff --git a/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php b/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php new file mode 100644 index 0000000000..5d39a2c94c --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php @@ -0,0 +1,74 @@ +controller = $controller; + } + + /** + * Array of events this subscriber listens to + * + * @return array + */ + public static function get_subscribed_events(): array { + return [ + 'switch_theme' => 'truncate_atf', + 'permalink_structure_changed' => 'truncate_atf', + 'rocket_domain_options_changed' => 'truncate_atf', + 'wp_trash_post' => 'delete_post_atf', + 'delete_post' => 'delete_post_atf', + 'clean_post_cache' => 'delete_post_atf', + 'wp_update_comment_count' => 'delete_post_atf', + 'edit_term' => 'delete_term_atf', + 'pre_delete_term' => 'delete_term_atf', + ]; + } + + /** + * Truncate delete ATF DB table. + * + * @return void + */ + public function truncate_atf() { + $this->controller->truncate_atf(); + } + + /** + * Delete ATF row on update Post or delete post. + * + * @param int $post_id The post ID. + * + * @return void + */ + public function delete_post_atf( $post_id ) { + $this->controller->delete_post_atf( $post_id ); + } + + /** + * Delete ATF row on update or delete term. + * + * @param int $term_id the term ID. + * + * @return void + */ + public function delete_term_atf( $term_id ) { + $this->controller->delete_term_atf( $term_id ); + } +} diff --git a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php index 7b2d1a8bd8..4b832c7696 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php @@ -84,4 +84,38 @@ public function maybe_trigger_recreate_table() { delete_option( $this->db_version_key ); } + + /** + * Remove all completed rows. + * + * @return bool|int + */ + public function remove_all_completed_rows() { + if ( ! $this->exists() ) { + return false; + } + + // Get the database interface. + $db = $this->get_db(); + + // Bail if no database interface is available. + if ( empty( $db ) ) { + return false; + } + + $prefixed_table_name = $this->apply_prefix( $this->table_name ); + return $db->query( "DELETE FROM `$prefixed_table_name` WHERE status IN ( 'failed', 'completed' )" ); + } + + /** + * Truncate DB table. + * + * @return bool + */ + public function truncate(): bool { + if ( ! $this->exists() ) { + return false; + } + return $this->truncate(); + } } diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index 16dc494d27..cd81b5b3eb 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -7,8 +7,8 @@ use WP_Rocket\Engine\Media\AboveTheFold\Context\Context; use WP_Rocket\Engine\Media\AboveTheFold\Database\Tables\AboveTheFold as ATFTable; use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; -use WP_Rocket\Engine\Media\AboveTheFold\Frontend\Controller as FrontController; -use WP_Rocket\Engine\Media\AboveTheFold\Frontend\Subscriber as FrontSubscriber; +use WP_Rocket\Engine\Media\AboveTheFold\Admin\{Controller as AdminController, Subscriber as AdminSubscriber}; +use WP_Rocket\Engine\Media\AboveTheFold\Frontend\{Controller as FrontController, Subscriber as FrontSubscriber}; class ServiceProvider extends AbstractServiceProvider { /** @@ -26,6 +26,8 @@ class ServiceProvider extends AbstractServiceProvider { 'atf_context', 'atf_controller', 'atf_subscriber', + 'atf_admin_controller', + 'atf_admin_subscriber', ]; /** @@ -45,5 +47,11 @@ public function register() { ->addArgument( $this->getContainer()->get( 'atf_context' ) ); $this->getContainer()->share( 'atf_subscriber', FrontSubscriber::class ) ->addArgument( $this->getContainer()->get( 'atf_controller' ) ); + $this->getContainer()->add( 'atf_admin_controller', AdminController::class ) + ->addArgument( $this->getContainer()->get( 'atf_table' ) ) + ->addArgument( $this->getContainer()->get( 'atf_query' ) ) + ->addArgument( $this->getContainer()->get( 'atf_context' ) ); + $this->getContainer()->share( 'atf_admin_subscriber', AdminSubscriber::class ) + ->addArgument( $this->getContainer()->get( 'atf_admin_controller' ) ); } } diff --git a/inc/Plugin.php b/inc/Plugin.php index 49a4ef1af7..d558b7ea73 100644 --- a/inc/Plugin.php +++ b/inc/Plugin.php @@ -384,6 +384,7 @@ private function init_common_subscribers() { 'shoptimizer', 'weglot', 'atf_subscriber', + 'atf_admin_subscriber', 'contactform7', ]; diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php new file mode 100644 index 0000000000..b37bab0f12 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php @@ -0,0 +1,28 @@ + [ + 'config' => [ + 'filter' => false, + 'post_id' => 1, + 'url' => 'http://example.org', + ], + 'expected' => false, + ], + 'testShoulDoNothingURLFalse' => [ + 'config' => [ + 'filter' => true, + 'post_id' => 1, + 'url' => false, + ], + 'expected' => false, + ], + 'testShoulDeletePost' => [ + 'config' => [ + 'filter' => true, + 'post_id' => 1, + 'url' => 'http://example.org', + ], + 'expected' => true, + ], +]; diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php new file mode 100644 index 0000000000..ad1da21714 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php @@ -0,0 +1,28 @@ + [ + 'config' => [ + 'filter' => false, + 'term_id' => 1, + 'url' => 'http://example.org/term', + ], + 'expected' => false, + ], + 'testShoulDoNothingURLFalse' => [ + 'config' => [ + 'filter' => true, + 'term_id' => 1, + 'url' => false, + ], + 'expected' => false, + ], + 'testShoulDeleteTerm' => [ + 'config' => [ + 'filter' => true, + 'term_id' => 1, + 'url' => 'http://example.org/term', + ], + 'expected' => true, + ], +]; diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php new file mode 100644 index 0000000000..40523d905e --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php @@ -0,0 +1,25 @@ + [ + 'config' => [ + 'filter' => false, + 'not_completed' => 1, + ], + 'expected' => false, + ], + 'testShoulDoPartialWhenNotCompletedRows' => [ + 'config' => [ + 'filter' => true, + 'not_completed' => 1, + ], + 'expected' => 'partial', + ], + 'testShoulDoTruncate' => [ + 'config' => [ + 'filter' => true, + 'not_completed' => 0, + ], + 'expected' => 'truncate', + ], +]; diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php new file mode 100644 index 0000000000..2661170fc5 --- /dev/null +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php @@ -0,0 +1,55 @@ +query = $this->createMock( ATFQuery::class ); + $this->table = $this->createMock( ATFTable::class ); + $this->context = Mockery::mock( Context::class ); + $this->controller = new Controller( $this->table, $this->query, $this->context ); + } + + /** + * @dataProvider configTestData + */ + public function testShouldDoExpected( $config, $expected ) { + $this->context->shouldReceive( 'is_allowed' ) + ->atMost() + ->once() + ->andReturn( $config['filter'] ); + + Functions\when( 'get_permalink' )->justReturn( $config['url'] ); + + if ( $expected ) { + $this->query->expects( $this->once() ) + ->method( 'delete_by_url' ) + ->with( $config['url'] ); + } else { + $this->query->expects( $this->never() ) + ->method( 'delete_by_url' ); + } + + $this->controller->delete_post_atf( $config['post_id'] ); + } +} diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php new file mode 100644 index 0000000000..063f470b2f --- /dev/null +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php @@ -0,0 +1,56 @@ +query = $this->createMock( ATFQuery::class ); + $this->table = $this->createMock( ATFTable::class ); + $this->context = Mockery::mock( Context::class ); + $this->controller = new Controller( $this->table, $this->query, $this->context ); + } + + /** + * @dataProvider configTestData + */ + public function testShouldDoExpected( $config, $expected ) { + $this->context->shouldReceive( 'is_allowed' ) + ->atMost() + ->once() + ->andReturn( $config['filter'] ); + + Functions\when( 'get_term_link' )->justReturn( $config['url'] ); + Functions\when( 'is_wp_error' )->justReturn( ! $expected ); + + if ( $expected ) { + $this->query->expects( $this->once() ) + ->method( 'delete_by_url' ) + ->with( $config['url'] ); + } else { + $this->query->expects( $this->never() ) + ->method( 'delete_by_url' ); + } + + $this->controller->delete_term_atf( $config['term_id'] ); + } +} diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php new file mode 100644 index 0000000000..684185db58 --- /dev/null +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php @@ -0,0 +1,60 @@ +query = $this->createMock( ATFQuery::class ); + $this->table = $this->createMock( ATFTable::class ); + $this->context = Mockery::mock( Context::class ); + $this->controller = new Controller( $this->table, $this->query, $this->context ); + } + + /** + * @dataProvider configTestData + */ + public function testShouldDoExpected( $config, $expected ) { + $this->context->shouldReceive( 'is_allowed' ) + ->atMost() + ->once() + ->andReturn( $config['filter'] ); + + if ( ! $expected ) { + $this->query->expects( $this->never() ) + ->method( 'get_not_completed_count' ); + } else { + $this->query->expects( $this->once() ) + ->method( 'get_not_completed_count' ) + ->willReturn( $config['not_completed'] ); + + if ( 'partial' === $expected ) { + $this->table->expects( $this->once() ) + ->method( 'remove_all_completed_rows' ); + } elseif ( 'truncate' === $expected ) { + $this->table->expects( $this->once() ) + ->method( 'truncate' ); + } + } + + $this->controller->truncate_atf(); + } +} From b0d1b4e7ab95a6827e1f30270d856a5573a8763a Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:18:05 +0100 Subject: [PATCH 006/167] Closes #6281: Task/lcp refactor rucss api cron queue (#6307) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémy Perona Co-authored-by: Rémy Perona --- inc/3rd-party/plugins/nginx-helper.php | 2 +- inc/Addon/Varnish/Subscriber.php | 2 +- inc/Engine/Cache/PurgeActionsSubscriber.php | 2 +- .../Common/Database/Queries/AbstractQuery.php | 245 +++++--- inc/Engine/Common/Database/TableInterface.php | 40 ++ .../Common/Database/Tables/AbstractTable.php | 140 +++++ .../JobManager/APIHandler}/APIClient.php | 26 +- .../APIHandler}/AbstractAPIClient.php | 3 +- .../AbstractFactory/SaasFactory.php | 23 + .../Common/JobManager/Cron/Subscriber.php | 338 ++++++++++ inc/Engine/Common/JobManager/JobProcessor.php | 585 ++++++++++++++++++ .../JobManager/Managers/AbstractManager.php | 223 +++++++ .../JobManager/Managers/ManagerInterface.php | 49 ++ .../JobManager/Queue}/Queue.php | 18 +- .../Common/JobManager/ServiceProvider.php | 81 +++ .../Strategy/Context/RetryContext.php | 4 +- .../Strategy/Factory/StrategyFactory.php | 64 ++ .../Strategy/Strategies/DefaultProcess.php | 32 +- .../Strategy/Strategies/JobSetFail.php | 45 ++ .../Strategy/Strategies/ResetRetryProcess.php | 38 ++ .../Strategy/Strategies/StrategyInterface.php | 2 +- .../Media/AboveTheFold/Context/Context.php | 5 + .../Database/Queries/AboveTheFold.php | 43 +- .../Database/Rows/AboveTheFold.php | 38 +- .../Database/Schemas/AboveTheFold.php | 10 + .../Database/Tables/AboveTheFold.php | 57 +- .../AboveTheFold/Frontend/Controller.php | 33 +- .../Media/AboveTheFold/Jobs/Factory.php | 54 ++ .../Media/AboveTheFold/Jobs/Manager.php | 153 +++++ .../Media/AboveTheFold/ServiceProvider.php | 32 +- .../Optimization/RUCSS/Admin/Database.php | 4 +- .../Optimization/RUCSS/Admin/Subscriber.php | 10 +- .../RUCSS/Context/RUCSSContextSaas.php | 23 + .../Optimization/RUCSS/Controller/UsedCSS.php | 382 +----------- .../Optimization/RUCSS/Cron/Subscriber.php | 286 +-------- .../RUCSS/Database/Queries/UsedCSS.php | 35 +- .../RUCSS/Database/Tables/UsedCSS.php | 160 +---- .../Optimization/RUCSS/Jobs/Factory.php | 54 ++ .../Optimization/RUCSS/Jobs/Manager.php | 222 +++++++ .../Optimization/RUCSS/ServiceProvider.php | 72 +-- .../Strategy/Factory/StrategyFactory.php | 73 --- .../RUCSS/Strategy/Strategies/JobSetFail.php | 45 -- .../Strategy/Strategies/ResetRetryProcess.php | 43 -- inc/Engine/Preload/Subscriber.php | 3 +- inc/Plugin.php | 5 +- inc/ThirdParty/Hostings/Kinsta.php | 2 +- inc/ThirdParty/Hostings/SpinUpWP.php | 2 +- inc/ThirdParty/Plugins/CDN/Cloudflare.php | 2 +- .../Plugins/I18n/TranslatePress.php | 2 +- uninstall.php | 2 + 50 files changed, 2623 insertions(+), 1191 deletions(-) create mode 100644 inc/Engine/Common/Database/TableInterface.php create mode 100644 inc/Engine/Common/Database/Tables/AbstractTable.php rename inc/Engine/{Optimization/RUCSS/Frontend => Common/JobManager/APIHandler}/APIClient.php (82%) rename inc/Engine/{Optimization/RUCSS => Common/JobManager/APIHandler}/AbstractAPIClient.php (96%) create mode 100644 inc/Engine/Common/JobManager/AbstractFactory/SaasFactory.php create mode 100644 inc/Engine/Common/JobManager/Cron/Subscriber.php create mode 100644 inc/Engine/Common/JobManager/JobProcessor.php create mode 100644 inc/Engine/Common/JobManager/Managers/AbstractManager.php create mode 100644 inc/Engine/Common/JobManager/Managers/ManagerInterface.php rename inc/Engine/{Optimization/RUCSS/Controller => Common/JobManager/Queue}/Queue.php (68%) create mode 100644 inc/Engine/Common/JobManager/ServiceProvider.php rename inc/Engine/{Optimization/RUCSS => Common/JobManager}/Strategy/Context/RetryContext.php (81%) create mode 100644 inc/Engine/Common/JobManager/Strategy/Factory/StrategyFactory.php rename inc/Engine/{Optimization/RUCSS => Common/JobManager}/Strategy/Strategies/DefaultProcess.php (68%) create mode 100644 inc/Engine/Common/JobManager/Strategy/Strategies/JobSetFail.php create mode 100644 inc/Engine/Common/JobManager/Strategy/Strategies/ResetRetryProcess.php rename inc/Engine/{Optimization/RUCSS => Common/JobManager}/Strategy/Strategies/StrategyInterface.php (81%) create mode 100644 inc/Engine/Media/AboveTheFold/Jobs/Factory.php create mode 100644 inc/Engine/Media/AboveTheFold/Jobs/Manager.php create mode 100644 inc/Engine/Optimization/RUCSS/Context/RUCSSContextSaas.php create mode 100644 inc/Engine/Optimization/RUCSS/Jobs/Factory.php create mode 100644 inc/Engine/Optimization/RUCSS/Jobs/Manager.php delete mode 100644 inc/Engine/Optimization/RUCSS/Strategy/Factory/StrategyFactory.php delete mode 100644 inc/Engine/Optimization/RUCSS/Strategy/Strategies/JobSetFail.php delete mode 100644 inc/Engine/Optimization/RUCSS/Strategy/Strategies/ResetRetryProcess.php diff --git a/inc/3rd-party/plugins/nginx-helper.php b/inc/3rd-party/plugins/nginx-helper.php index cb565ebe86..e6726a88fe 100644 --- a/inc/3rd-party/plugins/nginx-helper.php +++ b/inc/3rd-party/plugins/nginx-helper.php @@ -153,6 +153,6 @@ function rocket_clean_nginx_helper_cache() { * @since 3.12.3 */ add_action( 'rocket_rucss_after_clearing_usedcss', 'rocket_clean_nginx_cache_url' ); - add_action( 'rocket_rucss_complete_job_status', 'rocket_clean_nginx_helper_cache' ); + add_action( 'rocket_saas_complete_job_status', 'rocket_clean_nginx_helper_cache' ); endif; diff --git a/inc/Addon/Varnish/Subscriber.php b/inc/Addon/Varnish/Subscriber.php index 2a48fd9e5f..6b1e9fa1d8 100644 --- a/inc/Addon/Varnish/Subscriber.php +++ b/inc/Addon/Varnish/Subscriber.php @@ -44,7 +44,7 @@ public static function get_subscribed_events() { 'before_rocket_clean_file' => [ 'clean_file' ], 'rocket_rucss_after_clearing_usedcss' => [ 'clean_file' ], 'before_rocket_clean_home' => [ 'clean_home', 10, 2 ], - 'rocket_rucss_complete_job_status' => [ 'clean_file' ], + 'rocket_saas_complete_job_status' => [ 'clean_file' ], ]; } diff --git a/inc/Engine/Cache/PurgeActionsSubscriber.php b/inc/Engine/Cache/PurgeActionsSubscriber.php index e3df5a823c..bed2dcae19 100644 --- a/inc/Engine/Cache/PurgeActionsSubscriber.php +++ b/inc/Engine/Cache/PurgeActionsSubscriber.php @@ -53,7 +53,7 @@ public static function get_subscribed_events() { [ 'purge_dates_archives' ], [ 'purge_post_terms_urls' ], ], - 'rocket_rucss_complete_job_status' => [ 'purge_url_cache', 100 ], + 'rocket_saas_complete_job_status' => [ 'purge_url_cache', 100 ], 'rocket_rucss_after_clearing_usedcss' => 'purge_url_cache', 'rocket_after_save_dynamic_lists' => 'purge_cache_after_saving_dynamic_lists', 'update_option_' . $slug => [ 'purge_cache_reject_uri_partially', 10, 2 ], diff --git a/inc/Engine/Common/Database/Queries/AbstractQuery.php b/inc/Engine/Common/Database/Queries/AbstractQuery.php index 889378b021..6dfa0d7ca2 100644 --- a/inc/Engine/Common/Database/Queries/AbstractQuery.php +++ b/inc/Engine/Common/Database/Queries/AbstractQuery.php @@ -40,6 +40,31 @@ public function get_row( string $url, bool $is_mobile = false ) { return $query[0]; } + /** + * Get single row by ID. + * + * @param int $row_id DB Row ID. + * + * @return array|false + */ + public function get_row_by_id( int $row_id ) { + if ( ! self::$table_exists && ! $this->table_exists() ) { + return false; + } + + $query = $this->query( + [ + 'id' => $row_id, + ] + ); + + if ( empty( $query ) ) { + return false; + } + + return $query; + } + /** * Get all rows with the same url (desktop and mobile versions). * @@ -162,11 +187,6 @@ public function get_pending_jobs( int $count = 100 ) { [ 'number' => ( $count - $inprogress_count ), 'status' => 'pending', - 'fields' => [ - 'id', - 'url', - 'next_retry_time', - ], 'job_id__not_in' => [ 'not_in' => '', ], @@ -179,18 +199,23 @@ public function get_pending_jobs( int $count = 100 ) { /** * Increment retries number and change status back to pending. * - * @param int $id DB row ID. - * @param int $error_code error code. - * @param string $error_message error message. + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $error_code error code. + * @param string $error_message error message. * - * @return bool + * @return bool|int */ - public function increment_retries( $id, int $error_code, string $error_message ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { + public function increment_retries( string $url, bool $is_mobile, string $error_code, string $error_message ) { + if ( ! $this->is_allowed() ) { return false; } - $old = $this->get_item( $id ); + $db = $this->get_db(); + + $prefixed_table_name = $db->prefix . $this->table_name; + + $old = $this->get_row( $url, $is_mobile ); $retries = 0; $previous_message = ''; @@ -200,13 +225,18 @@ public function increment_retries( $id, int $error_code, string $error_message ) $previous_message = $old->error_message; } - $update_data = [ + $data = [ 'retries' => $retries + 1, 'status' => 'pending', 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$error_code}: {$error_message}", ]; - return $this->update_item( $id, $update_data ); + $where = [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + ]; + + return $db->update( $prefixed_table_name, $data, $where ); } /** @@ -229,21 +259,24 @@ public function update_job_id( $id, $new_job_id ) { /** * Change the status to be in-progress. * - * @param int $id DB row ID. - * - * @return bool + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @return bool|int */ - public function make_status_inprogress( int $id ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { + public function make_status_inprogress( string $url, bool $is_mobile ) { + if ( ! $this->is_allowed() ) { return false; } - return $this->update_item( - $id, - [ - 'status' => 'in-progress', - ] - ); + $db = $this->get_db(); + + $prefixed_table_name = $db->prefix . $this->table_name; + $where = [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + ]; + + return $db->update( $prefixed_table_name, [ 'status' => 'in-progress' ], $where ); } /** @@ -276,29 +309,38 @@ public function reset_job( int $id, string $job_id = '' ) { /** * Change the status to be failed. * - * @param int $id DB row ID. - * @param string $error_code error code. - * @param string $error_message error message. + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $error_code error code. + * @param string $error_message error message. * - * @return bool + * @return bool|int */ - public function make_status_failed( int $id, string $error_code, string $error_message ) { - if ( ! self::$table_exists && ! $this->table_exists() ) { + public function make_status_failed( string $url, bool $is_mobile, string $error_code, string $error_message ) { + if ( ! $this->is_allowed() ) { return false; } - $old = $this->get_item( $id ); + $db = $this->get_db(); + + $prefixed_table_name = $db->prefix . $this->table_name; + + $old = $this->get_row( $url, $is_mobile ); $previous_message = $old ? $old->error_message : ''; - return $this->update_item( - $id, - [ - 'status' => 'failed', - 'error_code' => $error_code, - 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$error_code}: {$error_message}", - ] - ); + $data = [ + 'status' => 'failed', + 'error_code' => $error_code, + 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$error_code}: {$error_message}", + ]; + + $where = [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + ]; + + return $db->update( $prefixed_table_name, $data, $where ); } /** @@ -473,34 +515,87 @@ protected function table_exists(): bool { return $exists; } + /** + * Change the status to be pending. + * + * @param string $url DB row url. + * @param string $job_id API job_id. + * @param string $queue_name API Queue name. + * @param bool $is_mobile if the request is for mobile page. + * @return bool|int + */ + public function make_status_pending( string $url, string $job_id = '', string $queue_name = '', bool $is_mobile = false ) { + if ( ! $this->is_allowed() ) { + return false; + } + + $db = $this->get_db(); + + $prefixed_table_name = $db->prefix . $this->table_name; + $data = [ + 'job_id' => $job_id, + 'queue_name' => $queue_name, + 'status' => 'pending', + 'is_mobile' => $is_mobile, + 'submitted_at' => current_time( 'mysql', true ), + ]; + + $where = [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + ]; + + return $db->update( $prefixed_table_name, $data, $where ); + } + /** * Update the error message. * - * @param int $job_id Job ID. - * @param int $code Response code. - * @param string $message Response message. - * @param string $previous_message Previous saved message. + * @param string $url DB row url. + * @param boolean $is_mobile Is mobile from DB row. + * @param int $code Response code. + * @param string $message Response message. + * @param string $previous_message Previous saved message. * - * @return int|bool + * @return bool|int */ - public function update_message( int $job_id, int $code, string $message, string $previous_message = '' ) { - return $this->update_item( - $job_id, - [ - 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$code}: {$message}", - ] - ); + public function update_message( string $url, bool $is_mobile, int $code, string $message, string $previous_message = '' ) { + if ( ! $this->is_allowed() ) { + return false; + } + + $db = $this->get_db(); + + $prefixed_table_name = $db->prefix . $this->table_name; + + $data = [ 'error_message' => $previous_message . ' - ' . current_time( 'mysql', true ) . " {$code}: {$message}" ]; + + $where = [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + ]; + + return $db->update( $prefixed_table_name, $data, $where ); } /** * Updates the next_retry_time field * - * @param mixed $job_id the job id. + * @param string $url DB row url. + * @param boolean $is_mobile Is mobile from DB row. * @param string|int $next_retry_time timestamp or mysql format date. * - * @return int|bool either it is saved or not. + * @return bool|int either it is saved or not. */ - public function update_next_retry_time( $job_id, $next_retry_time ) { + public function update_next_retry_time( string $url, bool $is_mobile, $next_retry_time ) { + if ( ! $this->is_allowed() ) { + return false; + } + + $db = $this->get_db(); + + $prefixed_table_name = $db->prefix . $this->table_name; + if ( is_string( $next_retry_time ) && strtotime( $next_retry_time ) ) { // If $next_retry_time is a valid date string, convert it to a timestamp. $next_retry_time = strtotime( $next_retry_time ); @@ -509,37 +604,31 @@ public function update_next_retry_time( $job_id, $next_retry_time ) { return false; } - return $this->update_item( - $job_id, - [ - 'next_retry_time' => gmdate( 'Y-m-d H:i:s', $next_retry_time ), - ] - ); + $data = [ 'next_retry_time' => gmdate( 'Y-m-d H:i:s', $next_retry_time ) ]; + + $where = [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + ]; + + return $db->update( $prefixed_table_name, $data, $where ); } /** - * Change the status to be pending. + * Check if db action can be processed. * - * @param int $id DB row ID. - * @param string $job_id API job_id. - * @param string $queue_name API Queue name. - * @param bool $is_mobile if the request is for mobile page. - * @return bool + * @return boolean */ - public function make_status_pending( int $id, string $job_id = '', string $queue_name = '', bool $is_mobile = false ) { + private function is_allowed() { if ( ! self::$table_exists && ! $this->table_exists() ) { return false; } - return $this->update_item( - $id, - [ - 'job_id' => $job_id, - 'queue_name' => $queue_name, - 'status' => 'pending', - 'is_mobile' => $is_mobile, - 'submitted_at' => current_time( 'mysql', true ), - ] - ); + // Bail if no database interface is available. + if ( empty( $this->get_db() ) ) { + return false; + } + + return true; } } diff --git a/inc/Engine/Common/Database/TableInterface.php b/inc/Engine/Common/Database/TableInterface.php new file mode 100644 index 0000000000..17715f8f8b --- /dev/null +++ b/inc/Engine/Common/Database/TableInterface.php @@ -0,0 +1,40 @@ +schema_data ) { + return; + } + + $this->schema = $this->schema_data; + } + + /** + * Delete all rows which were not accessed in the last month. + * + * @return bool|int + */ + public function delete_old_rows() { + if ( ! $this->exists() ) { + return false; + } + // Get the database interface. + $db = $this->get_db(); + + // Bail if no database interface is available. + if ( empty( $db ) ) { + return false; + } + + /** + * Filters the old RUCSS deletion interval + * + * @param int $delete_interval Old RUCSS deletion interval in months + */ + $delete_interval = (int) apply_filters( 'rocket_rucss_delete_interval', 1 ); + + if ( $delete_interval <= 0 ) { + return false; + } + + $prefixed_table_name = $this->apply_prefix( $this->table_name ); + $query = "DELETE FROM `$prefixed_table_name` WHERE `last_accessed` <= date_sub(now(), interval $delete_interval month)"; + $rows_affected = $db->query( $query ); + + return $rows_affected; + } + + /** + * Get all rows which were not accessed in the last month. + * + * @return array + */ + public function get_old_rows(): array { + if ( ! $this->exists() ) { + return false; + } + // Get the database interface. + $db = $this->get_db(); + + // Bail if no database interface is available. + if ( empty( $db ) ) { + return false; + } + + $prefixed_table_name = $this->apply_prefix( $this->table_name ); + $query = "SELECT * FROM `$prefixed_table_name` WHERE `last_accessed` <= date_sub(now(), interval 1 month)"; + $rows_affected = $db->get_results( $query ); + + return $rows_affected; + } + + /** + * Remove all completed rows. + * + * @return bool|int + */ + public function remove_all_completed_rows() { + if ( ! $this->exists() ) { + return false; + } + // Get the database interface. + $db = $this->get_db(); + + // Bail if no database interface is available. + if ( empty( $db ) ) { + return false; + } + + $prefixed_table_name = $this->apply_prefix( $this->table_name ); + return $db->query( "DELETE FROM `$prefixed_table_name` WHERE status IN ( 'failed', 'completed' )" ); + } + + /** + * Returns name from table. + * + * @return string + */ + public function get_name() { + return $this->apply_prefix( $this->table_name ); + } + + /** + * Trigger recreation of cache table if not exist. + * + * @return void + */ + public function maybe_trigger_recreate_table() { + if ( $this->exists() ) { + return; + } + + delete_option( $this->db_version_key ); + } +} diff --git a/inc/Engine/Optimization/RUCSS/Frontend/APIClient.php b/inc/Engine/Common/JobManager/APIHandler/APIClient.php similarity index 82% rename from inc/Engine/Optimization/RUCSS/Frontend/APIClient.php rename to inc/Engine/Common/JobManager/APIHandler/APIClient.php index 9820afcf23..de4bec1bff 100644 --- a/inc/Engine/Optimization/RUCSS/Frontend/APIClient.php +++ b/inc/Engine/Common/JobManager/APIHandler/APIClient.php @@ -1,9 +1,9 @@ 'failed', 'message' => 'No message. Defaulted in get_queue_job_status', 'contents' => [ - 'success' => false, - 'shakedCSS' => '', + 'success' => false, + 'shakedCSS' => '', + 'above_the_fold_result' => [ + 'lcp' => [], + 'images_above_fold' => [], + ], ], ]; diff --git a/inc/Engine/Optimization/RUCSS/AbstractAPIClient.php b/inc/Engine/Common/JobManager/APIHandler/AbstractAPIClient.php similarity index 96% rename from inc/Engine/Optimization/RUCSS/AbstractAPIClient.php rename to inc/Engine/Common/JobManager/APIHandler/AbstractAPIClient.php index 002b57fba5..5a35b33850 100644 --- a/inc/Engine/Optimization/RUCSS/AbstractAPIClient.php +++ b/inc/Engine/Common/JobManager/APIHandler/AbstractAPIClient.php @@ -1,11 +1,12 @@ job_processor = $job_processor; + $this->factories = $factories; + } + + /** + * Return an array of events that this subscriber listens to. + * + * @return array + */ + public static function get_subscribed_events(): array { + return [ + 'rocket_saas_pending_jobs' => 'process_pending_jobs', + 'rocket_saas_on_submit_jobs' => 'process_on_submit_jobs', + 'rocket_saas_job_check_status' => [ 'check_job_status', 10, 3 ], + 'rocket_saas_clean_rows_time_event' => 'cron_clean_rows', + 'cron_schedules' => 'add_interval', + 'rocket_deactivation' => 'on_deactivation', + 'rocket_remove_saas_failed_jobs' => 'cron_remove_failed_jobs', + 'init' => [ + [ 'schedule_clean_not_commonly_used_rows' ], + [ 'schedule_pending_jobs' ], + [ 'initialize_rucss_queue_runner' ], + [ 'schedule_removing_failed_jobs' ], + [ 'schedule_on_submit_jobs' ], + ], + 'wp_rocket_upgrade' => [ 'unschedule_rucss_cron', 13, 2 ], + ]; + } + + /** + * Schedules cron to clean not commonly used rows. + * + * @since 3.9 + * + * @return void + */ + public function schedule_clean_not_commonly_used_rows() { + if ( ! $this->job_processor->is_allowed() ) { + return; + } + + if ( wp_next_scheduled( 'rocket_saas_clean_rows_time_event' ) ) { + return; + } + + wp_schedule_event( time(), 'weekly', 'rocket_saas_clean_rows_time_event' ); + } + + /** + * Initialize the queue runner for our SaaS. + * + * @return void + */ + public function initialize_rucss_queue_runner() { + if ( ! $this->job_processor->is_allowed() ) { + return; + } + + RUCSSQueueRunner::instance()->init(); + } + + /** + * Process pending jobs with Cron iteration. + * + * @return void + */ + public function process_pending_jobs() { + $this->job_processor->process_pending_jobs(); + } + + /** + * Process on submit jobs with Cron iteration. + * + * @return void + */ + public function process_on_submit_jobs() { + $this->job_processor->process_on_submit_jobs(); + } + + /** + * Cron callback for deleting old rows in both table databases. + * + * @since 3.9 + * + * @return void + */ + public function cron_clean_rows() { + if ( ! $this->is_deletion_enabled() ) { + return; + } + + foreach ( $this->factories as $factory ) { + if ( $factory->manager()->is_allowed() ) { + $factory->table()->delete_old_rows(); + } + } + } + + /** + * Cron callback for removing failed jobs. + * + * @return void + */ + public function cron_remove_failed_jobs() { + $this->job_processor->clear_failed_urls(); + } + + /** + * Handle job status by DB url and is_mobile. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $optimization_type The type of optimization request to send. + * + * @return void + */ + public function check_job_status( string $url, bool $is_mobile, string $optimization_type ) { + $this->job_processor->check_job_status( $url, $is_mobile, $optimization_type ); + } + + /** + * Adds new interval for SaaS pending jobs cron + * + * @since 3.11.3 + * + * @param array[] $schedules An array of non-default cron schedule arrays. + * + * @return array + */ + public function add_interval( $schedules ) { + if ( ! $this->job_processor->is_allowed() ) { + return $schedules; + } + + /** + * Filters the cron interval. + * + * @since 3.11 + * + * @param int $interval Interval in seconds. + */ + $interval = apply_filters( 'rocket_saas_pending_jobs_cron_interval', 1 * rocket_get_constant( 'MINUTE_IN_SECONDS', 60 ) ); + + $schedules['rocket_saas_pending_jobs'] = [ + 'interval' => $interval, + 'display' => esc_html__( 'WP Rocket process pending jobs', 'rocket' ), + ]; + + $default_interval = 3 * rocket_get_constant( 'DAY_IN_SECONDS', 86400 ); + /** + * Filters the cron interval for clearing failed jobs. + * + * @param int $interval Interval in seconds. + */ + $interval = apply_filters( 'rocket_remove_saas_failed_jobs_cron_interval', $default_interval ); + $interval = (bool) $interval ? $interval : $default_interval; + + $schedules['rocket_remove_saas_failed_jobs'] = [ + 'interval' => $interval, + 'display' => esc_html__( 'WP Rocket clear failed jobs', 'rocket' ), + ]; + + /** + * Filters the cron interval for processing on submit jobs. + * + * @param int $interval Interval in seconds. + */ + $interval = (int) apply_filters( 'rocket_remove_saas_on_submit_jobs_cron_interval', 1 * rocket_get_constant( 'MINUTE_IN_SECONDS', 60 ) ); + + $schedules['rocket_saas_on_submit_jobs'] = [ + 'interval' => $interval, + 'display' => esc_html__( 'WP Rocket process on submit jobs', 'rocket' ), + ]; + + return $schedules; + } + + /** + * Schedule on submit jobs. + * + * @return void + */ + public function schedule_on_submit_jobs() { + if ( + ! $this->job_processor->is_allowed() + && + wp_next_scheduled( 'rocket_saas_on_submit_jobs' ) + ) { + wp_clear_scheduled_hook( 'rocket_saas_on_submit_jobs' ); + + return; + } + + if ( ! $this->job_processor->is_allowed() ) { + return; + } + + if ( wp_next_scheduled( 'rocket_saas_on_submit_jobs' ) ) { + return; + } + + wp_schedule_event( time(), 'rocket_saas_on_submit_jobs', 'rocket_saas_on_submit_jobs' ); + } + + /** + * Schedules cron to get SaaS pendings jobs. + * + * @since 3.11.3 + * + * @return void + */ + public function schedule_pending_jobs() { + if ( + ! $this->job_processor->is_allowed() + && + wp_next_scheduled( 'rocket_saas_pending_jobs' ) + ) { + wp_clear_scheduled_hook( 'rocket_saas_pending_jobs' ); + + return; + } + + if ( ! $this->job_processor->is_allowed() ) { + return; + } + + if ( wp_next_scheduled( 'rocket_saas_pending_jobs' ) ) { + return; + } + + wp_schedule_event( time(), 'rocket_saas_pending_jobs', 'rocket_saas_pending_jobs' ); + } + + /** + * Schedules cron to remove failed jobs. + * + * @return void + */ + public function schedule_removing_failed_jobs() { + if ( + ! $this->job_processor->is_allowed() + && + wp_next_scheduled( 'rocket_remove_saas_failed_jobs' ) + ) { + wp_clear_scheduled_hook( 'rocket_remove_saas_failed_jobs' ); + + return; + } + + if ( ! $this->job_processor->is_allowed() ) { + return; + } + + if ( wp_next_scheduled( 'rocket_remove_saas_failed_jobs' ) ) { + return; + } + + wp_schedule_event( time(), 'rocket_remove_saas_failed_jobs', 'rocket_remove_saas_failed_jobs' ); + } + + /** + * Clear schedule of SaaS CRONs on deactivation. + * + * @return void + */ + public function on_deactivation() { + wp_clear_scheduled_hook( 'action_scheduler_run_queue_rucss', [ 'WP Cron' ] ); + } + + /** + * Checks if the SaaS deletion is enabled. + * + * @return bool + */ + protected function is_deletion_enabled(): bool { + /** + * Filters the enable SaaS job deletion value + * + * @param bool $delete_saas_jobs True to enable deletion, false otherwise. + */ + return (bool) apply_filters( 'rocket_saas_deletion_enabled', true ); + } + + /** + * Unschedule old rucss crons. + * + * @since 3.16 + * + * @param string $new_version New plugin version. + * @param string $old_version Previous plugin version. + * + * @return void + */ + public function unschedule_rucss_cron( $new_version, $old_version ) { + if ( version_compare( $old_version, '3.16', '>=' ) ) { + return; + } + + wp_clear_scheduled_hook( 'rocket_rucss_on_submit_jobs' ); + wp_clear_scheduled_hook( 'rocket_rucss_pending_jobs' ); + wp_clear_scheduled_hook( 'rocket_remove_rucss_failed_jobs' ); + wp_clear_scheduled_hook( 'rocket_rucss_clean_rows_time_event' ); + } +} diff --git a/inc/Engine/Common/JobManager/JobProcessor.php b/inc/Engine/Common/JobManager/JobProcessor.php new file mode 100644 index 0000000000..ed907fe31f --- /dev/null +++ b/inc/Engine/Common/JobManager/JobProcessor.php @@ -0,0 +1,585 @@ +factories = $factories; + $this->queue = $queue; + $this->strategy_factory = $strategy_factory; + $this->api = $api; + $this->wpr_clock = $clock; + } + + /** + * Determine if action is allowed. + * + * @return boolean + */ + public function is_allowed(): bool { + if ( ! $this->factories ) { + return false; + } + + $is_allowed = []; + + foreach ( $this->factories as $factory ) { + $is_allowed[] = $factory->manager()->is_allowed(); + } + + return (bool) array_sum( $is_allowed ); + } + + /** + * Process pending jobs inside cron iteration. + * + * @return void + */ + public function process_pending_jobs() { + if ( ! $this->is_allowed() ) { + $this->logger::debug( 'Stop processing cron iteration for pending jobs.' ); + + return; + } + + $this->logger::debug( 'Start processing pending jobs inside cron.' ); + + // Get some items from the DB with status=pending & job_id isn't empty. + + /** + * Filters the pending jobs count. + * + * @since 3.11 + * + * @param int $rows Number of rows to grab with each CRON iteration. + */ + $rows = apply_filters( 'rocket_saas_pending_jobs_cron_rows_count', 100 ); + + $pending_jobs = $this->get_jobs( $rows, 'pending' ); + + if ( ! $pending_jobs ) { + return; + } + + foreach ( $pending_jobs as $row ) { + $current_time = $this->wpr_clock->current_time( 'timestamp', true ); + if ( $row->next_retry_time < $current_time ) { + $optimization_type = $this->get_optimization_type( $row ); + // Change status to in-progress. + $this->make_status_inprogress( $row->url, $row->is_mobile, $optimization_type ); + $this->queue->add_job_status_check_async( $row->url, $row->is_mobile, $optimization_type ); + } + } + } + + /** + * Check job status by DB row ID. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $optimization_type The type of optimization request to send. + * + * @return void + */ + public function check_job_status( string $url, bool $is_mobile, string $optimization_type ) { + + $row_details = $this->get_single_job( $url, $is_mobile, $optimization_type ); + if ( ! $row_details ) { + $this->logger::debug( 'Url - ' . $url . ' not found for is_mobile - ' . (int) $is_mobile ); + // Nothing in DB, bailout. + return; + } + + // Send the request to get the job status from SaaS. + $job_details = $this->api->get_queue_job_status( $row_details->job_id, $row_details->queue_name, $this->is_home( $row_details->url ) ); + + foreach ( $this->factories as $factory ) { + $factory->manager()->validate_and_fail( $job_details, $row_details, $optimization_type ); + } + + if ( + 200 !== (int) $job_details['code'] + ) { + $this->logger::debug( 'Job status failed for url: ' . $row_details->url, $job_details ); + $this->decide_strategy( $row_details, $job_details, $optimization_type ); + + return; + } + /** + * Unlock preload URL. + * + * @param string $url URL to unlock + */ + do_action( 'rocket_preload_unlock_url', $row_details->url ); + + foreach ( $this->factories as $factory ) { + $factory->manager()->process( $job_details, $row_details, $optimization_type ); + } + + /** + * Fires after successfully processing the SaaS jobs. + * + * @param string $url Optimized Url. + * @param array $job_details Result of the request to get the job status from SaaS. + */ + do_action( 'rocket_saas_complete_job_status', $row_details->url, $job_details ); + } + + /** + * Process on submit jobs. + * + * @return void + */ + public function process_on_submit_jobs() { + + if ( ! $this->is_allowed() ) { + $this->logger::debug( 'Stop processing cron iteration for to-submit jobs.' ); + + return; + } + + /** + * Pending rows cont. + * + * @param int $count Number of rows. + */ + $pending_job = (int) apply_filters( 'rocket_saas_pending_jobs_cron_rows_count', 100 ); + + /** + * Maximum processing rows. + * + * @param int $max Max processing rows. + */ + $max_pending_rows = (int) apply_filters( 'rocket_saas_max_pending_jobs', 3 * $pending_job, $pending_job ); + $rows = $this->get_jobs( $max_pending_rows, 'submit' ); + + if ( ! $rows ) { + return; + } + + foreach ( $rows as $row ) { + $optimization_type = $this->get_optimization_type( $row ); + $response = $this->send_api( $row->url, (bool) $row->is_mobile, $optimization_type ); + + if ( false === $response || ! isset( $response['contents'], $response['contents']['jobId'], $response['contents']['queueName'] ) ) { + + $this->make_status_failed( $row->url, $row->is_mobile, '', '', $optimization_type ); + continue; + } + + /** + * Lock preload URL. + * + * @param string $url URL to lock + */ + do_action( 'rocket_preload_lock_url', $row->url ); + + $this->make_status_pending( + $row->url, + $response['contents']['jobId'], + $response['contents']['queueName'], + (bool) $row->is_mobile, + $optimization_type + ); + } + } + + /** + * Send the job to the API. + * + * @param string $url URL to work on. + * @param bool $is_mobile Is the page for mobile. + * @param string $optimization_type The type of optimization request to send. + * @return array|false + */ + protected function send_api( string $url, bool $is_mobile, string $optimization_type ) { + $config = [ + 'treeshake' => 1, + 'is_mobile' => $is_mobile, + 'is_home' => $this->is_home( $url ), + ]; + + $config = $this->set_request_params( $config, $optimization_type ); + + $add_to_queue_response = $this->api->add_to_queue( $url, $config ); + + if ( 200 !== $add_to_queue_response['code'] ) { + $this->logger::error( + 'Error when contacting the SaaS API.', + [ + 'SaaS error', + 'url' => $url, + 'code' => $add_to_queue_response['code'], + 'message' => $add_to_queue_response['message'], + ] + ); + + return false; + } + + return $add_to_queue_response; + } + + /** + * Set request parameters + * + * @param array $config Array of request parameters. + * @param string $optimization_type The type of optimization applied for the current job. + * @return array + */ + public function set_request_params( array $config, string $optimization_type ): array { + list($updated_config, $optimization_list, $request_param) = [ [], [], [] ]; + + foreach ( $this->factories as $factory ) { + if ( $optimization_type === $factory->manager()->get_optimization_type() ) { + $config = array_merge( $config, $factory->manager()->set_request_param() ); + + return $config; + } + + $request_param = $factory->manager()->set_request_param(); + + $optimization_list = array_merge( $optimization_list, $request_param['optimization_list'] ); + $updated_config = array_merge( $request_param, $updated_config ); + } + + if ( ! $updated_config ) { + $updated_config['optimization_list'] = $optimization_list; + } + + return $updated_config; + } + + /** + * Clear failed urls. + * + * @return void + */ + public function clear_failed_urls(): void { + /** + * Delay before failed saas jobs are deleted. + * + * @param string $delay delay before failed saas jobs are deleted. + */ + $delay = (string) apply_filters( 'rocket_delay_remove_saas_failed_jobs', '3 days' ); + + if ( '' === $delay || '0' === $delay ) { + $delay = '3 days'; + } + $parts = explode( ' ', $delay ); + + $value = 3; + $unit = 'days'; + + if ( count( $parts ) === 2 && $parts[0] >= 0 ) { + $value = (float) $parts[0]; + $unit = $parts[1]; + } + + foreach ( $this->factories as $factory ) { + if ( $factory->manager()->is_allowed() ) { + $failed_urls = $factory->manager()->clear_failed_jobs( $value, $unit ); + + $hook = 'rocket_' . $factory->manager()->get_optimization_type() . '_after_clearing_failed_url'; + + /** + * Fires after clearing failed urls. + * + * @param array $urls Failed urls. + */ + do_action( $hook, $failed_urls ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals + } + } + } + + /** + * Check if current page is the home page. + * + * @param string $url Current page url. + * + * @return bool + */ + private function is_home( string $url ): bool { + /** + * Filters the home url. + * + * @since 3.11.4 + * + * @param string $home_url home url. + * @param string $url url of current page. + */ + $home_url = apply_filters( 'rocket_saas_is_home_url', home_url(), $url ); + return untrailingslashit( $url ) === untrailingslashit( $home_url ); + } + + + /** + * Change the status to be in-progress. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $optimization_type The type of optimization applied for the current job. + * @return void + */ + private function make_status_inprogress( string $url, bool $is_mobile, string $optimization_type ): void { + foreach ( $this->factories as $factory ) { + $factory->manager()->make_status_inprogress( $url, $is_mobile, $optimization_type ); + } + } + + /** + * Get single job. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $optimization_type The type of optimization applied for the current job. + * + * @return bool|object + */ + private function get_single_job( string $url, bool $is_mobile, string $optimization_type ) { + $job = []; + + foreach ( $this->factories as $factory ) { + if ( $optimization_type === $factory->manager()->get_optimization_type() ) { + return $factory->manager()->get_single_job( $url, $is_mobile ); + } + } + + $job = $this->factories[0]->manager()->get_single_job( $url, $is_mobile ); + + return ( ! $job ? [] : $job ); + } + + /** + * Decide jobs to get. + * + * @param integer $num_rows Number of rows to grab with each CRON iteration. + * @param string $type Type of job to get. + * @return array + */ + public function get_jobs( int $num_rows, string $type ): array { + $allowed_types = [ 'pending', 'submit' ]; + + if ( ! in_array( $type, $allowed_types, true ) ) { + return []; + } + + $rows = []; + + switch ( $type ) { + case 'pending': + foreach ( $this->factories as $factory ) { + $rows = array_merge( $rows, $factory->manager()->get_pending_jobs( $num_rows ) ); + } + break; + case 'submit': + foreach ( $this->factories as $factory ) { + $rows = array_merge( $rows, $factory->manager()->get_on_submit_jobs( $num_rows ) ); + } + break; + } + + if ( ! $rows ) { + return []; + } + + // Get distinct rows. + return $this->get_distinct( $rows ); + } + + /** + * Get rows common to jobs. + * + * @param array $rows Merged DB Rows of jobs. + * @return array + */ + private function get_common_jobs( array $rows ): array { + list($occurrences, $duplicates) = [ [], [] ]; + + foreach ( $rows as $row ) { + $key = $row->url . '|' . ( (bool) $row->is_mobile ?? 'null' ); + + if ( ! isset( $occurrences[ $key ] ) ) { + $occurrences[ $key ] = 1; + + continue; + } + + ++$occurrences[ $key ]; + + if ( 2 === $occurrences[ $key ] ) { + // Add new is_common property to the object and add object to duplicate. + $row->is_common = true; + $duplicates[] = $row; + } + } + + return $duplicates; + } + + /** + * Get distinct rows merged from both jobs. + * + * @param array $rows Merged DB Rows of jobs. + * @return array + */ + private function get_distinct( array $rows ): array { + // Get jobs common to both optimizations. + $common_rows = $this->get_common_jobs( $rows ); + + if ( ! $common_rows ) { + return $rows; + } + + $index = 0; + + foreach ( $rows as $row ) { + foreach ( $common_rows as $common_row ) { + if ( $row->url === $common_row->url && (bool) $row->is_mobile === (bool) $common_row->is_mobile ) { + // Remove the common row that is without the new is_common property. + unset( $rows[ $index ] ); + } + } + + ++$index; + } + + return array_merge( $rows, $common_rows ); + } + + /** + * Get the optimization type requested. + * + * @param object $row DB Row. + * @return string + */ + public function get_optimization_type( $row ): string { + $optimization_type = 'all'; + + if ( isset( $row->is_common ) ) { + return $optimization_type; + } + + foreach ( $this->factories as $factory ) { + $type = $factory->manager()->get_optimization_type_from_row( $row ); + + if ( is_string( $type ) ) { + $optimization_type = $type; + break; + } + } + + return $optimization_type; + } + + /** + * Decide with job strategy to apply based on the optimization type. + * + * @param object $row_details DB Row of job. + * @param array $job_details Job details from the API. + * @param string $optimization_type The type of optimization applied for the current job. + * @return void + */ + private function decide_strategy( $row_details, array $job_details, string $optimization_type ): void { + foreach ( $this->factories as $factory ) { + if ( $optimization_type === $factory->manager()->get_optimization_type() ) { + $this->strategy_factory->manage( $row_details, $job_details, $factory->manager() ); + break; + } + + $this->strategy_factory->manage( $row_details, $job_details, $factory->manager() ); + } + } + + /** + * Change the job status to be failed. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $error_code error code. + * @param string $error_message error message. + * @param string $optimization_type The type of optimization applied for the current job. + * @return void + */ + private function make_status_failed( string $url, bool $is_mobile, string $error_code, string $error_message, $optimization_type ): void { + foreach ( $this->factories as $factory ) { + $factory->manager()->make_status_failed( $url, $is_mobile, $error_code, $error_message, $optimization_type ); + } + } + + /** + * Change the job status to be pending. + * + * @param string $url Url from DB row. + * @param string $job_id API job_id. + * @param string $queue_name API Queue name. + * @param boolean $is_mobile if the request is for mobile page. + * @param string $optimization_type The type of optimization applied for the current job. + * @return void + */ + private function make_status_pending( string $url, string $job_id, string $queue_name, bool $is_mobile, string $optimization_type ): void { + foreach ( $this->factories as $factory ) { + $factory->manager()->make_status_pending( $url, $job_id, $queue_name, $is_mobile, $optimization_type ); + } + } +} diff --git a/inc/Engine/Common/JobManager/Managers/AbstractManager.php b/inc/Engine/Common/JobManager/Managers/AbstractManager.php new file mode 100644 index 0000000000..f22c0749ae --- /dev/null +++ b/inc/Engine/Common/JobManager/Managers/AbstractManager.php @@ -0,0 +1,223 @@ +context->is_allowed() ) { + return false; + } + + if ( ! $optimization_type ) { + return true; + } + + return in_array( $optimization_type, [ 'all', $this->optimization_type ], true ); + } + + /** + * Query object. + * + * @return object + */ + public function query() { + return $this->query; + } + + /** + * Return type of optimization. + * + * @return string + */ + public function get_optimization_type(): string { + return $this->optimization_type; + } + + /** + * Send the request to add url into the queue. + * + * @param string $url page URL. + * @param bool $is_mobile page is for mobile. + * + * @return void + */ + public function add_url_to_the_queue( string $url, bool $is_mobile ): void { + if ( ! $this->is_allowed() ) { + return; + } + + $row = $this->query->get_row( $url, (bool) $is_mobile ); + + if ( empty( $row ) ) { + $this->query->create_new_job( $url, '', '', $is_mobile ); + return; + } + $this->query->reset_job( (int) $row->id ); + } + + /** + * Clear failed jobs. + * + * @param float $delay delay before the urls are deleted. + * @param string $unit unit from the delay. + * @return array + */ + public function clear_failed_jobs( float $delay, string $unit ): array { + $rows = $this->query->get_failed_rows( $delay, $unit ); + + if ( empty( $rows ) ) { + return []; + } + + $failed_urls = []; + + foreach ( $rows as $row ) { + $failed_urls[] = $row->url; + + $id = (int) $row->id; + + if ( empty( $id ) ) { + continue; + } + + $this->add_url_to_the_queue( $row->url, (bool) $row->is_mobile ); + } + + return $failed_urls; + } + + /** + * Change the status to be in-progress. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $optimization_type The type of optimization applied for the current job. + * @return void + */ + public function make_status_inprogress( string $url, bool $is_mobile, string $optimization_type ): void { + if ( ! $this->is_allowed( $optimization_type ) ) { + return; + } + + $this->query->make_status_inprogress( $url, $is_mobile ); + } + + /** + * Get single job. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @return bool|object + */ + public function get_single_job( string $url, bool $is_mobile ) { + return $this->query->get_row( $url, $is_mobile ); + } + + /** + * Get on submit jobs based on enabled option. + * + * @param integer $num_rows Number of rows to grab with each CRON iteration. + * @return array|int + */ + public function get_on_submit_jobs( int $num_rows ): array { + return $this->query->get_on_submit_jobs( $num_rows ); + } + + /** + * Change the job status to be failed. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $error_code error code. + * @param string $error_message error message. + * @param string $optimization_type The type of optimization applied for the current job. + * @return void + */ + public function make_status_failed( string $url, bool $is_mobile, string $error_code, string $error_message, string $optimization_type = '' ): void { + if ( ! $this->is_allowed( $optimization_type ) ) { + return; + } + + $this->query->make_status_failed( $url, $is_mobile, $error_code, $error_message ); + } + + /** + * Change the job status to be pending. + * + * @param string $url Url from DB row. + * @param string $job_id API job_id. + * @param string $queue_name API Queue name. + * @param boolean $is_mobile if the request is for mobile page. + * @param string $optimization_type The type of optimization applied for the current job. + * @return void + */ + public function make_status_pending( string $url, string $job_id, string $queue_name, bool $is_mobile, string $optimization_type ): void { + if ( ! $this->is_allowed( $optimization_type ) ) { + return; + } + + $this->query->make_status_pending( $url, $job_id, $queue_name, $is_mobile ); + } + + /** + * Increment retries number and change status back to pending. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $error_code error code. + * @param string $error_message error message. + * + * @return void + */ + public function increment_retries( string $url, bool $is_mobile, string $error_code, string $error_message ): void { + if ( ! $this->is_allowed() ) { + return; + } + + $this->query->increment_retries( $url, $is_mobile, $error_code, $error_message ); + } + + /** + * Update the error message. + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $error_code error code. + * @param string $error_message error message. + * @param string $previous_message Previous saved message. + * + * @return void + */ + public function update_message( string $url, bool $is_mobile, string $error_code, string $error_message, string $previous_message ): void { + if ( ! $this->is_allowed() ) { + return; + } + + $this->query->update_message( $url, $is_mobile, $error_code, $error_message, $previous_message ); + } + + /** + * Updates the next_retry_time field + * + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string|int $next_retry_time timestamp or mysql format date. + * + * @return void + */ + public function update_next_retry_time( string $url, bool $is_mobile, $next_retry_time ): void { + if ( ! $this->is_allowed() ) { + return; + } + + $this->query->update_next_retry_time( $url, $is_mobile, $next_retry_time ); + } +} diff --git a/inc/Engine/Common/JobManager/Managers/ManagerInterface.php b/inc/Engine/Common/JobManager/Managers/ManagerInterface.php new file mode 100644 index 0000000000..e989183cba --- /dev/null +++ b/inc/Engine/Common/JobManager/Managers/ManagerInterface.php @@ -0,0 +1,49 @@ +add_async( - 'rocket_rucss_job_check_status', + 'rocket_saas_job_check_status', [ - $usedcss_row_id, + $url, + $is_mobile, + $optimization_type, ] ); } diff --git a/inc/Engine/Common/JobManager/ServiceProvider.php b/inc/Engine/Common/JobManager/ServiceProvider.php new file mode 100644 index 0000000000..52cf788b80 --- /dev/null +++ b/inc/Engine/Common/JobManager/ServiceProvider.php @@ -0,0 +1,81 @@ +getContainer()->get( 'rucss_factory' ), + $this->getContainer()->get( 'atf_factory' ), + ]; + + $this->getContainer()->add( 'wpr_clock', WPRClock::class ); + + $this->getContainer()->add( 'retry_strategy_context', RetryContext::class ); + + $this->getContainer()->add( 'retry_strategy_factory', StrategyFactory::class ) + ->addArgument( $this->getContainer()->get( 'wpr_clock' ) ); + + $this->getContainer()->add( 'queue', Queue::class ); + + $this->getContainer()->add( 'api_client', APIClient::class ) + ->addArgument( $this->getContainer()->get( 'options' ) ); + + $this->getContainer()->share( 'job_processor', JobProcessor::class ) + ->addArguments( + [ + $factories, + $this->getContainer()->get( 'queue' ), + $this->getContainer()->get( 'retry_strategy_factory' ), + $this->getContainer()->get( 'api_client' ), + $this->getContainer()->get( 'wpr_clock' ), + ] + ); + + $this->getContainer()->share( 'cron_subscriber', CronSubscriber::class ) + ->addArguments( + [ + $this->getContainer()->get( 'job_processor' ), + $factories, + ] + ); + } +} diff --git a/inc/Engine/Optimization/RUCSS/Strategy/Context/RetryContext.php b/inc/Engine/Common/JobManager/Strategy/Context/RetryContext.php similarity index 81% rename from inc/Engine/Optimization/RUCSS/Strategy/Context/RetryContext.php rename to inc/Engine/Common/JobManager/Strategy/Context/RetryContext.php index 87a8daafc9..b7ef8e43dd 100644 --- a/inc/Engine/Optimization/RUCSS/Strategy/Context/RetryContext.php +++ b/inc/Engine/Common/JobManager/Strategy/Context/RetryContext.php @@ -1,8 +1,8 @@ clock = $clock; + } + /** + * Manage the whole process, to determine which strategy to adopt.. + * + * @param object $row_details DB Row of a job. + * @param array $job_details Job information from the API. + * @param ManagerInterface $manager Job Manager. + * + * @return void + */ + public function manage( $row_details, $job_details, ManagerInterface $manager ): void { + + switch ( $job_details['code'] ) { + case 408: + $strategy = new ResetRetryProcess( $manager ); + break; + case 500: + case 422: + case 404: + case 401: + $strategy = new JobSetFail( $manager ); + break; + default: + $strategy = new DefaultProcess( $manager, $this->clock ); + break; + } + + $context = new RetryContext(); + $context->set_strategy( $strategy ); + $context->execute( $row_details, $job_details ); + } +} diff --git a/inc/Engine/Optimization/RUCSS/Strategy/Strategies/DefaultProcess.php b/inc/Engine/Common/JobManager/Strategy/Strategies/DefaultProcess.php similarity index 68% rename from inc/Engine/Optimization/RUCSS/Strategy/Strategies/DefaultProcess.php rename to inc/Engine/Common/JobManager/Strategy/Strategies/DefaultProcess.php index a322a56bbe..425d47063a 100644 --- a/inc/Engine/Optimization/RUCSS/Strategy/Strategies/DefaultProcess.php +++ b/inc/Engine/Common/JobManager/Strategy/Strategies/DefaultProcess.php @@ -1,20 +1,21 @@ used_css_query = $used_css_query; - $this->clock = $clock; + public function __construct( ManagerInterface $manager, WPRClock $clock ) { + $this->manager = $manager; + $this->clock = $clock; /** * Filter the array containing the time needed to wait for each retry. @@ -75,6 +76,7 @@ public function __construct( UsedCSS_Query $used_css_query, WPRClock $clock ) { * @return void */ public function execute( object $row_details, array $job_details ): void { + if ( $row_details->retries >= count( $this->time_table_retry ) ) { /** * Unlock preload URL. @@ -83,12 +85,12 @@ public function execute( object $row_details, array $job_details ): void { */ do_action( 'rocket_preload_unlock_url', $row_details->url ); - $this->used_css_query->make_status_failed( $row_details->id, strval( $job_details['code'] ), $job_details['message'] ); + $this->manager->make_status_failed( $row_details->url, $row_details->is_mobile, $job_details['code'], $job_details['message'] ); return; } - $this->used_css_query->increment_retries( $row_details->id, (int) $row_details->retries, $job_details['message'] ); + $this->manager->increment_retries( $row_details->url, $row_details->is_mobile, $job_details['code'], $job_details['message'] ); $rucss_retry_duration = $this->time_table_retry[ $row_details->retries ] ?? $this->default_waiting_retry; // Default to 30 minutes. @@ -105,7 +107,7 @@ public function execute( object $row_details, array $job_details ): void { // update the `next_retry_time` column. $next_retry_time = $this->clock->current_time( 'timestamp', true ) + $rucss_retry_duration; - $this->used_css_query->update_message( $row_details->id, $job_details['code'], $job_details['message'], $row_details->error_message ); - $this->used_css_query->update_next_retry_time( (int) $row_details->id, $next_retry_time ); + $this->manager->update_message( $row_details->url, $row_details->is_mobile, $job_details['code'], $job_details['message'], $row_details->error_message ); + $this->manager->update_next_retry_time( $row_details->url, $row_details->is_mobile, $next_retry_time ); } } diff --git a/inc/Engine/Common/JobManager/Strategy/Strategies/JobSetFail.php b/inc/Engine/Common/JobManager/Strategy/Strategies/JobSetFail.php new file mode 100644 index 0000000000..8aa5bc553e --- /dev/null +++ b/inc/Engine/Common/JobManager/Strategy/Strategies/JobSetFail.php @@ -0,0 +1,45 @@ +manager = $manager; + } + + /** + * Execute the strategy process. + * + * @param object $row_details Row details of the job. + * @param array $job_details Job details from the API. + * + * @return void + */ + public function execute( object $row_details, array $job_details ): void { + /** + * Unlock preload URL. + * + * @param string $url URL to unlock + */ + do_action( 'rocket_preload_unlock_url', $row_details->url ); + + $this->manager->make_status_failed( $row_details->url, $row_details->is_mobile, strval( $job_details['code'] ), $job_details['message'] ); + } +} diff --git a/inc/Engine/Common/JobManager/Strategy/Strategies/ResetRetryProcess.php b/inc/Engine/Common/JobManager/Strategy/Strategies/ResetRetryProcess.php new file mode 100644 index 0000000000..73de517844 --- /dev/null +++ b/inc/Engine/Common/JobManager/Strategy/Strategies/ResetRetryProcess.php @@ -0,0 +1,38 @@ +manager = $manager; + } + + /** + * Execute the strategy process. + * + * @param object $row_details Row details of the job. + * @param array $job_details Job details from the API. + * + * @return void + */ + public function execute( object $row_details, array $job_details ): void { + $this->manager->add_url_to_the_queue( $row_details->url, $row_details->is_mobile ); + } +} diff --git a/inc/Engine/Optimization/RUCSS/Strategy/Strategies/StrategyInterface.php b/inc/Engine/Common/JobManager/Strategy/Strategies/StrategyInterface.php similarity index 81% rename from inc/Engine/Optimization/RUCSS/Strategy/Strategies/StrategyInterface.php rename to inc/Engine/Common/JobManager/Strategy/Strategies/StrategyInterface.php index bd67ed0399..601c1ca6c2 100644 --- a/inc/Engine/Optimization/RUCSS/Strategy/Strategies/StrategyInterface.php +++ b/inc/Engine/Common/JobManager/Strategy/Strategies/StrategyInterface.php @@ -1,6 +1,6 @@ table_exists() ) { + return false; + } + + // Get the database interface. + $db = $this->get_db(); + + // Bail if no database interface is available. + if ( empty( $db ) ) { + return false; + } + + $prefixed_table_name = $db->prefix . $this->table_name; + + $data = [ + 'status' => 'completed', + 'lcp' => $data['lcp'], + 'viewport' => $data['viewport'], + ]; + + $where = [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + ]; + + return $db->update( $prefixed_table_name, $data, $where ); + } } diff --git a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php index 35eec7099f..eaa4ec7ca0 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php @@ -1,7 +1,7 @@ id = (int) $this->id; - $this->url = (string) $this->url; - $this->lcp = (string) $this->lcp; - $this->viewport = (string) $this->viewport; - $this->error_code = (string) $this->error_code; - $this->error_message = (string) $this->error_message; - $this->retries = (int) $this->retries; - $this->is_mobile = (bool) $this->is_mobile; - $this->job_id = (string) $this->job_id; - $this->queue_name = (string) $this->queue_name; - $this->status = (string) $this->status; - $this->submitted_at = empty( $this->submitted_at ) ? 0 : strtotime( $this->submitted_at ); - $this->modified = empty( $this->modified ) ? 0 : strtotime( $this->modified ); - $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( $this->last_accessed ); + $this->id = (int) $this->id; + $this->url = (string) $this->url; + $this->lcp = (string) $this->lcp; + $this->viewport = (string) $this->viewport; + $this->error_code = (string) $this->error_code; + $this->error_message = (string) $this->error_message; + $this->retries = (int) $this->retries; + $this->is_mobile = (bool) $this->is_mobile; + $this->job_id = (string) $this->job_id; + $this->queue_name = (string) $this->queue_name; + $this->status = (string) $this->status; + $this->submitted_at = empty( $this->submitted_at ) ? 0 : strtotime( $this->submitted_at ); + $this->modified = empty( $this->modified ) ? 0 : strtotime( $this->modified ); + $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( $this->last_accessed ); + $this->next_retry_time = empty( $this->next_retry_time ) ? 0 : strtotime( $this->next_retry_time ); } } diff --git a/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php index 6908bbf109..5ac68dc112 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php @@ -161,5 +161,15 @@ class AboveTheFold extends Schema { 'date_query' => true, 'sortable' => true, ], + + // NEXT_RETRY_TIME column. + [ + 'name' => 'next_retry_time', + 'type' => 'timestamp', + 'default' => '0000-00-00 00:00:00', + 'created' => true, + 'date_query' => true, + 'sortable' => true, + ], ]; } diff --git a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php index 4b832c7696..7eb361f2ca 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php @@ -3,9 +3,9 @@ namespace WP_Rocket\Engine\Media\AboveTheFold\Database\Tables; -use WP_Rocket\Dependencies\Database\Table; +use WP_Rocket\Engine\Common\Database\Tables\AbstractTable; -class AboveTheFold extends Table { +class AboveTheFold extends AbstractTable { /** * Table name * @@ -35,21 +35,11 @@ class AboveTheFold extends Table { protected $upgrades = []; /** - * Instantiate class. - */ - public function __construct() { - parent::__construct(); - add_action( 'admin_init', [ $this, 'maybe_trigger_recreate_table' ], 9 ); - add_action( 'init', [ $this, 'maybe_upgrade' ] ); - } - - /** - * Setup the database schema + * Table schema data. * - * @return void + * @var string */ - protected function set_schema() { - $this->schema = " + protected $schema_data = " id bigint(20) unsigned NOT NULL AUTO_INCREMENT, url varchar(2000) NOT NULL default '', is_mobile tinyint(1) NOT NULL default 0, @@ -64,48 +54,13 @@ protected function set_schema() { submitted_at timestamp NOT NULL default '0000-00-00 00:00:00', modified timestamp NOT NULL default '0000-00-00 00:00:00', last_accessed timestamp NOT NULL default '0000-00-00 00:00:00', + next_retry_time timestamp NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), KEY url (url(150), is_mobile), KEY modified (modified), KEY last_accessed (last_accessed), INDEX `status_index` (`status`(191)), INDEX `error_code_index` (`error_code`(32))"; - } - - /** - * Trigger recreation of cache table if not exist. - * - * @return void - */ - public function maybe_trigger_recreate_table() { - if ( $this->exists() ) { - return; - } - - delete_option( $this->db_version_key ); - } - - /** - * Remove all completed rows. - * - * @return bool|int - */ - public function remove_all_completed_rows() { - if ( ! $this->exists() ) { - return false; - } - - // Get the database interface. - $db = $this->get_db(); - - // Bail if no database interface is available. - if ( empty( $db ) ) { - return false; - } - - $prefixed_table_name = $this->apply_prefix( $this->table_name ); - return $db->query( "DELETE FROM `$prefixed_table_name` WHERE status IN ( 'failed', 'completed' )" ); - } /** * Truncate DB table. diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 10caca55e0..0f0e30542b 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -7,6 +7,7 @@ use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; use WP_Rocket\Engine\Media\AboveTheFold\Context\Context; use WP_Rocket\Engine\Optimization\RegexTrait; +use WP_Rocket\Engine\Common\JobManager\Managers\ManagerInterface; class Controller { use RegexTrait; @@ -32,17 +33,26 @@ class Controller { */ private $context; + /** + * Above the fold Job Manager. + * + * @var ManagerInterface + */ + private $manager; + /** * Constructor * - * @param Options_Data $options Options instance. - * @param ATFQuery $query Queries instance. - * @param Context $context Context instance. + * @param Options_Data $options Options instance. + * @param ATFQuery $query Queries instance. + * @param Context $context Context instance. + * @param ManagerInterface $manager Above the fold Job Manager. */ - public function __construct( Options_Data $options, ATFQuery $query, Context $context ) { + public function __construct( Options_Data $options, ATFQuery $query, Context $context, ManagerInterface $manager ) { $this->options = $options; $this->query = $query; $this->context = $context; + $this->manager = $manager; } /** @@ -59,15 +69,16 @@ public function lcp( $html ): string { global $wp; - $url = untrailingslashit( home_url( add_query_arg( [], $wp->request ) ) ); - - $row = $this->query->get_row( $url, $this->is_mobile() ); + $url = untrailingslashit( home_url( add_query_arg( [], $wp->request ) ) ); + $is_mobile = $this->is_mobile(); + $row = $this->query->get_row( $url, $is_mobile ); if ( empty( $row ) ) { + $this->manager->add_url_to_the_queue( $url, $is_mobile ); return $html; } - if ( empty( $row->lcp ) ) { + if ( 'completed' !== $row->status || empty( $row->lcp ) || 'not found' === $row->lcp ) { return $html; } @@ -129,7 +140,7 @@ private function set_fetchpriority( $lcp, string $html ): string { $url = preg_quote( $lcp->src, '/' ); $html = preg_replace_callback( - '/]*\s+src=[\'"]' . $url . '[\'"].+>$/', + '#]*?\s+src=["\']' . $url . '["\'][^>]*?|[^>]*?)>#', function ( $matches ) { // Check if the fetchpriority attribute already exists. if ( preg_match( '/fetchpriority=[\'"]([^\'"]+)[\'"]/', $matches[0] ) ) { @@ -171,12 +182,12 @@ public function add_exclusions( $exclusions ): array { return $exclusions; } - if ( $row->lcp ) { + if ( $row->lcp && 'not found' !== $row->lcp ) { $lcp = $this->generate_lcp_link_tag_with_sources( json_decode( $row->lcp ) ); $lcp = $lcp['sources']; } - if ( $row->viewport ) { + if ( $row->viewport && 'not found' !== $row->viewport ) { $atf = $this->get_atf_sources( json_decode( $row->viewport ) ); } diff --git a/inc/Engine/Media/AboveTheFold/Jobs/Factory.php b/inc/Engine/Media/AboveTheFold/Jobs/Factory.php new file mode 100644 index 0000000000..f7ff25529d --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Jobs/Factory.php @@ -0,0 +1,54 @@ +manager = $manager; + $this->table = $table; + } + + /** + * ATF job manager. + * + * @return ManagerInterface + */ + public function manager(): ManagerInterface { + return $this->manager; + } + + /** + * ATF Table. + * + * @return TableInterface + */ + public function table(): TableInterface { + return $this->table; + } +} diff --git a/inc/Engine/Media/AboveTheFold/Jobs/Manager.php b/inc/Engine/Media/AboveTheFold/Jobs/Manager.php new file mode 100644 index 0000000000..0060e0203b --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Jobs/Manager.php @@ -0,0 +1,153 @@ +query = $query; + $this->context = $context; + } + + /** + * Get pending jobs from db. + * + * @param integer $num_rows Number of rows to grab. + * @return array + */ + public function get_pending_jobs( int $num_rows ): array { + $this->logger::debug( "ATF: Start getting number of {$num_rows} pending jobs." ); + + $pending_jobs = $this->query->get_pending_jobs( $num_rows ); + + if ( ! $pending_jobs ) { + $this->logger::debug( 'ATF: No pending jobs are there.' ); + + return []; + } + + return $pending_jobs; + } + + /** + * Validate SaaS response and fail job. + * + * @param array $job_details Details related to the job.. + * @param object $row_details Details related to the row. + * @param string $optimization_type The type of optimization applied for the current job. + * + * @return void + */ + public function validate_and_fail( array $job_details, $row_details, string $optimization_type ): void { + if ( ! $this->is_allowed( $optimization_type ) ) { + return; + } + + if ( ! isset( $job_details['contents']['above_the_fold_result'] ) ) { + $this->make_status_failed( $row_details->url, $row_details->is_mobile, '400', 'No ATF/LCP response', $optimization_type ); + $this->can_process = false; + return; + } + } + + /** + * Process SaaS response. + * + * @param array $job_details Details related to the job. + * @param object $row_details Details related to the row. + * @param string $optimization_type The type of optimization applied for the current job. + * @return void + */ + public function process( array $job_details, $row_details, string $optimization_type ): void { + if ( ! $this->is_allowed( $optimization_type ) || ! $this->can_process ) { + return; + } + + // Everything is fine, save LCP & ATF into DB, change status to completed and reset queue_name and job_id. + $this->logger::debug( 'ATF: Save LCP and ATF for url: ' . $row_details->url ); + + $lcp = $job_details['contents']['above_the_fold_result']['lcp']; + $viewport = $job_details['contents']['above_the_fold_result']['images_above_fold']; + + $lcp = $lcp ? wp_json_encode( $lcp, JSON_UNESCAPED_SLASHES ) : 'not found'; + $viewport = $viewport ? wp_json_encode( $viewport, JSON_UNESCAPED_SLASHES ) : 'not found'; + + $lcp_atf = [ + 'lcp' => $lcp, + 'viewport' => $viewport, + ]; + + $this->query->make_job_completed( $row_details->url, $row_details->is_mobile, $lcp_atf ); + } + + /** + * Set the request parameter to be sent to the SaaS + * + * @return array + */ + public function set_request_param(): array { + return [ + 'optimization_list' => [ + 'lcp', + 'above_fold', + ], + ]; + } + + /** + * Get the optimization type from the DB Row. + * + * @param object $row DB Row Object. + * @return boolean|string + */ + public function get_optimization_type_from_row( $row ) { + if ( ! isset( $row->lcp ) ) { + return false; + } + + return $this->optimization_type; + } +} diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index cd81b5b3eb..e3e057be5a 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -9,6 +9,7 @@ use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; use WP_Rocket\Engine\Media\AboveTheFold\Admin\{Controller as AdminController, Subscriber as AdminSubscriber}; use WP_Rocket\Engine\Media\AboveTheFold\Frontend\{Controller as FrontController, Subscriber as FrontSubscriber}; +use WP_Rocket\Engine\Media\AboveTheFold\Jobs\{Manager, Factory}; class ServiceProvider extends AbstractServiceProvider { /** @@ -26,6 +27,8 @@ class ServiceProvider extends AbstractServiceProvider { 'atf_context', 'atf_controller', 'atf_subscriber', + 'atf_manager', + 'atf_factory', 'atf_admin_controller', 'atf_admin_subscriber', ]; @@ -41,10 +44,33 @@ public function register() { $this->getContainer()->add( 'atf_context', Context::class ); $this->getContainer()->get( 'atf_table' ); + + $this->getContainer()->add( 'atf_manager', Manager::class ) + ->addArguments( + [ + $this->getContainer()->get( 'atf_query' ), + $this->getContainer()->get( 'atf_context' ), + ] + ); + + $this->getContainer()->share( 'atf_factory', Factory::class ) + ->addArguments( + [ + $this->getContainer()->get( 'atf_manager' ), + $this->getContainer()->get( 'atf_table' ), + ] + ); + $this->getContainer()->add( 'atf_controller', FrontController::class ) - ->addArgument( $this->getContainer()->get( 'options' ) ) - ->addArgument( $this->getContainer()->get( 'atf_query' ) ) - ->addArgument( $this->getContainer()->get( 'atf_context' ) ); + ->addArguments( + [ + $this->getContainer()->get( 'options' ), + $this->getContainer()->get( 'atf_query' ), + $this->getContainer()->get( 'atf_context' ), + $this->getContainer()->get( 'atf_manager' ), + ] + ); + $this->getContainer()->share( 'atf_subscriber', FrontSubscriber::class ) ->addArgument( $this->getContainer()->get( 'atf_controller' ) ); $this->getContainer()->add( 'atf_admin_controller', AdminController::class ) diff --git a/inc/Engine/Optimization/RUCSS/Admin/Database.php b/inc/Engine/Optimization/RUCSS/Admin/Database.php index 83419dff06..59af63527a 100644 --- a/inc/Engine/Optimization/RUCSS/Admin/Database.php +++ b/inc/Engine/Optimization/RUCSS/Admin/Database.php @@ -56,7 +56,7 @@ public function delete_old_used_css() { return; } - $this->rucss_usedcss_table->delete_old_used_css(); + $this->rucss_usedcss_table->delete_old_rows(); } /** @@ -68,7 +68,7 @@ public function get_old_used_css(): array { if ( ! $this->rucss_usedcss_table->exists() ) { return []; } - return $this->rucss_usedcss_table->get_old_used_css(); + return $this->rucss_usedcss_table->get_old_rows(); } /** diff --git a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php index 0cccd50854..bacfcf3857 100644 --- a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php +++ b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Engine\Optimization\RUCSS\Admin; -use WP_Rocket\Engine\Optimization\RUCSS\Controller\Queue; +use WP_Rocket\Engine\Common\JobManager\Queue\Queue; use WP_Rocket\Engine\Common\Queue\RUCSSQueueRunner; use WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS; use WP_Rocket\Event_Management\Subscriber_Interface; @@ -745,16 +745,16 @@ public function maybe_delete_transient( $old_value, $value ) { } /** - * Checks if the RUCSS deletion is enabled. + * Checks if the SaaS deletion is enabled. * * @return bool */ protected function is_deletion_enabled(): bool { /** - * Filters the enable RUCSS deletion value + * Filters the enable SaaS deletion value * - * @param bool $delete_rucss True to enable deletion, false otherwise. + * @param bool $delete_saas_jobs True to enable deletion, false otherwise. */ - return (bool) apply_filters( 'rocket_rucss_deletion_enabled', true ); + return (bool) apply_filters( 'rocket_saas_deletion_enabled', true ); } } diff --git a/inc/Engine/Optimization/RUCSS/Context/RUCSSContextSaas.php b/inc/Engine/Optimization/RUCSS/Context/RUCSSContextSaas.php new file mode 100644 index 0000000000..9e192731dd --- /dev/null +++ b/inc/Engine/Optimization/RUCSS/Context/RUCSSContextSaas.php @@ -0,0 +1,23 @@ +run_common_checks( [ 'option' => 'remove_unused_css' ] ); + + if ( ! $is_allowed ) { + return false; + } + + return true; + } +} diff --git a/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php b/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php index 2bb0858d2d..dd65ba177b 100644 --- a/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php +++ b/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php @@ -4,23 +4,17 @@ namespace WP_Rocket\Engine\Optimization\RUCSS\Controller; use WP_Rocket\Admin\Options_Data; -use WP_Rocket\Engine\Common\Clock\WPRClock; use WP_Rocket\Engine\Common\Context\ContextInterface; -use WP_Rocket\Engine\Common\Queue\QueueInterface; use WP_Rocket\Engine\Optimization\CSSTrait; use WP_Rocket\Engine\Optimization\DynamicLists\DefaultLists\DataManager; use WP_Rocket\Engine\Optimization\RegexTrait; use WP_Rocket\Engine\Optimization\RUCSS\Database\Queries\UsedCSS as UsedCSS_Query; -use WP_Rocket\Engine\Optimization\RUCSS\Frontend\APIClient; use WP_Admin_Bar; -use WP_Rocket\Engine\Optimization\RUCSS\Strategy\Factory\StrategyFactory; -use WP_Rocket\Logger\LoggerAware; -use WP_Rocket\Logger\LoggerAwareInterface; +use WP_Rocket\Engine\Common\JobManager\Managers\ManagerInterface; -class UsedCSS implements LoggerAwareInterface { +class UsedCSS { use RegexTrait; use CSSTrait; - use LoggerAware; /** * UsedCss Query instance. @@ -36,20 +30,6 @@ class UsedCSS implements LoggerAwareInterface { */ protected $options; - /** - * APIClient instance - * - * @var APIClient - */ - private $api; - - /** - * Queue instance. - * - * @var QueueInterface - */ - private $queue; - /** * DataManager instance * @@ -100,55 +80,39 @@ class UsedCSS implements LoggerAwareInterface { private $inline_content_exclusions = []; /** - * Retry Strategy Factory - * - * @var StrategyFactory - */ - protected $strategy_factory; - - /** - * Clock instance. + * Above the fold Job Manager. * - * @var WPRClock + * @var ManagerInterface */ - protected $wpr_clock; + private $manager; /** * Instantiate the class. * * @param Options_Data $options Options instance. * @param UsedCSS_Query $used_css_query Usedcss Query instance. - * @param APIClient $api APIClient instance. - * @param QueueInterface $queue Queue instance. * @param DataManager $data_manager DataManager instance. * @param Filesystem $filesystem Filesystem instance. * @param ContextInterface $context RUCSS context. * @param ContextInterface $optimize_url_context RUCSS optimize url context. - * @param StrategyFactory $strategy_factory Strategy Factory used for RUCSS retry process. - * @param WPRClock $clock Clock object instance. + * @param ManagerInterface $manager RUCSS manager. */ public function __construct( Options_Data $options, UsedCSS_Query $used_css_query, - APIClient $api, - QueueInterface $queue, DataManager $data_manager, Filesystem $filesystem, ContextInterface $context, ContextInterface $optimize_url_context, - StrategyFactory $strategy_factory, - WPRClock $clock + ManagerInterface $manager ) { $this->options = $options; $this->used_css_query = $used_css_query; - $this->api = $api; - $this->queue = $queue; $this->data_manager = $data_manager; $this->filesystem = $filesystem; $this->context = $context; $this->optimize_url_context = $optimize_url_context; - $this->strategy_factory = $strategy_factory; - $this->wpr_clock = $clock; + $this->manager = $manager; } /** @@ -188,7 +152,7 @@ public function treeshake( string $html ): string { $used_css = $this->used_css_query->get_row( $url, $is_mobile ); if ( empty( $used_css ) ) { - $this->add_url_to_the_queue( $url, $is_mobile ); + $this->manager->add_url_to_the_queue( $url, $is_mobile ); return $html; } @@ -212,22 +176,6 @@ public function treeshake( string $html ): string { return $html; } - /** - * Send the request to add url into the queue. - * - * @param string $url page URL. - * @param bool $is_mobile page is for mobile. - * - * @return void - */ - public function add_url_to_the_queue( string $url, bool $is_mobile ) { - $used_css_row = $this->used_css_query->get_row( $url, $is_mobile ); - if ( empty( $used_css_row ) ) { - $this->used_css_query->create_new_job( $url, '', '', $is_mobile ); - return; - } - $this->used_css_query->reset_job( (int) $used_css_row->id ); - } /** * Delete used css based on URL. * @@ -467,160 +415,6 @@ private function is_mobile(): bool { && wp_is_mobile(); } - /** - * Check if current page is the home page. - * - * @param string $url Current page url. - * - * @return bool - */ - private function is_home( string $url ): bool { - /** - * Filters the home url. - * - * @since 3.11.4 - * - * @param string $home_url home url. - * @param string $url url of current page. - */ - $home_url = apply_filters( 'rocket_rucss_is_home_url', home_url(), $url ); - return untrailingslashit( $url ) === untrailingslashit( $home_url ); - } - - /** - * Process pending jobs inside cron iteration. - * - * @return void - */ - public function process_pending_jobs() { - $this->logger::debug( 'RUCSS: Start processing pending jobs inside cron.' ); - - if ( ! $this->is_enabled() ) { - $this->logger::debug( 'RUCSS: Stop processing cron iteration because option is disabled.' ); - - return; - } - - // Get some items from the DB with status=pending & job_id isn't empty. - - /** - * Filters the pending jobs count. - * - * @since 3.11 - * - * @param int $rows Number of rows to grab with each CRON iteration. - */ - $rows = apply_filters( 'rocket_rucss_pending_jobs_cron_rows_count', 100 ); - - $this->logger::debug( "RUCSS: Start getting number of {$rows} pending jobs." ); - - $pending_jobs = $this->used_css_query->get_pending_jobs( $rows ); - if ( ! $pending_jobs ) { - $this->logger::debug( 'RUCSS: No pending jobs are there.' ); - - return; - } - - foreach ( $pending_jobs as $used_css_row ) { - $current_time = $this->wpr_clock->current_time( 'timestamp', true ); - if ( strtotime( $used_css_row->next_retry_time ) < $current_time ) { - $this->logger::debug( "RUCSS: Send the job for url {$used_css_row->url} to Async task to check its job status." ); - - // Change status to in-progress. - $this->used_css_query->make_status_inprogress( (int) $used_css_row->id ); - $this->queue->add_job_status_check_async( (int) $used_css_row->id ); - } - } - } - - /** - * Check job status by DB row ID. - * - * @param int $id DB Row ID. - * - * @return void - */ - public function check_job_status( int $id ) { - $this->logger::debug( 'RUCSS: Start checking job status for row ID: ' . $id ); - - $row_details = $this->used_css_query->get_item( $id ); - if ( ! $row_details ) { - $this->logger::debug( 'RUCSS: Row ID not found ', compact( 'id' ) ); - - // Nothing in DB, bailout. - return; - } - - // Send the request to get the job status from SaaS. - $job_details = $this->api->get_queue_job_status( $row_details->job_id, $row_details->queue_name, $this->is_home( $row_details->url ) ); - - /** - * Filters the rocket min rucss css result size. - * - * @since 3.13.3 - * - * @param int min size. - */ - $min_rucss_size = apply_filters( 'rocket_min_rucss_size', 150 ); - if ( ! is_numeric( $min_rucss_size ) ) { - $min_rucss_size = 150; - } - - if ( isset( $job_details['contents']['shakedCSS_size'] ) && intval( $job_details['contents']['shakedCSS_size'] ) < $min_rucss_size ) { - $message = 'RUCSS: shakedCSS size is less than ' . $min_rucss_size; - $this->logger::error( $message ); - $this->used_css_query->make_status_failed( $id, '500', $message ); - return; - } - - if ( - 200 !== (int) $job_details['code'] - ) { - $this->logger::debug( 'RUCSS: Job status failed for url: ' . $row_details->url, $job_details ); - $this->strategy_factory->manage( $row_details, $job_details ); - - return; - } - /** - * Unlock preload URL. - * - * @param string $url URL to unlock - */ - do_action( 'rocket_preload_unlock_url', $row_details->url ); - - $css = $this->apply_font_display_swap( $job_details['contents']['shakedCSS'] ); - - /** - * RUCSS hash. - * - * @param string $hash RUCSS hash. - * @param string $css RUCSS content. - * @param UsedCSSRow $row_details Job details. - */ - $hash = (string) apply_filters( 'rocket_rucss_hash', md5( $css ), $css, $row_details ); - - if ( ! $this->filesystem->write_used_css( $hash, $css ) ) { - $message = 'RUCSS: Could not write used CSS to the filesystem: ' . $row_details->url; - $this->logger::error( $message ); - $this->used_css_query->make_status_failed( $id, '', $message ); - - return; - } - - // Everything is fine, save the usedcss into DB, change status to completed and reset queue_name and job_id. - $this->logger::debug( 'RUCSS: Save used CSS for url: ' . $row_details->url ); - - $this->used_css_query->make_status_completed( $id, $hash ); - - /** - * Fires after successfully saving the used CSS for an URL - * - * @param string $url URL used to generated the used CSS. - * @param array $job_details Result of the request to get the job status from SaaS. - */ - do_action( 'rocket_rucss_complete_job_status', $row_details->url, $job_details ); - } - /** * Add clear UsedCSS adminbar item. * @@ -704,59 +498,6 @@ public function get_not_completed_count() { return $this->used_css_query->get_not_completed_count(); } - /** - * Clear failed urls. - * - * @return void - */ - public function clear_failed_urls() { - /** - * Delay before failed rucss jobs are deleted. - * - * @param string $delay delay before failed rucss jobs are deleted. - */ - $delay = (string) apply_filters( 'rocket_delay_remove_rucss_failed_jobs', '3 days' ); - - if ( '' === $delay || '0' === $delay ) { - $delay = '3 days'; - } - $parts = explode( ' ', $delay ); - - $value = 3; - $unit = 'days'; - - if ( count( $parts ) === 2 && $parts[0] >= 0 ) { - $value = (float) $parts[0]; - $unit = $parts[1]; - } - $rows = $this->used_css_query->get_failed_rows( $value, $unit ); - - if ( empty( $rows ) ) { - return; - } - - $failed_urls = []; - - foreach ( $rows as $row ) { - $failed_urls[] = $row->url; - - $id = (int) $row->id; - - if ( empty( $id ) ) { - continue; - } - - $this->add_url_to_the_queue( $row->url, (bool) $row->is_mobile ); - } - - /** - * Fires after clearing failed urls. - * - * @param array $urls Failed urls. - */ - do_action( 'rocket_rucss_after_clearing_failed_url', $failed_urls ); - } - /** * Add preload links for the fonts in the used CSS * @@ -980,109 +721,4 @@ static function ( $item ) { public function has_one_completed_row_at_least() { return $this->used_css_query->get_completed_count() > 0; } - - /** - * Process on submit jobs. - * - * @return void - */ - public function process_on_submit_jobs() { - - if ( ! $this->is_enabled() ) { - $this->logger::debug( 'RUCSS: Stop processing cron iteration because option is disabled.' ); - - return; - } - - /** - * Pending rows cont. - * - * @param int $count Number of rows. - */ - $pending_job = (int) apply_filters( 'rocket_rucss_pending_jobs_cron_rows_count', 100 ); - - /** - * Maximum processing rows. - * - * @param int $max Max processing rows. - */ - $max_pending_rows = (int) apply_filters( 'rocket_rucss_max_pending_jobs', 3 * $pending_job, $pending_job ); - $rows = $this->used_css_query->get_on_submit_jobs( $max_pending_rows ); - - foreach ( $rows as $row ) { - $response = $this->send_api( $row->url, (bool) $row->is_mobile ); - if ( false === $response || ! isset( $response['contents'], $response['contents']['jobId'], $response['contents']['queueName'] ) ) { - - $this->used_css_query->make_status_failed( (int) $row->id, '', '' ); - continue; - } - - /** - * Lock preload URL. - * - * @param string $url URL to lock - */ - do_action( 'rocket_preload_lock_url', $row->url ); - - $this->used_css_query->make_status_pending( - (int) $row->id, - $response['contents']['jobId'], - $response['contents']['queueName'], - (bool) $row->is_mobile - ); - } - } - - /** - * Send the job to the API. - * - * @param string $url URL to work on. - * @param bool $is_mobile Is the page for mobile. - * @return array|false - */ - protected function send_api( string $url, bool $is_mobile ) { - /** - * Filters the RUCSS safelist - * - * @since 3.11 - * - * @param array $safelist Array of safelist values. - */ - $safelist = apply_filters( 'rocket_rucss_safelist', $this->options->get( 'remove_unused_css_safelist', [] ) ); - - /** - * Filters the styles attributes to be skipped (blocked) by RUCSS. - * - * @since 3.14 - * - * @param array $skipped_attr Array of safelist values. - */ - $skipped_attr = apply_filters( 'rocket_rucss_skip_styles_with_attr', [] ); - $skipped_attr = ( is_array( $skipped_attr ) ) ? $skipped_attr : []; - - $config = [ - 'treeshake' => 1, - 'rucss_safelist' => $safelist, - 'skip_attr' => $skipped_attr, - 'is_mobile' => $is_mobile, - 'is_home' => $this->is_home( $url ), - ]; - - $add_to_queue_response = $this->api->add_to_queue( $url, $config ); - if ( 200 !== $add_to_queue_response['code'] ) { - $this->logger::error( - 'Error when contacting the RUCSS API.', - [ - 'rucss error', - 'url' => $url, - 'code' => $add_to_queue_response['code'], - 'message' => $add_to_queue_response['message'], - ] - ); - - return false; - } - - return $add_to_queue_response; - } } diff --git a/inc/Engine/Optimization/RUCSS/Cron/Subscriber.php b/inc/Engine/Optimization/RUCSS/Cron/Subscriber.php index 4a772022ac..82a3b6b583 100644 --- a/inc/Engine/Optimization/RUCSS/Cron/Subscriber.php +++ b/inc/Engine/Optimization/RUCSS/Cron/Subscriber.php @@ -4,34 +4,33 @@ namespace WP_Rocket\Engine\Optimization\RUCSS\Cron; use WP_Rocket\Event_Management\Subscriber_Interface; -use WP_Rocket\Engine\Common\Queue\RUCSSQueueRunner; -use WP_Rocket\Engine\Optimization\RUCSS\Admin\Database; -use WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS; +use WP_Rocket\Engine\Common\JobManager\JobProcessor; +use WP_Rocket\Engine\Optimization\RUCSS\Database\Queries\UsedCSS as UsedCSS_Query; class Subscriber implements Subscriber_Interface { /** - * UsedCss instance + * JobProcessor instance * - * @var UsedCSS + * @var JobProcessor */ - private $used_css; + private $job_processor; /** - * Database instance + * UsedCss Query instance. * - * @var Database + * @var UsedCSS_Query */ - private $database; + private $used_css_query; /** * Instantiate the class * - * @param UsedCSS $used_css UsedCSS instance. - * @param Database $database Database instance. + * @param JobProcessor $job_processor JobProcessor instance. + * @param UsedCSS_Query $used_css_query Usedcss Query instance. */ - public function __construct( UsedCSS $used_css, Database $database ) { - $this->used_css = $used_css; - $this->database = $database; + public function __construct( JobProcessor $job_processor, UsedCSS_Query $used_css_query ) { + $this->job_processor = $job_processor; + $this->used_css_query = $used_css_query; } /** @@ -41,268 +40,23 @@ public function __construct( UsedCSS $used_css, Database $database ) { */ public static function get_subscribed_events(): array { return [ - 'rocket_rucss_pending_jobs' => 'process_pending_jobs', - 'rocket_rucss_on_submit_jobs' => 'process_on_submit_jobs', - 'rocket_rucss_job_check_status' => 'check_job_status', - 'rocket_rucss_clean_rows_time_event' => 'cron_clean_rows', - 'cron_schedules' => 'add_interval', - 'rocket_deactivation' => 'on_deactivation', - 'rocket_remove_rucss_failed_jobs' => 'cron_remove_failed_jobs', - 'init' => [ - [ 'schedule_clean_not_commonly_used_rows' ], - [ 'schedule_pending_jobs' ], - [ 'initialize_rucss_queue_runner' ], - [ 'schedule_removing_failed_jobs' ], - [ 'schedule_on_submit_jobs' ], - ], + 'rocket_rucss_job_check_status' => 'check_job_status', ]; } /** - * Schedules cron to clean not commonly used RUCSS rows. - * - * @since 3.9 - * - * @return void - */ - public function schedule_clean_not_commonly_used_rows() { - if ( ! $this->used_css->is_enabled() ) { - return; - } - - if ( wp_next_scheduled( 'rocket_rucss_clean_rows_time_event' ) ) { - return; - } - - wp_schedule_event( time(), 'weekly', 'rocket_rucss_clean_rows_time_event' ); - } - - /** - * Initialize the queue runner for our RUCSS. - * - * @return void - */ - public function initialize_rucss_queue_runner() { - if ( ! $this->used_css->is_enabled() ) { - return; - } - - RUCSSQueueRunner::instance()->init(); - } - - /** - * Process pending jobs with Cron iteration. - * - * @return void - */ - public function process_pending_jobs() { - $this->used_css->process_pending_jobs(); - } - - /** - * Process on submit jobs with Cron iteration. - * - * @return void - */ - public function process_on_submit_jobs() { - $this->used_css->process_on_submit_jobs(); - } - - /** - * Cron callback for deleting old rows in both table databases. - * - * @since 3.9 - * - * @return void - */ - public function cron_clean_rows() { - if ( ! $this->is_deletion_enabled() ) { - return; - } - - $this->database->delete_old_used_css(); - } - - /** - * Cron callback for removing failed jobs. - * - * @return void - */ - public function cron_remove_failed_jobs() { - $this->used_css->clear_failed_urls(); - } - - /** - * Handle job status by DB row ID. - * - * @param int $row_id DB Row ID. - * - * @return void - */ - public function check_job_status( int $row_id ) { - $this->used_css->check_job_status( $row_id ); - } - - /** - * Adds new interval for RUCSS pending jobs cron - * - * @since 3.11.3 - * - * @param array[] $schedules An array of non-default cron schedule arrays. - * - * @return array - */ - public function add_interval( $schedules ) { - if ( ! $this->used_css->is_enabled() ) { - return $schedules; - } - - /** - * Filters the cron interval. - * - * @since 3.11 - * - * @param int $interval Interval in seconds. - */ - $interval = apply_filters( 'rocket_rucss_pending_jobs_cron_interval', 1 * rocket_get_constant( 'MINUTE_IN_SECONDS', 60 ) ); - - $schedules['rocket_rucss_pending_jobs'] = [ - 'interval' => $interval, - 'display' => esc_html__( 'WP Rocket Remove Unused CSS pending jobs', 'rocket' ), - ]; - - $default_interval = 3 * rocket_get_constant( 'DAY_IN_SECONDS', 86400 ); - /** - * Filters the cron interval for clearing failed jobs. - * - * @param int $interval Interval in seconds. - */ - $interval = apply_filters( 'rocket_remove_rucss_failed_jobs_cron_interval', $default_interval ); - $interval = (bool) $interval ? $interval : $default_interval; - - $schedules['rocket_remove_rucss_failed_jobs'] = [ - 'interval' => $interval, - 'display' => esc_html__( 'WP Rocket clear Remove Unused CSS failed jobs', 'rocket' ), - ]; - - /** - * Filters the cron interval for processing on submit jobs. - * - * @param int $interval Interval in seconds. - */ - $interval = (int) apply_filters( 'rocket_remove_rucss_on_submit_jobs_cron_interval', 1 * rocket_get_constant( 'MINUTE_IN_SECONDS', 60 ) ); - - $schedules['rocket_rucss_on_submit_jobs'] = [ - 'interval' => $interval, - 'display' => esc_html__( 'WP Rocket procees on submit jobs', 'rocket' ), - ]; - - return $schedules; - } - - /** - * Schedule on submit jobs. - * - * @return void - */ - public function schedule_on_submit_jobs() { - if ( - ! $this->used_css->is_enabled() - && - wp_next_scheduled( 'rocket_rucss_on_submit_jobs' ) - ) { - wp_clear_scheduled_hook( 'rocket_rucss_on_submit_jobs' ); - - return; - } - - if ( ! $this->used_css->is_enabled() ) { - return; - } - - if ( wp_next_scheduled( 'rocket_rucss_on_submit_jobs' ) ) { - return; - } - - wp_schedule_event( time(), 'rocket_rucss_on_submit_jobs', 'rocket_rucss_on_submit_jobs' ); - } - - /** - * Schedules cron to get RUCSS pendings jobs. - * - * @since 3.11.3 + * Handle old rucss job during upgrade from versions < 3.16. * + * @param integer $row_id DB Row ID. * @return void */ - public function schedule_pending_jobs() { - if ( - ! $this->used_css->is_enabled() - && - wp_next_scheduled( 'rocket_rucss_pending_jobs' ) - ) { - wp_clear_scheduled_hook( 'rocket_rucss_pending_jobs' ); + public function check_job_status( int $row_id ): void { + $row = $this->used_css_query->get_row_by_id( $row_id ); + if ( ! $row ) { return; } - if ( ! $this->used_css->is_enabled() ) { - return; - } - - if ( wp_next_scheduled( 'rocket_rucss_pending_jobs' ) ) { - return; - } - - wp_schedule_event( time(), 'rocket_rucss_pending_jobs', 'rocket_rucss_pending_jobs' ); - } - - /** - * Schedules cron to remove failed jobs. - * - * @return void - */ - public function schedule_removing_failed_jobs() { - if ( - ! $this->used_css->is_enabled() - && - wp_next_scheduled( 'rocket_remove_rucss_failed_jobs' ) - ) { - wp_clear_scheduled_hook( 'rocket_remove_rucss_failed_jobs' ); - - return; - } - - if ( ! $this->used_css->is_enabled() ) { - return; - } - - if ( wp_next_scheduled( 'rocket_remove_rucss_failed_jobs' ) ) { - return; - } - - wp_schedule_event( time(), 'rocket_remove_rucss_failed_jobs', 'rocket_remove_rucss_failed_jobs' ); - } - - /** - * Clear schedule of RUCSS CRONs on deactivation. - * - * @return void - */ - public function on_deactivation() { - wp_clear_scheduled_hook( 'action_scheduler_run_queue_rucss', [ 'WP Cron' ] ); - } - - /** - * Checks if the RUCSS deletion is enabled. - * - * @return bool - */ - protected function is_deletion_enabled(): bool { - /** - * Filters the enable RUCSS deletion value - * - * @param bool $delete_rucss True to enable deletion, false otherwise. - */ - return (bool) apply_filters( 'rocket_rucss_deletion_enabled', true ); + $this->job_processor->check_job_status( $row->url, $row->is_mobile, 'rucss' ); } } diff --git a/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php b/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php index 37ddef0637..89ed6188bf 100644 --- a/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php +++ b/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS.php @@ -72,23 +72,38 @@ class UsedCSS extends AbstractQuery { /** * Complete a job. * - * @param int $id DB row ID. - * @param string $hash Hash. + * @param string $url Url from DB row. + * @param boolean $is_mobile Is mobile from DB row. + * @param string $hash Hash. * * @return bool */ - public function make_status_completed( int $id, string $hash = '' ) { + public function make_status_completed( string $url, bool $is_mobile, string $hash = '' ) { if ( ! self::$table_exists && ! $this->table_exists() ) { return false; } - return $this->update_item( - $id, - [ - 'hash' => $hash, - 'status' => 'completed', - ] - ); + // Get the database interface. + $db = $this->get_db(); + + // Bail if no database interface is available. + if ( empty( $db ) ) { + return false; + } + + $prefixed_table_name = $db->prefix . $this->table_name; + + $data = [ + 'hash' => $hash, + 'status' => 'completed', + ]; + + $where = [ + 'url' => untrailingslashit( $url ), + 'is_mobile' => $is_mobile, + ]; + + return $db->update( $prefixed_table_name, $data, $where ); } /** diff --git a/inc/Engine/Optimization/RUCSS/Database/Tables/UsedCSS.php b/inc/Engine/Optimization/RUCSS/Database/Tables/UsedCSS.php index 18eaac6477..6bf714a8bf 100644 --- a/inc/Engine/Optimization/RUCSS/Database/Tables/UsedCSS.php +++ b/inc/Engine/Optimization/RUCSS/Database/Tables/UsedCSS.php @@ -2,12 +2,12 @@ namespace WP_Rocket\Engine\Optimization\RUCSS\Database\Tables; -use WP_Rocket\Dependencies\Database\Table; +use WP_Rocket\Engine\Common\Database\Tables\AbstractTable; /** * RUCSS UsedCSS Table. */ -class UsedCSS extends Table { +class UsedCSS extends AbstractTable { /** * Table name @@ -46,98 +46,34 @@ class UsedCSS extends Table { ]; /** - * Instantiate class. - */ - public function __construct() { - parent::__construct(); - add_action( 'admin_init', [ $this, 'maybe_trigger_recreate_table' ], 9 ); - add_action( 'init', [ $this, 'maybe_upgrade' ] ); - } - - /** - * Setup the database schema - * - * @return void - */ - protected function set_schema() { - $this->schema = " - id bigint(20) unsigned NOT NULL AUTO_INCREMENT, - url varchar(2000) NOT NULL default '', - css longtext default NULL, - hash varchar(32) default '', - error_code varchar(32) NULL default NULL, - error_message longtext NULL default NULL, - unprocessedcss longtext NULL, - retries tinyint(1) NOT NULL default 1, - is_mobile tinyint(1) NOT NULL default 0, - job_id varchar(255) NOT NULL default '', - queue_name varchar(255) NOT NULL default '', - status varchar(255) NOT NULL default '', - modified timestamp NOT NULL default '0000-00-00 00:00:00', - last_accessed timestamp NOT NULL default '0000-00-00 00:00:00', - submitted_at timestamp NULL, - next_retry_time timestamp NOT NULL default '0000-00-00 00:00:00', - PRIMARY KEY (id), - KEY url (url(150), is_mobile), - KEY modified (modified), - KEY last_accessed (last_accessed), - INDEX `status_index` (`status`(191)), - INDEX `error_code_index` (`error_code`(32)), - KEY hash (hash)"; - } - - /** - * Delete all used_css which were not accessed in the last month. + * Table schema data. * - * @return bool|int + * @var string */ - public function delete_old_used_css() { - // Get the database interface. - $db = $this->get_db(); - - // Bail if no database interface is available. - if ( empty( $db ) ) { - return false; - } - - /** - * Filters the old RUCSS deletion interval - * - * @param int $delete_interval Old RUCSS deletion interval in months - */ - $delete_interval = (int) apply_filters( 'rocket_rucss_delete_interval', 1 ); - - if ( $delete_interval <= 0 ) { - return false; - } - - $prefixed_table_name = $this->apply_prefix( $this->table_name ); - $query = "DELETE FROM `$prefixed_table_name` WHERE `last_accessed` <= date_sub(now(), interval $delete_interval month)"; - $rows_affected = $db->query( $query ); - - return $rows_affected; - } - - /** - * Get all used_css which were not accessed in the last month. - * - * @return array - */ - public function get_old_used_css(): array { - // Get the database interface. - $db = $this->get_db(); - - // Bail if no database interface is available. - if ( empty( $db ) ) { - return false; - } - - $prefixed_table_name = $this->apply_prefix( $this->table_name ); - $query = "SELECT * FROM `$prefixed_table_name` WHERE `last_accessed` <= date_sub(now(), interval 1 month)"; - $rows_affected = $db->get_results( $query ); - - return $rows_affected; - } + protected $schema_data = " + id bigint(20) unsigned NOT NULL AUTO_INCREMENT, + url varchar(2000) NOT NULL default '', + css longtext default NULL, + hash varchar(32) default '', + error_code varchar(32) NULL default NULL, + error_message longtext NULL default NULL, + unprocessedcss longtext NULL, + retries tinyint(1) NOT NULL default 1, + is_mobile tinyint(1) NOT NULL default 0, + job_id varchar(255) NOT NULL default '', + queue_name varchar(255) NOT NULL default '', + status varchar(255) NOT NULL default '', + modified timestamp NOT NULL default '0000-00-00 00:00:00', + last_accessed timestamp NOT NULL default '0000-00-00 00:00:00', + submitted_at timestamp NULL, + next_retry_time timestamp NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (id), + KEY url (url(150), is_mobile), + KEY modified (modified), + KEY last_accessed (last_accessed), + INDEX `status_index` (`status`(191)), + INDEX `error_code_index` (`error_code`(32)), + KEY hash (hash)"; /** * Add queue columns. @@ -226,46 +162,6 @@ protected function make_status_column_index_instead_queue_name() { return $this->is_success( $index_added ); } - /** - * Remove all completed rows. - * - * @return bool|int - */ - public function remove_all_completed_rows() { - // Get the database interface. - $db = $this->get_db(); - - // Bail if no database interface is available. - if ( empty( $db ) ) { - return false; - } - - $prefixed_table_name = $this->apply_prefix( $this->table_name ); - return $db->query( "DELETE FROM `$prefixed_table_name` WHERE status IN ( 'failed', 'completed' )" ); - } - - /** - * Returns name from table. - * - * @return string - */ - public function get_name() { - return $this->apply_prefix( $this->table_name ); - } - - /** - * Trigger recreation of cache table if not exist. - * - * @return void - */ - public function maybe_trigger_recreate_table() { - if ( $this->exists() ) { - return; - } - - delete_option( $this->db_version_key ); - } - /** * Add error columns * diff --git a/inc/Engine/Optimization/RUCSS/Jobs/Factory.php b/inc/Engine/Optimization/RUCSS/Jobs/Factory.php new file mode 100644 index 0000000000..ccb4fd8307 --- /dev/null +++ b/inc/Engine/Optimization/RUCSS/Jobs/Factory.php @@ -0,0 +1,54 @@ +manager = $manager; + $this->table = $table; + } + + /** + * RUCSS job manager. + * + * @return ManagerInterface + */ + public function manager(): ManagerInterface { + return $this->manager; + } + + /** + * RUCSS Table. + * + * @return TableInterface + */ + public function table(): TableInterface { + return $this->table; + } +} diff --git a/inc/Engine/Optimization/RUCSS/Jobs/Manager.php b/inc/Engine/Optimization/RUCSS/Jobs/Manager.php new file mode 100644 index 0000000000..8b2436f0f0 --- /dev/null +++ b/inc/Engine/Optimization/RUCSS/Jobs/Manager.php @@ -0,0 +1,222 @@ +query = $query; + $this->filesystem = $filesystem; + $this->context = $context; + $this->options = $options; + } + + /** + * Get pending jobs from db. + * + * @param integer $num_rows Number of rows to grab. + * @return array + */ + public function get_pending_jobs( int $num_rows ): array { + $this->logger::debug( "RUCSS: Start getting number of {$num_rows} pending jobs." ); + + $pending_jobs = $this->query->get_pending_jobs( $num_rows ); + + if ( ! $pending_jobs ) { + $this->logger::debug( 'RUCSS: No pending jobs are there.' ); + + return []; + } + + return $pending_jobs; + } + + /** + * Validate SaaS response and fail job. + * + * @param array $job_details Details related to the job.. + * @param object $row_details Details related to the row. + * @param string $optimization_type The type of optimization applied for the current job. + * + * @return void + */ + public function validate_and_fail( array $job_details, $row_details, string $optimization_type ): void { + if ( 'all' !== $optimization_type || $this->optimization_type !== $optimization_type ) { + return; + } + + /** + * Filters the rocket min rucss css result size. + * + * @since 3.13.3 + * + * @param int min size. + */ + $min_rucss_size = apply_filters( 'rocket_min_rucss_size', 150 ); + if ( ! is_numeric( $min_rucss_size ) ) { + $min_rucss_size = 150; + } + + if ( isset( $job_details['contents']['shakedCSS_size'] ) && intval( $job_details['contents']['shakedCSS_size'] ) < $min_rucss_size ) { + $message = 'RUCSS: shakedCSS size is less than ' . $min_rucss_size; + $this->logger::error( $message ); + $this->make_status_failed( $row_details->url, $row_details->is_mobile, '500', $message ); + + $this->can_process = false; + } + } + + /** + * Process SaaS response. + * + * @param array $job_details Details related to the job.. + * @param object $row_details Details related to the row. + * @param string $optimization_type The type of optimization applied for the current job. + * + * @return void + */ + public function process( array $job_details, $row_details, string $optimization_type ): void { + if ( ! $this->is_allowed( $optimization_type ) || ! $this->can_process ) { + return; + } + + $css = $this->apply_font_display_swap( $job_details['contents']['shakedCSS'] ); + + /** + * RUCSS hash. + * + * @param string $hash RUCSS hash. + * @param string $css RUCSS content. + * @param UsedCSSRow $row_details Job details. + */ + $hash = (string) apply_filters( 'rocket_rucss_hash', md5( $css ), $css, $row_details ); + + if ( ! $this->filesystem->write_used_css( $hash, $css ) ) { + $message = 'RUCSS: Could not write used CSS to the filesystem: ' . $row_details->url; + $this->logger::error( $message ); + $this->query->make_status_failed( $row_details->url, $row_details->is_mobile, '', $job_details['message'] ); + + return; + } + + // Everything is fine, save the usedcss into DB, change status to completed and reset queue_name and job_id. + $this->logger::debug( 'RUCSS: Save used CSS for url: ' . $row_details->url ); + $this->query->make_status_completed( $row_details->url, $row_details->is_mobile, $hash ); + } + + /** + * Set the request parameter to be sent to the SaaS + * + * @return array + */ + public function set_request_param(): array { + /** + * Filters the RUCSS safelist + * + * @since 3.11 + * + * @param array $safelist Array of safelist values. + */ + $safelist = apply_filters( 'rocket_rucss_safelist', $this->options->get( 'remove_unused_css_safelist', [] ) ); + + /** + * Filters the styles attributes to be skipped (blocked) by RUCSS. + * + * @since 3.14 + * + * @param array $skipped_attr Array of safelist values. + */ + $skipped_attr = apply_filters( 'rocket_rucss_skip_styles_with_attr', [] ); + $skipped_attr = ( is_array( $skipped_attr ) ) ? $skipped_attr : []; + + return [ + 'rucss_safelist' => $safelist, + 'skip_attr' => $skipped_attr, + 'optimization_list' => [ + 'rucss', + ], + ]; + } + + /** + * Get the optimization type from the DB Row. + * + * @param object $row DB Row Object. + * @return boolean|string + */ + public function get_optimization_type_from_row( $row ) { + if ( ! isset( $row->css ) ) { + return false; + } + + return $this->optimization_type; + } +} diff --git a/inc/Engine/Optimization/RUCSS/ServiceProvider.php b/inc/Engine/Optimization/RUCSS/ServiceProvider.php index aeae9e5330..f5b55b6c76 100644 --- a/inc/Engine/Optimization/RUCSS/ServiceProvider.php +++ b/inc/Engine/Optimization/RUCSS/ServiceProvider.php @@ -3,24 +3,19 @@ use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider; use WP_Rocket\Engine\Optimization\RUCSS\Admin\{Database, OptionSubscriber, Settings}; -use WP_Rocket\Engine\Common\Clock\WPRClock; use WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber as AdminSubscriber; use WP_Rocket\Engine\Optimization\RUCSS\Context\RUCSSContext; use WP_Rocket\Engine\Optimization\RUCSS\Context\RUCSSOptimizeContext; use WP_Rocket\Engine\Optimization\RUCSS\Controller\Filesystem; -use WP_Rocket\Engine\Optimization\RUCSS\Controller\Queue; +use WP_Rocket\Engine\Common\JobManager\Queue\Queue; use WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS as UsedCSSController; -use WP_Rocket\Engine\Optimization\RUCSS\Cron\Subscriber as CronSubscriber; use WP_Rocket\Engine\Optimization\RUCSS\Database\Queries\UsedCSS as UsedCSSQuery; use WP_Rocket\Engine\Optimization\RUCSS\Database\Tables\UsedCSS as UsedCSSTable; -use WP_Rocket\Engine\Optimization\RUCSS\Frontend\APIClient; use WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber as FrontendSubscriber; -use WP_Rocket\Engine\Optimization\RUCSS\Strategy\Context\RetryContext; -use WP_Rocket\Engine\Optimization\RUCSS\Strategy\Factory\StrategyFactory; -use WP_Rocket\Engine\Optimization\RUCSS\Strategy\Strategies\DefaultProcess; -use WP_Rocket\Engine\Optimization\RUCSS\Strategy\Strategies\JobSetFail; -use WP_Rocket\Engine\Optimization\RUCSS\Strategy\Strategies\ResetRetryProcess; - +use WP_Rocket\Engine\Optimization\RUCSS\Factory\RUCSSFactory; +use WP_Rocket\Engine\Optimization\RUCSS\Jobs\{Manager, Factory}; +use WP_Rocket\Engine\Optimization\RUCSS\Context\RUCSSContextSaas; +use WP_Rocket\Engine\Optimization\RUCSS\Cron\Subscriber as CronSubscriber; /** * Service provider for the WP Rocket RUCSS * @@ -42,19 +37,16 @@ class ServiceProvider extends AbstractServiceProvider { 'rucss_database', 'rucss_option_subscriber', 'rucss_admin_subscriber', - 'rucss_frontend_api_client', 'rucss_used_css', 'rucss_used_css_query', 'rucss_frontend_subscriber', 'rucss_queue', 'rucss_filesystem', - 'rucss_cron_subscriber', 'rucss_used_css_controller', - 'rucss_retry_strategy_factory', - 'rucss_retry_strategy_job_found_no_result', - 'rucss_retry_strategy_job_not_found', - 'rucss_retry_strategy_reset_retry', - 'rucss_retry_strategy_context', + 'rucss_manager', + 'rucss_context_saas', + 'rucss_factory', + 'rucss_cron_subscriber', ]; /** @@ -74,8 +66,6 @@ public function register() { ->addArgument( $this->getContainer()->get( 'rucss_usedcss_table' ) ); $this->getContainer()->add( 'rucss_used_css_query', UsedCSSQuery::class ); - $this->getContainer()->add( 'rucss_frontend_api_client', APIClient::class ) - ->addArgument( $this->getContainer()->get( 'options' ) ); $this->getContainer()->add( 'rucss_queue', Queue::class ); $this->getContainer()->add( 'rucss_filesystem', Filesystem::class ) ->addArgument( rocket_get_constant( 'WP_ROCKET_USED_CSS_PATH' ) ) @@ -88,34 +78,35 @@ public function register() { $this->getContainer()->add( 'rucss_optimize_context', RUCSSOptimizeContext::class ) ->addArgument( $this->getContainer()->get( 'options' ) ); - $this->getContainer()->add( 'wpr_clock', WPRClock::class ); + $this->getContainer()->add( 'rucss_context_saas', RUCSSContextSaas::class ) + ->addArgument( $this->getContainer()->get( 'options' ) ); - $this->getContainer()->add( 'rucss_retry_strategy_factory', StrategyFactory::class ) - ->addArgument( $this->getContainer()->get( 'rucss_used_css_query' ) ) - ->addArgument( $this->getContainer()->get( 'wpr_clock' ) ); + $this->getContainer()->add( 'rucss_manager', Manager::class ) + ->addArguments( + [ + $this->getContainer()->get( 'rucss_used_css_query' ), + $this->getContainer()->get( 'rucss_filesystem' ), + $this->getContainer()->get( 'rucss_context_saas' ), + $this->getContainer()->get( 'options' ), + ] + ); + + $this->getContainer()->share( 'rucss_factory', Factory::class ) + ->addArguments( + [ + $this->getContainer()->get( 'rucss_manager' ), + $this->getContainer()->get( 'rucss_usedcss_table' ), + ] + ); $this->getContainer()->add( 'rucss_used_css_controller', UsedCSSController::class ) ->addArgument( $this->getContainer()->get( 'options' ) ) ->addArgument( $this->getContainer()->get( 'rucss_used_css_query' ) ) - ->addArgument( $this->getContainer()->get( 'rucss_frontend_api_client' ) ) - ->addArgument( $this->getContainer()->get( 'rucss_queue' ) ) ->addArgument( $this->getContainer()->get( 'dynamic_lists_defaultlists_data_manager' ) ) ->addArgument( $this->getContainer()->get( 'rucss_filesystem' ) ) ->addArgument( $this->getContainer()->get( 'rucss_context' ) ) ->addArgument( $this->getContainer()->get( 'rucss_optimize_context' ) ) - ->addArgument( $this->getContainer()->get( 'rucss_retry_strategy_factory' ) ) - ->addArgument( $this->getContainer()->get( 'wpr_clock' ) ); - - $this->getContainer()->add( 'rucss_retry_strategy_default_process', DefaultProcess::class ) - ->addArgument( $this->getContainer()->get( 'rucss_used_css_query' ) ); - - $this->getContainer()->add( 'rucss_retry_strategy_job_set_fail', JobSetFail::class ) - ->addArgument( $this->getContainer()->get( 'rucss_used_css_query' ) ); - - $this->getContainer()->add( 'rucss_retry_strategy_reset_retry', ResetRetryProcess::class ) - ->addArgument( $this->getContainer()->get( 'rucss_used_css_query' ) ); - - $this->getContainer()->add( 'rucss_retry_strategy_context', RetryContext::class ); + ->addArgument( $this->getContainer()->get( 'rucss_manager' ) ); $this->getContainer()->share( 'rucss_option_subscriber', OptionSubscriber::class ) ->addArgument( $this->getContainer()->get( 'rucss_settings' ) ); @@ -127,8 +118,9 @@ public function register() { $this->getContainer()->share( 'rucss_frontend_subscriber', FrontendSubscriber::class ) ->addArgument( $this->getContainer()->get( 'rucss_used_css_controller' ) ) ->addArgument( $this->getContainer()->get( 'rucss_context' ) ); + $this->getContainer()->share( 'rucss_cron_subscriber', CronSubscriber::class ) - ->addArgument( $this->getContainer()->get( 'rucss_used_css_controller' ) ) - ->addArgument( $this->getContainer()->get( 'rucss_database' ) ); + ->addArgument( $this->getContainer()->get( 'job_processor' ) ) + ->addArgument( $this->getContainer()->get( 'rucss_used_css_query' ) ); } } diff --git a/inc/Engine/Optimization/RUCSS/Strategy/Factory/StrategyFactory.php b/inc/Engine/Optimization/RUCSS/Strategy/Factory/StrategyFactory.php deleted file mode 100644 index 1fd4ecf088..0000000000 --- a/inc/Engine/Optimization/RUCSS/Strategy/Factory/StrategyFactory.php +++ /dev/null @@ -1,73 +0,0 @@ -used_css_query = $used_css_query; - $this->clock = $clock; - } - /** - * Manage the whole process, to determine which strategy to adopt.. - * - * @param object $row_details DB Row of a job. - * @param array $job_details Job information from the API. - * - * @return void - */ - public function manage( $row_details, $job_details ): void { - - switch ( $job_details['code'] ) { - case 408: - $strategy = new ResetRetryProcess( $this->used_css_query ); - break; - case 500: - case 422: - case 404: - case 401: - $strategy = new JobSetFail( $this->used_css_query ); - break; - default: - $strategy = new DefaultProcess( $this->used_css_query, $this->clock ); - break; - } - - $context = new RetryContext(); - $context->set_strategy( $strategy ); - $context->execute( $row_details, $job_details ); - } -} diff --git a/inc/Engine/Optimization/RUCSS/Strategy/Strategies/JobSetFail.php b/inc/Engine/Optimization/RUCSS/Strategy/Strategies/JobSetFail.php deleted file mode 100644 index a4e63fa2fd..0000000000 --- a/inc/Engine/Optimization/RUCSS/Strategy/Strategies/JobSetFail.php +++ /dev/null @@ -1,45 +0,0 @@ -used_css_query = $used_css_query; - } - - /** - * Execute the strategy process. - * - * @param object $row_details Row details of the job. - * @param array $job_details Job details from the API. - * - * @return void - */ - public function execute( object $row_details, array $job_details ): void { - /** - * Unlock preload URL. - * - * @param string $url URL to unlock - */ - do_action( 'rocket_preload_unlock_url', $row_details->url ); - - $this->used_css_query->make_status_failed( $row_details->id, strval( $job_details['code'] ), $job_details['message'] ); - } -} diff --git a/inc/Engine/Optimization/RUCSS/Strategy/Strategies/ResetRetryProcess.php b/inc/Engine/Optimization/RUCSS/Strategy/Strategies/ResetRetryProcess.php deleted file mode 100644 index 3e531448f9..0000000000 --- a/inc/Engine/Optimization/RUCSS/Strategy/Strategies/ResetRetryProcess.php +++ /dev/null @@ -1,43 +0,0 @@ -used_css_query = $used_css_query; - } - - /** - * Execute the strategy process. - * - * @param object $row_details Row details of the job. - * @param array $job_details Job details from the API. - * - * @return void - */ - public function execute( object $row_details, array $job_details ): void { - $used_css_row = $this->used_css_query->get_row( $row_details->url, (bool) $row_details->is_mobile ); - if ( empty( $used_css_row ) ) { - $this->used_css_query->create_new_job( $row_details->url, '', '', $row_details->is_mobile ); - return; - } - $this->used_css_query->reset_job( (int) $used_css_row->id ); - } -} diff --git a/inc/Engine/Preload/Subscriber.php b/inc/Engine/Preload/Subscriber.php index 2f33c21c3c..698d999443 100644 --- a/inc/Engine/Preload/Subscriber.php +++ b/inc/Engine/Preload/Subscriber.php @@ -104,7 +104,7 @@ public static function get_subscribed_events() { 'permalink_structure_changed' => 'on_permalink_changed', 'rocket_domain_changed' => 'on_permalink_changed', 'wp_rocket_upgrade' => [ 'on_update', 16, 2 ], - 'rocket_rucss_complete_job_status' => 'clean_url', + 'rocket_saas_complete_job_status' => 'clean_url', 'rocket_rucss_after_clearing_usedcss' => [ 'clean_url', 20 ], 'rocket_after_automatic_cache_purge' => 'preload_after_automatic_cache_purge', 'after_rocket_clean_post' => [ 'clean_partial_cache', 10, 3 ], @@ -124,6 +124,7 @@ public static function get_subscribed_events() { [ 'add_cache_reject_uri_to_excluded' ], ], 'rocket_rucss_after_clearing_failed_url' => [ 'clean_urls', 20 ], + 'rocket_atf_after_clearing_failed_url' => [ 'clean_urls', 20 ], 'transition_post_status' => [ 'remove_private_post', 10, 3 ], 'rocket_preload_exclude' => [ 'exclude_private_url', 10, 2 ], ]; diff --git a/inc/Plugin.php b/inc/Plugin.php index d558b7ea73..b3ead21ef9 100644 --- a/inc/Plugin.php +++ b/inc/Plugin.php @@ -7,6 +7,7 @@ use WP_Rocket\Admin\Options; use WP_Rocket\Engine\Admin\API\ServiceProvider as APIServiceProvider; use WP_Rocket\Engine\Common\ExtractCSS\ServiceProvider as CommmonExtractCSSServiceProvider; +use WP_Rocket\Engine\Common\JobManager\ServiceProvider as JobManagerServiceProvider; use WP_Rocket\Engine\Media\Lazyload\CSS\ServiceProvider as LazyloadCSSServiceProvider; use WP_Rocket\Engine\Media\Lazyload\CSS\Admin\ServiceProvider as AdminLazyloadCSSServiceProvider; use WP_Rocket\Event_Management\Event_Manager; @@ -291,6 +292,7 @@ private function init_common_subscribers() { $this->container->addServiceProvider( CommmonExtractCSSServiceProvider::class ); $this->container->addServiceProvider( LazyloadCSSServiceProvider::class ); $this->container->addServiceProvider( ATFServiceProvider::class ); + $this->container->addServiceProvider( JobManagerServiceProvider::class ); $common_subscribers = [ 'license_subscriber', @@ -329,7 +331,6 @@ private function init_common_subscribers() { 'rucss_admin_subscriber', 'rucss_option_subscriber', 'rucss_frontend_subscriber', - 'rucss_cron_subscriber', 'divi', 'preload_subscriber', 'preload_front_subscriber', @@ -384,8 +385,10 @@ private function init_common_subscribers() { 'shoptimizer', 'weglot', 'atf_subscriber', + 'cron_subscriber', 'atf_admin_subscriber', 'contactform7', + 'rucss_cron_subscriber', ]; $host_type = HostResolver::get_host_service(); diff --git a/inc/ThirdParty/Hostings/Kinsta.php b/inc/ThirdParty/Hostings/Kinsta.php index d3b30e576d..fdc8bbf729 100644 --- a/inc/ThirdParty/Hostings/Kinsta.php +++ b/inc/ThirdParty/Hostings/Kinsta.php @@ -26,7 +26,7 @@ public static function get_subscribed_events() { $events['rocket_after_clean_domain'] = 'clean_kinsta_cache'; $events['after_rocket_clean_post'] = 'clean_kinsta_post_cache'; $events['rocket_rucss_after_clearing_usedcss'] = 'clean_kinsta_cache_url'; - $events['rocket_rucss_complete_job_status'] = 'clean_kinsta_cache_url'; + $events['rocket_saas_complete_job_status'] = 'clean_kinsta_cache_url'; $events['after_rocket_clean_home'] = [ 'clean_kinsta_cache_home', 10, 2 ]; $events['after_rocket_clean_file'] = 'clean_kinsta_cache_url'; $events['wp_rocket_loaded'] = 'remove_partial_purge_hooks'; diff --git a/inc/ThirdParty/Hostings/SpinUpWP.php b/inc/ThirdParty/Hostings/SpinUpWP.php index 9655ed262f..5cdb196ebf 100644 --- a/inc/ThirdParty/Hostings/SpinUpWP.php +++ b/inc/ThirdParty/Hostings/SpinUpWP.php @@ -30,7 +30,7 @@ public static function get_subscribed_events() { 'wp_rocket_loaded' => 'remove_actions', 'after_rocket_clean_file' => 'purge_url', 'rocket_rucss_after_clearing_usedcss' => 'purge_url', - 'rocket_rucss_complete_job_status' => 'purge_url', + 'rocket_saas_complete_job_status' => 'purge_url', 'after_rocket_clean_term' => [ 'purge_term_urls', 10, 2 ], 'rocket_after_clean_terms' => 'purge_urls', ]; diff --git a/inc/ThirdParty/Plugins/CDN/Cloudflare.php b/inc/ThirdParty/Plugins/CDN/Cloudflare.php index c3f7d4ec04..d68dc3ad71 100644 --- a/inc/ThirdParty/Plugins/CDN/Cloudflare.php +++ b/inc/ThirdParty/Plugins/CDN/Cloudflare.php @@ -72,7 +72,7 @@ public static function get_subscribed_events() { 'pre_get_rocket_option_do_cloudflare' => 'disable_cloudflare_option', 'rocket_after_clean_domain' => 'purge_cloudflare', 'after_rocket_clean_files' => 'purge_cloudflare_partial', - 'rocket_rucss_complete_job_status' => 'purge_cloudflare_after_usedcss', + 'rocket_saas_complete_job_status' => 'purge_cloudflare_after_usedcss', 'rocket_rucss_after_clearing_usedcss' => 'purge_cloudflare_after_usedcss', 'admin_post_rocket_enable_separate_mobile_cache' => 'enable_separate_mobile_cache', 'rocket_cdn_helper_addons' => 'add_cdn_helper_message', diff --git a/inc/ThirdParty/Plugins/I18n/TranslatePress.php b/inc/ThirdParty/Plugins/I18n/TranslatePress.php index 80727133a7..53c8edc7cf 100644 --- a/inc/ThirdParty/Plugins/I18n/TranslatePress.php +++ b/inc/ThirdParty/Plugins/I18n/TranslatePress.php @@ -19,7 +19,7 @@ public static function get_subscribed_events() { } return [ - 'rocket_rucss_is_home_url' => [ 'detect_homepage', 10, 2 ], + 'rocket_saas_is_home_url' => [ 'detect_homepage', 10, 2 ], 'rocket_has_i18n' => 'is_translatepress', 'rocket_i18n_admin_bar_menu' => 'add_langs_to_admin_bar', 'rocket_i18n_current_language' => 'set_current_language', diff --git a/uninstall.php b/uninstall.php index 885f146663..4f49ff3d20 100755 --- a/uninstall.php +++ b/uninstall.php @@ -22,6 +22,8 @@ require_once __DIR__ . '/inc/Dependencies/Database/Queries/Meta.php'; require_once __DIR__ . '/inc/Dependencies/Database/Queries/Date.php'; require_once __DIR__ . '/inc/Dependencies/Database/Queries/Compare.php'; +require_once __DIR__ . '/inc/Engine/Common/Database/Table.php'; +require_once __DIR__ . '/inc/Engine/Common/Database/Tables/AbstractTable.php'; require_once __DIR__ . '/inc/Engine/Optimization/RUCSS/Database/Tables/UsedCSS.php'; require_once __DIR__ . '/inc/Engine/Preload/Database/Tables/Cache.php'; require_once __DIR__ . '/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php'; From 92f1b13f1d51b52059c41c03f42b83d241417da4 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Fri, 15 Dec 2023 13:31:40 +0100 Subject: [PATCH 007/167] Updated table interface name --- uninstall.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uninstall.php b/uninstall.php index 4f49ff3d20..83b9f06ffe 100755 --- a/uninstall.php +++ b/uninstall.php @@ -22,7 +22,7 @@ require_once __DIR__ . '/inc/Dependencies/Database/Queries/Meta.php'; require_once __DIR__ . '/inc/Dependencies/Database/Queries/Date.php'; require_once __DIR__ . '/inc/Dependencies/Database/Queries/Compare.php'; -require_once __DIR__ . '/inc/Engine/Common/Database/Table.php'; +require_once __DIR__ . '/inc/Engine/Common/Database/TableInterface.php'; require_once __DIR__ . '/inc/Engine/Common/Database/Tables/AbstractTable.php'; require_once __DIR__ . '/inc/Engine/Optimization/RUCSS/Database/Tables/UsedCSS.php'; require_once __DIR__ . '/inc/Engine/Preload/Database/Tables/Cache.php'; From 818e4b030a756bef7831c319d7448faf30827976 Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:29:58 +0100 Subject: [PATCH 008/167] Fixes #6323: Get the actual title tag of the document and use as regex directly (#6324) --- inc/Engine/Media/AboveTheFold/Frontend/Controller.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 0f0e30542b..5f687961fd 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -96,13 +96,18 @@ public function lcp( $html ): string { * @return string */ private function preload_lcp( $html, $row ) { - $preload = ''; + if ( ! preg_match( '##', $html, $matches ) ) { + return $html; + } + + $title = $matches[0]; + $preload = $title; $lcp = json_decode( $row->lcp ); $preload .= $this->preload_tag( $lcp ); - $replace = preg_replace( '##', $preload, $html, 1 ); + $replace = preg_replace( '#' . $title . '#', $preload, $html, 1 ); $replace = $this->set_fetchpriority( $lcp, $replace ); return $replace; From 0b20b4047605be6f190d5ba9aa9b18f8bf20222d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Fri, 15 Dec 2023 11:34:24 -0500 Subject: [PATCH 009/167] Closes #6319 Create SaaS global clear and banners (#6328) --- .../Media/AboveTheFold/Admin/Controller.php | 55 +++ .../Media/AboveTheFold/Admin/Subscriber.php | 20 + .../Optimization/RUCSS/Admin/Settings.php | 293 --------------- .../Optimization/RUCSS/Admin/Subscriber.php | 182 ++-------- .../RUCSS/Context/RUCSSOptimizeContext.php | 9 +- .../Optimization/RUCSS/Controller/UsedCSS.php | 62 ---- .../Optimization/RUCSS/ServiceProvider.php | 2 + inc/Engine/Saas/Admin/AdminBar.php | 159 ++++++++ inc/Engine/Saas/Admin/Clean.php | 73 ++++ inc/Engine/Saas/Admin/Notices.php | 341 ++++++++++++++++++ inc/Engine/Saas/Admin/Subscriber.php | 163 +++++++++ inc/Engine/Saas/ServiceProvider.php | 46 +++ inc/Plugin.php | 3 + 13 files changed, 887 insertions(+), 521 deletions(-) create mode 100644 inc/Engine/Saas/Admin/AdminBar.php create mode 100644 inc/Engine/Saas/Admin/Clean.php create mode 100644 inc/Engine/Saas/Admin/Notices.php create mode 100644 inc/Engine/Saas/Admin/Subscriber.php create mode 100644 inc/Engine/Saas/ServiceProvider.php diff --git a/inc/Engine/Media/AboveTheFold/Admin/Controller.php b/inc/Engine/Media/AboveTheFold/Admin/Controller.php index 7eb7735579..38575bf6e6 100644 --- a/inc/Engine/Media/AboveTheFold/Admin/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Admin/Controller.php @@ -110,4 +110,59 @@ public function delete_term_atf( $term_id ) { $this->query->delete_by_url( untrailingslashit( $url ) ); } + + /** + * Deletes rows when triggering clean from admin + * + * @return array + */ + public function truncate() { + if ( ! current_user_can( 'rocket_manage_options' ) ) { + return [ + 'status' => 'die', + ]; + } + + if ( ! $this->context->is_allowed() ) { + return [ + 'status' => 'error', + 'message' => sprintf( + // translators: %1$s = plugin name. + __( '%1$s: Critical images optimization is not enabled!', 'rocket' ), + 'WP Rocket' + ), + ]; + } + + $this->delete_rows(); + + return [ + 'status' => 'success', + 'message' => sprintf( + // translators: %1$s = plugin name. + __( '%1$s: Critical images cleared!', 'rocket' ), + 'WP Rocket' + ), + ]; + } + + /** + * Cleans rows for the current URL. + * + * @return void + */ + public function clean_url() { + if ( ! current_user_can( 'rocket_manage_options' ) ) { + wp_nonce_ays( '' ); + } + + $url = wp_get_referer(); + + if ( 0 !== strpos( $url, 'http' ) ) { + $parse_url = get_rocket_parse_url( untrailingslashit( home_url() ) ); + $url = $parse_url['scheme'] . '://' . $parse_url['host'] . $url; + } + + $this->query->delete_by_url( untrailingslashit( $url ) ); + } } diff --git a/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php b/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php index 5d39a2c94c..089c7a36df 100644 --- a/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php +++ b/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php @@ -38,6 +38,8 @@ public static function get_subscribed_events(): array { 'wp_update_comment_count' => 'delete_post_atf', 'edit_term' => 'delete_term_atf', 'pre_delete_term' => 'delete_term_atf', + 'rocket_saas_clean_all' => 'truncate', + 'rocket_saas_clean_url' => 'clean_url', ]; } @@ -71,4 +73,22 @@ public function delete_post_atf( $post_id ) { public function delete_term_atf( $term_id ) { $this->controller->delete_term_atf( $term_id ); } + + /** + * Deletes rows when triggering clean from admin + * + * @return array + */ + public function truncate() { + return $this->controller->truncate(); + } + + /** + * Cleans rows for the current URL. + * + * @return void + */ + public function clean_url() { + $this->controller->clean_url(); + } } diff --git a/inc/Engine/Optimization/RUCSS/Admin/Settings.php b/inc/Engine/Optimization/RUCSS/Admin/Settings.php index 7fd3bf6e1e..786dd75391 100644 --- a/inc/Engine/Optimization/RUCSS/Admin/Settings.php +++ b/inc/Engine/Optimization/RUCSS/Admin/Settings.php @@ -90,50 +90,6 @@ public function sanitize_options( array $input, AdminSettings $settings ): array return $input; } - /** - * Add Clean used CSS link to WP Rocket admin bar item - * - * @since 3.9 - * - * @param \WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance, passed by reference. - * - * @return void - */ - public function add_clean_used_css_menu_item( $wp_admin_bar ) { - if ( 'local' === wp_get_environment_type() ) { - return; - } - - if ( ! current_user_can( 'rocket_remove_unused_css' ) ) { - return; - } - - if ( ! is_admin() ) { - return; - } - - if ( ! $this->is_enabled() ) { - return; - } - - $referer = ''; - $action = 'rocket_clear_usedcss'; - - if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { - $referer_url = filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ), FILTER_SANITIZE_URL ); - $referer = '&_wp_http_referer=' . rawurlencode( remove_query_arg( 'fl_builder', $referer_url ) ); - } - - $wp_admin_bar->add_menu( - [ - 'parent' => 'wp-rocket', - 'id' => 'clean-used-css', - 'title' => __( 'Clear Used CSS', 'rocket' ), - 'href' => wp_nonce_url( admin_url( "admin-post.php?action={$action}{$referer}" ), $action ), - ] - ); - } - /** * Set optimize css delivery value * @@ -184,128 +140,6 @@ public function set_optimize_css_delivery_method_value( $field_args ): array { return $field_args; } - /** - * Displays the RUCSS currently processing notice - * - * @since 3.11 - * - * @return void - */ - public function display_processing_notice() { - - if ( $this->has_saas_error_notice() ) { - return; - } - - if ( ! $this->can_display_notice() ) { - return; - } - - if ( ! $this->used_css->exists() ) { - return; - } - - $transient = get_transient( 'rocket_rucss_processing' ); - - if ( false === $transient ) { - return; - } - - $current_time = time(); - - if ( $transient < $current_time ) { - return; - } - - $remaining = $transient - $current_time; - - $message = sprintf( - // translators: %1$s = plugin name, %2$s = number of seconds. - __( '%1$s: Please wait %2$s seconds. The Remove Unused CSS service is processing your pages.', 'rocket' ), - 'WP Rocket', - '' . $remaining . '' - ); - - rocket_notice_html( - [ - 'status' => 'info', - 'message' => $message, - 'id' => 'rocket-notice-rucss-processing', - ] - ); - } - - /** - * Displays the RUCSS success notice - * - * @since 3.11 - * - * @return void - */ - public function display_success_notice() { - - if ( ! $this->can_display_notice() ) { - return; - } - - if ( ! $this->used_css->exists() ) { - return; - } - - if ( $this->has_saas_error_notice() ) { - return; - } - - $boxes = get_user_meta( get_current_user_id(), 'rocket_boxes', true ); - - if ( in_array( 'rucss_success_notice', (array) $boxes, true ) ) { - return; - } - - $transient = get_transient( 'rocket_rucss_processing' ); - $class = ''; - - if ( false !== $transient ) { - $class = 'hidden'; - } - - $message = sprintf( - // translators: %1$s = plugin name, %2$s = number of URLs, %3$s = number of seconds. - __( '%1$s: The Used CSS of your homepage has been processed. WP Rocket will continue to generate Used CSS for up to %2$s URLs per %3$s second(s).', 'rocket' ), - 'WP Rocket', - apply_filters( 'rocket_rucss_pending_jobs_cron_rows_count', 100 ), - apply_filters( 'rocket_rucss_pending_jobs_cron_interval', MINUTE_IN_SECONDS ) - ); - - if ( ! $this->options->get( 'manual_preload', 0 ) ) { - $message .= ' ' . sprintf( - // translators: %1$s = opening link tag, %2$s = closing link tag. - __( 'We suggest enabling %1$sPreload%2$s for the fastest results.', 'rocket' ), - '', - '' - ); - } - - $beacon = $this->beacon->get_suggest( 'async_opti' ); - - $message .= '
' . sprintf( - // translators: %1$s = opening link tag, %2$s = closing link tag. - __( 'To learn more about the process check our %1$sdocumentation%2$s.', 'rocket' ), - '', - '' - ); - - rocket_notice_html( - [ - 'message' => $message, - 'dismissible' => $class, - 'id' => 'rocket-notice-rucss-success', - 'dismiss_button' => 'rucss_success_notice', - 'dismiss_button_class' => 'button-primary', - ] - ); - } - /** * Checks if we can display the RUCSS notices * @@ -341,36 +175,6 @@ private function can_display_notice( $check_enabled = true ): bool { return true; } - /** - * Adds the notice end time to WP Rocket localize script data - * - * @since 3.11 - * - * @param array $data Localize script data. - * - * @return array - */ - public function add_localize_script_data( $data ): array { - if ( ! is_array( $data ) ) { - $data = (array) $data; - } - - if ( ! $this->is_enabled() ) { - return $data; - } - - $transient = get_transient( 'rocket_rucss_processing' ); - - if ( false === $transient ) { - return $data; - } - - $data['notice_end_time'] = $transient; - $data['cron_disabled'] = rocket_get_constant( 'DISABLE_WP_CRON', false ); - - return $data; - } - /** * Disables combine CSS if RUCSS is enabled when updating to 3.11 * @@ -431,103 +235,6 @@ public function update_safelist_items( $old_version ) { update_option( 'wp_rocket_settings', $options ); } - /** - * Display a notification on wrong license. - * - * @return void - */ - public function display_wrong_license_notice() { - if ( ! $this->can_display_notice( false ) ) { - return; - } - - $main_message = __( "We couldn't generate the used CSS because you're using a nulled version of WP Rocket. You need an active license to use the Remove Unused CSS feature and further improve your website's performance.", 'rocket' ); - $cta_message = sprintf( - // translators: %1$s = promo percentage. - __( 'Click here to get a WP Rocket single license at %1$s off!', 'rocket' ), - '10%%' - ); - - $message = sprintf( - // translators: %1$s = plugin name, %2$s = opening anchor tag, %3$s = closing anchor tag. - "%1\$s:

$main_message

%2\$s$cta_message%3\$s", - 'WP Rocket', - '', - '' - ); - - rocket_notice_html( - [ - 'status' => 'error', - 'dismissible' => '', - 'message' => $message, - 'id' => 'rocket-notice-rucss-wrong-licence', - ] - ); - } - - /** - * Display an error notice when the connection to the server fails - * - * @return void - */ - public function display_saas_error_notice() { - - if ( ! $this->has_saas_error_notice() ) { - $boxes = get_user_meta( get_current_user_id(), 'rocket_boxes', true ); - if ( in_array( 'rucss_saas_error_notice', (array) $boxes, true ) ) { - unset( $boxes['rucss_saas_error_notice'] ); - update_user_meta( get_current_user_id(), 'rocket_boxes', $boxes ); - } - - return; - } - - if ( ! $this->can_display_notice() ) { - return; - } - - $boxes = get_user_meta( get_current_user_id(), 'rocket_boxes', true ); - - if ( in_array( 'rucss_error_notice', (array) $boxes, true ) ) { - return; - } - - $firewall_beacon = $this->beacon->get_suggest( 'rucss_firewall_ips' ); - - $main_message = sprintf( - // translators: %1$s = open tag, %2$s = closing tag. - __( 'It seems a security plugin or the server\'s firewall prevents WP Rocket from accessing the Remove Unused CSS generator. IPs listed %1$shere in our documentation%2$s should be added to your allowlists:', 'rocket' ), - '', - '' - ); - - $security_message = __( '- In the security plugin, if you are using one', 'rocket' ); - $firewall_message = __( "- In the server's firewall. Your host can help you with this", 'rocket' ); - - $message = "WP Rocket: $main_message
  • $security_message
  • $firewall_message
"; - - rocket_notice_html( - [ - 'status' => 'error', - 'message' => $message, - 'dismissible' => '', - 'id' => 'rocket-notice-rucss-error-http', - 'dismiss_button' => 'rucss_error_notice', - 'dismiss_button_class' => 'button-primary', - ] - ); - } - - /** - * Is the error notice present. - * - * @return bool - */ - public function has_saas_error_notice() { - return (bool) get_transient( 'wp_rocket_rucss_errors_count' ); - } - /** * Display a notice on table missing. * diff --git a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php index bacfcf3857..4f40635695 100644 --- a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php +++ b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php @@ -5,9 +5,8 @@ use WP_Rocket\Engine\Common\JobManager\Queue\Queue; use WP_Rocket\Engine\Common\Queue\RUCSSQueueRunner; -use WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS; +use WP_Rocket\Engine\Optimization\RUCSS\Controller\{Queue, UsedCSS}; use WP_Rocket\Event_Management\Subscriber_Interface; -use WP_Admin_Bar; class Subscriber implements Subscriber_Interface { /** @@ -77,26 +76,14 @@ public static function get_subscribed_events(): array { 'wp_update_comment_count' => 'delete_used_css_on_update_or_delete', 'edit_term' => 'delete_term_used_css', 'pre_delete_term' => 'delete_term_used_css', - 'admin_post_rocket_clear_usedcss' => 'truncate_used_css_handler', - 'admin_post_rocket_clear_usedcss_url' => 'clear_url_usedcss', 'admin_notices' => [ - [ 'clear_usedcss_result' ], - [ 'display_processing_notice' ], - [ 'display_success_notice' ], - [ 'display_wrong_license_notice' ], - [ 'display_saas_error_notice' ], [ 'display_no_table_notice' ], [ 'notice_write_permissions' ], ], - 'rocket_admin_bar_items' => [ - [ 'add_clean_used_css_menu_item' ], - [ 'add_clear_usedcss_bar_item' ], - ], 'rocket_before_add_field_to_settings' => [ [ 'set_optimize_css_delivery_value', 10, 1 ], [ 'set_optimize_css_delivery_method_value', 10, 1 ], ], - 'rocket_localize_admin_script' => 'add_localize_script_data', 'wp_rocket_upgrade' => [ [ 'set_option_on_update', 14, 2 ], [ 'update_safelist_items', 15, 2 ], @@ -109,6 +96,8 @@ public static function get_subscribed_events(): array { 'admin_head-tools_page_action-scheduler' => 'delete_as_tables_transient_on_tools_page', 'pre_get_rocket_option_remove_unused_css' => 'disable_russ_on_wrong_license', 'rocket_before_rollback' => 'cancel_queues', + 'rocket_saas_clean_all' => [ 'truncate', 11 ], + 'rocket_saas_clean_url' => [ 'clean_url', 11 ], ]; } @@ -259,99 +248,38 @@ public function clean_used_css_and_cache( $old_value, $value ) { } /** - * Truncate used_css table when clicking on the dashboard button. - * - * @since 3.9 + * Deletes rows when triggering clean from admin * - * @return void + * @return array */ - public function truncate_used_css_handler() { - if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( $_GET['_wpnonce'] ), 'rocket_clear_usedcss' ) ) { - wp_nonce_ays( '' ); - } - + public function truncate() { if ( ! current_user_can( 'rocket_remove_unused_css' ) ) { - rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit; + return [ + 'status' => 'die', + ]; } if ( ! $this->settings->is_enabled() ) { - set_transient( - 'rocket_clear_usedcss_response', - [ - 'status' => 'error', - 'message' => sprintf( - // translators: %1$s = plugin name. - __( '%1$s: Used CSS option is not enabled!', 'rocket' ), - 'WP Rocket' - ), - ] - ); - - wp_safe_redirect( esc_url_raw( wp_get_referer() ) ); - rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit; - } - - rocket_clean_domain(); - - $this->delete_used_css_rows(); - - rocket_dismiss_box( 'rocket_warning_plugin_modification' ); - - set_transient( - 'rocket_clear_usedcss_response', - [ - 'status' => 'success', + return [ + 'status' => 'error', 'message' => sprintf( // translators: %1$s = plugin name. - __( '%1$s: Used CSS cache cleared!', 'rocket' ), + __( '%1$s: Used CSS option is not enabled!', 'rocket' ), 'WP Rocket' ), - ] - ); - - $this->set_notice_transient(); - - wp_safe_redirect( esc_url_raw( wp_get_referer() ) ); - rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit; - } - - /** - * Show admin notice after clearing used_css table. - * - * @since 3.9 - * - * @return void - */ - public function clear_usedcss_result() { - if ( ! current_user_can( 'rocket_remove_unused_css' ) ) { - return; - } - - if ( ! $this->settings->is_enabled() ) { - return; + ]; } - $response = get_transient( 'rocket_clear_usedcss_response' ); - if ( ! $response ) { - return; - } - - delete_transient( 'rocket_clear_usedcss_response' ); - - rocket_notice_html( $response ); - } + $this->delete_used_css_rows(); - /** - * Add Clean used CSS link to WP Rocket admin bar item - * - * @since 3.9 - * - * @param \WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance, passed by reference. - * - * @return void - */ - public function add_clean_used_css_menu_item( $wp_admin_bar ) { - $this->settings->add_clean_used_css_menu_item( $wp_admin_bar ); + return [ + 'status' => 'success', + 'message' => sprintf( + // translators: %1$s = plugin name. + __( '%1$s: Used CSS cache cleared!', 'rocket' ), + 'WP Rocket' + ), + ]; } /** @@ -402,52 +330,6 @@ public function display_success_notice() { $this->settings->display_success_notice(); } - /** - * Display a notification on wrong license. - * - * @return void - */ - public function display_wrong_license_notice() { - $transient = get_option( 'wp_rocket_no_licence' ); - - if ( ! $transient ) { - return; - } - - $this->settings->display_wrong_license_notice(); - } - - /** - * Display error notice when connection to SAAS fails - * - * @return void - */ - public function display_saas_error_notice() { - $this->settings->display_saas_error_notice(); - } - - - /** - * Display admin notice when detecting any missed Action scheduler tables. - * - * @since 3.11.0.3 - * - * @return void - */ - public function display_as_missed_tables_notice() { - $screen = get_current_screen(); - - if ( isset( $screen->id ) && 'tools_page_action-scheduler' === $screen->id ) { - return; - } - - if ( $this->is_valid_as_tables() ) { - return; - } - - $this->settings->display_as_missed_tables_notice(); - } - /** * Adds the notice end time to WP Rocket localize script data * @@ -461,13 +343,11 @@ public function add_localize_script_data( $data ): array { } /** - * Clear UsedCSS for the current URL. + * Clean UsedCSS for the current URL. * * @return void */ - public function clear_url_usedcss() { - check_admin_referer( 'rocket_clear_usedcss_url' ); - + public function clean_url() { if ( ! current_user_can( 'rocket_remove_unused_css' ) ) { wp_nonce_ays( '' ); } @@ -480,20 +360,6 @@ public function clear_url_usedcss() { } $this->used_css->clear_url_usedcss( $url ); - - wp_safe_redirect( esc_url_raw( wp_get_referer() ) ); - rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit; - } - - /** - * Add clear UsedCSS adminbar item. - * - * @param WP_Admin_Bar $wp_admin_bar Adminbar object. - * - * @return void - */ - public function add_clear_usedcss_bar_item( WP_Admin_Bar $wp_admin_bar ) { - $this->used_css->add_clear_usedcss_bar_item( $wp_admin_bar ); } /** diff --git a/inc/Engine/Optimization/RUCSS/Context/RUCSSOptimizeContext.php b/inc/Engine/Optimization/RUCSS/Context/RUCSSOptimizeContext.php index 9413ac06d3..c2a8126cc4 100644 --- a/inc/Engine/Optimization/RUCSS/Context/RUCSSOptimizeContext.php +++ b/inc/Engine/Optimization/RUCSS/Context/RUCSSOptimizeContext.php @@ -10,6 +10,7 @@ class RUCSSOptimizeContext extends AbstractContext { * Check if the operation is allowed. * * @param array $data Data to provide to the context. + * * @return bool */ public function is_allowed( array $data = [] ): bool { @@ -21,18 +22,10 @@ public function is_allowed( array $data = [] ): bool { ] ); - if ( 'local' === wp_get_environment_type() ) { - return false; - } - if ( ! current_user_can( 'rocket_remove_unused_css' ) ) { return false; } - if ( is_admin() ) { - return false; - } - if ( ! $is_allowed ) { return false; } diff --git a/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php b/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php index dd65ba177b..a2e213a776 100644 --- a/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php +++ b/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php @@ -9,7 +9,6 @@ use WP_Rocket\Engine\Optimization\DynamicLists\DefaultLists\DataManager; use WP_Rocket\Engine\Optimization\RegexTrait; use WP_Rocket\Engine\Optimization\RUCSS\Database\Queries\UsedCSS as UsedCSS_Query; -use WP_Admin_Bar; use WP_Rocket\Engine\Common\JobManager\Managers\ManagerInterface; class UsedCSS { @@ -51,13 +50,6 @@ class UsedCSS { */ protected $context; - /** - * RUCSS optimize url context. - * - * @var ContextInterface - */ - protected $optimize_url_context; - /** * External exclusions list, can be urls or attributes. * @@ -415,60 +407,6 @@ private function is_mobile(): bool { && wp_is_mobile(); } - /** - * Add clear UsedCSS adminbar item. - * - * @param WP_Admin_Bar $wp_admin_bar Adminbar object. - * - * @return void - */ - public function add_clear_usedcss_bar_item( WP_Admin_Bar $wp_admin_bar ) { - global $post; - - if ( ! $this->optimize_url_context->is_allowed() ) { - return; - } - - /** - * Filters the rocket `clear used css of this url` option on admin bar menu. - * - * @since 3.12.1 - * - * @param bool $should_skip Should skip adding `clear used css of this url` option in admin bar. - * @param type $post Post object. - */ - if ( apply_filters( 'rocket_skip_admin_bar_clear_used_css_option', false, $post ) ) { - return; - } - - $referer = ''; - $action = 'rocket_clear_usedcss_url'; - - if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { - $referer_url = filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ), FILTER_SANITIZE_URL ); - - /** - * Filters to act on the referer url for the admin bar. - * - * @param string $uri Current uri - */ - $referer = (string) apply_filters( 'rocket_admin_bar_referer', esc_url( $referer_url ) ); - $referer = '&_wp_http_referer=' . rawurlencode( remove_query_arg( 'fl_builder', $referer ) ); - } - - /** - * Clear usedCSS for this URL (frontend). - */ - $wp_admin_bar->add_menu( - [ - 'parent' => 'wp-rocket', - 'id' => 'clear-usedcss-url', - 'title' => __( 'Clear Used CSS of this URL', 'rocket' ), - 'href' => wp_nonce_url( admin_url( 'admin-post.php?action=' . $action . $referer ), $action ), - ] - ); - } - /** * Clear specific url. * diff --git a/inc/Engine/Optimization/RUCSS/ServiceProvider.php b/inc/Engine/Optimization/RUCSS/ServiceProvider.php index f5b55b6c76..fb44633c34 100644 --- a/inc/Engine/Optimization/RUCSS/ServiceProvider.php +++ b/inc/Engine/Optimization/RUCSS/ServiceProvider.php @@ -47,6 +47,8 @@ class ServiceProvider extends AbstractServiceProvider { 'rucss_context_saas', 'rucss_factory', 'rucss_cron_subscriber', + 'rucss_context', + 'rucss_optimize_context', ]; /** diff --git a/inc/Engine/Saas/Admin/AdminBar.php b/inc/Engine/Saas/Admin/AdminBar.php new file mode 100644 index 0000000000..ba2f6c6791 --- /dev/null +++ b/inc/Engine/Saas/Admin/AdminBar.php @@ -0,0 +1,159 @@ +options = $options; + $this->atf_context = $atf_context; + $this->rucss_url_context = $rucss_url_context; + } + + /** + * Add clean SaaS data to WP Rocket admin bar menu + * + * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance, passed by reference. + * + * @return void + */ + public function add_clean_saas_menu_item( $wp_admin_bar ) { + if ( 'local' === wp_get_environment_type() ) { + return; + } + + if ( ! is_admin() ) { + return; + } + + if ( + ! $this->atf_context->is_allowed() + && + ! (bool) $this->options->get( 'remove_unused_css', 0 ) + ) { + return; + } + + $title = __( 'Clear Critical Images', 'rocket' ); + + if ( + (bool) $this->options->get( 'remove_unused_css', 0 ) + && + current_user_can( 'rocket_remove_unused_css' ) + ) { + $title = __( 'Clear Used CSS', 'rocket' ); + } + + $referer = ''; + $action = 'rocket_clean_saas'; + + if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { + $referer_url = filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ), FILTER_SANITIZE_URL ); + $referer = '&_wp_http_referer=' . rawurlencode( remove_query_arg( 'fl_builder', $referer_url ) ); + } + + $wp_admin_bar->add_menu( + [ + 'parent' => 'wp-rocket', + 'id' => 'clean-saas', + 'title' => $title, + 'href' => wp_nonce_url( admin_url( "admin-post.php?action={$action}{$referer}" ), $action ), + ] + ); + } + + /** + * Add clean SaaS URL data to WP Rocket admin bar menu + * + * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance, passed by reference. + * + * @return void + */ + public function add_clean_url_menu_item( WP_Admin_Bar $wp_admin_bar ) { + global $post; + + if ( 'local' === wp_get_environment_type() ) { + return; + } + + if ( ! $this->atf_context->is_allowed() + && + ! $this->rucss_url_context->is_allowed() + ) { + return; + } + + /** + * Filters the rocket `clear used css of this url` option on admin bar menu. + * + * @since 3.12.1 + * + * @param bool $should_skip Should skip adding `clear used css of this url` option in admin bar. + * @param type $post Post object. + */ + if ( apply_filters( 'rocket_skip_admin_bar_clear_used_css_option', false, $post ) ) { + return; + } + + $referer = ''; + $action = 'rocket_clean_saas_url'; + + if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { + $referer_url = filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ), FILTER_SANITIZE_URL ); + + /** + * Filters to act on the referer url for the admin bar. + * + * @param string $uri Current uri. + */ + $referer = (string) apply_filters( 'rocket_admin_bar_referer', esc_url( $referer_url ) ); + $referer = '&_wp_http_referer=' . rawurlencode( remove_query_arg( 'fl_builder', $referer ) ); + } + $title = __( 'Clear Critical Images of this URL', 'rocket' ); + + if ( $this->rucss_url_context->is_allowed() ) { + $title = __( 'Clean Used CSS of this URL', 'rocket' ); + } + + $wp_admin_bar->add_menu( + [ + 'parent' => 'wp-rocket', + 'id' => 'clear-saaas-url', + 'title' => $title, + 'href' => wp_nonce_url( admin_url( 'admin-post.php?action=' . $action . $referer ), $action ), + ] + ); + } +} diff --git a/inc/Engine/Saas/Admin/Clean.php b/inc/Engine/Saas/Admin/Clean.php new file mode 100644 index 0000000000..fb1813d8e4 --- /dev/null +++ b/inc/Engine/Saas/Admin/Clean.php @@ -0,0 +1,73 @@ +options = $options; + $this->beacon = $beacon; + $this->atf_context = $atf_context; + } + + /** + * Show admin notice after clearing SaaS tables. + * + * @return void + */ + public function clean_saas_result() { + if ( ! current_user_can( 'rocket_manage_options' ) ) { + return; + } + + if ( + ! $this->options->get( 'remove_unused_css', 0 ) + && + ! $this->atf_context->is_allowed() + ) { + return; + } + + $response = get_transient( 'rocket_saas_clean_message' ); + + if ( ! $response ) { + return; + } + + delete_transient( 'rocket_saas_clean_message' ); + + rocket_notice_html( $response ); + } + + /** + * Displays the SaaS currently processing notice + * + * @return void + */ + public function display_processing_notice() { + if ( $this->has_saas_error_notice() ) { + return; + } + + if ( ! $this->can_display_notice() ) { + return; + } + + $transient = get_transient( 'rocket_saas_processing' ); + + if ( false === $transient ) { + return; + } + + $current_time = time(); + + if ( $transient < $current_time ) { + return; + } + + $remaining = $transient - $current_time; + + $message = sprintf( + // translators: %1$s = plugin name, %2$s = number of seconds. + __( '%1$s: Please wait %2$s seconds. The Remove Unused CSS service is processing your pages.', 'rocket' ), + 'WP Rocket', + '' . $remaining . '' + ); + + rocket_notice_html( + [ + 'status' => 'info', + 'message' => $message, + 'id' => 'rocket-notice-saas-processing', + ] + ); + } + + /** + * Displays the SaaS success notice + * + * @return void + */ + public function display_success_notice() { + if ( ! $this->can_display_notice() ) { + return; + } + + if ( $this->has_saas_error_notice() ) { + return; + } + + $boxes = get_user_meta( get_current_user_id(), 'rocket_boxes', true ); + + if ( in_array( 'saas_success_notice', (array) $boxes, true ) ) { + return; + } + + $transient = get_transient( 'rocket_saas_processing' ); + $class = ''; + + if ( false !== $transient ) { + $class = 'hidden'; + } + + $message = sprintf( + // translators: %1$s = plugin name, %2$s = number of URLs, %3$s = number of seconds. + __( '%1$s: The Used CSS of your homepage has been processed. WP Rocket will continue to generate Used CSS for up to %2$s URLs per %3$s second(s).', 'rocket' ), + 'WP Rocket', + apply_filters( 'rocket_rucss_pending_jobs_cron_rows_count', 100 ), + apply_filters( 'rocket_rucss_pending_jobs_cron_interval', MINUTE_IN_SECONDS ) + ); + + if ( ! $this->options->get( 'manual_preload', 0 ) ) { + $message .= ' ' . sprintf( + // translators: %1$s = opening link tag, %2$s = closing link tag. + __( 'We suggest enabling %1$sPreload%2$s for the fastest results.', 'rocket' ), + '', + '' + ); + } + + $beacon = $this->beacon->get_suggest( 'async_opti' ); + + $message .= '
' . sprintf( + // translators: %1$s = opening link tag, %2$s = closing link tag. + __( 'To learn more about the process check our %1$sdocumentation%2$s.', 'rocket' ), + '', + '' + ); + + rocket_notice_html( + [ + 'message' => $message, + 'dismissible' => $class, + 'id' => 'rocket-notice-saas-success', + 'dismiss_button' => 'saas_success_notice', + 'dismiss_button_class' => 'button-primary', + ] + ); + } + + /** + * Adds the notice end time to WP Rocket localize script data + * + * @since 3.11 + * + * @param array $data Localize script data. + * + * @return array + */ + public function add_localize_script_data( $data ): array { + if ( ! is_array( $data ) ) { + $data = (array) $data; + } + + if ( + ! $this->options->get( 'remove_unused_css', 0 ) + && + ! $this->atf_context->is_allowed() + ) { + return $data; + } + + $transient = get_transient( 'rocket_saas_processing' ); + + if ( false === $transient ) { + return $data; + } + + $data['notice_end_time'] = $transient; + $data['cron_disabled'] = rocket_get_constant( 'DISABLE_WP_CRON', false ); + + return $data; + } + + /** + * Display a notification on wrong license. + * + * @return void + */ + public function display_wrong_license_notice() { + $transient = get_option( 'wp_rocket_no_licence' ); + + if ( ! $transient ) { + return; + } + + if ( ! $this->can_display_notice() ) { + return; + } + + $main_message = __( "We couldn't generate the used CSS because you're using a nulled version of WP Rocket. You need an active license to use the Remove Unused CSS feature and further improve your website's performance.", 'rocket' ); + $cta_message = sprintf( + // translators: %1$s = promo percentage. + __( 'Click here to get a WP Rocket single license at %1$s off!', 'rocket' ), + '10%%' + ); + + $message = sprintf( + // translators: %1$s = plugin name, %2$s = opening anchor tag, %3$s = closing anchor tag. + "%1\$s:

$main_message

%2\$s$cta_message%3\$s", + 'WP Rocket', + '', + '' + ); + + rocket_notice_html( + [ + 'status' => 'error', + 'dismissible' => '', + 'message' => $message, + 'id' => 'rocket-notice-rucss-wrong-licence', + ] + ); + } + + /** + * Display an error notice when the connection to the server fails + * + * @return void + */ + public function display_saas_error_notice() { + + if ( ! $this->has_saas_error_notice() ) { + $boxes = get_user_meta( get_current_user_id(), 'rocket_boxes', true ); + if ( in_array( 'rucss_saas_error_notice', (array) $boxes, true ) ) { + unset( $boxes['rucss_saas_error_notice'] ); + update_user_meta( get_current_user_id(), 'rocket_boxes', $boxes ); + } + + return; + } + + if ( ! $this->can_display_notice() ) { + return; + } + + $boxes = get_user_meta( get_current_user_id(), 'rocket_boxes', true ); + + if ( in_array( 'saas_error_notice', (array) $boxes, true ) ) { + return; + } + + $firewall_beacon = $this->beacon->get_suggest( 'rucss_firewall_ips' ); + + $main_message = sprintf( + // translators: %1$s = open tag, %2$s = closing tag. + __( 'It seems a security plugin or the server\'s firewall prevents WP Rocket from accessing the Remove Unused CSS generator. IPs listed %1$shere in our documentation%2$s should be added to your allowlists:', 'rocket' ), + '', + '' + ); + + $security_message = __( '- In the security plugin, if you are using one', 'rocket' ); + $firewall_message = __( "- In the server's firewall. Your host can help you with this", 'rocket' ); + + $message = "WP Rocket: $main_message
  • $security_message
  • $firewall_message
"; + + rocket_notice_html( + [ + 'status' => 'error', + 'message' => $message, + 'dismissible' => '', + 'id' => 'rocket-notice-rucss-error-http', + 'dismiss_button' => 'rucss_error_notice', + 'dismiss_button_class' => 'button-primary', + ] + ); + } + + /** + * Checks if we can display the SaaS notices + * + * @return bool + */ + private function can_display_notice(): bool { + $screen = get_current_screen(); + + if ( + isset( $screen->id ) + && + 'settings_page_wprocket' !== $screen->id + ) { + return false; + } + + if ( ! current_user_can( 'rocket_manage_options' ) ) { + return false; + } + + return true; + } + + /** + * Is the error notice present. + * + * @return bool + */ + private function has_saas_error_notice() { + return (bool) get_transient( 'wp_rocket_rucss_errors_count' ); + } +} diff --git a/inc/Engine/Saas/Admin/Subscriber.php b/inc/Engine/Saas/Admin/Subscriber.php new file mode 100644 index 0000000000..26ee2bee8b --- /dev/null +++ b/inc/Engine/Saas/Admin/Subscriber.php @@ -0,0 +1,163 @@ +admin_bar = $admin_bar; + $this->clean = $clean; + $this->notices = $notices; + } + + /** + * Array of events this subscriber listens to + * + * @return array + */ + public static function get_subscribed_events(): array { + return [ + 'rocket_admin_bar_items' => [ + [ 'add_clean_saas_menu_item' ], + [ 'add_clean_url_menu_item' ], + ], + 'admin_post_rocket_clean_saas' => 'clean_saas', + 'admin_post_rocket_clean_saas_url' => 'clean_url_saas', + 'admin_notices' => [ + [ 'clean_saas_result' ], + [ 'display_processing_notice' ], + [ 'display_success_notice' ], + [ 'display_wrong_license_notice' ], + [ 'display_saas_error_notice' ], + ], + 'rocket_localize_admin_script' => 'add_localize_script_data', + ]; + } + + /** + * Add clean SaaS data to WP Rocket admin bar menu + * + * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance, passed by reference. + * + * @return void + */ + public function add_clean_saas_menu_item( WP_Admin_Bar $wp_admin_bar ) { + $this->admin_bar->add_clean_saas_menu_item( $wp_admin_bar ); + } + + /** + * Add clean SaaS URL data to WP Rocket admin bar menu + * + * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance, passed by reference. + * + * @return void + */ + public function add_clean_url_menu_item( WP_Admin_Bar $wp_admin_bar ) { + $this->admin_bar->add_clean_url_menu_item( $wp_admin_bar ); + } + + /** + * Truncate SaaS tables when clicking on the dashboard button + * + * @return void + */ + public function clean_saas() { + $this->clean->clean_saas(); + } + + /** + * Clean SaaS for the current URL. + * + * @return void + */ + public function clean_url_saas() { + $this->clean->clean_url_saas(); + } + + /** + * Show admin notice after clearing SaaS tables. + * + * @return void + */ + public function clean_saas_result() { + $this->notices->clean_saas_result(); + } + + /** + * Displays the SaaS currently processing notice + * + * @return void + */ + public function display_processing_notice() { + $this->notices->display_processing_notice(); + } + + /** + * Displays the SaaS success notice + * + * @return void + */ + public function display_success_notice() { + $this->notices->display_success_notice(); + } + + /** + * Display a notification on wrong license. + * + * @return void + */ + public function display_wrong_license_notice() { + $this->notices->display_wrong_license_notice(); + } + + /** + * Display an error notice when the connection to the server fails + * + * @return void + */ + public function display_saas_error_notice() { + $this->notices->display_saas_error_notice(); + } + + /** + * Adds the notice end time to WP Rocket localize script data + * + * @param array $data Localize script data. + * + * @return array + */ + public function add_localize_script_data( $data ): array { + return $this->notices->add_localize_script_data( $data ); + } +} diff --git a/inc/Engine/Saas/ServiceProvider.php b/inc/Engine/Saas/ServiceProvider.php new file mode 100644 index 0000000000..60fc9699c6 --- /dev/null +++ b/inc/Engine/Saas/ServiceProvider.php @@ -0,0 +1,46 @@ +getContainer()->add( 'sass_admin_bar', Adminbar::class ) + ->addArgument( $this->getContainer()->get( 'options' ) ) + ->addArgument( $this->getContainer()->get( 'atf_context' ) ) + ->addArgument( $this->getContainer()->get( 'rucss_optimize_context' ) ); + $this->getContainer()->add( 'sass_clean', Clean::class ); + $this->getContainer()->add( 'sass_notices', Notices::class ) + ->addArgument( $this->getContainer()->get( 'options' ) ) + ->addArgument( $this->getContainer()->get( 'beacon' ) ) + ->addArgument( $this->getContainer()->get( 'atf_context' ) ); + $this->getContainer()->share( 'saas_admin_subscriber', Subscriber::class ) + ->addArgument( $this->getContainer()->get( 'sass_admin_bar' ) ) + ->addArgument( $this->getContainer()->get( 'sass_clean' ) ) + ->addArgument( $this->getContainer()->get( 'sass_notices' ) ); + } +} diff --git a/inc/Plugin.php b/inc/Plugin.php index b3ead21ef9..44db290e06 100644 --- a/inc/Plugin.php +++ b/inc/Plugin.php @@ -39,6 +39,7 @@ use WP_Rocket\Engine\Plugin\ServiceProvider as PluginServiceProvider; use WP_Rocket\Engine\Preload\Links\ServiceProvider as PreloadLinksServiceProvider; use WP_Rocket\Engine\Preload\ServiceProvider as PreloadServiceProvider; +use WP_Rocket\Engine\Saas\ServiceProvider as SaasAdminServiceProvider; use WP_Rocket\Engine\Support\ServiceProvider as SupportServiceProvider; use WP_Rocket\ServiceProvider\Common_Subscribers; use WP_Rocket\ServiceProvider\Options as OptionsServiceProvider; @@ -293,6 +294,7 @@ private function init_common_subscribers() { $this->container->addServiceProvider( LazyloadCSSServiceProvider::class ); $this->container->addServiceProvider( ATFServiceProvider::class ); $this->container->addServiceProvider( JobManagerServiceProvider::class ); + $this->container->addServiceProvider( SaasAdminServiceProvider::class ); $common_subscribers = [ 'license_subscriber', @@ -389,6 +391,7 @@ private function init_common_subscribers() { 'atf_admin_subscriber', 'contactform7', 'rucss_cron_subscriber', + 'saas_admin_subscriber', ]; $host_type = HostResolver::get_host_service(); From cedc02e5663c8d983b719ce65e2b7cc803f9c7ce Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Fri, 15 Dec 2023 17:45:46 +0100 Subject: [PATCH 010/167] Fixes: #6322: Guard LCP filter from wrong value (#6326) --- inc/Engine/Media/AboveTheFold/Context/Context.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/Context/Context.php b/inc/Engine/Media/AboveTheFold/Context/Context.php index 4f3358d04c..edb3a385d4 100644 --- a/inc/Engine/Media/AboveTheFold/Context/Context.php +++ b/inc/Engine/Media/AboveTheFold/Context/Context.php @@ -23,6 +23,12 @@ public function is_allowed( array $data = [] ): bool { * * @param bool $allow True to allow, false otherwise. */ - return apply_filters( 'rocket_above_the_fold_optimization', true ); + $is_atf_enabled = apply_filters( 'rocket_above_the_fold_optimization', true ); + + if ( ! is_bool( $is_atf_enabled ) ) { + return true; + } + + return $is_atf_enabled; } } From a8bef5a29ee49a0b499ba24174a16300b0cd5c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Fri, 15 Dec 2023 13:36:18 -0500 Subject: [PATCH 011/167] fix import, remove unused methods --- .../Optimization/RUCSS/Admin/Subscriber.php | 36 +------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php index 4f40635695..244ddd450b 100644 --- a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php +++ b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php @@ -5,7 +5,7 @@ use WP_Rocket\Engine\Common\JobManager\Queue\Queue; use WP_Rocket\Engine\Common\Queue\RUCSSQueueRunner; -use WP_Rocket\Engine\Optimization\RUCSS\Controller\{Queue, UsedCSS}; +use WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS; use WP_Rocket\Event_Management\Subscriber_Interface; class Subscriber implements Subscriber_Interface { @@ -308,40 +308,6 @@ public function set_optimize_css_delivery_method_value( $field_args ): array { return $this->settings->set_optimize_css_delivery_method_value( $field_args ); } - /** - * Displays the RUCSS currently processing notice - * - * @since 3.11 - * - * @return void - */ - public function display_processing_notice() { - $this->settings->display_processing_notice(); - } - - /** - * Displays the RUCSS success notice - * - * @since 3.11 - * - * @return void - */ - public function display_success_notice() { - $this->settings->display_success_notice(); - } - - /** - * Adds the notice end time to WP Rocket localize script data - * - * @since 3.11 - * - * @param array $data Localize script data. - * @return array - */ - public function add_localize_script_data( $data ): array { - return $this->settings->add_localize_script_data( $data ); - } - /** * Clean UsedCSS for the current URL. * From 32b2a5c8fec1eb500a9ef08457e6c68cfb62a8cc Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:44:47 +0100 Subject: [PATCH 012/167] Closes #6321: LCP/ATF relative images not excluded from LL (#6336) --- .../AboveTheFold/Frontend/Controller.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 5f687961fd..badc869fbb 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -190,10 +190,12 @@ public function add_exclusions( $exclusions ): array { if ( $row->lcp && 'not found' !== $row->lcp ) { $lcp = $this->generate_lcp_link_tag_with_sources( json_decode( $row->lcp ) ); $lcp = $lcp['sources']; + $lcp = $this->get_path_for_exclusion( $lcp ); } if ( $row->viewport && 'not found' !== $row->viewport ) { $atf = $this->get_atf_sources( json_decode( $row->viewport ) ); + $atf = $this->get_path_for_exclusion( $atf ); } $exclusions = array_merge( $exclusions, $lcp, $atf ); @@ -204,6 +206,24 @@ public function add_exclusions( $exclusions ): array { return $exclusions; } + /** + * Get only the url path to exclude. + * + * @param array $exclusions Array of exclusions. + * @return array + */ + private function get_path_for_exclusion( array $exclusions ): array { + $exclusions = array_map( + function ( $exclusion ) { + $exclusion = wp_parse_url( $exclusion ); + return $exclusion['path']; + }, + $exclusions + ); + + return $exclusions; + } + /** * Generate preload link tags with sources for LCP. * From 5bc42493cc8e81373065fecdb8842cb1da74fccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Tue, 2 Jan 2024 15:52:01 -0500 Subject: [PATCH 013/167] Fixes #6325 Detect existing fetchpriority attribute when spaces around equal sign (#6335) Co-authored-by: Michael Lee --- inc/Engine/Media/AboveTheFold/Frontend/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index badc869fbb..85a27415f0 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -148,7 +148,7 @@ private function set_fetchpriority( $lcp, string $html ): string { '#]*?\s+src=["\']' . $url . '["\'][^>]*?|[^>]*?)>#', function ( $matches ) { // Check if the fetchpriority attribute already exists. - if ( preg_match( '/fetchpriority=[\'"]([^\'"]+)[\'"]/', $matches[0] ) ) { + if ( preg_match( '/fetchpriority\s*=\s*[\'"]([^\'"]+)[\'"]/i', $matches[0] ) ) { // If it exists, don't modify the tag. return $matches[0]; } From b7ab5143021d7c81e30a821d009bccf828e97c5c Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Wed, 10 Jan 2024 16:02:00 +0100 Subject: [PATCH 014/167] Updated optimization type --- inc/Engine/Optimization/RUCSS/Jobs/Manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Optimization/RUCSS/Jobs/Manager.php b/inc/Engine/Optimization/RUCSS/Jobs/Manager.php index 8b2436f0f0..91f16d6417 100644 --- a/inc/Engine/Optimization/RUCSS/Jobs/Manager.php +++ b/inc/Engine/Optimization/RUCSS/Jobs/Manager.php @@ -43,7 +43,7 @@ class Manager implements ManagerInterface, LoggerAwareInterface { * * @var string */ - protected $optimization_type = 'somethingelse'; + protected $optimization_type = 'rucss'; /** * Check if manager can process. From fcd6b467b45cd954b392f7cf7f728b94c42e0577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 15 Jan 2024 09:51:03 -0500 Subject: [PATCH 015/167] Refactor clean RUCSS/Critical images dashboard button (#6334) --- .../Media/AboveTheFold/Admin/Controller.php | 21 +++--- .../Media/AboveTheFold/Admin/Subscriber.php | 6 +- .../Database/Tables/AboveTheFold.php | 3 +- .../Optimization/RUCSS/Admin/Subscriber.php | 19 ++---- .../Optimization/RUCSS/Controller/UsedCSS.php | 15 ++--- .../Optimization/RUCSS/ServiceProvider.php | 1 - inc/Engine/Saas/Admin/AdminBar.php | 66 ++++++++++++++++++- inc/Engine/Saas/Admin/Clean.php | 4 +- inc/Engine/Saas/Admin/Subscriber.php | 10 +++ inc/Engine/Saas/ServiceProvider.php | 3 +- inc/classes/class-abstract-render.php | 2 +- views/settings/page-sections/dashboard.php | 25 +++---- views/settings/sections/clean-section.php | 30 +++++++++ 13 files changed, 143 insertions(+), 62 deletions(-) create mode 100644 views/settings/sections/clean-section.php diff --git a/inc/Engine/Media/AboveTheFold/Admin/Controller.php b/inc/Engine/Media/AboveTheFold/Admin/Controller.php index 38575bf6e6..eb37140bf4 100644 --- a/inc/Engine/Media/AboveTheFold/Admin/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Admin/Controller.php @@ -66,7 +66,7 @@ private function delete_rows() { return; } - $this->table->truncate(); + $this->table->truncate_atf_table(); } /** @@ -114,23 +114,18 @@ public function delete_term_atf( $term_id ) { /** * Deletes rows when triggering clean from admin * + * @param array $clean An array containing the status and message. + * * @return array */ - public function truncate() { - if ( ! current_user_can( 'rocket_manage_options' ) ) { - return [ - 'status' => 'die', - ]; + public function truncate( $clean ) { + if ( ! $this->context->is_allowed() ) { + return $clean; } - if ( ! $this->context->is_allowed() ) { + if ( ! current_user_can( 'rocket_manage_options' ) ) { return [ - 'status' => 'error', - 'message' => sprintf( - // translators: %1$s = plugin name. - __( '%1$s: Critical images optimization is not enabled!', 'rocket' ), - 'WP Rocket' - ), + 'status' => 'die', ]; } diff --git a/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php b/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php index 089c7a36df..6f2906956b 100644 --- a/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php +++ b/inc/Engine/Media/AboveTheFold/Admin/Subscriber.php @@ -77,10 +77,12 @@ public function delete_term_atf( $term_id ) { /** * Deletes rows when triggering clean from admin * + * @param array $clean An array containing the status and message. + * * @return array */ - public function truncate() { - return $this->controller->truncate(); + public function truncate( $clean ) { + return $this->controller->truncate( $clean ); } /** diff --git a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php index 7eb361f2ca..3b1a87991d 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php @@ -67,10 +67,11 @@ class AboveTheFold extends AbstractTable { * * @return bool */ - public function truncate(): bool { + public function truncate_atf_table(): bool { if ( ! $this->exists() ) { return false; } + return $this->truncate(); } } diff --git a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php index 244ddd450b..ec2bc6da1d 100644 --- a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php +++ b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php @@ -250,23 +250,18 @@ public function clean_used_css_and_cache( $old_value, $value ) { /** * Deletes rows when triggering clean from admin * + * @param array $clean An array containing the status and message. + * * @return array */ - public function truncate() { - if ( ! current_user_can( 'rocket_remove_unused_css' ) ) { - return [ - 'status' => 'die', - ]; + public function truncate( $clean ) { + if ( ! $this->settings->is_enabled() ) { + return $clean; } - if ( ! $this->settings->is_enabled() ) { + if ( ! current_user_can( 'rocket_remove_unused_css' ) ) { return [ - 'status' => 'error', - 'message' => sprintf( - // translators: %1$s = plugin name. - __( '%1$s: Used CSS option is not enabled!', 'rocket' ), - 'WP Rocket' - ), + 'status' => 'die', ]; } diff --git a/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php b/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php index a2e213a776..afd1865c11 100644 --- a/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php +++ b/inc/Engine/Optimization/RUCSS/Controller/UsedCSS.php @@ -86,7 +86,6 @@ class UsedCSS { * @param DataManager $data_manager DataManager instance. * @param Filesystem $filesystem Filesystem instance. * @param ContextInterface $context RUCSS context. - * @param ContextInterface $optimize_url_context RUCSS optimize url context. * @param ManagerInterface $manager RUCSS manager. */ public function __construct( @@ -95,16 +94,14 @@ public function __construct( DataManager $data_manager, Filesystem $filesystem, ContextInterface $context, - ContextInterface $optimize_url_context, ManagerInterface $manager ) { - $this->options = $options; - $this->used_css_query = $used_css_query; - $this->data_manager = $data_manager; - $this->filesystem = $filesystem; - $this->context = $context; - $this->optimize_url_context = $optimize_url_context; - $this->manager = $manager; + $this->options = $options; + $this->used_css_query = $used_css_query; + $this->data_manager = $data_manager; + $this->filesystem = $filesystem; + $this->context = $context; + $this->manager = $manager; } /** diff --git a/inc/Engine/Optimization/RUCSS/ServiceProvider.php b/inc/Engine/Optimization/RUCSS/ServiceProvider.php index fb44633c34..56ed8ec237 100644 --- a/inc/Engine/Optimization/RUCSS/ServiceProvider.php +++ b/inc/Engine/Optimization/RUCSS/ServiceProvider.php @@ -107,7 +107,6 @@ public function register() { ->addArgument( $this->getContainer()->get( 'dynamic_lists_defaultlists_data_manager' ) ) ->addArgument( $this->getContainer()->get( 'rucss_filesystem' ) ) ->addArgument( $this->getContainer()->get( 'rucss_context' ) ) - ->addArgument( $this->getContainer()->get( 'rucss_optimize_context' ) ) ->addArgument( $this->getContainer()->get( 'rucss_manager' ) ); $this->getContainer()->share( 'rucss_option_subscriber', OptionSubscriber::class ) diff --git a/inc/Engine/Saas/Admin/AdminBar.php b/inc/Engine/Saas/Admin/AdminBar.php index ba2f6c6791..2605a3b81b 100644 --- a/inc/Engine/Saas/Admin/AdminBar.php +++ b/inc/Engine/Saas/Admin/AdminBar.php @@ -4,10 +4,11 @@ namespace WP_Rocket\Engine\Saas\Admin; use WP_Admin_Bar; +use WP_Rocket\Abstract_Render; use WP_Rocket\Admin\Options_Data; use WP_Rocket\Engine\Common\Context\ContextInterface; -class AdminBar { +class AdminBar extends Abstract_Render { /** * Options data instance. * @@ -35,8 +36,11 @@ class AdminBar { * @param Options_Data $options Options data instance. * @param ContextInterface $atf_context ATF context. * @param ContextInterface $rucss_url_context RUCSS optimize url context. + * @param string $template_path Template path. */ - public function __construct( Options_Data $options, ContextInterface $atf_context, ContextInterface $rucss_url_context ) { + public function __construct( Options_Data $options, ContextInterface $atf_context, ContextInterface $rucss_url_context, $template_path ) { + parent::__construct( $template_path ); + $this->options = $options; $this->atf_context = $atf_context; $this->rucss_url_context = $rucss_url_context; @@ -102,12 +106,34 @@ public function add_clean_saas_menu_item( $wp_admin_bar ) { * @return void */ public function add_clean_url_menu_item( WP_Admin_Bar $wp_admin_bar ) { - global $post; + global $pagenow, $post; if ( 'local' === wp_get_environment_type() ) { return; } + if ( + is_admin() + && + ( + ! $post + || + 'post.php' !== $pagenow + || + ! isset( $_GET['action'], $_GET['post'] ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended + ) + ) { + return; + } + + if ( + $post + && + ! rocket_can_display_options() + ) { + return; + } + if ( ! $this->atf_context->is_allowed() && ! $this->rucss_url_context->is_allowed() @@ -156,4 +182,38 @@ public function add_clean_url_menu_item( WP_Admin_Bar $wp_admin_bar ) { ] ); } + + /** + * Display the dashboard button to clean SaaS features + * + * @return void + */ + public function display_dashboard_button() { + if ( 'local' === wp_get_environment_type() ) { + return; + } + + if ( ! $this->atf_context->is_allowed() + && + ! $this->rucss_url_context->is_allowed() + ) { + return; + } + + $title = __( 'Critical Images Cache', 'rocket' ); + $label = esc_html__( 'Clean Critical Images', 'rocket' ); + + if ( $this->rucss_url_context->is_allowed() ) { + $title = __( 'Remove Used CSS Cache', 'rocket' ); + $label = esc_html__( 'Clear Used CSS', 'rocket' ); + } + + $data = [ + 'action' => 'rocket_clean_saas', + 'title' => $title, + 'label' => $label, + ]; + + echo $this->generate( 'sections/clean-section', $data ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } } diff --git a/inc/Engine/Saas/Admin/Clean.php b/inc/Engine/Saas/Admin/Clean.php index fb1813d8e4..413e1c764c 100644 --- a/inc/Engine/Saas/Admin/Clean.php +++ b/inc/Engine/Saas/Admin/Clean.php @@ -21,9 +21,9 @@ public function clean_saas() { * * @since 3.16 * - * @param array An array containing the status and message. + * @param array $clean An array containing the status and message. */ - $clean = apply_filter( 'rocket_saas_clean_all', [] ); + $clean = apply_filters( 'rocket_saas_clean_all', [] ); if ( empty( $clean ) diff --git a/inc/Engine/Saas/Admin/Subscriber.php b/inc/Engine/Saas/Admin/Subscriber.php index 26ee2bee8b..dce5e9475d 100644 --- a/inc/Engine/Saas/Admin/Subscriber.php +++ b/inc/Engine/Saas/Admin/Subscriber.php @@ -62,6 +62,7 @@ public static function get_subscribed_events(): array { [ 'display_saas_error_notice' ], ], 'rocket_localize_admin_script' => 'add_localize_script_data', + 'rocket_dashboard_actions' => 'display_dashboard_button', ]; } @@ -160,4 +161,13 @@ public function display_saas_error_notice() { public function add_localize_script_data( $data ): array { return $this->notices->add_localize_script_data( $data ); } + + /** + * Display the dashboard button to clean SaaS features + * + * @return void + */ + public function display_dashboard_button() { + $this->admin_bar->display_dashboard_button(); + } } diff --git a/inc/Engine/Saas/ServiceProvider.php b/inc/Engine/Saas/ServiceProvider.php index 60fc9699c6..e3a34508f4 100644 --- a/inc/Engine/Saas/ServiceProvider.php +++ b/inc/Engine/Saas/ServiceProvider.php @@ -32,7 +32,8 @@ public function register() { $this->getContainer()->add( 'sass_admin_bar', Adminbar::class ) ->addArgument( $this->getContainer()->get( 'options' ) ) ->addArgument( $this->getContainer()->get( 'atf_context' ) ) - ->addArgument( $this->getContainer()->get( 'rucss_optimize_context' ) ); + ->addArgument( $this->getContainer()->get( 'rucss_optimize_context' ) ) + ->addArgument( $this->getContainer()->get( 'template_path' ) . '/settings' ); $this->getContainer()->add( 'sass_clean', Clean::class ); $this->getContainer()->add( 'sass_notices', Notices::class ) ->addArgument( $this->getContainer()->get( 'options' ) ) diff --git a/inc/classes/class-abstract-render.php b/inc/classes/class-abstract-render.php index 578aed9a6b..c804996549 100644 --- a/inc/classes/class-abstract-render.php +++ b/inc/classes/class-abstract-render.php @@ -124,7 +124,7 @@ public function render_action_button( $type, $action, $args = [] ) { case 'rocket_export': case 'rocket_generate_critical_css': case 'rocket_purge_rocketcdn': - case 'rocket_clear_usedcss': + case 'rocket_clean_saas': $referer = ''; if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { diff --git a/views/settings/page-sections/dashboard.php b/views/settings/page-sections/dashboard.php index 2eab1c68f7..f1d42c1174 100644 --- a/views/settings/page-sections/dashboard.php +++ b/views/settings/page-sections/dashboard.php @@ -177,23 +177,14 @@ - -
-

- render_action_button( - 'link', - 'rocket_clear_usedcss', - [ - 'label' => __( 'Clear Used CSS', 'rocket' ), - 'attributes' => [ - 'class' => 'wpr-button wpr-button--icon wpr-button--small wpr-icon-trash', - ], - ] - ); - ?> -
- + diff --git a/views/settings/sections/clean-section.php b/views/settings/sections/clean-section.php new file mode 100644 index 0000000000..4912174f00 --- /dev/null +++ b/views/settings/sections/clean-section.php @@ -0,0 +1,30 @@ + +
+

+ render_action_button( + 'link', + $data['action'], + [ + 'label' => $data['label'], + 'attributes' => [ + 'class' => 'wpr-button wpr-button--icon wpr-button--small wpr-icon-trash', + ], + ] + ); + ?> +
From 56dbb5f23f4b594a158459498e7415a6be58b3bd Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Wed, 13 Mar 2024 05:21:21 +0100 Subject: [PATCH 016/167] Closes #6461: Delete old implementation lcp --- .../Database/Rows/AboveTheFold.php | 66 ++------ .../Database/Schemas/AboveTheFold.php | 63 -------- .../Database/Tables/AboveTheFold.php | 46 ++++-- .../AboveTheFold/Frontend/Controller.php | 16 +- .../Media/AboveTheFold/Jobs/Factory.php | 54 ------- .../Media/AboveTheFold/Jobs/Manager.php | 153 ------------------ .../Media/AboveTheFold/ServiceProvider.php | 20 --- 7 files changed, 49 insertions(+), 369 deletions(-) delete mode 100644 inc/Engine/Media/AboveTheFold/Jobs/Factory.php delete mode 100644 inc/Engine/Media/AboveTheFold/Jobs/Manager.php diff --git a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php index eaa4ec7ca0..fd2ca2d038 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php @@ -41,13 +41,6 @@ class AboveTheFold extends Row { */ public $is_mobile; - /** - * Error code - * - * @var string - */ - public $error_code; - /** * Error message * @@ -55,27 +48,6 @@ class AboveTheFold extends Row { */ public $error_message; - /** - * Number of retries - * - * @var int - */ - public $retries; - - /** - * Job ID - * - * @var string - */ - public $job_id; - - /** - * Job queue name - * - * @var string - */ - public $queue_name; - /** * Status * @@ -83,13 +55,6 @@ class AboveTheFold extends Row { */ public $status; - /** - * Submitted time - * - * @var int - */ - public $submitted_at; - /** * Last modified time * @@ -104,13 +69,6 @@ class AboveTheFold extends Row { */ public $last_accessed; - /** - * Tells when the retry has to be processed - * - * @var int - */ - public $next_retry_time; - /** * Constructor. * @@ -120,20 +78,14 @@ public function __construct( $item ) { parent::__construct( $item ); // Set the type of each column, and prepare. - $this->id = (int) $this->id; - $this->url = (string) $this->url; - $this->lcp = (string) $this->lcp; - $this->viewport = (string) $this->viewport; - $this->error_code = (string) $this->error_code; - $this->error_message = (string) $this->error_message; - $this->retries = (int) $this->retries; - $this->is_mobile = (bool) $this->is_mobile; - $this->job_id = (string) $this->job_id; - $this->queue_name = (string) $this->queue_name; - $this->status = (string) $this->status; - $this->submitted_at = empty( $this->submitted_at ) ? 0 : strtotime( $this->submitted_at ); - $this->modified = empty( $this->modified ) ? 0 : strtotime( $this->modified ); - $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( $this->last_accessed ); - $this->next_retry_time = empty( $this->next_retry_time ) ? 0 : strtotime( $this->next_retry_time ); + $this->id = (int) $this->id; + $this->url = (string) $this->url; + $this->lcp = (string) $this->lcp; + $this->viewport = (string) $this->viewport; + $this->error_message = (string) $this->error_message; + $this->is_mobile = (bool) $this->is_mobile; + $this->status = (string) $this->status; + $this->modified = empty( $this->modified ) ? 0 : strtotime( (string) $this->modified ); + $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( (string) $this->last_accessed ); } } diff --git a/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php index 5ac68dc112..53d2f7e03d 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php @@ -67,17 +67,6 @@ class AboveTheFold extends Schema { 'sortable' => true, ], - // error_code column. - [ - 'name' => 'error_code', - 'type' => 'varchar', - 'length' => '32', - 'default' => null, - 'cache_key' => false, - 'searchable' => true, - 'sortable' => true, - ], - // error_message column. [ 'name' => 'error_message', @@ -88,39 +77,6 @@ class AboveTheFold extends Schema { 'sortable' => true, ], - // RETRIES column. - [ - 'name' => 'retries', - 'type' => 'tinyint', - 'length' => '1', - 'default' => 1, - 'cache_key' => false, - 'searchable' => true, - 'sortable' => true, - ], - - // JOB_ID column. - [ - 'name' => 'job_id', - 'type' => 'varchar', - 'length' => '255', - 'default' => null, - 'cache_key' => true, - 'searchable' => false, - 'sortable' => false, - ], - - // QUEUE_NAME column. - [ - 'name' => 'queue_name', - 'type' => 'varchar', - 'length' => '255', - 'default' => null, - 'cache_key' => true, - 'searchable' => false, - 'sortable' => false, - ], - // STATUS column. [ 'name' => 'status', @@ -132,16 +88,6 @@ class AboveTheFold extends Schema { 'sortable' => false, ], - // Submitted_at column. - [ - 'name' => 'submitted_at', - 'type' => 'timestamp', - 'default' => '0000-00-00 00:00:00', - 'created' => true, - 'date_query' => true, - 'sortable' => true, - ], - // MODIFIED column. [ 'name' => 'modified', @@ -162,14 +108,5 @@ class AboveTheFold extends Schema { 'sortable' => true, ], - // NEXT_RETRY_TIME column. - [ - 'name' => 'next_retry_time', - 'type' => 'timestamp', - 'default' => '0000-00-00 00:00:00', - 'created' => true, - 'date_query' => true, - 'sortable' => true, - ], ]; } diff --git a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php index 3b1a87991d..6235dd1a3b 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php @@ -25,14 +25,16 @@ class AboveTheFold extends AbstractTable { * * @var int */ - protected $version = 20231006; + protected $version = 20240313; /** * Key => value array of versions => methods. * * @var array */ - protected $upgrades = []; + protected $upgrades = [ + 20240313 => 'delete_old_atf_implementation', + ]; /** * Table schema data. @@ -45,22 +47,15 @@ class AboveTheFold extends AbstractTable { is_mobile tinyint(1) NOT NULL default 0, lcp longtext default '', viewport longtext default '', - error_code varchar(32) NULL default NULL, error_message longtext NULL default NULL, - retries tinyint(1) NOT NULL default 1, - job_id varchar(255) NOT NULL default '', - queue_name varchar(255) NOT NULL default '', status varchar(255) NOT NULL default '', - submitted_at timestamp NOT NULL default '0000-00-00 00:00:00', modified timestamp NOT NULL default '0000-00-00 00:00:00', last_accessed timestamp NOT NULL default '0000-00-00 00:00:00', - next_retry_time timestamp NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), KEY url (url(150), is_mobile), KEY modified (modified), KEY last_accessed (last_accessed), - INDEX `status_index` (`status`(191)), - INDEX `error_code_index` (`error_code`(32))"; + INDEX `status_index` (`status`(191))"; /** * Truncate DB table. @@ -74,4 +69,35 @@ public function truncate_atf_table(): bool { return $this->truncate(); } + + /** + * This function is responsible for deleting old columns from the 'wpr_above_the_fold' table. + * The columns to be deleted are: 'error_code', 'retries', 'job_id', 'queue_name', 'submitted_at', 'next_retry_time'. + * + * @return bool Returns true if all specified columns are successfully deleted or do not exist, false otherwise. + */ + public function delete_old_atf_implementation() { + // An array of column names to be deleted. + $columns_to_delete = [ 'error_code', 'retries', 'job_id', 'queue_name', 'submitted_at', 'next_retry_time' ]; + + // A flag to indicate the success of the operation. It is initially set to true. + $is_successful = true; + + // Iterate over each column name in the array. + foreach ( $columns_to_delete as $column ) { + // Check if the column exists in the table. + if ( $this->column_exists( $column ) ) { + // If the column exists, attempt to delete it. + $query_result = $this->get_db()->query( "ALTER TABLE `{$this->table_name}` DROP COLUMN `{$column}`" ); + + // If the deletion query fails, set the success flag to false. + if ( false === $query_result ) { + $is_successful = false; + } + } + } + + // Return the success flag. If all deletion queries were successful (or the columns did not exist), this will be true. If any query failed, this will be false. + return $is_successful; + } } diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 85a27415f0..a2d8590d3e 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -33,26 +33,18 @@ class Controller { */ private $context; - /** - * Above the fold Job Manager. - * - * @var ManagerInterface - */ - private $manager; /** * Constructor * - * @param Options_Data $options Options instance. - * @param ATFQuery $query Queries instance. - * @param Context $context Context instance. - * @param ManagerInterface $manager Above the fold Job Manager. + * @param Options_Data $options Options instance. + * @param ATFQuery $query Queries instance. + * @param Context $context Context instance. */ - public function __construct( Options_Data $options, ATFQuery $query, Context $context, ManagerInterface $manager ) { + public function __construct( Options_Data $options, ATFQuery $query, Context $context ) { $this->options = $options; $this->query = $query; $this->context = $context; - $this->manager = $manager; } /** diff --git a/inc/Engine/Media/AboveTheFold/Jobs/Factory.php b/inc/Engine/Media/AboveTheFold/Jobs/Factory.php deleted file mode 100644 index f7ff25529d..0000000000 --- a/inc/Engine/Media/AboveTheFold/Jobs/Factory.php +++ /dev/null @@ -1,54 +0,0 @@ -manager = $manager; - $this->table = $table; - } - - /** - * ATF job manager. - * - * @return ManagerInterface - */ - public function manager(): ManagerInterface { - return $this->manager; - } - - /** - * ATF Table. - * - * @return TableInterface - */ - public function table(): TableInterface { - return $this->table; - } -} diff --git a/inc/Engine/Media/AboveTheFold/Jobs/Manager.php b/inc/Engine/Media/AboveTheFold/Jobs/Manager.php deleted file mode 100644 index 0060e0203b..0000000000 --- a/inc/Engine/Media/AboveTheFold/Jobs/Manager.php +++ /dev/null @@ -1,153 +0,0 @@ -query = $query; - $this->context = $context; - } - - /** - * Get pending jobs from db. - * - * @param integer $num_rows Number of rows to grab. - * @return array - */ - public function get_pending_jobs( int $num_rows ): array { - $this->logger::debug( "ATF: Start getting number of {$num_rows} pending jobs." ); - - $pending_jobs = $this->query->get_pending_jobs( $num_rows ); - - if ( ! $pending_jobs ) { - $this->logger::debug( 'ATF: No pending jobs are there.' ); - - return []; - } - - return $pending_jobs; - } - - /** - * Validate SaaS response and fail job. - * - * @param array $job_details Details related to the job.. - * @param object $row_details Details related to the row. - * @param string $optimization_type The type of optimization applied for the current job. - * - * @return void - */ - public function validate_and_fail( array $job_details, $row_details, string $optimization_type ): void { - if ( ! $this->is_allowed( $optimization_type ) ) { - return; - } - - if ( ! isset( $job_details['contents']['above_the_fold_result'] ) ) { - $this->make_status_failed( $row_details->url, $row_details->is_mobile, '400', 'No ATF/LCP response', $optimization_type ); - $this->can_process = false; - return; - } - } - - /** - * Process SaaS response. - * - * @param array $job_details Details related to the job. - * @param object $row_details Details related to the row. - * @param string $optimization_type The type of optimization applied for the current job. - * @return void - */ - public function process( array $job_details, $row_details, string $optimization_type ): void { - if ( ! $this->is_allowed( $optimization_type ) || ! $this->can_process ) { - return; - } - - // Everything is fine, save LCP & ATF into DB, change status to completed and reset queue_name and job_id. - $this->logger::debug( 'ATF: Save LCP and ATF for url: ' . $row_details->url ); - - $lcp = $job_details['contents']['above_the_fold_result']['lcp']; - $viewport = $job_details['contents']['above_the_fold_result']['images_above_fold']; - - $lcp = $lcp ? wp_json_encode( $lcp, JSON_UNESCAPED_SLASHES ) : 'not found'; - $viewport = $viewport ? wp_json_encode( $viewport, JSON_UNESCAPED_SLASHES ) : 'not found'; - - $lcp_atf = [ - 'lcp' => $lcp, - 'viewport' => $viewport, - ]; - - $this->query->make_job_completed( $row_details->url, $row_details->is_mobile, $lcp_atf ); - } - - /** - * Set the request parameter to be sent to the SaaS - * - * @return array - */ - public function set_request_param(): array { - return [ - 'optimization_list' => [ - 'lcp', - 'above_fold', - ], - ]; - } - - /** - * Get the optimization type from the DB Row. - * - * @param object $row DB Row Object. - * @return boolean|string - */ - public function get_optimization_type_from_row( $row ) { - if ( ! isset( $row->lcp ) ) { - return false; - } - - return $this->optimization_type; - } -} diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index e3e057be5a..13ad688d3c 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -9,7 +9,6 @@ use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; use WP_Rocket\Engine\Media\AboveTheFold\Admin\{Controller as AdminController, Subscriber as AdminSubscriber}; use WP_Rocket\Engine\Media\AboveTheFold\Frontend\{Controller as FrontController, Subscriber as FrontSubscriber}; -use WP_Rocket\Engine\Media\AboveTheFold\Jobs\{Manager, Factory}; class ServiceProvider extends AbstractServiceProvider { /** @@ -27,8 +26,6 @@ class ServiceProvider extends AbstractServiceProvider { 'atf_context', 'atf_controller', 'atf_subscriber', - 'atf_manager', - 'atf_factory', 'atf_admin_controller', 'atf_admin_subscriber', ]; @@ -45,29 +42,12 @@ public function register() { $this->getContainer()->get( 'atf_table' ); - $this->getContainer()->add( 'atf_manager', Manager::class ) - ->addArguments( - [ - $this->getContainer()->get( 'atf_query' ), - $this->getContainer()->get( 'atf_context' ), - ] - ); - - $this->getContainer()->share( 'atf_factory', Factory::class ) - ->addArguments( - [ - $this->getContainer()->get( 'atf_manager' ), - $this->getContainer()->get( 'atf_table' ), - ] - ); - $this->getContainer()->add( 'atf_controller', FrontController::class ) ->addArguments( [ $this->getContainer()->get( 'options' ), $this->getContainer()->get( 'atf_query' ), $this->getContainer()->get( 'atf_context' ), - $this->getContainer()->get( 'atf_manager' ), ] ); From 1a6ceac41b137bb4f7078a952159cdd0749591ed Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Wed, 13 Mar 2024 05:27:27 +0100 Subject: [PATCH 017/167] Delete last reference to `atf_factory` --- inc/Engine/Common/JobManager/ServiceProvider.php | 1 - 1 file changed, 1 deletion(-) diff --git a/inc/Engine/Common/JobManager/ServiceProvider.php b/inc/Engine/Common/JobManager/ServiceProvider.php index 52cf788b80..996ca78dda 100644 --- a/inc/Engine/Common/JobManager/ServiceProvider.php +++ b/inc/Engine/Common/JobManager/ServiceProvider.php @@ -44,7 +44,6 @@ public function register() { $factories = [ $this->getContainer()->get( 'rucss_factory' ), - $this->getContainer()->get( 'atf_factory' ), ]; $this->getContainer()->add( 'wpr_clock', WPRClock::class ); From 1b55af56c573fdf0eef48a4954d766b791352cd3 Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Thu, 14 Mar 2024 16:46:47 +0100 Subject: [PATCH 018/167] Revert "Closes #6461: Deletes old implementation LCP" (#6483) --- .../Database/Rows/AboveTheFold.php | 66 ++++++-- .../Database/Schemas/AboveTheFold.php | 63 ++++++++ .../Database/Tables/AboveTheFold.php | 46 ++---- .../AboveTheFold/Frontend/Controller.php | 16 +- .../Media/AboveTheFold/Jobs/Factory.php | 54 +++++++ .../Media/AboveTheFold/Jobs/Manager.php | 153 ++++++++++++++++++ .../Media/AboveTheFold/ServiceProvider.php | 20 +++ 7 files changed, 369 insertions(+), 49 deletions(-) create mode 100644 inc/Engine/Media/AboveTheFold/Jobs/Factory.php create mode 100644 inc/Engine/Media/AboveTheFold/Jobs/Manager.php diff --git a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php index fd2ca2d038..eaa4ec7ca0 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php @@ -41,6 +41,13 @@ class AboveTheFold extends Row { */ public $is_mobile; + /** + * Error code + * + * @var string + */ + public $error_code; + /** * Error message * @@ -48,6 +55,27 @@ class AboveTheFold extends Row { */ public $error_message; + /** + * Number of retries + * + * @var int + */ + public $retries; + + /** + * Job ID + * + * @var string + */ + public $job_id; + + /** + * Job queue name + * + * @var string + */ + public $queue_name; + /** * Status * @@ -55,6 +83,13 @@ class AboveTheFold extends Row { */ public $status; + /** + * Submitted time + * + * @var int + */ + public $submitted_at; + /** * Last modified time * @@ -69,6 +104,13 @@ class AboveTheFold extends Row { */ public $last_accessed; + /** + * Tells when the retry has to be processed + * + * @var int + */ + public $next_retry_time; + /** * Constructor. * @@ -78,14 +120,20 @@ public function __construct( $item ) { parent::__construct( $item ); // Set the type of each column, and prepare. - $this->id = (int) $this->id; - $this->url = (string) $this->url; - $this->lcp = (string) $this->lcp; - $this->viewport = (string) $this->viewport; - $this->error_message = (string) $this->error_message; - $this->is_mobile = (bool) $this->is_mobile; - $this->status = (string) $this->status; - $this->modified = empty( $this->modified ) ? 0 : strtotime( (string) $this->modified ); - $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( (string) $this->last_accessed ); + $this->id = (int) $this->id; + $this->url = (string) $this->url; + $this->lcp = (string) $this->lcp; + $this->viewport = (string) $this->viewport; + $this->error_code = (string) $this->error_code; + $this->error_message = (string) $this->error_message; + $this->retries = (int) $this->retries; + $this->is_mobile = (bool) $this->is_mobile; + $this->job_id = (string) $this->job_id; + $this->queue_name = (string) $this->queue_name; + $this->status = (string) $this->status; + $this->submitted_at = empty( $this->submitted_at ) ? 0 : strtotime( $this->submitted_at ); + $this->modified = empty( $this->modified ) ? 0 : strtotime( $this->modified ); + $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( $this->last_accessed ); + $this->next_retry_time = empty( $this->next_retry_time ) ? 0 : strtotime( $this->next_retry_time ); } } diff --git a/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php index 53d2f7e03d..5ac68dc112 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php @@ -67,6 +67,17 @@ class AboveTheFold extends Schema { 'sortable' => true, ], + // error_code column. + [ + 'name' => 'error_code', + 'type' => 'varchar', + 'length' => '32', + 'default' => null, + 'cache_key' => false, + 'searchable' => true, + 'sortable' => true, + ], + // error_message column. [ 'name' => 'error_message', @@ -77,6 +88,39 @@ class AboveTheFold extends Schema { 'sortable' => true, ], + // RETRIES column. + [ + 'name' => 'retries', + 'type' => 'tinyint', + 'length' => '1', + 'default' => 1, + 'cache_key' => false, + 'searchable' => true, + 'sortable' => true, + ], + + // JOB_ID column. + [ + 'name' => 'job_id', + 'type' => 'varchar', + 'length' => '255', + 'default' => null, + 'cache_key' => true, + 'searchable' => false, + 'sortable' => false, + ], + + // QUEUE_NAME column. + [ + 'name' => 'queue_name', + 'type' => 'varchar', + 'length' => '255', + 'default' => null, + 'cache_key' => true, + 'searchable' => false, + 'sortable' => false, + ], + // STATUS column. [ 'name' => 'status', @@ -88,6 +132,16 @@ class AboveTheFold extends Schema { 'sortable' => false, ], + // Submitted_at column. + [ + 'name' => 'submitted_at', + 'type' => 'timestamp', + 'default' => '0000-00-00 00:00:00', + 'created' => true, + 'date_query' => true, + 'sortable' => true, + ], + // MODIFIED column. [ 'name' => 'modified', @@ -108,5 +162,14 @@ class AboveTheFold extends Schema { 'sortable' => true, ], + // NEXT_RETRY_TIME column. + [ + 'name' => 'next_retry_time', + 'type' => 'timestamp', + 'default' => '0000-00-00 00:00:00', + 'created' => true, + 'date_query' => true, + 'sortable' => true, + ], ]; } diff --git a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php index 6235dd1a3b..3b1a87991d 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php @@ -25,16 +25,14 @@ class AboveTheFold extends AbstractTable { * * @var int */ - protected $version = 20240313; + protected $version = 20231006; /** * Key => value array of versions => methods. * * @var array */ - protected $upgrades = [ - 20240313 => 'delete_old_atf_implementation', - ]; + protected $upgrades = []; /** * Table schema data. @@ -47,15 +45,22 @@ class AboveTheFold extends AbstractTable { is_mobile tinyint(1) NOT NULL default 0, lcp longtext default '', viewport longtext default '', + error_code varchar(32) NULL default NULL, error_message longtext NULL default NULL, + retries tinyint(1) NOT NULL default 1, + job_id varchar(255) NOT NULL default '', + queue_name varchar(255) NOT NULL default '', status varchar(255) NOT NULL default '', + submitted_at timestamp NOT NULL default '0000-00-00 00:00:00', modified timestamp NOT NULL default '0000-00-00 00:00:00', last_accessed timestamp NOT NULL default '0000-00-00 00:00:00', + next_retry_time timestamp NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), KEY url (url(150), is_mobile), KEY modified (modified), KEY last_accessed (last_accessed), - INDEX `status_index` (`status`(191))"; + INDEX `status_index` (`status`(191)), + INDEX `error_code_index` (`error_code`(32))"; /** * Truncate DB table. @@ -69,35 +74,4 @@ public function truncate_atf_table(): bool { return $this->truncate(); } - - /** - * This function is responsible for deleting old columns from the 'wpr_above_the_fold' table. - * The columns to be deleted are: 'error_code', 'retries', 'job_id', 'queue_name', 'submitted_at', 'next_retry_time'. - * - * @return bool Returns true if all specified columns are successfully deleted or do not exist, false otherwise. - */ - public function delete_old_atf_implementation() { - // An array of column names to be deleted. - $columns_to_delete = [ 'error_code', 'retries', 'job_id', 'queue_name', 'submitted_at', 'next_retry_time' ]; - - // A flag to indicate the success of the operation. It is initially set to true. - $is_successful = true; - - // Iterate over each column name in the array. - foreach ( $columns_to_delete as $column ) { - // Check if the column exists in the table. - if ( $this->column_exists( $column ) ) { - // If the column exists, attempt to delete it. - $query_result = $this->get_db()->query( "ALTER TABLE `{$this->table_name}` DROP COLUMN `{$column}`" ); - - // If the deletion query fails, set the success flag to false. - if ( false === $query_result ) { - $is_successful = false; - } - } - } - - // Return the success flag. If all deletion queries were successful (or the columns did not exist), this will be true. If any query failed, this will be false. - return $is_successful; - } } diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index a2d8590d3e..85a27415f0 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -33,18 +33,26 @@ class Controller { */ private $context; + /** + * Above the fold Job Manager. + * + * @var ManagerInterface + */ + private $manager; /** * Constructor * - * @param Options_Data $options Options instance. - * @param ATFQuery $query Queries instance. - * @param Context $context Context instance. + * @param Options_Data $options Options instance. + * @param ATFQuery $query Queries instance. + * @param Context $context Context instance. + * @param ManagerInterface $manager Above the fold Job Manager. */ - public function __construct( Options_Data $options, ATFQuery $query, Context $context ) { + public function __construct( Options_Data $options, ATFQuery $query, Context $context, ManagerInterface $manager ) { $this->options = $options; $this->query = $query; $this->context = $context; + $this->manager = $manager; } /** diff --git a/inc/Engine/Media/AboveTheFold/Jobs/Factory.php b/inc/Engine/Media/AboveTheFold/Jobs/Factory.php new file mode 100644 index 0000000000..f7ff25529d --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Jobs/Factory.php @@ -0,0 +1,54 @@ +manager = $manager; + $this->table = $table; + } + + /** + * ATF job manager. + * + * @return ManagerInterface + */ + public function manager(): ManagerInterface { + return $this->manager; + } + + /** + * ATF Table. + * + * @return TableInterface + */ + public function table(): TableInterface { + return $this->table; + } +} diff --git a/inc/Engine/Media/AboveTheFold/Jobs/Manager.php b/inc/Engine/Media/AboveTheFold/Jobs/Manager.php new file mode 100644 index 0000000000..0060e0203b --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Jobs/Manager.php @@ -0,0 +1,153 @@ +query = $query; + $this->context = $context; + } + + /** + * Get pending jobs from db. + * + * @param integer $num_rows Number of rows to grab. + * @return array + */ + public function get_pending_jobs( int $num_rows ): array { + $this->logger::debug( "ATF: Start getting number of {$num_rows} pending jobs." ); + + $pending_jobs = $this->query->get_pending_jobs( $num_rows ); + + if ( ! $pending_jobs ) { + $this->logger::debug( 'ATF: No pending jobs are there.' ); + + return []; + } + + return $pending_jobs; + } + + /** + * Validate SaaS response and fail job. + * + * @param array $job_details Details related to the job.. + * @param object $row_details Details related to the row. + * @param string $optimization_type The type of optimization applied for the current job. + * + * @return void + */ + public function validate_and_fail( array $job_details, $row_details, string $optimization_type ): void { + if ( ! $this->is_allowed( $optimization_type ) ) { + return; + } + + if ( ! isset( $job_details['contents']['above_the_fold_result'] ) ) { + $this->make_status_failed( $row_details->url, $row_details->is_mobile, '400', 'No ATF/LCP response', $optimization_type ); + $this->can_process = false; + return; + } + } + + /** + * Process SaaS response. + * + * @param array $job_details Details related to the job. + * @param object $row_details Details related to the row. + * @param string $optimization_type The type of optimization applied for the current job. + * @return void + */ + public function process( array $job_details, $row_details, string $optimization_type ): void { + if ( ! $this->is_allowed( $optimization_type ) || ! $this->can_process ) { + return; + } + + // Everything is fine, save LCP & ATF into DB, change status to completed and reset queue_name and job_id. + $this->logger::debug( 'ATF: Save LCP and ATF for url: ' . $row_details->url ); + + $lcp = $job_details['contents']['above_the_fold_result']['lcp']; + $viewport = $job_details['contents']['above_the_fold_result']['images_above_fold']; + + $lcp = $lcp ? wp_json_encode( $lcp, JSON_UNESCAPED_SLASHES ) : 'not found'; + $viewport = $viewport ? wp_json_encode( $viewport, JSON_UNESCAPED_SLASHES ) : 'not found'; + + $lcp_atf = [ + 'lcp' => $lcp, + 'viewport' => $viewport, + ]; + + $this->query->make_job_completed( $row_details->url, $row_details->is_mobile, $lcp_atf ); + } + + /** + * Set the request parameter to be sent to the SaaS + * + * @return array + */ + public function set_request_param(): array { + return [ + 'optimization_list' => [ + 'lcp', + 'above_fold', + ], + ]; + } + + /** + * Get the optimization type from the DB Row. + * + * @param object $row DB Row Object. + * @return boolean|string + */ + public function get_optimization_type_from_row( $row ) { + if ( ! isset( $row->lcp ) ) { + return false; + } + + return $this->optimization_type; + } +} diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index 13ad688d3c..e3e057be5a 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -9,6 +9,7 @@ use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; use WP_Rocket\Engine\Media\AboveTheFold\Admin\{Controller as AdminController, Subscriber as AdminSubscriber}; use WP_Rocket\Engine\Media\AboveTheFold\Frontend\{Controller as FrontController, Subscriber as FrontSubscriber}; +use WP_Rocket\Engine\Media\AboveTheFold\Jobs\{Manager, Factory}; class ServiceProvider extends AbstractServiceProvider { /** @@ -26,6 +27,8 @@ class ServiceProvider extends AbstractServiceProvider { 'atf_context', 'atf_controller', 'atf_subscriber', + 'atf_manager', + 'atf_factory', 'atf_admin_controller', 'atf_admin_subscriber', ]; @@ -42,12 +45,29 @@ public function register() { $this->getContainer()->get( 'atf_table' ); + $this->getContainer()->add( 'atf_manager', Manager::class ) + ->addArguments( + [ + $this->getContainer()->get( 'atf_query' ), + $this->getContainer()->get( 'atf_context' ), + ] + ); + + $this->getContainer()->share( 'atf_factory', Factory::class ) + ->addArguments( + [ + $this->getContainer()->get( 'atf_manager' ), + $this->getContainer()->get( 'atf_table' ), + ] + ); + $this->getContainer()->add( 'atf_controller', FrontController::class ) ->addArguments( [ $this->getContainer()->get( 'options' ), $this->getContainer()->get( 'atf_query' ), $this->getContainer()->get( 'atf_context' ), + $this->getContainer()->get( 'atf_manager' ), ] ); From 8ada5e248171382d3b27dc62d53b8f0dfd275b2b Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Fri, 15 Mar 2024 04:34:41 +0100 Subject: [PATCH 019/167] Remove atf_factory from $factories array --- inc/Engine/Common/JobManager/ServiceProvider.php | 1 - 1 file changed, 1 deletion(-) diff --git a/inc/Engine/Common/JobManager/ServiceProvider.php b/inc/Engine/Common/JobManager/ServiceProvider.php index 52cf788b80..996ca78dda 100644 --- a/inc/Engine/Common/JobManager/ServiceProvider.php +++ b/inc/Engine/Common/JobManager/ServiceProvider.php @@ -44,7 +44,6 @@ public function register() { $factories = [ $this->getContainer()->get( 'rucss_factory' ), - $this->getContainer()->get( 'atf_factory' ), ]; $this->getContainer()->add( 'wpr_clock', WPRClock::class ); From 9b098e8b72ac9ecc616e885c2842b1a21e93f8f0 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 19 Mar 2024 07:17:04 +0100 Subject: [PATCH 020/167] Closes #6474: Update maintenance for LCP/ATF --- .../Media/AboveTheFold/Cron/Controller.php | 67 ++++++ .../Media/AboveTheFold/Cron/Subscriber.php | 70 ++++++ .../Database/Queries/AboveTheFold.php | 22 ++ .../Database/Tables/AboveTheFold.php | 36 ++++ .../Media/AboveTheFold/ServiceProvider.php | 8 + inc/Plugin.php | 1 + .../Cron/Subscriber/atfCleanup.php | 75 +++++++ .../AboveTheFold/Frontend/Controller/lcp.php | 203 ------------------ tests/Integration/DBTrait.php | 6 + .../Cron/Subscriber/atfCleanup.php | 76 +++++++ .../AboveTheFold/Frontend/Controller/lcp.php | 79 ------- 11 files changed, 361 insertions(+), 282 deletions(-) create mode 100644 inc/Engine/Media/AboveTheFold/Cron/Controller.php create mode 100644 inc/Engine/Media/AboveTheFold/Cron/Subscriber.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php delete mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php create mode 100644 tests/Integration/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php delete mode 100644 tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php diff --git a/inc/Engine/Media/AboveTheFold/Cron/Controller.php b/inc/Engine/Media/AboveTheFold/Cron/Controller.php new file mode 100644 index 0000000000..8348eee885 --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Cron/Controller.php @@ -0,0 +1,67 @@ +table = $table; + } + + /** + * Schedules the 'above the fold' cleanup to run daily if it's not already scheduled. + */ + public function schedule_atf_cleanup() { + if ( ! wp_next_scheduled( 'rocket_atf_cleanup' ) ) { + wp_schedule_event( time(), 'daily', 'rocket_atf_cleanup' ); + } + } + + /** + * Executes the 'above the fold' cleanup. + * It gets the current date and subtracts the interval (default to 1 month) from it. + * Then it deletes the rows with 'failed' status or not accessed since the interval. + */ + public function atf_cleanup() { + // Delete the rows with failed status or not accessed. + $this->table->delete_old_rows(); + } + + /** + * Unschedules the 'above the fold' cleanup, preventing it from running at the previously scheduled time. + */ + public function unschedule_atf_cleanup() { + $timestamp = wp_next_scheduled( 'rocket_atf_cleanup' ); + if ( $timestamp ) { + wp_unschedule_event( $timestamp, 'rocket_atf_cleanup' ); + } + } +} diff --git a/inc/Engine/Media/AboveTheFold/Cron/Subscriber.php b/inc/Engine/Media/AboveTheFold/Cron/Subscriber.php new file mode 100644 index 0000000000..5eea55118e --- /dev/null +++ b/inc/Engine/Media/AboveTheFold/Cron/Subscriber.php @@ -0,0 +1,70 @@ +controller = $controller; + } + + /** + * Returns an array of events that this class subscribes to. + * + * @return array An associative array where the keys are the event names and the values are the method names to call when the event is triggered. + */ + public static function get_subscribed_events() { + return [ + 'rocket_atf_cleanup' => 'atf_cleanup', + 'init' => 'schedule_atf_cleanup', + 'rocket_deactivation' => 'unschedule_atf_cleanup', + ]; + } + + /** + * Executes the 'above the fold' cleanup. + * + * @return void + */ + public function atf_cleanup() { + $this->controller->atf_cleanup(); + } + + /** + * Schedules the 'above the fold' cleanup to run at a later time. + * + * @return void + */ + public function schedule_atf_cleanup() { + $this->controller->schedule_atf_cleanup(); + } + + /** + * Unschedules the 'above the fold' cleanup, preventing it from running at the previously scheduled time. + * + * @return void + */ + public function unschedule_atf_cleanup() { + $this->controller->unschedule_atf_cleanup(); + } +} diff --git a/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php index f2c9f232fa..550d1baf83 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php @@ -104,4 +104,26 @@ public function make_job_completed( string $url, bool $is_mobile, array $data ) return $db->update( $prefixed_table_name, $data, $where ); } + + /** + * Deletes rows from the 'above_the_fold' table that have a 'failed' status and have not been accessed since a specified date. + * + * @return int|false The number of rows affected if the query is successful, or false on failure. + */ + public function delete_failed_and_not_accessed_rows() { + // Get the database object. + $db = $this->get_db(); + + // If no database interface is available, return false. + if ( empty( $db ) ) { + return false; + } + + // Prepare the SQL query. The '%s' placeholder will be replaced by the value of $date. + // The query will delete rows from the 'above_the_fold' table where 'status' is 'failed' and 'last_accessed' is less than or equal to $date. + $query = $db->prepare( "DELETE FROM {$this->table_name} WHERE status = 'failed' AND last_accessed <= %s", $date ); + + // Execute the query and return the result. If the query is successful, the number of affected rows will be returned. If the query fails, false will be returned. + return $db->query( $query ); + } } diff --git a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php index 3b1a87991d..edc14bfb84 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php @@ -74,4 +74,40 @@ public function truncate_atf_table(): bool { return $this->truncate(); } + + /** + * Delete all rows which were not accessed in the last month. + * + * @return bool|int + */ + public function delete_old_rows() { + if ( ! $this->exists() ) { + return false; + } + // Get the database interface. + $db = $this->get_db(); + + // Bail if no database interface is available. + if ( empty( $db ) ) { + return false; + } + + /** + * Filters the interval (in months) to determine when an Above The Fold (ATF) entry is considered 'old'. + * Old ATF entries are eligible for deletion. By default, an ATF entry is considered old if it hasn't been accessed in the last month. + * + * @param int $delete_interval The interval in months after which an ATF entry is considered old. Default is 1 month. + */ + $delete_interval = (int) apply_filters( 'rocket_atf_cleanup_interval', 1 ); + + if ( $delete_interval <= 0 ) { + return false; + } + + $prefixed_table_name = $this->apply_prefix( $this->table_name ); + $query = "DELETE FROM `$prefixed_table_name` WHERE status = 'failed' OR `last_accessed` <= date_sub(now(), interval $delete_interval month)"; + $rows_affected = $db->query( $query ); + + return $rows_affected; + } } diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index e3e057be5a..736c9e6f2b 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -10,6 +10,7 @@ use WP_Rocket\Engine\Media\AboveTheFold\Admin\{Controller as AdminController, Subscriber as AdminSubscriber}; use WP_Rocket\Engine\Media\AboveTheFold\Frontend\{Controller as FrontController, Subscriber as FrontSubscriber}; use WP_Rocket\Engine\Media\AboveTheFold\Jobs\{Manager, Factory}; +use WP_Rocket\Engine\Media\AboveTheFold\Cron\{Controller as CronController, Subscriber as CronSubscriber}; class ServiceProvider extends AbstractServiceProvider { /** @@ -31,6 +32,8 @@ class ServiceProvider extends AbstractServiceProvider { 'atf_factory', 'atf_admin_controller', 'atf_admin_subscriber', + 'atf_cron_controller', + 'atf_cron_subscriber', ]; /** @@ -79,5 +82,10 @@ public function register() { ->addArgument( $this->getContainer()->get( 'atf_context' ) ); $this->getContainer()->share( 'atf_admin_subscriber', AdminSubscriber::class ) ->addArgument( $this->getContainer()->get( 'atf_admin_controller' ) ); + + $this->getContainer()->add( 'atf_cron_controller', CronController::class ) + ->addArgument( $this->getContainer()->get( 'atf_table' ) ); + $this->getContainer()->share( 'atf_cron_subscriber', CronSubscriber::class ) + ->addArgument( $this->getContainer()->get( 'atf_cron_controller' ) ); } } diff --git a/inc/Plugin.php b/inc/Plugin.php index 44db290e06..77fa8e41ee 100644 --- a/inc/Plugin.php +++ b/inc/Plugin.php @@ -391,6 +391,7 @@ private function init_common_subscribers() { 'atf_admin_subscriber', 'contactform7', 'rucss_cron_subscriber', + 'atf_cron_subscriber', 'saas_admin_subscriber', ]; diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php new file mode 100644 index 0000000000..a3f17e6af6 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php @@ -0,0 +1,75 @@ + [ + 'config' => [ + 'rows' => [ + [ + 'status' => 'failed', + 'url' => 'http://example.org', + 'last_accessed' => $current_date, + 'modified' => $current_date, + ], + [ + 'status' => 'completed', + 'url' => 'http://example.org/hello-world', + 'last_accessed' => $current_date, + 'modified' => $current_date, + ], + ], + ], + 'expected' => [ + 'numberRowStillInDb' => 1 + ], + ], + 'shouldDeleteRowWithOldEnough' => [ + 'config' => [ + 'rows' => [ + [ + 'status' => 'in-progress', + 'url' => 'http://example.org', + 'last_accessed' => $old_date, + 'modified' => $old_date, + ] + ], + ], + 'expected' => [ + 'numberRowStillInDb' => 0 + ], + ], + 'shouldDeleteRowWithOldEnoughAndFailed' => [ + 'config' => [ + 'rows' => [ + [ + 'status' => 'in-progress', + 'url' => 'http://example.org', + 'last_accessed' => $old_date, + 'modified' => $old_date, + ], + [ + 'status' => 'failed', + 'url' => 'http://example.org/hello-world', + 'last_accessed' => $current_date, + 'modified' => $current_date, + ], + [ + 'status' => 'completed', + 'url' => 'http://example.org/hello-world', + 'last_accessed' => $old_date, + 'modified' => $old_date, + ], + [ + 'status' => 'completed', + 'url' => 'http://example.org/hello-world', + 'last_accessed' => $current_date, + 'modified' => $current_date, + ], + ], + ], + 'expected' => + [ + 'numberRowStillInDb' => 1 + ], + ], +]; diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php deleted file mode 100644 index 814c400884..0000000000 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php +++ /dev/null @@ -1,203 +0,0 @@ -'; -$html_lcp = ''; - -$html_srcset = ''; -$html_srcset_lcp = ''; - -$html_picture = ''; -$html_picture_lcp = ''; - -$html_bg_img = '
'; -$html_bg_img_lcp = '
'; -$html_bg_img_set_lcp = '
'; - -return [ - 'testShouldReturnSameWhenFeatureDisabled' => [ - 'config' => [ - 'filter' => false, - 'wp' => (object) [ - 'request' => '', - ], - 'url' => 'http://example.org', - 'is_mobile' => false, - 'row' => (object) [ - 'lcp' => '', - 'viewport' => '', - ], - 'cache_mobile' => 0, - 'do_caching_mobile_files' => 0, - 'wp_is_mobile' => false, - ], - 'html' => $html, - 'expected' => $html, - ], - 'testShouldReturnSameWhenEmptyRow' => [ - 'config' => [ - 'filter' => true, - 'wp' => (object) [ - 'request' => '', - ], - 'url' => 'http://example.org', - 'is_mobile' => false, - 'row' => false, - 'cache_mobile' => 0, - 'do_caching_mobile_files' => 0, - 'wp_is_mobile' => false, - ], - 'html' => $html, - 'expected' => $html, - ], - 'testShouldReturnSameWhenMissingLCP' => [ - 'config' => [ - 'filter' => true, - 'wp' => (object) [ - 'request' => '', - ], - 'url' => 'http://example.org', - 'is_mobile' => false, - 'row' => (object) [ - 'viewport' => '', - ], - 'cache_mobile' => 0, - 'do_caching_mobile_files' => 0, - 'wp_is_mobile' => false, - ], - 'html' => $html, - 'expected' => $html, - ], - 'testShouldReturnUpdatedWhenImgLCP' => [ - 'config' => [ - 'filter' => true, - 'wp' => (object) [ - 'request' => '', - ], - 'url' => 'http://example.org', - 'is_mobile' => false, - 'row' => (object) [ - 'lcp' => json_encode( (object) [ - 'type' => 'img', - 'src' => 'http://example.org/wp-content/uploads/image.jpg', - ] ), - 'viewport' => json_encode( [ - 0 => (object) [ - 'type' => 'img', - 'src' => 'http://example.org/wp-content/uploads/image.jpg', - ], - ] ), - ], - 'cache_mobile' => 0, - 'do_caching_mobile_files' => 0, - 'wp_is_mobile' => false, - ], - 'html' => $html, - 'expected' => $html_lcp, - ], - 'testShouldReturnUpdatedWhenImgSrcsetLCP' => [ - 'config' => [ - 'filter' => true, - 'wp' => (object) [ - 'request' => '', - ], - 'url' => 'http://example.org', - 'is_mobile' => false, - 'row' => (object) [ - 'lcp' => json_encode( (object) [ - 'type' => 'img-srcset', - 'src' => 'http://example.org/wp-content/uploads/image.jpg', - 'srcset' => 'http://example.org/wp-content/uploads/image-640x400.jpg 640w', - 'sizes' => '50vw', - ] ), - 'viewport' => json_encode( [] ), - ], - 'cache_mobile' => 0, - 'do_caching_mobile_files' => 0, - 'wp_is_mobile' => false, - ], - 'html' => $html_srcset, - 'expected' => $html_srcset_lcp, - ], - 'testShouldReturnUpdatedWhenPictureLCP' => [ - 'config' => [ - 'filter' => true, - 'wp' => (object) [ - 'request' => '', - ], - 'url' => 'http://example.org', - 'is_mobile' => false, - 'row' => (object) [ - 'lcp' => json_encode( (object) [ - 'type' => 'picture', - 'src' => 'http://example.org/wp-content/uploads/image.jpg', - 'sources' => [ - (object) [ - 'srcset' => 'http://example.org/wp-content/uploads/image-640x400.jpg', - 'media' => '(max-width: 640px)', - ], - ], - ] ), - 'viewport' => json_encode( [] ), - ], - 'cache_mobile' => 0, - 'do_caching_mobile_files' => 0, - 'wp_is_mobile' => false, - ], - 'html' => $html_picture, - 'expected' => $html_picture_lcp, - ], - 'testShouldReturnUpdatedBGImgLCP' => [ - 'config' => [ - 'filter' => true, - 'wp' => (object) [ - 'request' => '', - ], - 'url' => 'http://example.org', - 'is_mobile' => false, - 'row' => (object) [ - 'lcp' => json_encode( (object) [ - 'type' => 'bg-img', - 'bg_set' => [ - (object) [ - 'src' => 'http://example.org/wp-content/uploads/image.jpg', - ], - ], - ] ), - 'viewport' => json_encode( [] ), - ], - 'cache_mobile' => 0, - 'do_caching_mobile_files' => 0, - 'wp_is_mobile' => false, - ], - 'html' => $html_bg_img, - 'expected' => $html_bg_img_lcp, - ], - 'testShouldReturnUpdatedBGImgSetLCP' => [ - 'config' => [ - 'filter' => true, - 'wp' => (object) [ - 'request' => '', - ], - 'url' => 'http://example.org', - 'is_mobile' => false, - 'row' => (object) [ - 'lcp' => json_encode( (object) [ - 'type' => 'bg-img-set', - 'bg_set' => [ - (object) [ - 'src' => 'http://example.org/wp-content/uploads/image.jpg', - ], - (object) [ - 'src' => 'http://example.org/wp-content/uploads/image-640x400.jpg', - ], - ], - ] ), - 'viewport' => json_encode( [] ), - ], - 'cache_mobile' => 0, - 'do_caching_mobile_files' => 0, - 'wp_is_mobile' => false, - ], - 'html' => $html_bg_img, - 'expected' => $html_bg_img_set_lcp, - ], -]; diff --git a/tests/Integration/DBTrait.php b/tests/Integration/DBTrait.php index c58a62403a..78425fe3ae 100644 --- a/tests/Integration/DBTrait.php +++ b/tests/Integration/DBTrait.php @@ -43,6 +43,12 @@ public static function addCache( array $resource ) { return $cache_query->create_or_update( $resource ); } + public static function addLcp( array $resource ) { + $container = apply_filters( 'rocket_container', null ); + $lcp_query = $container->get( 'atf_query' ); + return $lcp_query->add_item( $resource ); + } + public static function installFresh() { $container = apply_filters( 'rocket_container', null ); diff --git a/tests/Integration/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php b/tests/Integration/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php new file mode 100644 index 0000000000..4a533fae66 --- /dev/null +++ b/tests/Integration/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php @@ -0,0 +1,76 @@ +config = $config; + $container = apply_filters( 'rocket_container', null ); + $current_date = current_time( 'mysql', true ); + $old_date = strtotime( $current_date . ' - 32 days' ); + + if (!empty($config['rows'])) { + foreach ($config['rows'] as $row) { + // If the value is 'current_date', replace it with the current date. + if ( 'current_date' === $row[ 'last_accessed' ] ) { + $row[ 'last_accessed' ] = $current_date; + } + + // If the value is 'old_date', replace it with the old date. + if ( 'old_date' === $row[ 'last_accessed' ] ) { + $row[ 'last_accessed' ] = $old_date; + } + + // Do the same for 'modified'. + if ( 'current_date' === $row[ 'modified' ] ) { + $row[ 'modified' ] = $current_date; + } + + if ( 'old_date' === $row[ 'modified' ] ) { + $row[ 'modified' ] = $old_date; + } + + self::addLcp($row); + } + } + + do_action('rocket_atf_cleanup'); + + $atf_query = $container->get('atf_query'); + $resultAtfAfterClean = $atf_query->query(); + + $this->assertCount($expected['numberRowStillInDb'], $resultAtfAfterClean); + + } + +} diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php deleted file mode 100644 index e33d379c3a..0000000000 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/lcp.php +++ /dev/null @@ -1,79 +0,0 @@ -options = Mockery::mock( Options_Data::class ); - $this->query = $this->createPartialMock( AboveTheFold::class, [ 'get_row' ] ); - $this->context = Mockery::mock( Context::class ); - - $this->controller = new Controller( $this->options, $this->query, $this->context ); - } - - protected function tearDown(): void { - unset( $GLOBALS['wp'] ); - - parent::tearDown(); - } - - /** - * @dataProvider configTestData - */ - public function testShouldReturnExpected( $config, $html, $expected ) { - $this->context->shouldReceive( 'is_allowed' ) - ->atMost() - ->once() - ->andReturn( $config['filter'] ); - - $GLOBALS['wp'] = $config['wp']; - - Functions\when( 'home_url' )->justReturn( 'http://example.org' ); - Functions\when( 'add_query_arg' )->returnArg( 2 ); - - $this->query->method( 'get_row' ) - ->with( $config['url'], $config['is_mobile'] ) - ->willReturn( $config['row'] ); - - $this->options->shouldReceive( 'get' ) - ->with( 'cache_mobile', 0 ) - ->atMost() - ->once() - ->andReturn( $config['cache_mobile'] ); - - $this->options->shouldReceive( 'get' ) - ->with( 'do_caching_mobile_files', 0 ) - ->atMost() - ->once() - ->andReturn( $config['do_caching_mobile_files'] ); - - Functions\when( 'wp_is_mobile' ) - ->justReturn( $config['wp_is_mobile'] ); - - $this->assertSame( - $this->format_the_html( $expected ), - $this->format_the_html( $this->controller->lcp( $html ) ) - ); - } -} From 127b57f0cd338d22a0e819a27add3222b0f0a524 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 19 Mar 2024 15:42:08 +0100 Subject: [PATCH 021/167] Swap function from ATFTable to ATFQuery --- .../Media/AboveTheFold/Cron/Controller.php | 14 ++++---- .../Database/Queries/AboveTheFold.php | 31 ++++++++++------ .../Database/Tables/AboveTheFold.php | 36 ------------------- .../Media/AboveTheFold/ServiceProvider.php | 2 +- 4 files changed, 28 insertions(+), 55 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/Cron/Controller.php b/inc/Engine/Media/AboveTheFold/Cron/Controller.php index 8348eee885..982b6567e4 100644 --- a/inc/Engine/Media/AboveTheFold/Cron/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Cron/Controller.php @@ -3,9 +3,7 @@ namespace WP_Rocket\Engine\Media\AboveTheFold\Cron; -use WP_Rocket\Engine\Media\AboveTheFold\Context\Context; use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; -use WP_Rocket\Engine\Media\AboveTheFold\Database\Tables\AboveTheFold as ATFTable; use WP_Rocket\Engine\Optimization\RegexTrait; @@ -21,19 +19,19 @@ class Controller { /** * Instance of the ATFQuery class. * - * @var ATFTable + * @var ATFQuery */ - private $table; + private $query; /** * Constructor method. * Initializes a new instance of the Controller class. * - * @param ATFTable $table An instance of the ATFQuery class. + * @param ATFQuery $query An instance of the ATFQuery class. */ - public function __construct( ATFTable $table ) { - $this->table = $table; + public function __construct( ATFQuery $query ) { + $this->query = $query; } /** @@ -52,7 +50,7 @@ public function schedule_atf_cleanup() { */ public function atf_cleanup() { // Delete the rows with failed status or not accessed. - $this->table->delete_old_rows(); + $this->query->delete_old_rows(); } /** diff --git a/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php index 550d1baf83..9729fa2dcd 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php @@ -106,24 +106,35 @@ public function make_job_completed( string $url, bool $is_mobile, array $data ) } /** - * Deletes rows from the 'above_the_fold' table that have a 'failed' status and have not been accessed since a specified date. + * Delete all rows which were not accessed in the last month. * - * @return int|false The number of rows affected if the query is successful, or false on failure. + * @return bool|int */ - public function delete_failed_and_not_accessed_rows() { - // Get the database object. + public function delete_old_rows() { + // Get the database interface. $db = $this->get_db(); - // If no database interface is available, return false. + // Bail if no database interface is available. if ( empty( $db ) ) { return false; } - // Prepare the SQL query. The '%s' placeholder will be replaced by the value of $date. - // The query will delete rows from the 'above_the_fold' table where 'status' is 'failed' and 'last_accessed' is less than or equal to $date. - $query = $db->prepare( "DELETE FROM {$this->table_name} WHERE status = 'failed' AND last_accessed <= %s", $date ); + /** + * Filters the interval (in months) to determine when an Above The Fold (ATF) entry is considered 'old'. + * Old ATF entries are eligible for deletion. By default, an ATF entry is considered old if it hasn't been accessed in the last month. + * + * @param int $delete_interval The interval in months after which an ATF entry is considered old. Default is 1 month. + */ + $delete_interval = (int) apply_filters( 'rocket_atf_cleanup_interval', 1 ); + + if ( $delete_interval <= 0 ) { + return false; + } + + $prefixed_table_name = $this->apply_prefix( $this->table_name ); + $query = "DELETE FROM `$prefixed_table_name` WHERE status = 'failed' OR `last_accessed` <= date_sub(now(), interval $delete_interval month)"; + $rows_affected = $db->query( $query ); - // Execute the query and return the result. If the query is successful, the number of affected rows will be returned. If the query fails, false will be returned. - return $db->query( $query ); + return $rows_affected; } } diff --git a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php index edc14bfb84..3b1a87991d 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php @@ -74,40 +74,4 @@ public function truncate_atf_table(): bool { return $this->truncate(); } - - /** - * Delete all rows which were not accessed in the last month. - * - * @return bool|int - */ - public function delete_old_rows() { - if ( ! $this->exists() ) { - return false; - } - // Get the database interface. - $db = $this->get_db(); - - // Bail if no database interface is available. - if ( empty( $db ) ) { - return false; - } - - /** - * Filters the interval (in months) to determine when an Above The Fold (ATF) entry is considered 'old'. - * Old ATF entries are eligible for deletion. By default, an ATF entry is considered old if it hasn't been accessed in the last month. - * - * @param int $delete_interval The interval in months after which an ATF entry is considered old. Default is 1 month. - */ - $delete_interval = (int) apply_filters( 'rocket_atf_cleanup_interval', 1 ); - - if ( $delete_interval <= 0 ) { - return false; - } - - $prefixed_table_name = $this->apply_prefix( $this->table_name ); - $query = "DELETE FROM `$prefixed_table_name` WHERE status = 'failed' OR `last_accessed` <= date_sub(now(), interval $delete_interval month)"; - $rows_affected = $db->query( $query ); - - return $rows_affected; - } } diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index 736c9e6f2b..f903adca37 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -84,7 +84,7 @@ public function register() { ->addArgument( $this->getContainer()->get( 'atf_admin_controller' ) ); $this->getContainer()->add( 'atf_cron_controller', CronController::class ) - ->addArgument( $this->getContainer()->get( 'atf_table' ) ); + ->addArgument( $this->getContainer()->get( 'atf_query' ) ); $this->getContainer()->share( 'atf_cron_subscriber', CronSubscriber::class ) ->addArgument( $this->getContainer()->get( 'atf_cron_controller' ) ); } From e1fcffa55f9ba2b8f1a8434b78e1c38fbe05e941 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Wed, 20 Mar 2024 14:36:52 +0100 Subject: [PATCH 022/167] Fix Conflicts --- .../Media/AboveTheFold/ServiceProvider.php | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index f903adca37..e86f4e6508 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -9,7 +9,6 @@ use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; use WP_Rocket\Engine\Media\AboveTheFold\Admin\{Controller as AdminController, Subscriber as AdminSubscriber}; use WP_Rocket\Engine\Media\AboveTheFold\Frontend\{Controller as FrontController, Subscriber as FrontSubscriber}; -use WP_Rocket\Engine\Media\AboveTheFold\Jobs\{Manager, Factory}; use WP_Rocket\Engine\Media\AboveTheFold\Cron\{Controller as CronController, Subscriber as CronSubscriber}; class ServiceProvider extends AbstractServiceProvider { @@ -28,8 +27,6 @@ class ServiceProvider extends AbstractServiceProvider { 'atf_context', 'atf_controller', 'atf_subscriber', - 'atf_manager', - 'atf_factory', 'atf_admin_controller', 'atf_admin_subscriber', 'atf_cron_controller', @@ -48,29 +45,12 @@ public function register() { $this->getContainer()->get( 'atf_table' ); - $this->getContainer()->add( 'atf_manager', Manager::class ) - ->addArguments( - [ - $this->getContainer()->get( 'atf_query' ), - $this->getContainer()->get( 'atf_context' ), - ] - ); - - $this->getContainer()->share( 'atf_factory', Factory::class ) - ->addArguments( - [ - $this->getContainer()->get( 'atf_manager' ), - $this->getContainer()->get( 'atf_table' ), - ] - ); - $this->getContainer()->add( 'atf_controller', FrontController::class ) ->addArguments( [ $this->getContainer()->get( 'options' ), $this->getContainer()->get( 'atf_query' ), $this->getContainer()->get( 'atf_context' ), - $this->getContainer()->get( 'atf_manager' ), ] ); From 0253e4b3c2c69ff94e1625d9fb7ce1d107490a14 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Wed, 20 Mar 2024 15:11:18 +0100 Subject: [PATCH 023/167] Closes #6461: Delete old implementation lcp --- .../Database/Rows/AboveTheFold.php | 66 ++------ .../Database/Schemas/AboveTheFold.php | 64 -------- .../Database/Tables/AboveTheFold.php | 49 ++++-- .../AboveTheFold/Frontend/Controller.php | 18 +-- .../Media/AboveTheFold/Jobs/Factory.php | 54 ------- .../Media/AboveTheFold/Jobs/Manager.php | 153 ------------------ .../Media/AboveTheFold/ServiceProvider.php | 20 --- 7 files changed, 50 insertions(+), 374 deletions(-) delete mode 100644 inc/Engine/Media/AboveTheFold/Jobs/Factory.php delete mode 100644 inc/Engine/Media/AboveTheFold/Jobs/Manager.php diff --git a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php index eaa4ec7ca0..fd2ca2d038 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php @@ -41,13 +41,6 @@ class AboveTheFold extends Row { */ public $is_mobile; - /** - * Error code - * - * @var string - */ - public $error_code; - /** * Error message * @@ -55,27 +48,6 @@ class AboveTheFold extends Row { */ public $error_message; - /** - * Number of retries - * - * @var int - */ - public $retries; - - /** - * Job ID - * - * @var string - */ - public $job_id; - - /** - * Job queue name - * - * @var string - */ - public $queue_name; - /** * Status * @@ -83,13 +55,6 @@ class AboveTheFold extends Row { */ public $status; - /** - * Submitted time - * - * @var int - */ - public $submitted_at; - /** * Last modified time * @@ -104,13 +69,6 @@ class AboveTheFold extends Row { */ public $last_accessed; - /** - * Tells when the retry has to be processed - * - * @var int - */ - public $next_retry_time; - /** * Constructor. * @@ -120,20 +78,14 @@ public function __construct( $item ) { parent::__construct( $item ); // Set the type of each column, and prepare. - $this->id = (int) $this->id; - $this->url = (string) $this->url; - $this->lcp = (string) $this->lcp; - $this->viewport = (string) $this->viewport; - $this->error_code = (string) $this->error_code; - $this->error_message = (string) $this->error_message; - $this->retries = (int) $this->retries; - $this->is_mobile = (bool) $this->is_mobile; - $this->job_id = (string) $this->job_id; - $this->queue_name = (string) $this->queue_name; - $this->status = (string) $this->status; - $this->submitted_at = empty( $this->submitted_at ) ? 0 : strtotime( $this->submitted_at ); - $this->modified = empty( $this->modified ) ? 0 : strtotime( $this->modified ); - $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( $this->last_accessed ); - $this->next_retry_time = empty( $this->next_retry_time ) ? 0 : strtotime( $this->next_retry_time ); + $this->id = (int) $this->id; + $this->url = (string) $this->url; + $this->lcp = (string) $this->lcp; + $this->viewport = (string) $this->viewport; + $this->error_message = (string) $this->error_message; + $this->is_mobile = (bool) $this->is_mobile; + $this->status = (string) $this->status; + $this->modified = empty( $this->modified ) ? 0 : strtotime( (string) $this->modified ); + $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( (string) $this->last_accessed ); } } diff --git a/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php index 5ac68dc112..a626230029 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Schemas/AboveTheFold.php @@ -67,17 +67,6 @@ class AboveTheFold extends Schema { 'sortable' => true, ], - // error_code column. - [ - 'name' => 'error_code', - 'type' => 'varchar', - 'length' => '32', - 'default' => null, - 'cache_key' => false, - 'searchable' => true, - 'sortable' => true, - ], - // error_message column. [ 'name' => 'error_message', @@ -88,39 +77,6 @@ class AboveTheFold extends Schema { 'sortable' => true, ], - // RETRIES column. - [ - 'name' => 'retries', - 'type' => 'tinyint', - 'length' => '1', - 'default' => 1, - 'cache_key' => false, - 'searchable' => true, - 'sortable' => true, - ], - - // JOB_ID column. - [ - 'name' => 'job_id', - 'type' => 'varchar', - 'length' => '255', - 'default' => null, - 'cache_key' => true, - 'searchable' => false, - 'sortable' => false, - ], - - // QUEUE_NAME column. - [ - 'name' => 'queue_name', - 'type' => 'varchar', - 'length' => '255', - 'default' => null, - 'cache_key' => true, - 'searchable' => false, - 'sortable' => false, - ], - // STATUS column. [ 'name' => 'status', @@ -132,16 +88,6 @@ class AboveTheFold extends Schema { 'sortable' => false, ], - // Submitted_at column. - [ - 'name' => 'submitted_at', - 'type' => 'timestamp', - 'default' => '0000-00-00 00:00:00', - 'created' => true, - 'date_query' => true, - 'sortable' => true, - ], - // MODIFIED column. [ 'name' => 'modified', @@ -161,15 +107,5 @@ class AboveTheFold extends Schema { 'date_query' => true, 'sortable' => true, ], - - // NEXT_RETRY_TIME column. - [ - 'name' => 'next_retry_time', - 'type' => 'timestamp', - 'default' => '0000-00-00 00:00:00', - 'created' => true, - 'date_query' => true, - 'sortable' => true, - ], ]; } diff --git a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php index 3b1a87991d..04aecde2f2 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Tables/AboveTheFold.php @@ -25,15 +25,16 @@ class AboveTheFold extends AbstractTable { * * @var int */ - protected $version = 20231006; + protected $version = 20240313; /** * Key => value array of versions => methods. * * @var array */ - protected $upgrades = []; - + protected $upgrades = [ + 20240313 => 'delete_old_atf_implementation', + ]; /** * Table schema data. * @@ -45,22 +46,15 @@ class AboveTheFold extends AbstractTable { is_mobile tinyint(1) NOT NULL default 0, lcp longtext default '', viewport longtext default '', - error_code varchar(32) NULL default NULL, - error_message longtext NULL default NULL, - retries tinyint(1) NOT NULL default 1, - job_id varchar(255) NOT NULL default '', - queue_name varchar(255) NOT NULL default '', + error_message longtext NULL default NULL,, status varchar(255) NOT NULL default '', - submitted_at timestamp NOT NULL default '0000-00-00 00:00:00', modified timestamp NOT NULL default '0000-00-00 00:00:00', last_accessed timestamp NOT NULL default '0000-00-00 00:00:00', - next_retry_time timestamp NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), KEY url (url(150), is_mobile), KEY modified (modified), KEY last_accessed (last_accessed), - INDEX `status_index` (`status`(191)), - INDEX `error_code_index` (`error_code`(32))"; + INDEX `status_index` (`status`(191))"; /** * Truncate DB table. @@ -74,4 +68,35 @@ public function truncate_atf_table(): bool { return $this->truncate(); } + + /** + * This function is responsible for deleting old columns from the 'wpr_above_the_fold' table. + * The columns to be deleted are: 'error_code', 'retries', 'job_id', 'queue_name', 'submitted_at', 'next_retry_time'. + * + * @return bool Returns true if all specified columns are successfully deleted or do not exist, false otherwise. + */ + public function delete_old_atf_implementation() { + // An array of column names to be deleted. + $columns_to_delete = [ 'error_code', 'retries', 'job_id', 'queue_name', 'submitted_at', 'next_retry_time' ]; + + // A flag to indicate the success of the operation. It is initially set to true. + $is_successful = true; + + // Iterate over each column name in the array. + foreach ( $columns_to_delete as $column ) { + // Check if the column exists in the table. + if ( $this->column_exists( $column ) ) { + // If the column exists, attempt to delete it. + $query_result = $this->get_db()->query( "ALTER TABLE `{$this->table_name}` DROP COLUMN `{$column}`" ); + + // If the deletion query fails, set the success flag to false. + if ( false === $query_result ) { + $is_successful = false; + } + } + } + + // Return the success flag. If all deletion queries were successful (or the columns did not exist), this will be true. If any query failed, this will be false. + return $is_successful; + } } diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 85a27415f0..a21005fe2a 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -33,26 +33,16 @@ class Controller { */ private $context; - /** - * Above the fold Job Manager. - * - * @var ManagerInterface - */ - private $manager; - /** * Constructor * - * @param Options_Data $options Options instance. - * @param ATFQuery $query Queries instance. - * @param Context $context Context instance. - * @param ManagerInterface $manager Above the fold Job Manager. - */ - public function __construct( Options_Data $options, ATFQuery $query, Context $context, ManagerInterface $manager ) { + * @param Options_Data $options Options instance. + * @param ATFQuery $query Queries instance. + * @param Context $context Context instance. */ + public function __construct( Options_Data $options, ATFQuery $query, Context $context ) { $this->options = $options; $this->query = $query; $this->context = $context; - $this->manager = $manager; } /** diff --git a/inc/Engine/Media/AboveTheFold/Jobs/Factory.php b/inc/Engine/Media/AboveTheFold/Jobs/Factory.php deleted file mode 100644 index f7ff25529d..0000000000 --- a/inc/Engine/Media/AboveTheFold/Jobs/Factory.php +++ /dev/null @@ -1,54 +0,0 @@ -manager = $manager; - $this->table = $table; - } - - /** - * ATF job manager. - * - * @return ManagerInterface - */ - public function manager(): ManagerInterface { - return $this->manager; - } - - /** - * ATF Table. - * - * @return TableInterface - */ - public function table(): TableInterface { - return $this->table; - } -} diff --git a/inc/Engine/Media/AboveTheFold/Jobs/Manager.php b/inc/Engine/Media/AboveTheFold/Jobs/Manager.php deleted file mode 100644 index 0060e0203b..0000000000 --- a/inc/Engine/Media/AboveTheFold/Jobs/Manager.php +++ /dev/null @@ -1,153 +0,0 @@ -query = $query; - $this->context = $context; - } - - /** - * Get pending jobs from db. - * - * @param integer $num_rows Number of rows to grab. - * @return array - */ - public function get_pending_jobs( int $num_rows ): array { - $this->logger::debug( "ATF: Start getting number of {$num_rows} pending jobs." ); - - $pending_jobs = $this->query->get_pending_jobs( $num_rows ); - - if ( ! $pending_jobs ) { - $this->logger::debug( 'ATF: No pending jobs are there.' ); - - return []; - } - - return $pending_jobs; - } - - /** - * Validate SaaS response and fail job. - * - * @param array $job_details Details related to the job.. - * @param object $row_details Details related to the row. - * @param string $optimization_type The type of optimization applied for the current job. - * - * @return void - */ - public function validate_and_fail( array $job_details, $row_details, string $optimization_type ): void { - if ( ! $this->is_allowed( $optimization_type ) ) { - return; - } - - if ( ! isset( $job_details['contents']['above_the_fold_result'] ) ) { - $this->make_status_failed( $row_details->url, $row_details->is_mobile, '400', 'No ATF/LCP response', $optimization_type ); - $this->can_process = false; - return; - } - } - - /** - * Process SaaS response. - * - * @param array $job_details Details related to the job. - * @param object $row_details Details related to the row. - * @param string $optimization_type The type of optimization applied for the current job. - * @return void - */ - public function process( array $job_details, $row_details, string $optimization_type ): void { - if ( ! $this->is_allowed( $optimization_type ) || ! $this->can_process ) { - return; - } - - // Everything is fine, save LCP & ATF into DB, change status to completed and reset queue_name and job_id. - $this->logger::debug( 'ATF: Save LCP and ATF for url: ' . $row_details->url ); - - $lcp = $job_details['contents']['above_the_fold_result']['lcp']; - $viewport = $job_details['contents']['above_the_fold_result']['images_above_fold']; - - $lcp = $lcp ? wp_json_encode( $lcp, JSON_UNESCAPED_SLASHES ) : 'not found'; - $viewport = $viewport ? wp_json_encode( $viewport, JSON_UNESCAPED_SLASHES ) : 'not found'; - - $lcp_atf = [ - 'lcp' => $lcp, - 'viewport' => $viewport, - ]; - - $this->query->make_job_completed( $row_details->url, $row_details->is_mobile, $lcp_atf ); - } - - /** - * Set the request parameter to be sent to the SaaS - * - * @return array - */ - public function set_request_param(): array { - return [ - 'optimization_list' => [ - 'lcp', - 'above_fold', - ], - ]; - } - - /** - * Get the optimization type from the DB Row. - * - * @param object $row DB Row Object. - * @return boolean|string - */ - public function get_optimization_type_from_row( $row ) { - if ( ! isset( $row->lcp ) ) { - return false; - } - - return $this->optimization_type; - } -} diff --git a/inc/Engine/Media/AboveTheFold/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/ServiceProvider.php index f903adca37..e86f4e6508 100644 --- a/inc/Engine/Media/AboveTheFold/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/ServiceProvider.php @@ -9,7 +9,6 @@ use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; use WP_Rocket\Engine\Media\AboveTheFold\Admin\{Controller as AdminController, Subscriber as AdminSubscriber}; use WP_Rocket\Engine\Media\AboveTheFold\Frontend\{Controller as FrontController, Subscriber as FrontSubscriber}; -use WP_Rocket\Engine\Media\AboveTheFold\Jobs\{Manager, Factory}; use WP_Rocket\Engine\Media\AboveTheFold\Cron\{Controller as CronController, Subscriber as CronSubscriber}; class ServiceProvider extends AbstractServiceProvider { @@ -28,8 +27,6 @@ class ServiceProvider extends AbstractServiceProvider { 'atf_context', 'atf_controller', 'atf_subscriber', - 'atf_manager', - 'atf_factory', 'atf_admin_controller', 'atf_admin_subscriber', 'atf_cron_controller', @@ -48,29 +45,12 @@ public function register() { $this->getContainer()->get( 'atf_table' ); - $this->getContainer()->add( 'atf_manager', Manager::class ) - ->addArguments( - [ - $this->getContainer()->get( 'atf_query' ), - $this->getContainer()->get( 'atf_context' ), - ] - ); - - $this->getContainer()->share( 'atf_factory', Factory::class ) - ->addArguments( - [ - $this->getContainer()->get( 'atf_manager' ), - $this->getContainer()->get( 'atf_table' ), - ] - ); - $this->getContainer()->add( 'atf_controller', FrontController::class ) ->addArguments( [ $this->getContainer()->get( 'options' ), $this->getContainer()->get( 'atf_query' ), $this->getContainer()->get( 'atf_context' ), - $this->getContainer()->get( 'atf_manager' ), ] ); From d234139778d2a90b489d240db07ad83492a1a90c Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Wed, 20 Mar 2024 20:26:03 +0100 Subject: [PATCH 024/167] Closes #6500: Use correct table name (#6501) --- inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php index 9729fa2dcd..74d539fa47 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php @@ -131,7 +131,7 @@ public function delete_old_rows() { return false; } - $prefixed_table_name = $this->apply_prefix( $this->table_name ); + $prefixed_table_name = $db->prefix . $this->table_name; $query = "DELETE FROM `$prefixed_table_name` WHERE status = 'failed' OR `last_accessed` <= date_sub(now(), interval $delete_interval month)"; $rows_affected = $db->query( $query ); From c8a9bb65183fdffc6c2c862f6675546e3990a8d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Robin?= Date: Wed, 20 Mar 2024 21:07:17 +0100 Subject: [PATCH 025/167] Closes #6430: Inject beacon script to page (#6459) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémy Perona --- assets/js/lcp-beacon.js | 1 + assets/js/lcp-beacon.js.min.map | 1 + assets/js/lcp-beacon.min.js | 2 + dynamic-lists-delayjs.json | 2 +- dynamic-lists.json | 2 +- gulpfile.js | 19 ++++- .../Database/Rows/AboveTheFold.php | 21 +++++ .../AboveTheFold/Frontend/Controller.php | 59 ++++++++++---- .../CDN/CDN/HTML/siteURLWithPath/rewrite.html | 21 ++--- .../CDN/Subscriber/HTML/siteURL/original.html | 76 +++++++++--------- .../CDN/Subscriber/HTML/siteURL/rewrite.html | 77 ++++++++++--------- .../HTML/siteURLWithPath/rewrite.html | 21 ++--- .../Frontend/Subscriber/HTML/input.html | 7 ++ .../Frontend/Subscriber/HTML/output.html | 7 ++ .../Subscriber/HTML/output_w_beacon.html | 7 ++ .../AboveTheFold/Frontend/Subscriber/lcp.php | 51 ++++++++++++ .../Minify/CSS/Subscriber/process.php | 6 ++ .../Minify/JS/Subscriber/process.php | 14 ++++ ...disableImageDimensionsHeightPercentage.php | 3 +- tests/Integration/DBTrait.php | 1 - .../AboveTheFold/Frontend/Subscriber/lcp.php | 58 ++++++++++++++ .../Subscriber/specifyImageDimensions.php | 7 ++ .../GoogleFonts/Combine/optimize.php | 3 +- .../RUCSS/Frontend/Subscriber/treeshake.php | 2 + .../inc/Engine/Preload/Fonts/preloadFonts.php | 7 +- ...disableImageDimensionsHeightPercentage.php | 2 +- .../Frontend/Controller/addExclusions.php | 5 +- 27 files changed, 362 insertions(+), 120 deletions(-) create mode 100644 assets/js/lcp-beacon.js create mode 100644 assets/js/lcp-beacon.js.min.map create mode 100644 assets/js/lcp-beacon.min.js create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input.html create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output.html create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php create mode 100644 tests/Integration/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js new file mode 100644 index 0000000000..5a68eb5f11 --- /dev/null +++ b/assets/js/lcp-beacon.js @@ -0,0 +1 @@ +console.log('Hello world'); \ No newline at end of file diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map new file mode 100644 index 0000000000..cc4a38b2c7 --- /dev/null +++ b/assets/js/lcp-beacon.js.min.map @@ -0,0 +1 @@ +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(t,u,i){function f(e,r){if(!u[e]){if(!t[e]){var n=\"function\"==typeof require&&require;if(!r&&n)return n(e,!0);if(c)return c(e,!0);throw(n=new Error(\"Cannot find module '\"+e+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=u[e]={exports:{}},t[e][0].call(n.exports,function(r){return f(t[e][1][r]||r)},n,n.exports,o,t,u,i)}return u[e].exports}for(var c=\"function\"==typeof require&&require,r=0;r|$)","\/elementor\/","\/elementor-pro\/","\/wp-includes\/js\/imagesloaded.min.js","ElementorProFrontendConfig","elementorFrontendConfig","\/wp-content\/plugins\/jet-tabs\/assets\/js\/jet-tabs-frontend.min.js"],"icon_url":"","type":"plugin","id":"plugin:d887a6ffea25d759e8aecdb6b78917f7","is_default":0,"created_at":1697130971},"b7f89562-230c-4f63-8360-7aad6df31e02":{"id":"plugin:829272546b040d5aaeeeaf976b6cd4ec","title":"JetTricks","type":"plugin","icon":"","exclusions":["\/jet-tricks\/"],"is_default":0,"condition":"jet-tricks\/jet-tricks.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"90451e2a-553a-4496-9fa4-cffedbe69d43":{"id":"plugin:f44f3dbd09149f57db370e4132b057db","title":"JetWoo Widgets For Elementor","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/jetwoo-widgets-for-elementor\/assets\/js\/jet-woo-widgets.js","\/jet-woo-builder\/assets\/js\/jet-woo-builder.min.js","\/jet-woo-builder\/assets\/js\/frontend.min.js","\/wp-includes\/js\/imagesloaded.min.js"],"is_default":0,"condition":"jet-woo-builder\/jet-woo-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"944718c2-48c6-4f53-aaa2-460d07e033cc":{"id":"plugin:ed318a971f8a047bed5b02ad546a9c18","title":"JetWooBuilder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/dist\/i18n.min.js","\/elementor-pro\/","\/elementor\/","elementorFrontendConfig","ElementorProFrontendConfig","JetEngineSettings","\/jet-woo-builder\/","\/jet-woo-builder-custom-quantity-selectors-main\/assets\/js\/main.js"],"is_default":0,"condition":"jet-woo-builder\/jet-woo-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f5b62f59-1dae-4cdf-ac3f-f5e846fc9918":{"id":"plugin:9562e253cd4ac2b1e1f70e32cb4e32dc","title":"Layer Slider","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/LayerSlider\/assets\/static\/layerslider\/js\/layerslider.utils.js","\/LayerSlider\/assets\/static\/layerslider\/js\/layerslider.kreaturamedia.jquery.js","\/LayerSlider\/assets\/static\/layerslider\/js\/layerslider.transitions.js","initLayerSlider"],"is_default":0,"condition":"LayerSlider\/layerslider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e2be718d-83a2-4fa0-bc98-f0df52be3dc1":{"id":"plugin:1425e2735306796fe1539d9184a77e10","title":"LoftLoader Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","loftloader.min.js"],"is_default":0,"condition":"loftloader-pro\/loftloader-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"cfa18552-656e-453c-9e14-c07522dc6598":{"id":"plugin:0bf67b8ba84771e1a367fe24590ef09c","title":"MailUp for WordPress","type":"plugin","icon":"","exclusions":["\/mailup-email-and-newsletter-subscription-form\/public\/js\/mailup-public.js","mailup-js-extra"],"is_default":0,"condition":"mailup-email-and-newsletter-subscription-form\/mailup.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"c5330c66-ba7b-45b1-87e4-ce590ab005dd":{"id":"plugin:10d0de28911c5f66463b9c8783f8148a","title":"Maintenance","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/maintenance\/"],"is_default":0,"condition":"maintenance\/maintenance.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"267aef71-afa0-4848-b6f8-3e1ca15c3a23":{"id":"plugin:9460789bdfe77425c895f130991a4cb4","title":"Maps Marker Pro","type":"plugin","icon":"","exclusions":["\/maps-marker-pro\/js\/mapsmarkerpro.js","var mapsMarkerPro"],"is_default":0,"condition":"maps-marker-pro\/maps-marker-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"b5a88b63-e906-49b3-8134-420139915ea6":{"title":"Master Popups","condition":"master-popups\/master-popups.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/plugins\/master-popups\/assets\/public\/js\/master-popups-libs.min.js"],"icon_url":"","type":"plugin","id":"plugin:8fd7bd2c8b0a33e62798573abd12be63","is_default":0,"created_at":1681305305},"4be41549-bf4d-4c49-8346-0f8a3b88fdba":{"id":"plugin:de888634cc4bd51576eed319d5a528fd","title":"Master Slider","type":"plugin","icon":"","exclusions":["masterslider"],"is_default":0,"condition":"master-slider\/master-slider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"087bee18-7cd1-4c10-8acc-19e1b7c4f4cd":{"id":"plugin:b71309a89bf3c8b558b6fca5d6531919","title":"Max Mega Menu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/hoverIntent.min.js","\/megamenu\/js\/maxmegamenu.js","var megamenu"],"is_default":0,"condition":"megamenu\/megamenu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"cf22f0b9-01f4-409e-8a93-ad6743095abd":{"id":"plugin:94a7bae84ef2816494be4af66c577bfc","title":"Meta Slider","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ml-slider\/","var metaslider"],"is_default":0,"condition":"ml-slider\/ml-slider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"bb2cbc0d-20da-415e-8218-c17f1db53579":{"title":"Monarch","condition":"monarch\/monarch.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","dt-place-monarch-icons"],"icon_url":"","type":"plugin","id":"plugin:b7335d6d6d5c5134ea10ac2d9b04226c","is_default":0,"created_at":1677853476},"a98d6a80-4610-4ede-bd33-c3e15bed0a95":{"id":"plugin:4f8651262425ef6d7c223c68a2ec2063","title":"Monster Insights","type":"plugin","icon":"","exclusions":["__gtagTracker","monsterinsights_frontend","\/google-analytics-for-wordpress\/assets\/js\/frontend-gtag.min.js"],"is_default":0,"condition":"google-analytics-for-wordpress\/googleanalytics.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"26e1a36e-7a03-449e-8ecc-e42c41ca291c":{"id":"plugin:f8fc66b302dec2327bdec0434a3b275b","title":"Motion.page","type":"plugin","icon":"","exclusions":["\/motionpage\/core\/includes\/assets\/js\/(.*)","\/motionpage\/core\/includes\/assets\/js\/gsap\/(.*)","\/motionpage\/assets\/js\/(.*)","\/motionpage\/assets\/js\/gsap\/(.*)"],"is_default":0,"condition":"motionpage\/motionpage.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"459fd663-7f80-45fd-8308-d3484981e161":{"title":"Ninja Forms","condition":"ninja-forms\/ninja-forms.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/backbone.min.js","\/ninja-forms\/assets\/js\/min\/front-end-deps.js","\/ninja-forms\/assets\/js\/min\/front-end.js","nf-"],"icon_url":"","type":"plugin","id":"plugin:1d3ae9c1a96d5062616968b81eef319d","is_default":0,"created_at":1681377675},"c97440dd-7592-40e7-8c98-dac20d39808f":{"id":"plugin:723a588dcd49285ea9f7404e2379b47f","title":"Ninja Tables","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ninja-tables(.*)\/assets\/","\/ninja-tables(.*)\/public\/","\/wp-includes\/js\/dist\/vendor\/moment.min.js","ninja_table_instance_","ninja_filter_","ninja_table_ready_init_table_id"],"is_default":0,"condition":"ninja-tables\/ninja-tables.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"ebc01f06-8c35-47fa-9c63-8959c5cbd915":{"id":"plugin:f41a52ab1dd50a81cd3a5e341af0007c","title":"NotificationX","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/notificationx\/assets\/public\/js\/(.*).js","notificationXArr"],"is_default":0,"condition":"notificationx\/notificationx.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"3aaf4a1b-591a-48b7-8d60-e6d65c0f94c9":{"id":"plugin:be8fc72a8b8e8eb5958be13737cff47c","title":"Ocean Elementor Widgets","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/ocean-elementor-widgets\/"],"is_default":0,"condition":"ocean-elementor-widgets\/ocean-elementor-widgets.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f053a7d3-62b0-4312-b0ca-6ff63380eb0b":{"id":"plugin:1a14afe852fefe7b22ccad3893672a29","title":"One Click Accessibility","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/pojo-accessibility\/assets\/js\/app.min.js"],"is_default":0,"condition":"pojo-accessibility\/pojo-accessibility.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"61e11800-48a9-4354-8a4c-ac9a2b4b033a":{"id":"plugin:b9ed0fe6f2cdbd305691a6b857f4b3dc","title":"OoohBoi Steroids for Elementor","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/ooohboi-steroids-for-elementor\/"],"is_default":0,"condition":"ooohboi-steroids-for-elementor\/ooohboi-steroids.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"560b78a2-f051-490b-9dc6-a602dece0d81":{"id":"plugin:f1ff18a3e04c4e0995fca9cabffe57a7","title":"Optimole","type":"plugin","icon":"","exclusions":["optimoleData"],"is_default":0,"condition":"optimole-wp\/optimole-wp.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"b0fda458-4bf2-41e9-a159-60d4bb6102a6":{"id":"plugin:48ec18bd3f59772d98f85dddab75e305","title":"OSM - OpenStreetMap","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/osm\/js\/OL\/","\/osm\/js\/osm-v3-plugin-lib.js","vectorM"],"is_default":0,"condition":"osm\/osm.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"3743ed67-e0d1-4243-bb1f-ee48a445dd10":{"id":"plugin:9eacf0b76484af0259cd788f4923f20c","title":"OxyExtras","type":"plugin","icon":"","exclusions":["vime","vime.esm.js"],"is_default":0,"condition":"oxyextras\/plugin.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"52a21e27-af5b-4476-8d6d-54c323fd1443":{"id":"plugin:e852555c4b4789d78a96d76f503b3262","title":"Oxygen Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/component-framework\/vendor\/aos\/aos.js","AOS.init","oxygen_init_pro_menu","oxy-pro-menu-show-dropdown","oxy-shape-divider","oxygenVSBInitToggleJs"],"is_default":0,"condition":"oxygen\/functions.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"ebd282b9-e175-4b83-90a2-fe12389ccd11":{"id":"plugin:6f9419e58ec86c94e7698aaaaf9dc715","title":"PageLoader by Bonfire","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/pageloader-by-bonfire\/pageloader.js","bonfire-pageloader-overlay"],"is_default":0,"condition":"pageloader-by-bonfire\/pageloader-by-bonfire.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"0baf6353-aa70-41a9-a3bc-d89870a5839b":{"id":"plugin:3a4c4518eb0f60108ab4934fab27d335","title":"PDF Embedder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/pdf-embedder\/js\/(.*).js"],"is_default":0,"condition":"pdf-embedder\/pdf_embedder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"cba51ec1-87cc-44eb-b12b-d652e3446507":{"id":"plugin:4f90aca5957cccbf623e3bbc31afa204","title":"Perfect Brands for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/perfect-woocommerce-brands\/assets\/lib\/slick\/slick.min.js","\/perfect-woocommerce-brands\/assets\/js\/functions-frontend.min.js"],"is_default":0,"condition":"perfect-woocommerce-brands\/perfect-woocommerce-brands.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"808e7a4e-025c-4fae-bf82-de3716e5eb0d":{"id":"plugin:84fe214646388d7c021dda25003ac165","title":"Photonic","type":"plugin","icon":"","exclusions":["\/photonic\/include\/js\/front-end\/module\/photonic-baguettebox.min.js"],"is_default":0,"condition":"photonic\/photonic.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"936aff7d-a8ac-4473-a7b5-4b1611b6c557":{"id":"plugin:6838be282f853f71be282783cb1c162b","title":"Pixel Caffein","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/pixel-caffeine\/build\/frontend.js","aepc_pixel"],"is_default":0,"condition":"pixel-caffeine\/pixel-caffeine.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"ab3a4ef5-2732-4b46-a7c3-17b4e9405cd1":{"id":"plugin:afe0eb7c64d4556a7111c56dd8c4d307","title":"Pixel Manager for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/woocommerce-pixel-manager-pro\/js\/public\/","wpm"],"is_default":0,"condition":"woocommerce-pixel-manager-pro\/woocommerce-pixel-manager.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"2774f964-50b2-425e-8a30-0a02f421b7e4":{"id":"plugin:38d4b2986868f543639cd1ebc3e510aa","title":"Popup Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/popup-builder\/public\/js\/(.*).js","\/popupbuilder-exit-intent\/public\/javascript\/ExitIntent.js","var sgpbPublicUrl","SGPB_POPUP_PARAMS"],"is_default":0,"condition":"popup-builder\/popup-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"82dbb1e5-31f9-43d7-b522-52819aa49ba5":{"id":"plugin:786717922362642f34a7ff58e919bd95","title":"Popup Maker","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/pum\/pum-site-scripts.js","pum","\/plugins\/popup-maker\/assets\/js\/site.min.js"],"is_default":0,"condition":"popup-maker\/popup-maker.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"48e08305-1f1c-4ef4-9f13-24af1b155abc":{"id":"plugin:17831cbb64e469c7f66224c8c63d0a58","title":"PowerPack Addons for Elementor","type":"plugin","icon":"","exclusions":["\/powerpack-lite-for-elementor\/assets\/js\/min\/frontend.min.js"],"is_default":0,"condition":"powerpack-lite-for-elementor\/powerpack-lite-elementor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e037ae2f-e36b-4f1a-ada8-eb8fde6746f2":{"id":"plugin:80e1283ea1afead3ca904fad792643c5","title":"Preloader Plus","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/preloader-plus\/(.*)"],"is_default":0,"condition":"preloader-plus\/preloader-plus.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"90fed478-e89a-455c-8371-836bee58fb81":{"title":"Premium Addons for Elementor","condition":"premium-addons-for-elementor\/premium-addons-for-elementor.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/premium-addons-for-elementor\/assets\/frontend\/min-js\/premium-addons.min.js","\/premium-addons-for-elementor\/assets\/frontend\/min-js\/isotope.min.js","\/premium-addons-elementor\/pa-frontend-(.*).min.js","\/premium-addons-for-elementor\/assets\/frontend\/min-js\/slick.min.js","\/premium-addons-pro\/assets\/frontend\/min-js\/tooltipster.min.js","window.scopes_array","lottie.min.js","\/premium-addons-for-elementor\/assets\/frontend\/min-js\/premium-nav-menu.min.js"],"icon_url":"","type":"plugin","id":"plugin:debbfbbcbdf9ffb465bbc40008d99f02","is_default":0,"created_at":1693315214},"7e43c261-77be-48fc-b25a-8953a654ae85":{"id":"plugin:100a0382fcf3d1b6b22da928bce46ea8","title":"Presto Player","type":"plugin","icon":"","exclusions":["\/wp-includes\/js\/dist\/vendor\/regenerator-runtime.min.js","\/presto-player\/dist\/components\/web-components\/web-components.esm.js","\/presto-player\/src\/player\/player-static.js","var player","\/wp-includes\/js\/dist\/api-fetch.min.js","\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/dist\/i18n.min.js"],"is_default":0,"condition":"presto-player\/presto-player.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"3d6f509f-d040-4279-9a2f-a4e6eae1e9df":{"id":"plugin:c0fce700121492b566517e68301db382","title":"Price Based on Country for WooCommerce Pro","type":"plugin","icon":"","exclusions":["\/woocommerce-product-price-based-on-countries\/assets\/js\/ajax-geolocation.min.js","\/woocommerce-price-based-country-pro-addon\/assets\/js\/currency-switcher.min.js","add-to-cart.min.js","cart-fragments.min.js"],"is_default":0,"condition":"woocommerce-price-based-country-pro-addon\/woocommerce-price-based-country-pro-addon.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"b970bc8a-bcbe-4d08-8ac0-a6853ab3f036":{"id":"plugin:f1ecfe258440b371124999ca3bfbfff3","title":"Prime Slider","type":"plugin","icon":"","exclusions":["\/plugins\/bdthemes-prime-slider-lite\/assets\/js\/bdt-uikit.min.js"],"is_default":0,"condition":"bdthemes-prime-slider-lite\/bdthemes-prime-slider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e5458963-f167-4b68-88e4-77dd39af2842":{"id":"plugin:29ea8f4dd72f5a5c5927917fb0665a05","title":"PRO Elements","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/pro-elements\/"],"is_default":0,"condition":"pro-elements\/pro-elements.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"b119ad72-f498-4576-bb71-9e6d8c37b68f":{"title":"Product Filter by WBW (for WooCommerce)","condition":"woo-product-filter\/woo-product-filter.php","exclusions":["\/jquery-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/jquery-migrate(.*)(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/wp-content\/plugins\/woo-product-filter\/modules\/woofilters\/js\/frontend.woofilters.js","\/wp-includes\/js\/jquery\/ui\/mouse.min.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/wp-includes\/js\/jquery\/ui\/slider.min.js"],"icon_url":"","type":"plugin","id":"plugin:e57ad91e0d94fab011353af544873743","is_default":0,"created_at":1685686062},"7b779aca-e497-4da3-8e51-fa12837d15ab":{"title":"Product Filters for WooCommerce","condition":"woocommerce-product-filters\/woocommerce-product-filters.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/woocommerce-product-filters\/","\/woocommerce\/assets\/js\/accounting\/accounting.min.js","\/wp-includes\/js\/jquery\/ui\/","wcpf-load-project","WCPFData"],"icon_url":"","type":"plugin","id":"plugin:719469f1c977f7109d3d6ee21ecd5a16","is_default":0,"created_at":1691235154},"2b2a51f2-bd47-4591-92d8-4a690bce5d99":{"id":"plugin:a898898b2b0ea2cd82e20a6d3a3aa47b","title":"Product Gallery Slider for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/twist\/assets\/js\/slick.min.js","wpgs-public-js-after"],"is_default":0,"condition":"twist\/twist.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"062c5be3-e5ea-4958-9619-44e3410f237e":{"title":"Product Video Gallery for Woocommerce","condition":"product-video-gallery-slider-for-woocommerce\/product-video-gallery-slider-for-woocommerce.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/product-video-gallery-slider-for-woocommerce\/public\/js\/nickx.front.js"],"icon_url":"","type":"plugin","id":"plugin:bbc653a91f0635cd2edb0b741aa62b85","is_default":0,"created_at":1693512477},"34d225a4-688c-476b-846b-420774160d6b":{"id":"plugin:e0b123d324c6fc85b8682660c34f8829","title":"Rank Math SEO","type":"plugin","icon":"","exclusions":["local_ga_js"],"is_default":0,"condition":"seo-by-rank-math\/rank-math.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"02305ca0-2c2a-4eef-a802-b8a942771ecc":{"title":"Retainful","condition":"retainful-next-order-coupon-for-woocommerce\/retainful-next-order-coupon-for-woocommerce.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/retainful-next-order-coupon-for-woocommerce\/src\/premium\/assets\/js\/atc-popup.min.js","\/retainful-next-order-coupon-for-woocommerce\/src\/premium\/assets\/js\/exit-intent-popup.js","retainful.com","rnoc-add-to-cart-js-before","rnoc_redirect_coupon_popup"],"icon_url":"","type":"plugin","id":"plugin:f9fdee19ba6aed961d96d86e1521a761","is_default":0,"created_at":1679331508},"b4055250-5813-400f-b663-d390fee989e4":{"id":"plugin:d6a4d07d1b4022d886df52322dcd8a6f","title":"Revolution Slider","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/revslider\/public\/assets\/js\/","\/revslider-(.*)-addon\/","setREVStartSize","rev_slider_","revslider_","window.RS_MODULES"],"is_default":0,"condition":"revslider\/revslider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"0b4e061a-b366-4d5a-a00e-bded4b107133":{"title":"Royal Elementor Addons","condition":"royal-elementor-addons\/wpr-addons.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/royal-elementor-addons\/assets\/js\/frontend.min.js","\/royal-elementor-addons\/assets\/js\/lib\/jarallax\/jarallax.min.js"],"icon_url":"","type":"plugin","id":"plugin:c4b464373716d7ac8e3cfb019aaa6102","is_default":0,"created_at":1688124503},"1b19ec89-171a-4f85-8c4b-b1bcfc6b1433":{"id":"plugin:5e3f85d8c82cc184b945415d1a862601","title":"Sassy Social Share","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/sassy-social-share\/public\/js\/sassy-social-share-public.js","heateorSssLoadEvent"],"is_default":0,"condition":"sassy-social-share\/sassy-social-share.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"f5899925-2ab7-43b6-abc4-51b76d664ca6":{"title":"Scrollsequence","condition":"scrollsequence-pro\/scrollsequence-pro.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/scrollsequence-pro\/public\/js\/gsap__premium_only.js","\/scrollsequence-pro\/public\/js\/gsap-scrolltrigger__premium_only.js","\/scrollsequence-pro\/public\/js\/ssq-lib__premium_only.js","scrollsequence-input-script"],"icon_url":"","type":"plugin","id":"plugin:3df51830b6b80668fc342c8dcea495cf","is_default":0,"created_at":1678111131},"043827fc-3df8-45d6-9cd2-14fbe962987a":{"id":"plugin:9d60b5d2de4d828b78c7b088024377d6","title":"ShiftNav Pro - Responsive Mobile Menu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/shiftnav-pro\/assets\/js\/shiftnav(.*).js"],"is_default":0,"condition":"shiftnav-pro\/shiftnav.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"bcbaf240-e76f-4620-b7d5-4852c46d4be7":{"id":"plugin:56279bd768c8f27ad1972b6774738bcf","title":"ShiftNav \u2013 Responsive Mobile Menu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/shiftnav-responsive-mobile-menu\/"],"is_default":0,"condition":"shiftnav-responsive-mobile-menu\/shiftnav-responsive-mobile-menu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"bbe0543b-b5af-467b-a90d-e2975d892d8d":{"id":"plugin:1bc7ac87d8ab2301a1b904919dc7a798","title":"Short Pixel Adaptive Image","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","\/shortpixel-adaptive-images\/assets\/js\/ai(.*).min.js","spai_settings"],"is_default":0,"condition":"shortpixel-adaptive-images\/short-pixel-ai.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"543ab43a-6bd3-4948-a09e-3b95e7c9209d":{"id":"plugin:ce4dea8ddc3caa8d00e95cec3202d32a","title":"Showcase IDX","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","SIDX","search.showcaseidx.com\/js\/app-(.*).js","cdn.shortpixel.ai"],"is_default":0,"condition":"showcase-idx\/showcaseidx.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"a16bcab7-1169-46b9-a425-b091478d8312":{"id":"plugin:3ea7d9f75ad03620b0bce2517bd5b8d1","title":"Side Cart WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/plugins\/woocommerce\/assets\/js\/frontend\/cart-fragments.min.js","\/plugins\/woocommerce\/assets\/js\/frontend\/add-to-cart.min.js","\/plugins\/woocommerce\/assets\/js\/jquery-blockui\/jquery.blockUI.min.js","\/plugins\/woocommerce\/assets\/js\/js-cookie\/js.cookie.min.js"],"is_default":0,"condition":"side-cart-woocommerce\/xoo-wsc-main.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"521f748e-cf09-4019-bd28-b52daef5f16f":{"id":"plugin:7843983bf90dbae16c6e889382c71b23","title":"Simple Banner","type":"plugin","icon":"","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/simple-banner\/","simpleBannerScriptParams"],"is_default":0,"condition":"simple-banner\/simple-banner.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"76026e82-d9cf-482c-b480-55c57693a184":{"id":"plugin:b6825f971d35a5515d095564a2e40936","title":"Site Kit by Google","type":"plugin","icon":"","exclusions":["google-analytics.com\/analytics.js","ga\\( '","ga\\('","\/gtag\/js","gtag\\(","\/gtm.js"],"is_default":0,"condition":"google-site-kit\/google-site-kit.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"79c458d7-f7f7-4072-919d-ad337bde6ae3":{"id":"plugin:5ce5dfecdc9d3292c69a1413bbd17d3c","title":"Slick Menu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","\/slick-menu\/"],"is_default":0,"condition":"slick-menu\/slick-menu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"dd0ea584-0c99-4c30-b46d-da35b94c9f0a":{"id":"plugin:ffb5f8cc0ea17886dbd05f601ca3eec0","title":"Slider by Soliloquy","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","soliloquy-min.js","soliloquy_slider"],"is_default":0,"condition":"soliloquy-lite\/soliloquy-lite.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"ecb2fffc-d289-4f68-ae94-71131f17deee":{"id":"plugin:2f373822dceb191c31c8ad2183d51869","title":"Smart Slider 3","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","\/smart-slider-3\/(.*).js","_N2"],"is_default":0,"condition":"smart-slider-3\/smart-slider-3.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"284ede43-bf80-419e-8414-46c26cb746f0":{"id":"plugin:720ec9fbbd8a52ce525959a68a5310b3","title":"Smart Slider 3 Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","\/SmartSlider3\/(.*).js","_N2"],"is_default":0,"condition":"nextend-smart-slider3-pro\/nextend-smart-slider3-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"c3334c29-4160-42df-a1ce-f8aeeaee8668":{"title":"Super Socializer","condition":"super-socializer\/super_socializer.php","exclusions":["theChamp","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"icon_url":"","type":"plugin","id":"plugin:660defe26748470c3a47366cd4012579","is_default":0,"created_at":1677853633},"f18b4242-fe3f-4e2b-bfc9-ac2fb3939a90":{"title":"Superfly Menu","condition":"superfly-menu\/main.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate((.*?)(.min?)?).js","\/superfly-menu\/includes\/vendor\/looks_awesome\/icon_manager\/js\/md5.js","\/superfly-menu\/includes\/vendor\/looks_awesome\/icon_manager\/js\/util.js","\/superfly-menu\/js\/public.min.js","window.SFM_is_mobile","var SFM_skew_disabled","var SFM_template"],"icon_url":"","type":"plugin","id":"plugin:ccb15175093bc6c437b78797f0698a7b","is_default":0,"created_at":1684301673},"1a05c00a-8562-45bc-80e8-987a4574b1c9":{"title":"Symplr Ads","condition":"symplr-ads\/symplr-plugin.php","exclusions":["\/symplr-ads\/","cdns.symplr.de"],"icon_url":"","type":"plugin","id":"plugin:3b6d39e28a87e86c4659491e2368ff61","is_default":0,"created_at":1692199959},"858d2d7f-bdac-4d27-ba26-baa9ace96ba4":{"id":"plugin:7d93008296bb5c7c43d4cba185ed2632","title":"Tabby Responsive Tabs","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/tabby-responsive-tabs\/js\/tabby.js","RESPONSIVEUI"],"is_default":0,"condition":"tabby-responsive-tabs\/tabby-responsive-tabs.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e44a5c93-bb77-4624-a121-d846905137ea":{"id":"plugin:2f563bbb7e92363ec3fb2989a1c7dffe","title":"The Plus Addons for Elementor","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/theplus-addons\/(.*)"],"is_default":0,"condition":"the-plus-addons-for-elementor-page-builder\/theplus_elementor_addon.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"2bbac961-b000-4802-ae97-d52472ec6750":{"title":"The Plus Addons for Elementor Premium","condition":"theplus_elementor_addon\/theplus_elementor_addon.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/wp-content\/plugins\/theplus_elementor_addon\/","\/elementor\/","\/elementor-pro\/","\/wp-includes\/js\/imagesloaded.min.js","ElementorProFrontendConfig","elementorFrontendConfig"],"icon_url":"","type":"plugin","id":"plugin:6e127deaaeefbe57ff945b1f9e274518","is_default":0,"created_at":1688143611},"666b45e8-749c-4140-bd17-e1cd589e03ee":{"id":"plugin:b9c418b47c986935a1151ab9b42f8971","title":"ThemeREX Addons","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/trx_addons\/js\/__scripts-full.js","\/trx_addons\/components\/cpt\/layouts\/shortcodes\/menu\/superfish.min.js"],"is_default":0,"condition":"trx_addons\/trx_addons.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"a750cada-eb58-4df4-9966-21c8a69332ba":{"id":"plugin:75af9efe22c5cc776636266feb55adf1","title":"Thrive Architect","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"is_default":0,"condition":"thrive-visual-editor\/thrive-visual-editor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"13714cde-680e-4ca4-8607-c35952d6a5f2":{"title":"Thrive Comments","condition":"thrive-comments\/thrive-comments.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/thrive-leads\/","window.TL_Const","var ml=","\/thrive-comments\/assets\/js\/","ThriveComments","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/backbone.min.js"],"icon_url":"","type":"plugin","id":"plugin:6a72d06ca2f6a888b0d9d5ea93af2edc","is_default":0,"created_at":1677852974},"aa7ca898-499f-4f04-b419-3de199996969":{"id":"plugin:b84d82c02cade64ade00712b9c5652aa","title":"Thrive Leads","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/thrive-leads\/","window.TL_Const","var ml=","\/thrive-comments\/assets\/js\/","ThriveComments","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/backbone.min.js"],"is_default":0,"condition":"thrive-leads\/thrive-leads.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"9eee297a-8241-4ef2-af97-46074bd0898c":{"id":"plugin:5bb61b0559b0a3fd578315b553451327","title":"Thrive Quiz Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"is_default":0,"condition":"thrive-quiz-builder\/thrive-quiz-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"c2f3ec2a-5b09-4845-aa95-84841783fbfc":{"id":"plugin:a7f3e5206abff19ca7cf142260181738","title":"Thrive Ultimatum","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/thrive-ultimatum\/","var TVE_Ult_"],"is_default":0,"condition":"thrive-ultimatum\/thrive-ultimatum.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"d48b8d2f-e071-4a30-840a-306154a115a0":{"id":"plugin:f57be2014b6a489d053f8367fa6c0f9f","title":"Tidio Chat","type":"plugin","icon":"","exclusions":["document.tidioChatCode"],"is_default":0,"condition":"tidio-live-chat\/tidio-elements.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"cb6d33ed-7eb4-4ff9-9ad0-7fc54fbecf6f":{"id":"plugin:c9e0485ec256d4a6a8d92a98c18d76fc","title":"Toolset Blocks","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","toolsetCommonEs.fontToHead","toolsetCommonEs.styleToHead","\/toolset-blocks\/vendor\/toolset\/blocks\/public\/js\/frontend.js","\/toolset-blocks\/vendor\/toolset\/common-es\/public\/toolset-common-es-frontend.js","\/toolset-blocks\/public\/js\/views-frontend.js","\/wp-includes\/js\/underscore.min.js"],"is_default":0,"condition":"toolset-blocks\/wp-views.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"4bac6350-0925-49fb-904a-372f22fd6baf":{"id":"plugin:71beda322b37f7fc7d456822493cb972","title":"Top Bar Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/plugins\/topbar-pro\/js\/tpbr_front.min.js","\/plugins\/topbar-pro\/js\/jquery.cookie.js"],"is_default":0,"condition":"topbar-pro\/topbar_pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"033486e7-0ddc-4915-a848-31504d00448e":{"title":"Twenty20 Image Before-After","condition":"twenty20\/ttwenty.php","exclusions":["\/twenty20\/assets\/js\/(.*).js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","twentytwenty-container"],"icon_url":"","type":"plugin","id":"plugin:23441bba9d3602bc932d697c7cb8aa1f","is_default":0,"created_at":1677858089},"7675a34d-006e-4672-99d5-a81e1b8e47f9":{"id":"plugin:3d59cc34167a7f8123e66b627148e0b7","title":"UberMenu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ubermenu\/assets\/js\/ubermenu.min.js"],"is_default":0,"condition":"ubermenu\/ubermenu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"8233178a-e7b3-43ce-b193-bd0d9c960933":{"id":"plugin:86424c46157c1c7e2e1571055813beee","title":"Ultimate Addons for Elementor","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ultimate-elementor\/assets\/lib\/slick\/slick.min.js","\/ultimate-elementor\/assets\/min-js\/uael-frontend.min.js","\/ultimate-elementor\/assets\/lib\/isotope\/isotope.min.js","\/ultimate-elementor\/assets\/lib\/jquery-element-resize\/jquery_resize.min.js","\/ultimate-elementor\/assets\/lib\/fancybox\/jquery_fancybox.min.js","\/ultimate-elementor\/assets\/lib\/justifiedgallery\/justifiedgallery.min.js","\/elementor-pro\/assets\/js\/frontend.min.js","\/wp-includes\/js\/imagesloaded.min.js","\/js_composer\/assets\/js\/dist\/js_composer_front.min.js","\/elementor\/assets\/lib\/swiper\/swiper.min.js","\/nasa-core\/assets\/js\/min\/jquery.slick.min.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig"],"is_default":0,"condition":"ultimate-elementor\/ultimate-elementor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"8bddf484-6c78-4147-a4e6-d3039904e5f6":{"title":"Ultimate Addons for Elementor - Mobile Menu","condition":"ultimate-elementor\/ultimate-elementor.php","exclusions":["\/jquery-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/jquery-migrate(.*)(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/ultimate-elementor\/assets\/js\/uael-nav-menu.js","\/ultimate-elementor\/assets\/min-js\/uael-nav-menu.min.js"],"icon_url":"","type":"plugin","id":"plugin:70cfade3a7adbb54196f6acccc5a176f","is_default":0,"created_at":1694771327},"028504f7-b1cd-4318-8a6d-ce186197e89d":{"id":"plugin:0f0a91f0c454021a5ff9fc25c3ed419f","title":"Ultimate Addons for WPBakery Page Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/Ultimate_VC_Addons\/assets\/"],"is_default":0,"condition":"Ultimate_VC_Addons\/Ultimate_VC_Addons.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"5754af3d-a6af-49eb-b731-bdd82f26dc4e":{"id":"plugin:34db8636812bad84c8aea037c2ddc8c2","title":"Ultimate Responsive Image Slider","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","sliderPro"],"is_default":0,"condition":"ultimate-responsive-image-slider\/ultimate-responsive-image-slider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"78ae882d-ae31-4179-b677-8893814938c7":{"title":"Unlimited Elements for Elementor Premium - Slider","condition":"unlimited-elements-for-elementor-premium\/unlimited-elements-pro.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/unlimited-elements-for-elementor-premium\/","uc_"],"icon_url":"","type":"plugin","id":"plugin:17260bc347b8c29bee0010e9ec164184","is_default":0,"created_at":1683270377},"051cbfbb-7ad2-4f06-a493-3cf423a80904":{"id":"plugin:6717ef5673a956bc08ca4a5117065d53","title":"Variation Swatches for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jquery\/ui\/","\/woo-variation-swatches\/","\/woo-variation-swatches-pro\/","underscore.min.js"],"is_default":0,"condition":"woo-variation-swatches\/woo-variation-swatches.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"6879caba-7224-4eca-bcb2-370785b495ea":{"id":"plugin:57597b7683e01892932083413f085134","title":"Web Accessibility By accessiBe","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/accessibe\/","acsbJS"],"is_default":0,"condition":"accessibe\/accessiebe.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"bd6732fe-4c2b-40a1-9035-8464057e2da5":{"title":"WooCommerce - Cart Fragments","condition":"woocommerce\/woocommerce.php","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/woocommerce\/assets\/js\/frontend\/cart-fragments.min.js","\/woocommerce\/assets\/js\/js-cookie\/js.cookie.min.js"],"icon_url":"","type":"plugin","id":"plugin:201de694c6fc28c8d580a3b2ca484218","is_default":0,"created_at":1680937567},"d044900d-07e1-4533-9516-33106efcb259":{"title":"WooCommerce - Product description","condition":"woocommerce\/woocommerce.php","exclusions":["\/plugins\/woocommerce\/assets\/js\/frontend\/single-product.min.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"icon_url":"","type":"plugin","id":"plugin:a82644b4c9417ea3a240939a73344700","is_default":0,"created_at":1679309756},"bff953b1-2213-4666-8112-76a84a3cc207":{"title":"WooCommerce - Product Gallery","condition":"woocommerce\/woocommerce.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/woocommerce\/?(.*)\/assets\/js\/zoom\/jquery.zoom(.min)?.js","\/woocommerce\/?(.*)\/assets\/js\/photoswipe\/","\/woocommerce\/?(.*)\/assets\/js\/flexslider\/jquery.flexslider(.min)?.js","\/woocommerce\/?(.*)\/assets\/js\/frontend\/single-product(.min)?.js","wc_single_product_params"],"icon_url":"","type":"plugin","id":"plugin:7665868ff97c265628f376523a4f9ecc","is_default":0,"created_at":1686579689},"016e6ddf-c6e7-49ec-bd3f-2585d9e45895":{"title":"WooCommerce - Select2 library","condition":"woocommerce\/woocommerce.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/woocommerce\/assets\/js\/select2\/select2(.*).js"],"icon_url":"","type":"plugin","id":"plugin:4bca670bd5d55dd24b17fb0193b0891e","is_default":0,"created_at":1681459540},"b9b2c6d7-944f-4ae3-ae04-c9e2204b9dab":{"id":"plugin:9165c768e978d6ad3f696db8c78ccbb2","title":"WooCommerce Attribute Swatches","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/iconic-woo-attribute-swatches-premium\/assets\/frontend\/js\/main.min.js","\/iconic-woo-attribute-swatches-premium\/assets\/vendor\/flickity\/flickity.pkgd.min.js","iconic_was_vars"],"is_default":0,"condition":"iconic-woo-attribute-swatches-premium\/iconic-woo-attribute-swatches.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"4506c5e9-7349-44c9-9967-34370c83facb":{"title":"WooCommerce Bookings","condition":"woocommerce-bookings\/woocommerce-bookings.php","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/woocommerce-bookings\/dist\/frontend.js","\/wp-includes\/js\/dist\/date.min.js","\/wp-includes\/js\/dist\/vendor\/moment.min.js","\/wp-includes\/js\/jquery\/ui\/datepicker.min.js","\/wp-includes\/js\/underscore.min.js","\/woocommerce\/assets\/js\/jquery-blockui\/jquery.blockUI.min.js","\/wp-includes\/js\/dist\/hooks.min.js"],"icon_url":"","type":"plugin","id":"plugin:14dec6d289b9977fa3a74116feecebcc","is_default":0,"created_at":1693998405},"fec9cd04-c358-45da-a1a8-1668b964016b":{"id":"plugin:456f3b849ba3b6647246aca9d7cdaed5","title":"WooCommerce Product Reviews Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","wc_product_reviews_pro","\/woocommerce-product-reviews-pro\/assets\/js\/frontend\/wc-product-reviews-pro-frontend.min.js","\/woocommerce\/assets\/js\/jquery-tiptip\/jquery.tipTip.min.js"],"is_default":0,"condition":"woocommerce-product-reviews-pro\/woocommerce-product-reviews-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"551a9399-627f-4978-9bae-5cc8e0aefc82":{"id":"plugin:c8577e74eef3b082fb6403760d53f68c","title":"WooCommerce TM Extra Product Options","type":"plugin","icon":"","exclusions":["\/woocommerce-tm-extra-product-options\/assets\/js\/epo.min.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/wp-includes\/js\/jquery\/ui\/mouse.min.js","\/wp-includes\/js\/jquery\/ui\/slider.min.js","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/wp-util.min.js","\/wp-includes\/js\/dist\/hooks.js","\/wp-includes\/js\/dist\/i18n.js"],"is_default":0,"condition":"woocommerce-tm-extra-product-options\/tm-woo-extra-product-options.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"3cac4650-6a52-448e-8e48-e99a772a59a2":{"id":"plugin:c6e6cab8c80fa3fe57d609f72d2d5c56","title":"WooLentor","type":"plugin","icon":"","exclusions":["\/woolementor\/assets\/third-party\/slick\/slick.min.js","\/woolentor-addons","woolentor_addons"],"is_default":0,"condition":"woolentor-addons\/woolentor_addons_elementor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"21af073d-d2ec-4d46-bbda-2c69f87f3f98":{"title":"Woolentor - Fix product gallery","condition":"woolentor-addons\/woolentor_addons_elementor.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)",".woolentor-learg-img","\/woolentor-addons\/assets\/js\/slick.min.js","\/woolentor-addons-pro\/assets\/lib\/js\/tippy.min.js"],"icon_url":"","type":"plugin","id":"plugin:c5315e06dfc353cd57f85a60abe4e320","is_default":0,"created_at":1700061004},"67aeb4cb-1a00-4d10-a00c-34888b4c0dba":{"title":"WooThumbs for WooCommerce","condition":"woothumbs-premium\/woothumbs-premium.php","exclusions":["\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/wp-embed.min.js","\/wp-includes\/js\/wp-util.min.js","\/woothumbs-premium\/(.*)"],"icon_url":"","type":"plugin","id":"plugin:b97b1d3f627769e1dd8305aa25af993c","is_default":0,"created_at":1679065404},"c7a14763-88d0-4344-a6af-e0a8dc5fa8d5":{"id":"plugin:31b9e812a025e5750a6ef0980ee7d2db","title":"WordPress Mega Menu \u2013 QuadMenu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/quadmenu","#private-menu","#public-menu"],"is_default":0,"condition":"quadmenu\/quadmenu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"f699fdbd-84a7-4f24-b729-3e4a4f83a4dd":{"id":"plugin:601f8fc7d10cad1c2ec2949c0d9b1651","title":"WP Armour","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/honeypot\/includes\/js\/wpa.js","\/wp-armour-extended\/includes\/js\/wpae.js","wpa_hidden_field","wpa_add_test"],"is_default":0,"condition":"wp-armour-extended\/wp-armour-extended.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"6a28aae5-ef91-43fc-8204-92e3a25642b4":{"id":"plugin:5728f3b9856dfe37a36ab15b0a637198","title":"WP Go Maps","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","maps.googleapis.com"],"is_default":0,"condition":"wp-google-maps\/wpGoogleMaps.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"c9b991d1-a653-404b-be85-e276b1814e7d":{"title":"WP Google Map Pro","condition":"wp-google-map-gold\/wp-google-map-gold.php","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","maps.google.com\/maps\/api\/js","\/wp-includes\/js\/masonry.min.js","\/wp-google-map-gold\/(.*)"],"icon_url":"","type":"plugin","id":"plugin:dc12a9b7b9c4c7ce3c532b6b377739f2","is_default":0,"created_at":1677858391},"1f8f9fbf-fbf0-4e3a-b77c-af0fa47e950d":{"id":"plugin:87f572f5f0ec143a8fceba77d0616197","title":"WP Google Maps Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-google-maps(.*)","maps.googleapis.com","mgl_","wpgmza"],"is_default":0,"condition":"wp-google-maps-pro\/wp-google-maps-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"41e4b98c-e63f-4800-a478-02592562322b":{"id":"plugin:3735ca768ede98b25795f4cb057ff4ed","title":"WP iCal Availability","type":"plugin","icon":"","exclusions":["\/wp-ical-availability\/js\/custom-select.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-ical-availability\/"],"is_default":0,"condition":"wp-ical-availability\/wp-ical-availability.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"2b06c5b8-dc32-4bb0-8504-3a9f1c3a1ec0":{"title":"WP MapIt","condition":"wp-mapit\/wp_mapit.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-mapit\/wp_mapit\/js\/leaflet.js","\/wp-mapit\/wp_mapit\/js\/wp_mapit_multipin.js"],"icon_url":"","type":"plugin","id":"plugin:ba8d1c7f294a3f5b593556eb3b0bc7d9","is_default":0,"created_at":1679331261},"2039eafd-1c11-4e21-a61b-30857f291ae3":{"id":"plugin:927b8bf7806f2d287559b86a0b455a59","title":"WP Responsive Menu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-responsive-menu\/(.*)"],"is_default":0,"condition":"wp-responsive-menu\/wp-responsive-menu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e06be942-cccd-4b2d-a268-06dc78f0b820":{"title":"WP Search with Algolia","condition":"wp-search-with-algolia\/algolia.php","exclusions":["\/wp-search-with-algolia\/js\/algoliasearch\/dist\/algoliasearch-lite.umd.js","\/wp-search-with-algolia\/js\/autocomplete-noconflict.js","\/wp-search-with-algolia\/js\/autocomplete.js\/dist\/autocomplete.min.js","var algolia"],"icon_url":"","type":"plugin","id":"plugin:43267e659d599fbb6b42c719b49bb7a7","is_default":0,"created_at":1677857180},"4fc2a7ae-b9e6-410e-93cf-e6d1962add6a":{"id":"plugin:4fb90fc73fc2b5d1e37ea2dadfd3cef3","title":"WP Smart Preloader","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","\/wp-smart-preloader\/assets\/js\/wsp-main-script(.min)?.js"],"is_default":0,"condition":"wp-smart-preloader\/wp-preloader.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"7ecf40ce-2bcd-412c-bb01-9e71fecf6be8":{"id":"plugin:d37bb5054a24471ca1675d9ab49d01b0","title":"WP Store Locator","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","\/wp-store-locator\/","\/wp-includes\/js\/underscore.min.js","maps.google.com"],"is_default":0,"condition":"wp-store-locator\/wp-store-locator.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"7a1d19a2-3a48-40ab-8051-f642fc63ce2d":{"title":"WP Ultimate Post Grid","condition":"wp-ultimate-post-grid\/wp-ultimate-post-grid.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/wp-ultimate-post-grid\/dist\/public.js","\/wp-ultimate-post-grid-premium\/dist\/public-premium.js","wpupg_grid_args"],"icon_url":"","type":"plugin","id":"plugin:e24341fef49bd64b89682d583218c108","is_default":0,"created_at":1686597940},"76c86163-ddf3-4113-b620-de9d5058f505":{"id":"plugin:517d7d24da9a7072ed389d0fb30374a0","title":"WPBakery Page Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/js_composer\/assets\/js\/dist\/js_composer_front.min.js"],"is_default":0,"condition":"js_composer\/js_composer.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"4f5e5b98-c326-4b9f-9ada-3b257862132c":{"id":"plugin:1ec7138c950c355e7af60d49c81139fc","title":"wpDataTables","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wpdatatables\/","highcharts"],"is_default":0,"condition":"wpdatatables\/wpdatatables.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"18be1b8c-0bc4-4a01-abc6-a127aff380c6":{"id":"plugin:c62ca58ea081c1271de8dadfa7daac69","title":"WPForms","type":"plugin","icon":"","exclusions":["\/wpforms-offline-forms\/assets\/js\/wpforms-offline-forms.min.js","wpforms-offline-forms-js-extra","wpformsRecaptchaLoad"],"is_default":0,"condition":"wpforms\/wpforms.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"8a3cacb6-81bd-456a-a1cc-a4025f8e5234":{"id":"plugin:0992ac952c0a05bb35e18b1d5744d346","title":"WPForms Lite","type":"plugin","icon":"","exclusions":["wpformsRecaptchaLoad","\/wpforms-offline-forms\/assets\/js\/wpforms-offline-forms.min.js","wpforms-offline-forms-js-extra"],"is_default":0,"condition":"wpforms-lite\/wpforms.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"98bbd410-5b01-4244-a8eb-715765180328":{"title":"XL WooCommerce Sales Triggers","condition":"xl-woocommerce-sales-triggers\/xl-woocommerce-sales-triggers.php","exclusions":["\/xl-woocommerce-sales-triggers\/assets\/js\/wcst_combined.min.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"icon_url":"","type":"plugin","id":"plugin:ba9e526ddb0157e69757530c6b18b714","is_default":0,"created_at":1677856813},"bf9f9620-dd0e-4e6f-9a45-4eb78a148f42":{"id":"plugin:58663fc781232169e865f6fe7cf1afaa","title":"YITH WooCommerce Ajax Product Filter","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/yith-woocommerce-ajax-navigation\/assets\/js\/yith-wcan-shortcodes.min.js"],"is_default":0,"condition":"yith-woocommerce-ajax-navigation\/init.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"b053279d-e07c-438c-bb3e-3a1f4f5d7c5e":{"id":"plugin:68b637fd247e40c8e135e4771d739b07","title":"YITH WooCommerce AJAX Product Filter Premium","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/yith-woocommerce-ajax-product-filter-premium\/assets\/js\/yith-wcan-shortcodes.min.js"],"is_default":0,"condition":"yith-woocommerce-ajax-product-filter-premium\/init.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"d94dbbf3-bcab-4e47-9fbb-6b3a7cf92787":{"title":"Yotpo Social Reviews for Woocommerce","condition":"yotpo-social-reviews-for-woocommerce\/wc_yotpo.php","exclusions":["\/yotpo-social-reviews-for-woocommerce\/assets\/js\/headerScript.js"],"icon_url":"","type":"plugin","id":"plugin:45ab742b3fccbd04d7bc973c8582be87","is_default":0,"created_at":1680686421}},"themes":{"9c623554-5834-4669-9e96-1b894c1939b2":{"id":"theme:0193ea55fce2ada93b262f2824008c0f","title":"Andaman","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/andaman\/assets\/js\/","\/wp-andaman-plugins\/shortcodes\/vc_extend\/"],"is_default":0,"condition":"andaman","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"7374c5a5-69f8-460f-b44f-dee884a824cd":{"id":"theme:24cbda63f1b898ade5562ab4ec6d97a5","title":"Artale","type":"theme","icon":"","exclusions":["\/artale-elementor\/assets\/js\/modulobox.js","\/artale-elementor\/assets\/js\/artale-elementor.js","\/artale\/js\/jquery-stellar.js","\/artale\/js\/core\/artale-plugins.js","\/artale\/js\/core\/artale-custom.js","var loader"],"is_default":0,"condition":"artale","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"03a9cc62-c167-447d-beb2-65c76c96b056":{"title":"Astra","condition":"astra","exclusions":["\/astra\/assets\/js\/minified\/frontend.min.js"],"icon_url":"","type":"theme","id":"theme:3cce5f3eaf76e098ba8e28f7bbba3f92","is_default":0,"created_at":1681390022},"2a2b54cb-8e1d-49d2-bfca-93eee231e470":{"id":"theme:72a8d63e59c10bdf512a62b862d143a7","title":"Astra - Carousel","type":"theme","icon":"","exclusions":["var astra","\/astra\/assets\/js\/minified\/style.min.js"],"is_default":0,"condition":"astra","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"7783361f-66fc-4d95-a054-4e9545bb5b48":{"title":"Auteur","condition":"g5plus-auteur","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/g5plus-auteur\/assets\/js\/core.min.js","\/g5plus-auteur\/assets\/vendors\/","\/auteur-framework\/libs\/smart-framework\/assets\/vendors\/perfect-scrollbar\/js\/perfect-scrollbar.jquery.min.js","\/wp-includes\/js\/imagesloaded.min.js"],"icon_url":"","type":"theme","id":"theme:6207fe478e269e7547bda70a46607a49","is_default":0,"created_at":1679737107},"4c618038-8fc7-4d48-8d41-a32da14e5c1e":{"title":"AutoTrader","condition":"autotrader","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/autotrader\/(.*).js"],"icon_url":"","type":"theme","id":"theme:046dfeee2b77390c53e0e7f93b6a3792","is_default":0,"created_at":1679736741},"18f04f23-35a0-4c45-8cb6-a91d57ca1790":{"id":"theme:835da12f43373029659f766920e81b47","title":"Avada - Animations & mobile-specific actions","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/uploads\/fusion-scripts\/(.*).js","window.off_canvas_","\/plugins\/fusion-builder\/","\/plugins\/fusion-core\/","\/Avada\/includes\/"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"90135867-1b95-498b-80d6-f5dbf2f6b318":{"title":"Avada - FAQ shortcode","condition":"Avada","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/plugins\/fusion-core\/js\/min\/avada-faqs.js"],"icon_url":"","type":"theme","id":"theme:b084708c80d8582546e5430219aa4670","is_default":0,"created_at":1678277160},"d23b5bb1-1d7f-4109-bf69-b20a2be2d337":{"id":"theme:5e7a2248e1a53d9bb27b187deb541248","title":"Avada - Fusion carousel","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/includes\/lib\/assets\/min\/js\/library\/jquery.carouFredSel.js","\/includes\/lib\/assets\/min\/js\/general\/fusion-carousel.js","fusionCarouselVars"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"98dfa8c1-e72a-4cef-a0b2-8f0c322490fc":{"id":"theme:f16fb109027f4994a7649a8b1663e6f7","title":"Avada - Fusion form","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/fusion-builder\/assets\/js\/min\/general\/fusion-form.js","\/fusion-builder\/assets\/js\/min\/general\/fusion-form-logics.js","\/includes\/lib\/assets\/min\/js\/library\/cssua.js","\/includes\/lib\/assets\/min\/js\/general\/fusion.js","\/includes\/lib\/assets\/min\/js\/library\/modernizr.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"026801fa-af67-47ba-b966-347693f0585f":{"id":"theme:33f50696d353d8bd4eb59ff6e8f44c97","title":"Avada - Fusion grid gallery","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/fusion-builder\/assets\/js\/min\/general\/fusion-gallery.js","\/includes\/lib\/assets\/min\/js\/library\/imagesLoaded.js","\/includes\/lib\/assets\/min\/js\/library\/isotope.js","\/includes\/lib\/assets\/min\/js\/library\/packery.js","\/includes\/lib\/assets\/min\/js\/library\/lazysizes.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"c8349314-15a3-481e-973b-e4d936e4420e":{"id":"theme:56fa9993a573540c83eda9c49fae5e3c","title":"Avada - Fusion slider","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/fusion-core\/js\/min\/avada-fusion-slider.js","\/Avada\/includes\/"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"7a04bc85-0fec-4487-ae05-bb2e5d8d0420":{"title":"Avada - Load Portfolio on pageload","condition":"Avada","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/library\/packery.js","\/library\/isotope.js","\/library\/imagesLoaded.js","\/general\/fusion-lightbox.js","\/fusion-core\/js\/min\/avada-portfolio.js"],"icon_url":"","type":"theme","id":"theme:c3f0ed4d94499b68c77d95db37d1d399","is_default":0,"created_at":1696601814},"55bd510c-78aa-49d5-8304-8be2ee2ab0da":{"id":"theme:2189c1c769d65cfc2182e4822847071b","title":"Avada - Mobile menu","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/assets\/min\/js\/general\/avada-menu.js","\/includes\/lib\/assets\/min\/js\/library\/modernizr.js","\/includes\/lib\/assets\/min\/js\/library\/jquery.easing.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"ddf00672-c35c-4b68-aeca-925e68bf12b2":{"id":"theme:97a185f08af70c39c7e221faab0f73eb","title":"Avada - OffCanvas","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/uploads\/fusion-scripts\/(.*).min.js","window.off_canvas_"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"17544cc3-9d3a-4611-bc5d-44d04e2786fa":{"title":"Avada - Show the Portfolio grid on page load","condition":"Avada","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/includes\/lib\/assets\/min\/js\/library\/imagesLoaded.js","\/includes\/lib\/assets\/min\/js\/library\/isotope.js","\/includes\/lib\/assets\/min\/js\/library\/lazysizes.js","\/includes\/lib\/assets\/min\/js\/library\/modernizr.js","\/includes\/lib\/assets\/min\/js\/library\/packery.js","\/fusion-core\/js\/min\/avada-portfolio.js","avadaPortfolioVars"],"icon_url":"","type":"theme","id":"theme:9d1a9b0c2ca20fca764a82f197b962fd","is_default":0,"created_at":1696601823},"c6c3347c-14e0-4766-afa5-df33a47f5a5a":{"id":"theme:3ff44421b404c5efffa25e78e479e4ea","title":"Avada - Sticky menu","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/Avada\/assets\/min\/js\/general\/avada-menu.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"232596c1-6a6a-4fe8-a5c3-a60fa74a9456":{"id":"theme:0d727d80bb132f17c737e55883fe4be0","title":"Avada - WooCommerce product gallery","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/assets\/min\/js\/general\/avada-woo-product-images.js","\/includes\/lib\/assets\/min\/js\/library\/jquery.flexslider.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"95ece7e4-3b19-45e5-aa28-14f833c9afca":{"title":"Avesa","condition":"avesa","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/avesa\/js\/main.js","\/avesa\/js\/isotope.js","\/sw_core\/js\/slick.min.js","\/avesa\/js\/bootstrap-datetimepicker.min.js","\/avesa\/js\/bootstrap.min.js"],"icon_url":"","type":"theme","id":"theme:aad8bfcc594eec02e3b0d635198dee5e","is_default":0,"created_at":1679737993},"f2bfe477-4e45-4e52-a7d9-4d0ba3a92258":{"title":"Besa","condition":"besa","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/besa\/js\/"],"icon_url":"","type":"theme","id":"theme:c238e89523c46ca28b08e401f42f6ccc","is_default":0,"created_at":1679738204},"bd94908c-8138-4995-986b-47ec66494bdd":{"title":"BeTheme","condition":"betheme","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/betheme\/","mfn","\/wp-includes\/js\/jquery\/ui\/tabs.min.js","\/wp-includes\/js\/jquery\/ui\/core.min.js"],"icon_url":"","type":"theme","id":"theme:b99156eb9eeb357c0a70bd3bda6861cc","is_default":0,"created_at":1679738639},"6fb2b9d7-6ecc-4260-999c-938fbebdbf01":{"id":"theme:de8504b73ea228d0ea9bbce69752092e","title":"Bridge","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/bridge-creative\/bridge\/js\/","\/wp-includes\/js\/"],"is_default":0,"condition":"bridge","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"65698b6b-85dd-41ef-8fd7-718f1e983dba":{"title":"Car Dealer","condition":"cardealer","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/jquery\/(.*)","\/cardealer\/js\/(.*)"],"icon_url":"","type":"theme","id":"theme:b1111424fff61af8d1e152dcdd6810f6","is_default":0,"created_at":1679737517},"3927d724-5a0a-402b-a838-858d30b54ea9":{"title":"Cardea - Show Page Content on Load","condition":"cardea-wp","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/themes\/cardea-wp\/js\/main.js","\/themes\/cardea-wp\/js\/jquery.sticky.js","\/themes\/cardea-wp\/js\/jquery.fitvids.js","\/themes\/cardea-wp\/js\/jquery.smartmenus.min.js"],"icon_url":"","type":"theme","id":"theme:d65d1a8303b0c7508278884520e4bec7","is_default":0,"created_at":1698677525},"087fb457-a09d-4140-84bd-c9bc1e8195b7":{"title":"CheerUp","condition":"cheerup","exclusions":["\/cheerup\/js\/jquery.sticky-sidebar.js","\/cheerup\/js\/object-fit-images.js","\/cheerup\/js\/jquery.fitvids.js","\/cheerup\/js\/jquery.mfp-lightbox.js","\/cheerup\/js\/ie-polyfills.js","\/cheerup\/js\/theme.js","\/wp-includes\/js\/imagesloaded.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/wp-includes\/js\/jquery\/jquery.min.js"],"icon_url":"","type":"theme","id":"theme:13bcf562f45afb245dc4f76fecfba6d6","is_default":0,"created_at":1696429398},"eb86aedb-91e6-480c-b76c-756ac1da41be":{"title":"Clover","condition":"clover-theme","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/clover-theme\/"],"icon_url":"","type":"theme","id":"theme:89372f3d9321ae09c94488592084da29","is_default":0,"created_at":1679738878},"6e90b649-5736-497f-9bc6-515900cfea8a":{"title":"Divi - Animations","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js",".dipi_preloader_wrapper_outer","\/Divi\/js\/scripts.min.js","\/Divi\/js\/custom.unified.js","\/js\/magnific-popup.js","var DIVI"],"icon_url":"","type":"theme","id":"theme:c0abf30dba4ff13db836d1b01685953a","is_default":0,"created_at":1679737389},"70916c43-4e02-4932-b6aa-91a1815bc755":{"title":"Divi - Background video","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/Divi\/js\/custom.unified.js","\/js\/mediaelement\/(.*)","mejs"],"icon_url":"","type":"theme","id":"theme:c7edea41ae6716291e2d32a2ab429209","is_default":0,"created_at":1679738240},"08531785-9818-4e30-903e-564637a2ad7a":{"title":"Divi - Counter module","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js",".dipi_preloader_wrapper_outer","\/Divi\/js\/scripts.min.js","\/Divi\/js\/custom.unified.js","\/js\/magnific-popup.js","var DIVI","\/Divi\/includes\/builder\/feature\/dynamic-assets\/assets\/js\/easypiechart.js"],"icon_url":"","type":"theme","id":"theme:2c46b9f5a770f260c3f7115bb330b2d5","is_default":0,"created_at":1679736810},"b996762a-84ef-440d-a089-73a187936fbf":{"title":"Divi - Mobile menu","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/Divi\/js\/scripts.min.js","\/Divi\/js\/custom.unified.js"],"icon_url":"","type":"theme","id":"theme:b9116994f4e4b9b9fa574440c00d2f0d","is_default":0,"created_at":1679738580},"ae096e1e-9c36-46ad-a3d1-c26ea507276b":{"title":"Divi - Sticky elements","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js",".dipi_preloader_wrapper_outer","\/Divi\/js\/scripts.min.js","\/Divi\/includes\/builder\/feature\/dynamic-assets\/assets\/js\/sticky-elements.js","var DIVI"],"icon_url":"","type":"theme","id":"theme:8b62db03c90245f3e690335b079b05dc","is_default":0,"created_at":1679737191},"349f31f0-dd10-41d3-b0a4-9c5df64879f8":{"title":"Divi - Sticky menu","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/js\/jquery\/jquery-migrate.min.js","\/Divi\/js\/scripts.min.js","\/Divi\/includes\/builder\/feature\/dynamic-assets\/assets\/js\/magnific-popup.js","jqueryParams","firstHeader"],"icon_url":"","type":"theme","id":"theme:b7b84aca0f0dc6a1ced31d38626c50ea","is_default":0,"created_at":1679738821},"59563458-5f04-4959-b3e2-53e49e169d67":{"title":"Divi - WooCommerce Single Product Images","condition":"Divi","exclusions":["\/Divi\/js\/scripts.min.js"],"icon_url":"","type":"theme","id":"theme:f9c5bdba8b39fc877b41dea00fa756f9","is_default":0,"created_at":1684342262},"6426539e-4e43-4fef-ab5a-3eb7b2a8b057":{"title":"Eikra","condition":"eikra","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/eikra\/assets\/js\/","EikraObj"],"icon_url":"","type":"theme","id":"theme:55d2581ad975eb6325bc97fc3d3b0cb8","is_default":0,"created_at":1679738450},"59020bd6-069f-4f2d-afa2-fbdefa03211c":{"title":"Ekko","condition":"ekko","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ekko\/"],"icon_url":"","type":"theme","id":"theme:2c06f4a1949f8ba4e77042a47674fd9e","is_default":0,"created_at":1679737803},"d82f5cdd-c5d3-4596-94dc-1e25aaff2083":{"title":"Elessi","condition":"elessi-theme","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elessi-theme\/assets\/js\/min\/functions.min.js","\/elessi-theme\/assets\/js\/min\/main.min.js"],"icon_url":"","type":"theme","id":"theme:d5d2b7fda7b8a2b5b91d430f7602e230","is_default":0,"created_at":1679737773},"f0587c21-54d0-429d-8efe-18a93dacb18d":{"id":"theme:5fc04cc678cb54567aedb51027933002","title":"Enfold","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/dynamic_avia\/avia-footer-scripts-(.*).js","var avia_is_mobile"],"is_default":0,"condition":"enfold","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"cc0550cb-918e-419d-b4f2-1809cf666dbb":{"id":"theme:eb759a03d0ca292c948f09d004a2963f","title":"Enfold - LayerSlider","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","layerslider"],"is_default":0,"condition":"enfold","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"ec883654-4f63-4fae-a3ef-923dcbc2426d":{"title":"Enfold - Shortcodes","condition":"enfold","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/enfold\/js\/avia.js","\/enfold\/js\/shortcodes.js","\/enfold\/config-templatebuilder\/avia-shortcodes\/","\/enfold\/js\/avia-compat.js","\/enfold\/js\/waypoints\/waypoints.min.js","\/enfold\/js\/avia-snippet-(.*).js"],"icon_url":"","type":"theme","id":"theme:072fc4077d7071791d774d6ddbf5dc2a","is_default":0,"created_at":1684519716},"fe3546f0-be3e-4173-8992-a7f6f203b82f":{"title":"Envision","condition":"envision","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/envision\/lib\/js\/app.min.js","var CloudFwOp"],"is_default":1,"icon_url":"","type":"theme","id":"theme:fc5f7d69b646ed95835badc0fc23bc11","created_at":1679737494},"d997b942-19de-4710-9c81-79d3c65cbd76":{"id":"theme:047f009f2a1f4cdf2088c46be47e385b","title":"Ewebot","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/gt3-themes-core\/","\/uploads\/gt3-assets\/js\/(.*)","\/wp-includes\/js\/imagesloaded.min.js"],"is_default":0,"condition":"ewebot","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"53d29aec-8ae4-4273-b748-f5bd52dfe177":{"title":"Farvis","condition":"farvis","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/farvis\/"],"icon_url":"","type":"theme","id":"theme:26bff2f3a6ff6347d35edf5c77a35687","is_default":0,"created_at":1679737972},"fb01246b-a5f8-4021-b514-c02cf55e80bd":{"title":"Flatsome","condition":"flatsome","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/flatsome\/assets\/js\/flatsome.js","\/flatsome\/assets\/libs\/packery.pkgd.min.js","\/flatsome\/assets\/js\/woocommerce.js"],"icon_url":"","type":"theme","id":"theme:26fb1cf80f074ca199d8a7e94c5fc796","is_default":0,"created_at":1679738732},"4d65dc12-9ce7-4171-94a7-9821fd95240e":{"id":"theme:28a6f8b3319c107a34603be0f01a4bcf","title":"Flatsome - Google map","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","maps.googleapis.com","google.maps.LatLng","\/wp-includes\/js\/hoverIntent.min.js"],"is_default":0,"condition":"flatsome","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"890e15b6-c66b-4a9e-9b7d-55417df94916":{"title":"Flatsome - Images","condition":"flatsome","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/flatsome\/inc\/integrations\/wp-rocket\/flatsome-wp-rocket.js","\/flatsome\/assets\/js\/flatsome.js","\/flatsome\/inc\/extensions\/flatsome-lazy-load\/flatsome-lazy-load.js"],"icon_url":"","type":"theme","id":"theme:f2d60aad9f2f5395e3e145cf8f8ab165","is_default":0,"created_at":1679737691},"cb54d070-8ee0-4c35-9fa9-b2bac73ccf39":{"title":"Frida","condition":"frida","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/frida\/"],"icon_url":"","type":"theme","id":"theme:109ddf56796a5133e12279f3daa5ff62","is_default":0,"created_at":1679738013},"9e78539a-03d9-442b-ab94-dd3b7a9658e4":{"id":"theme:80a330247d61d729fcd78dc01de6ed2f","title":"GeneratePress - Mobile menu","type":"theme","icon":"","exclusions":["\/generatepress\/assets\/js\/menu.min.js","generatepressMenu","\/gp-premium\/menu-plus\/functions\/js\/offside.min.js"],"is_default":0,"condition":"generatepress","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"6373bbb2-877c-4075-b6e4-7c58d686b25c":{"title":"HealthFirst - Prevent console errors","condition":"healthfirst","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/wp-includes\/js\/hoverIntent.min.js","\/wp-content\/plugins\/healthfirst-core\/assets\/js\/healthfirst-core.min.js","\/wp-content\/plugins\/healthfirst-core\/assets\/plugins\/modernizr\/modernizr.js","\/wp-content\/plugins\/healthfirst-core\/assets\/plugins\/perfect-scrollbar\/perfect-scrollbar.jquery.min.js","\/wp-content\/themes\/healthfirst\/assets\/js\/main.min.js","\/wp-content\/themes\/healthfirst\/assets\/plugins\/waitforimages\/jquery.waitforimages.js"],"icon_url":"","type":"theme","id":"theme:d244b3c692f8d023048207dbe9eb84da","is_default":0,"created_at":1699370973},"2c72e7e6-cb77-44e9-af87-d5c42ae6db52":{"title":"Honor - WPBakery fix","condition":"honor","exclusions":["\/honor\/js\/__scripts.js","HONOR_STORAGE","\/js_composer\/"],"icon_url":"","type":"theme","id":"theme:9f228373ff4d172655dbf5cb3b1bc23a","is_default":0,"created_at":1679736895},"9309d1d3-1035-4a2c-8ced-075bc3ff9957":{"title":"HotelMaster","condition":"hotelmaster","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/hotelmaster\/javascript\/gdlr-script.js","\/hotelmaster\/plugins\/dl-menu\/modernizr.custom.js","\/hotelmaster\/plugins\/dl-menu\/jquery.dlmenu.js","\/hotelmaster\/plugins\/superfish\/js\/superfish.js","\/hotelmaster\/plugins\/jquery.easing.js"],"icon_url":"","type":"theme","id":"theme:978eaddad3b1047e479407b6d92197aa","is_default":0,"created_at":1679738595},"4a09f745-cbb1-47c8-b50a-c8014d5d1335":{"id":"theme:e813a548bceac6765a1cdf2316f1a6ab","title":"HotelMaster - Blog","type":"theme","icon":"","exclusions":["\/wp-includes\/js\/masonry.min.js","\/gp-premium\/blog\/functions\/js\/scripts.min.js","\/wp-includes\/js\/imagesloaded.min.js"],"is_default":0,"condition":"hotelmaster","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"f2d8f704-ec68-4278-9ca2-885daa0c1ce5":{"id":"theme:398a264e302e42640553681e8759cd07","title":"HotelMaster - Masonry","type":"theme","icon":"","exclusions":["\/gp-premium\/menu-plus\/functions\/js\/offside.min.js","offSide"],"is_default":0,"condition":"hotelmaster","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"92b2e258-1f44-41c1-b1bd-f117f61ee49d":{"title":"Jannah Theme - Fix masonry grid","condition":"jannah","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/masonry.min.js","\/wp-includes\/js\/jquery\/jquery.masonry.min.js","tie-"],"icon_url":"","type":"theme","id":"theme:35f7f183089309f52046377ca65e905a","is_default":0,"created_at":1699642920},"df52436c-53d6-461a-b81a-cd0b21680524":{"title":"JNews","condition":"jnews","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/jnews\/assets\/js\/","jnews","jfla"],"icon_url":"","type":"theme","id":"theme:5d90e451984f9d894b1aabb0d00f30a2","is_default":0,"created_at":1679738860},"87ed69a2-3295-4fad-a82e-eeb02925a5dc":{"title":"Jobify","condition":"jobify","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","\/jobify\/js\/jobify.min.js","\/jobify\/js\/select2.full.min.js"],"icon_url":"","type":"theme","id":"theme:592006aa4562a6915e344e5e2a09e5ee","is_default":0,"created_at":1686856948},"28a0b1ea-8d2f-4931-a48a-166b8df8a773":{"title":"JOYN","condition":"joyn","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/swift-framework\/includes\/page-builder\/frontend-assets\/js\/lib\/modernizr-custom.js","\/swift-framework\/includes\/page-builder\/frontend-assets\/js\/spb-functions.min.js","\/swift-framework\/includes\/swift-slider\/assets\/js\/swift-slider.min.js","\/swift-framework\/public\/js\/lib\/imagesloaded.pkgd.min.js","\/joyn\/js\/owl.carousel.min.js","\/joyn\/js\/theme-scripts.js","\/joyn\/js\/functions.js"],"icon_url":"","type":"theme","id":"theme:c395470ad2d4d681836cd942bbb03120","is_default":0,"created_at":1679738527},"542be60a-2346-4740-9a41-8a580c4f013c":{"title":"Juno Toys","condition":"junotoys","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/junotoys\/fw\/js\/core.init.js","\/junotoys\/fw\/js\/core.utils.js","\/junotoys\/fw\/js\/superfish.js","\/junotoys\/fw\/js\/swiper\/swiper.js","\/trx_utils\/shortcodes\/theme.shortcodes.js","\/wp-includes\/js\/jquery\/ui\/(.*)"],"icon_url":"","type":"theme","id":"theme:2acab38e8356d36355bb81d931e7fba4","is_default":0,"created_at":1679737788},"06167710-10c7-446e-a08b-ce676e444102":{"title":"Jupiter","condition":"jupiter","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jupiter\/","\/wp-includes\/js\/underscore.min.js","WebFont.load"],"icon_url":"","type":"theme","id":"theme:89c5c30498c2989611f9044be006197c","is_default":0,"created_at":1679738430},"5d042e1f-7e62-4ec4-ba31-30d396004522":{"title":"JupiterX","condition":"jupiterx","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jupiterx\/(.*).js","\/wp-includes\/js\/underscore.min.js","WebFont.load"],"icon_url":"","type":"theme","id":"theme:b06632962a4948d4944fd8d79ffbfceb","is_default":0,"created_at":1679737312},"c4b030ea-66a1-4729-85bf-a484e373a316":{"title":"Kadence","condition":"kadence","exclusions":["\/kadence\/assets\/js\/navigation.min.js","mobile_menu_breakpoint ","kadenceConfig"],"icon_url":"","type":"theme","id":"theme:4b7907ee68218db279648da9bf7102d1","is_default":0,"created_at":1679737958},"20c605b4-3e3a-4bb0-a5e5-a08e2cb0f31f":{"title":"Kalium","condition":"kalium","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/kalium\/assets\/js\/main.min.js","mobile_menu_breakpoint","var _k"],"icon_url":"","type":"theme","id":"theme:1fcb99a1ab06e1e36635365ed3e59ce5","is_default":0,"created_at":1679737406},"e1e04a7d-635a-4e28-83d9-e345ce40e354":{"title":"Kava","condition":"kava","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/kava\/assets\/js\/theme-script.js"],"icon_url":"","type":"theme","id":"theme:359d67efbf530c998245225dd3245a88","is_default":0,"created_at":1679738609},"e833c36e-ee89-4924-b608-3f28327c2f85":{"title":"Lay","condition":"lay","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/backbone.min.js","\/wp-includes\/js\/underscore.min.js","\/lay\/","\/laytheme-carousel\/","window.laytheme"],"icon_url":"","type":"theme","id":"theme:7c718c6da874ea6e4b27c6d70bc4e7e8","is_default":0,"created_at":1679737453},"2df2ef47-a833-4711-ba54-48dc62586f37":{"id":"theme:85d9922ac61ed833fd047a67029df8e5","title":"LazaNews","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jquery.custom.js"],"is_default":0,"condition":"lazanews","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"9443304a-34e9-4700-a03a-5f8f62f83ed1":{"title":"Listeo","condition":"listeo","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/listeo\/js\/"],"icon_url":"","type":"theme","id":"theme:db7da585545001f5ae614a2810f08f3a","is_default":0,"created_at":1679737244},"77afa73c-c4a8-42a8-aaee-43f6a761364e":{"title":"ListingPro","condition":"listingpro","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/listingpro\/assets\/lib\/jquerym.menu\/js\/jquery.mmenu.min.all.js","\/listingpro\/assets\/lib\/Magnific-Popup-master\/jquery.magnific-popup.min.js","\/listingpro\/assets\/js\/select2.full.min.js","\/listingpro\/assets\/js\/jquery.city-autocomplete.js","\/listingpro\/assets\/js\/chosen.jquery.min.js","\/listingpro\/assets\/lib\/bootstrap\/js\/bootstrap-slider.js","\/listingpro\/assets\/js\/jquery-ui.js","\/listingpro\/assets\/js\/mapbox.js","\/listingpro\/assets\/js\/main.js","\/listingpro\/assets\/js\/leaflet.markercluster.js","maps"],"icon_url":"","type":"theme","id":"theme:0b365e43dfc65d2b1b70fac6510c7c9c","is_default":0,"created_at":1679737938},"01b369b5-b578-4314-8e95-40b67a41d75a":{"title":"Master Study","condition":"masterstudy","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/masterstudy\/assets\/js\/custom.js ","\/masterstudy\/assets\/vendors\/jquery.fancybox.min.js ","\/masterstudy\/assets\/js\/select2.full.min.js"],"icon_url":"","type":"theme","id":"theme:0ee224c20e4ef7d546733d933db598f2","is_default":0,"created_at":1679737878},"6b000cc7-d33b-4109-9c39-6119a5d81cde":{"title":"Maya","condition":"maya","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/maya\/js\/jquery.mobilemenu.js","\/maya\/js\/jquery.custom.js","\/maya\/core\/includes\/js\/jquery.tipsy.js"],"icon_url":"","type":"theme","id":"theme:719fe28004fcdd81a820602924aa8074","is_default":0,"created_at":1679737916},"ef3c76d6-1041-473d-81ea-a5a6e8c86735":{"title":"MH Magazine","condition":"mh-magazine","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/mh-magazine\/"],"icon_url":"","type":"theme","id":"theme:2a0cd6efc2f46be69de61712729a2ec9","is_default":0,"created_at":1679737743},"9cbb2777-5524-43b8-af36-692b27452c0d":{"title":"Minimog","condition":"minimog","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/minimog\/"],"icon_url":"","type":"theme","id":"theme:61c0c235042359ee7d2a9035e79a7da2","is_default":0,"created_at":1679738135},"7eb81c74-8062-4a6c-bf66-b7c5bc160141":{"title":"Moozo Elementor","condition":"moozo-elementor","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/moozo-elementor\/assets\/js\/countdown.js","\/moozo-elementor\/assets\/vendor\/countdown\/countdown.min.js"],"icon_url":"","type":"theme","id":"theme:2ddb538c8e6b6c766fffd0d5c861fd82","is_default":0,"created_at":1679738623},"e90b7bfa-9ff6-4e1a-bf29-6207d55fdd39":{"title":"Motor","condition":"motor","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/motor\/js\/"],"icon_url":"","type":"theme","id":"theme:b33538179f5661a86cbe327a1793e199","is_default":0,"created_at":1683973354},"445e625a-f955-41fa-84de-65d9ea19be07":{"title":"My Listing","condition":"my-listing","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/my-listing\/assets\/","\/wp-includes\/js\/dist\/vendor\/moment.min.js","maps.googleapis.com","MyListing","_Explore_Settings"],"icon_url":"","type":"theme","id":"theme:afacb777229ddf5cabceacc64948057d","is_default":0,"created_at":1679737725},"00b8cd2d-2781-4fbb-ac5d-00750ba94ac9":{"title":"Neve - Mobile menu","condition":"neve","exclusions":["\/neve\/assets\/js\/build\/modern\/frontend.js"],"icon_url":"","type":"theme","id":"theme:5ae731cc06dd9284f8172675a6fe81ab","is_default":0,"created_at":1679738714},"483abc54-f1fc-47dc-bfc1-a269c7d1c849":{"title":"Newspaper - Images","condition":"Newspaper","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","tagdiv_theme.min.js","tdBlocksArray","\/wp-includes\/js\/underscore.min.js","\/td-cloud-library\/assets\/js\/","\/npm\/slick-carousel@1.8.1\/slick\/slick.min.js","tdb-gallery-wrap","tdBlocksArray","tdb_"],"icon_url":"","type":"theme","id":"theme:649ff22527bac2b1c8e0115cd3851d53","is_default":0,"created_at":1695805761},"50db8d14-d421-4237-be14-a6f7b5c11ec5":{"title":"Newspaper - Slider & YouTube","condition":"Newspaper","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","tagdiv_theme.min.js","tdBlocksArray","tdb_globals","td_youtube_list_ids","iosSlider","\/td-cloud-library\/assets\/js\/js_files_for_front.min.js","\/wp-includes\/js\/underscore.min.js","\/td-cloud-library\/assets\/js\/","\/npm\/slick-carousel@1.8.1\/slick\/slick.min.js","tdb-gallery-wrap","tdBlocksArray","tdb_"],"icon_url":"","type":"theme","id":"theme:7e2eeee57ae458c5959342eda6526bf1","is_default":0,"created_at":1695805747},"514f4c30-2b67-4648-960e-dfe1cc401ca5":{"title":"Niva","condition":"niva","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/niva\/js\/","\/sweetthemes-framework\/js\/","mt_typed"],"icon_url":"","type":"theme","id":"theme:c4838f73a344b829ed626635e210dcf4","is_default":0,"created_at":1679738256},"e67ee504-c3b1-455e-88ab-1fae8c830652":{"title":"OceanWP","condition":"oceanwp","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/oceanwp\/"],"icon_url":"","type":"theme","id":"theme:db37af4b7d12695d37d9256313a5f37a","is_default":0,"created_at":1679737552},"e44e240a-8765-4f4f-b67e-d54e4b727506":{"title":"OceanWP - Mobile menu","condition":"oceanwp","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ocean-side-panel\/assets\/js\/side-panel.min.js","\/oceanwp\/assets\/js\/theme.vanilla.min.js"],"icon_url":"","type":"theme","id":"theme:9babbcd52b2ce558d299a06cd1130a11","is_default":0,"created_at":1679738463},"897b0100-958d-4a02-b6b2-1e753e9869f4":{"title":"PenNews","condition":"pennews","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","\/pennews\/js\/script.min.js","\/pennews\/js\/script.lib.min.js"],"icon_url":"","type":"theme","id":"theme:02811fa00bc1471bb5be0457ce0ee005","is_default":0,"created_at":1679737471},"edd3ba03-e0fd-4b6e-911b-60b29f3471bf":{"title":"Pharmacy Mentor","condition":"pharmacymentor","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/pharmacymentor\/"],"icon_url":"","type":"theme","id":"theme:3188aaf1ef2c39937450f2a14ebb1174","is_default":0,"created_at":1679738214},"725415ff-cc76-45cc-a131-3170e5aa30fc":{"title":"Porto","condition":"porto","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/jquery\/ui\/","\/porto\/js\/theme.js","\/porto\/js\/theme.min.js"],"icon_url":"","type":"theme","id":"theme:8493f398f200c8dffe60d46439dd3360","is_default":0,"created_at":1679737758},"2c19bcec-f3ff-4873-bfd7-db6bc0f6433c":{"title":"Porto - Owl Carousel","condition":"porto","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/wp-includes\/js\/jquery\/ui\/","\/porto\/js\/theme(|.min).js","\/porto\/js\/libs\/owl.carousel(|.min).js","\/porto\/js\/theme-async(|.min).js","\/prettyPhoto\/jquery.prettyPhoto(|.min).js"],"icon_url":"","type":"theme","id":"theme:f34f5199fb7fca78852cd3fb7758f178","is_default":0,"created_at":1687527252},"31347ccb-f69e-4cd3-bd47-b80ce14ac76e":{"title":"ProPhoto","condition":"prophoto7","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/prophoto7\/js\/bundle.front.js","\/wp-includes\/js\/underscore.min.js","PROPHOTO"],"icon_url":"","type":"theme","id":"theme:a5836a56c4472fade4dc6ebfe2281554","is_default":0,"created_at":1679737425},"a8208c04-865c-49aa-ab96-41e378d391c8":{"title":"Publisher","condition":"publisher","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/publisher\/js\/"],"icon_url":"","type":"theme","id":"theme:32c73be0cb175da278c8e2af0811b0d1","is_default":0,"created_at":1679738169},"a0d69f3d-1356-4a1d-a600-2f2f788b8a9a":{"title":"REHub","condition":"rehub-theme","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/rehub-theme\/js\/custom_floatpanel.js"],"icon_url":"","type":"theme","id":"theme:321af1febb74f488cf911380893739b2","is_default":0,"created_at":1679738502},"8b74bbe5-7f32-42df-908f-78c99a8cad82":{"title":"Rey","condition":"rey","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/rey\/scripts-(.*).js","\/rey-core\/assets\/js\/"],"icon_url":"","type":"theme","id":"theme:e46567cd0f3ec9b37e7230dc87eac367","is_default":0,"created_at":1679737011},"5c9115d3-bcbd-49d6-8feb-4880d2b82bfe":{"title":"Rife Free","condition":"rife-free","exclusions":["\/rife-free\/js\/script.min.js","\/rife-free\/js\/isotope.pkgd.min.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","var reJS"],"icon_url":"","type":"theme","id":"theme:74a449954de79625eccc6750e87af8f6","is_default":0,"created_at":1679738107},"6542b2fd-1f91-4862-aa18-11eecc02faaf":{"title":"Roisin","condition":"roisin","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/themes\/roisin\/assets\/js\/main.min.js","\/plugins\/roisin-core\/assets\/js\/roisin-core.min.js","\/wp-includes\/js\/hoverIntent.min.js"],"icon_url":"","type":"theme","id":"theme:8f38fe58034772931110930b91cb6797","is_default":0,"created_at":1685964523},"5a192ad9-d150-4aa0-8efc-d68131cb7a37":{"title":"Sahifa - Mobile Menu","condition":"sahifa","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/themes\/sahifa\/js\/ilightbox.packed.js","\/translate_a\/element.js"],"icon_url":"","type":"theme","id":"theme:06ebe49f4c1e5b04cece831f8bb198a3","is_default":0,"created_at":1687540363},"7ae9d978-d63c-4a58-beb3-418bebb5b23c":{"title":"Salient","condition":"salient","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js","\/salient\/","winW > bodyW"],"icon_url":"","type":"theme","id":"theme:b3e12d57ac23897be1bb2c673e3fc761","is_default":0,"created_at":1679736950},"35aaa6c5-4a37-4161-b504-fb3ebc4b1148":{"id":"theme:d612db1dd8dc76faa6a36a9ebfd336dc","title":"Salient - Nectar slider","type":"theme","icon":"","exclusions":["\/salient-nectar-slider\/js\/nectar-slider.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js ","\/jquery-migrate(.min)?.js"],"is_default":0,"condition":"salient","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"84c95206-3e59-4eb3-a0c9-e2231a1c0a48":{"title":"SEO Lounge","condition":"seolounge","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/js_composer\/assets\/js\/dist\/js_composer_front.min.js","\/seolounge\/js\/radiantthemes-custom.js","\/seolounge\/js\/radiantthemes-core.min.js"],"icon_url":"","type":"theme","id":"theme:3d72b779d9c4ba6b51cc5b245b141433","is_default":0,"created_at":1691695809},"cd44aa56-088a-40dd-bf1e-f835efa68626":{"title":"Shoptimizer","condition":"shoptimizer","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/shoptimizer\/assets\/js\/lazyload-bg.js","\/shoptimizer\/assets\/js\/main.min.js"],"icon_url":"","type":"theme","id":"theme:6c32b43f4da639e5901574fac6b7d387","is_default":0,"created_at":1679737143},"d2c48a48-430a-4eea-bc05-99b66f1f6a7b":{"title":"SmartMag","condition":"smart-mag","exclusions":["\/smart-mag\/js\/lazyload.js"],"icon_url":"","type":"theme","id":"theme:23d6b7878bd0087addb067db3fa39864","is_default":0,"created_at":1679738490},"dd0d9133-ef17-4dac-b174-9f25d535838f":{"title":"Soledad","condition":"soledad","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/soledad\/js\/main.js","\/soledad\/js\/more-post.js","\/soledad\/js\/libs-script.min.js"],"icon_url":"","type":"theme","id":"theme:d3f78b26c2d11c99230171cc6378d06e","is_default":0,"created_at":1679737664},"d657dc56-5c04-439a-8987-401f89a65bf9":{"title":"Stockholm","condition":"stockholm","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/stockholm\/js\/"],"icon_url":"","type":"theme","id":"theme:fcfff492e00727b63cf5dff9f59bc2a4","is_default":0,"created_at":1679738378},"121f9b1b-d3cd-4dde-915e-0b348abf6687":{"title":"Storefront","condition":"storefront","exclusions":["\/storefront\/assets\/js\/navigation.min.js"],"icon_url":"","type":"theme","id":"theme:f0dca7e4eaedf573d4664be249845942","is_default":0,"created_at":1679738793},"41cfc83f-ff02-4a35-a3b7-e92db213b224":{"title":"StreamTube","condition":"streamtube","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/streamtube\/","\/streamtube-core\/"],"icon_url":"","type":"theme","id":"theme:9772ccddd470688f6bc6aee86e34d29b","is_default":0,"created_at":1679331431},"aec0a548-4c6b-400a-80ed-19a49e0faef0":{"title":"The7","condition":"dt-the7","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","loader-removed","\/Ultimate_VC_Addons\/assets\/min-js\/","\/dt-the7\/","\/js_composer\/"],"icon_url":"","type":"theme","id":"theme:7934c689fd20e30b6bfc69bb9d46cb63","is_default":0,"created_at":1679737892},"538354ff-d69f-40be-b0cc-df3790599dd2":{"title":"TheGem","condition":"thegem","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/thegem\/js\/","gemSettings","thegemSlideshow","tgpLazyItemsOptions"],"icon_url":"","type":"theme","id":"theme:153c54fe73897da838ce39152b1db5a8","is_default":0,"created_at":1679738477},"68f2de3b-e2b8-4edf-b82f-93fd7834c65f":{"title":"Total","condition":"Total","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/Total\/assets\/js\/total.min.js"],"icon_url":"","type":"theme","id":"theme:96b0141273eabab320119c467cdcaf17","is_default":0,"created_at":1679737571},"6dc1cb35-6b50-4da0-9834-dddf169edaa6":{"id":"theme:7c37c885d7fecf788f635734f99e8610","title":"Townhub","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/townhub-add-ons\/assets\/js\/(.*)","\/wp-includes\/js\/dist\/vendor\/react.js","\/wp-includes\/js\/dist\/vendor\/react-dom.js"],"is_default":0,"condition":"townhub","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f484f86b-e316-4871-9322-dee3925349fe":{"title":"Travel Monster - Owl Carousel","condition":"travel-monster","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/wp-content\/plugins\/wp-travel-engine\/assets\/lib\/owl-carousel(.*)\/owl.carousel(|.min).js","var isRtl"],"icon_url":"","type":"theme","id":"theme:d3e8da87b3affd399205438fbc8a4f05","is_default":0,"created_at":1690822771},"3ec96c3f-a6bf-4748-9b7e-78864bd24add":{"title":"uDesign - Mobile Menu","condition":"u-design","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/wp-content\/themes\/u-design\/assets\/js\/theme.min.js","\/wp-content\/themes\/u-design\/framework\/assets\/js\/framework.min.js","\/wp-content\/themes\/u-design\/framework\/assets\/js\/framework-async.min.js"],"icon_url":"","type":"theme","id":"theme:31ce70b0a02f8720a86d993816676943","is_default":0,"created_at":1699292981},"cb523239-27cc-461e-973d-c984a83223ac":{"title":"uDesign - Show Page Content on Load","condition":"u-design","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/wp-content\/themes\/u-design\/assets\/js\/theme.min.js","\/wp-content\/themes\/u-design\/framework\/assets\/js\/framework.min.js"],"icon_url":"","type":"theme","id":"theme:c55edd40ad3f9321da577dad70bb130c","is_default":0,"created_at":1698778683},"14cb0a85-8bee-491e-99d7-5f20a07f4bdd":{"title":"Uncode","condition":"uncode","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/uncode\/library\/js\/init(.min)?.js","\/uncode\/library\/js\/plugins(.min)?.js","\/uncode\/library\/js\/app(.min)?.js","\/uncode\/library\/js\/woocommerce-uncode(.min)?.js","\/wp-includes\/js\/mediaelement\/mediaelement-and-player.min.js","initHeader","initBox","fixMenuHeight","initRow"],"icon_url":"","type":"theme","id":"theme:18ba19b98aefbb6c0fde6c6bf92e9cfc","is_default":0,"created_at":1679738154},"88e96479-1aa2-4adc-8f07-20bc0368a63f":{"title":"Werkstatt","condition":"werkstatt","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/js\/underscore.min.js","\/werkstatt\/assets\/js\/vendor.min.js","\/werkstatt\/assets\/js\/fullscreen.min.js","\/werkstatt\/assets\/js\/app.min.js"],"icon_url":"","type":"theme","id":"theme:38faa29db5a07b8fef6aee9cc11cafec","is_default":0,"created_at":1679737639},"60c4110b-a960-4d44-b619-6d79514dbf75":{"title":"Woodmart","condition":"woodmart","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/imagesloaded.min.js","\/woodmart\/js\/scripts\/wc\/","\/woodmart\/js\/scripts\/global\/","\/woodmart\/js\/libs\/owl.carousel.min.js","\/woodmart\/js\/libs\/owl.carousel.js","\/woodmart\/js\/libs\/slick.js","\/woodmart\/js\/libs\/autocomplete.min.js"],"icon_url":"","type":"theme","id":"theme:06338f13cb89e5309ad2eb7e4d457be4","is_default":0,"created_at":1695633901},"a4547b5b-10ab-407c-969c-269fddec07b8":{"title":"Woodmart - Cart Fragments","condition":"woodmart","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/woocommerce\/assets\/js\/frontend\/cart-fragments.min.js","\/woocommerce\/assets\/js\/js-cookie\/js.cookie.min.js","\/woodmart\/js\/scripts\/wc\/updateCartFragmentsFix.js"],"icon_url":"","type":"theme","id":"theme:591f4f1b2e86b1e987cd8789df3ffce3","is_default":0,"created_at":1700584689},"119ebd1c-6b46-4f07-8d6a-3498d9c8814f":{"title":"XStore","condition":"xstore","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/xstore\/js\/","\/et-core-plugin\/packages\/st-woo-swatches\/public\/js\/frontend.min.js"],"icon_url":"","type":"theme","id":"theme:3de9d9ba385200548f177d9c704ae92a","is_default":0,"created_at":1679738190},"9a7a548c-07a1-4dff-93fc-6e8230b67853":{"id":"theme:119d329456073aa10969d7cbd9760f28","title":"YOOtheme Pro","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","uikit.min.js"],"is_default":0,"condition":"yootheme","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f74c499e-b7d9-4590-8671-379f51f468c8":{"title":"Zeen","condition":"zeen","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/zeen\/assets\/js\/","\/js.cookie.min.js"],"icon_url":"","type":"theme","id":"theme:acb52844f996627788836366404a3245","is_default":0,"created_at":1679737859}},"scripts":{"dd0c5a5b-ec56-49f9-9aa4-89e1e3a6a28a":{"title":"Amazon Ads","exclusions":["amazon-adsystem.com"],"icon_url":"","type":"script","id":"script:b82a5936d8ea0745016caeb71629ae5d","is_default":0,"created_at":1681390276},"980edf32-c64b-4370-bf23-c62b079e71c3":{"title":"Google AdSense","exclusions":["adsbygoogle"],"icon_url":"","type":"script","id":"script:0206e6040c8ff64b8d6ee5fef2ce1c90","is_default":0,"created_at":1681377840},"2499bb90-0753-4b2b-9bd4-1525f94c7437":{"title":"Google Analytics","exclusions":["google-analytics.com\/analytics.js","ga\\( '","ga\\('"],"icon_url":"","type":"script","id":"script:d86cf69a8b82547a94ca3f6a307cf9a6","is_default":0,"created_at":1681388311},"6f460036-3106-4b8c-9951-d32de9b1258f":{"title":"Google Maps","exclusions":["maps.googleapis.com","maps.google.com"],"icon_url":"","type":"script","id":"script:4d60ab2c6d11d753267484006c23e54c","is_default":0,"created_at":1681390259},"ac2d5720-9418-468c-80a0-3874ee743c0f":{"title":"Google Optimize","exclusions":["a,s,y,n,c,h,i,d,e","googleoptimize.com\/optimize.js","async-hide"],"icon_url":"","type":"script","id":"script:031a0cece38c4739df67f910dcabf1bd","is_default":0,"created_at":1681390261},"122e6ebb-51fd-477f-97fb-559593f1a48b":{"title":"Google Recaptcha","exclusions":["recaptcha"],"icon_url":"","type":"script","id":"script:032cb16577cbf07bc7c02bac83bd936d","is_default":0,"created_at":1681390264},"219277ae-b2ac-4d42-913d-eaea40985295":{"title":"Google Tag Manager","exclusions":["\/gtag\/js","gtag\\(","\/gtm.js","async-hide"],"icon_url":"","type":"script","id":"script:1d3c65b2b03ef35e14df6b163ea3a1f6","is_default":0,"created_at":1681390266},"f632e3f4-20e6-471e-a78d-86afbea63586":{"title":"HubSpot","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","js.hsforms.net","hbspt.forms.create"],"icon_url":"","type":"script","id":"script:de4bd8ef4675ebb85a055955de76d0ee","is_default":0,"created_at":1679331623},"5d606add-ffb8-4a06-b295-5f722710fbfd":{"title":"Refari","exclusions":["widget.refari.co","refari"],"icon_url":"","type":"script","id":"script:a705e197b13b47e72a105c923e044358","is_default":0,"created_at":1683797056},"742ec14a-27a1-4789-b9c8-a9c3a3cf7042":{"title":"Reviews.io","exclusions":["\/carousel-inline-iframeless\/dist.js","carouselInlineWidget"],"icon_url":"","type":"script","id":"script:4df445c576f45889506ba175a4c39fdc","is_default":0,"created_at":1684389426},"05d3eb78-f574-49be-95e1-3f11714005d1":{"id":"script:ce7566d1d08cc094b74cf283cf9c56a5","title":"Stripe","type":"script","icon":"","exclusions":["js.stripe.com"],"is_default":0,"condition":"","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"b56bf06c-2f8c-4757-b536-a689fb0e75f9":{"title":"Typekit","exclusions":["typekit"],"icon_url":"","type":"script","id":"script:7815e38b93e3b500a632681bd594bd61","is_default":0,"created_at":1681390268},"49c38c0a-43b9-4237-88cb-57ddd519f0ad":{"title":"Venatus Media","exclusions":["\/ad-manager.min.js","__vm_add"],"icon_url":"","type":"script","id":"script:abe11528732aed9a19a97e73b242faa5","is_default":0,"created_at":1681390272},"2c1d0998-8ab5-478c-8eb9-9e375b46363e":{"title":"Wistia","exclusions":["fast.wistia.com"],"icon_url":"","type":"script","id":"script:9a0111f8c3186c1cb3113587c660c041","is_default":0,"created_at":1681390274},"0627fe24-7e9d-400f-b064-d98bec2ba85e":{"id":"script:dbd1875130c71eb4b2ef768ad18d820c","title":"Yandex Ads","type":"script","icon":"","exclusions":["yandex.ru","window.yaContextCb"],"is_default":0,"condition":"","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""}}} \ No newline at end of file +{"plugins":{"ffc21030-519a-4853-8cea-49f959e82731":{"id":"plugin:def67a2c1ddd6df2353e4772b6fd4e5b","title":"Additional Variation Images Gallery for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/woo-variation-gallery\/assets\/js\/slick.min.js","\/woo-variation-gallery\/assets\/js\/frontend.min.js","\/wp-includes\/js\/underscore.min.js","variation_custom_fields"],"is_default":0,"condition":"woo-variation-gallery\/woo-variation-gallery.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"0e7dc253-acd0-4421-877f-a7101d848717":{"id":"plugin:4b82cc7379d46c6272f5d556bb264eec","title":"Advanced Ads","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/uploads\/(.*).js","advanced_ads_ready","advadsCfpQueue","adsbygoogle","adservice.google","\/advanced-ads(.*)","advads_items","advads_tracking_ads"],"is_default":0,"condition":"advanced-ads\/advanced-ads.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"a4d5c058-9120-47ee-977c-f30f83fb1a75":{"id":"plugin:a076fbb79772f497349a76ee74a7f708","title":"All-in-one Compliance for GDPR \/ CCPA Cookie Consent","type":"plugin","icon":"","exclusions":["iubenda_cs.js","var _iub"],"is_default":0,"condition":"iubenda-cookie-law-solution\/iubenda_cookie_solution.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"79a5082f-821a-4a4b-a0e3-caaf22cf3f75":{"id":"plugin:9bdceaa1bb89135730a3b2aa4db94c22","title":"AMO Team Showcase","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/amo-team-showcase\/public\/js\/wookmark.js","\/amo-team-showcase\/public\/js\/amo-team-showcase-public.js","\/wp-includes\/js\/imagesloaded.min.js","amoTeamVars"],"is_default":0,"condition":"amo-team-showcase\/amo-team-showcase.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"90c7fd90-3adf-4cb7-8a92-845bdbd95d27":{"title":"Anti-Spam by CleanTalk - Prevent console error","condition":"cleantalk-spam-protect\/cleantalk.php","exclusions":["ctPublicFunctions","ctPublic"],"icon_url":"","type":"plugin","id":"plugin:ed2ade77cd44e21b1703b093c002a903","is_default":0,"created_at":1699370420},"e054f840-700a-4549-bbba-485473a53f71":{"title":"AnWP Football Leagues - Calendar Widget","condition":"football-leagues-by-anwppro\/anwp-football-leagues.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/football-leagues-by-anwppro\/(.*)","\/football-leagues-by-anwppro-premium-premium\/(.*)","window.AnWPFLPro","window.AnWPFLTabulator","\/elementor\/assets\/lib\/flatpickr\/flatpickr.min.js"],"icon_url":"","type":"plugin","id":"plugin:e7581089f33fdf0a970d5c5deb16ff50","is_default":0,"created_at":1708535321},"1d058cae-4460-4354-bab3-a96445650bd8":{"id":"plugin:b739df50f3f5bf400075f17dca652517","title":"AnyWhere Elementor Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/anywhere-elementor-pro\/build\/index.js"],"is_default":0,"condition":"anywhere-elementor-pro\/anywhere-elementor-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"8a1614c7-55b1-4b6d-88e5-6e8ddc630dae":{"id":"plugin:46741e77eaf4d13a0c80be6b86379758","title":"Astra - Pro Addon","type":"plugin","icon":"","exclusions":["\/astra-addon\/astra-addon-(.*).js"],"is_default":0,"condition":"astra-addon\/astra-addon.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"37d96403-f9ea-4481-b2f8-374d7c93e61a":{"id":"plugin:ccd87807930a1856717fd276c336db9a","title":"Beaver Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/uploads\/bb-plugin\/","\/bb-plugin\/js\/yui3.min.js","\/wp-includes\/js\/imagesloaded.min.js","\/bb-plugin\/js\/fl-slideshow.min.js"],"is_default":0,"condition":"beaver-builder-lite-version\/fl-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f83dbf3b-783e-4ef9-9b18-8a469ca7102d":{"title":"Bloom","condition":"bloom\/bloom.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/bloom\/"],"icon_url":"","type":"plugin","id":"plugin:e57cdfbc09f4e0f7445c279d9f580bdd","is_default":0,"created_at":1685189070},"135aadd2-cd4a-44ae-8dcf-801f3f2316c0":{"id":"plugin:055ef01accbad6378e3d1a4965600964","title":"Booked","type":"plugin","icon":"","exclusions":["\/booked\/","\/js\/jquery\/ui\/datepicker.min.js"],"is_default":0,"condition":"booked\/booked.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"ddfee9b0-e5a9-4d3f-8c21-b999cbb61c33":{"id":"plugin:492f9b0d55f3bf07c68e915ea1dfb72a","title":"Bookly","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/bookly-responsive-appointment-booking-tool\/frontend\/","window.bookly"],"is_default":0,"condition":"bookly-responsive-appointment-booking-tool\/main.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"7a013fd6-0881-4dbe-8e93-33edefe7f717":{"title":"Borlabs Cookie","condition":"borlabs-cookie\/borlabs-cookie.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","borlabsCookieConfig","borlabs-cookie.min.js","borlabsCookieContentBlocker","BorlabsCookieBox","allFbWidgets","\/borlabs-cookie\/assets\/javascript\/","borlabs-cookie-config"],"icon_url":"","type":"plugin","id":"plugin:e1ec2daca513de476bd3dae79366e9ab","is_default":0,"created_at":1702497952},"3999e680-4049-4494-945c-768cecc1a2c4":{"id":"plugin:43019d66af7b41e65bb602c01e10c6a0","title":"Brizy","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/brizy\/public\/editor-build\/(.*)-wp\/editor\/js\/group-(.*).js","\/brizy\/public\/editor-build\/(.*)-wp\/editor\/js\/preview.js","Brizy.emit"],"is_default":0,"condition":"brizy\/brizy.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"af4d9357-3def-42a1-86b7-419553444b4d":{"id":"plugin:5c317f9f244597d8f236ecb7d8e41752","title":"Carousel Upsells and Related Product for WooCommerce","type":"plugin","icon":"","exclusions":["\/carousel-upsells-and-related-product-for-woocommerce\/assets\/js\/glide.min.js","carusel_poduct_related"],"is_default":0,"condition":"carousel-upsells-and-related-product-for-woocommerce\/ffxf-woo-glide-related-and-upsells.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"1d866d90-5451-43ba-a4d1-75b64f9235e1":{"id":"plugin:0a3a29603ebac8fe0808f64f5c8edbb2","title":"clickskeks.at Cookiebanner","type":"plugin","icon":"","exclusions":["clickskeks"],"is_default":0,"condition":"clickskeks\/index.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"c09695cc-2387-4416-881a-c0b392188a26":{"title":"Complianz","condition":"complianz-gdpr\/complianz-gpdr.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","complianz"],"icon_url":"","type":"plugin","id":"plugin:a766f95208154cd69a3e15150a42f325","is_default":0,"created_at":1685188788},"b5e146fc-0b7c-4c6c-a631-8da246d3bd89":{"title":"Conerstone Builder - Fix mobile menu","condition":"cornerstone\/cornerstone.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/cornerstone\/assets\/js\/site\/cs-classic.(.*).js"],"icon_url":"","type":"plugin","id":"plugin:f8f8c81535b5e0073aa3c56b6dd3df5b","is_default":0,"created_at":1708614275},"7e551e3b-fbe4-4235-87a9-b476bc9e2020":{"id":"plugin:949b1b923d51d10a2fb67a2a39d166b3","title":"Content Egg","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/content-egg\/res\/js\/morrisjs\/morris.min.js","\/content-egg\/res\/js\/morrisjs\/raphael.min.js","Morris.Area"],"is_default":0,"condition":"content-egg\/content-egg.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"7fbca6c5-9239-4550-a755-6f041f867a57":{"title":"Cookie Notice & Compliance for GDPR \/ CCPA","condition":"cookie-notice\/cookie-notice.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/cookie-notice\/","var cnArgs"],"icon_url":"","type":"plugin","id":"plugin:213d0f883ae27aefb3a7937656bbd11e","is_default":0,"created_at":1681379736},"26722567-fe35-44b5-a5a7-fb0f3a38c3f2":{"id":"plugin:1d10ad30bbcf0fd4b26e9625a07abcfc","title":"Cookiebot CMP","type":"plugin","icon":"","exclusions":["consent.cookiebot.com"],"is_default":0,"condition":"cookiebot\/cookiebot.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"74110e36-89e5-440d-bec3-7133da3277c2":{"id":"plugin:edcf103293ceab711e999d419d038ca1","title":"Coupon Referral Program","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/coupon-referral-program\/","\/wp-includes\/js\/jquery\/ui\/draggable.min.js"],"is_default":0,"condition":"coupon-referral-program\/coupon-referral-program.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"ed63e02f-d6c5-481a-bcb9-aae15f72aa21":{"id":"plugin:c3e26264dcfd25802805b4fd1a2a449c","title":"Crisp - Live Chat and Chatbot","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","CRISP_RUNTIME_CONFIG","l.js"],"is_default":0,"condition":"crisp\/crisp.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"a8eb622b-279c-4f84-86e0-785e9497add7":{"id":"plugin:6e4bf949e12f0bebfefb48f6c316102a","title":"Custom Twitter Feeds pro","type":"plugin","icon":"","exclusions":["\/custom-twitter-feeds-pro\/js\/ctf-scripts.min.js"],"is_default":0,"condition":"custom-twitter-feeds-pro\/custom-twitter-feed.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"1624ef15-e25b-406d-bdf9-d4b78d7a59e7":{"title":"Customer Reviews for WooCommerce Plugin","condition":"customer-reviews-woocommerce\/ivole.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/customer-reviews-woocommerce\/js\/colcade.js"],"icon_url":"","type":"plugin","id":"plugin:1f893b343e72ce55e6c9013fbda172fa","is_default":0,"created_at":1704734788},"396cc03a-8946-4ee8-ab15-7e48261df79a":{"title":"Divi - Carousel Module 2.0","condition":"dg-divi-carousel","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/wp-content\/plugins\/dg-divi-carousel\/"],"icon_url":"","type":"plugin","id":"plugin:fcd789b7d02699f89720aa5ff3627912","is_default":0,"created_at":1709126476},"c15fe3b3-0eaa-48f9-bf04-0e778b1f8c63":{"title":"Divi - Supreme","condition":"supreme-modules-for-divi\/supreme-modules-for-divi.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js",".dipi_preloader_wrapper_outer","\/Divi\/js\/scripts.min.js","\/Divi\/js\/custom.unified.js","\/js\/magnific-popup.js","var DIVI","\/supreme-modules-for-divi\/"],"icon_url":"","type":"plugin","id":"plugin:b5489ae4d8b949f536d6dd2e5b0c1a95","is_default":0,"created_at":1679738701},"dd31451b-989a-4517-b02a-e2c2e2023366":{"id":"plugin:5caed322df984bbfd3ecb506cf12b688","title":"Divi Den Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ddpro\/build\/freddie\/js\/freddieScriptPageTransition.js","\/ddpro\/build\/freddie\/js\/freddieScriptsHeaders.js","\/ddpro\/build\/freddie\/js\/freddieScriptsContents.js","\/ddpro\/build\/freddie\/js\/gsap\/gsap.min.js"],"is_default":0,"condition":"ddpro\/ddpro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"2b006370-cc90-42c1-9656-a30fbfbc91c6":{"id":"plugin:402d9b241b04934dd30f32e7ba490e63","title":"Divi Mobile","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","divi-menu","dm_nav"],"is_default":0,"condition":"divi-mobile\/divi-mobile.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"666bbed9-7ce3-457c-ad6e-b5e056d05010":{"title":"Divi Overlays","condition":"divi-overlays\/divi-overlays.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js",".dipi_preloader_wrapper_outer","\/Divi\/js\/scripts.min.js","\/Divi\/js\/custom.unified.js","var DIVI","\/divi-overlays\/"],"icon_url":"","type":"plugin","id":"plugin:1c828c93d87298d2a27c76e13d0880ba","is_default":0,"created_at":1679738664},"42a404af-7792-44be-9baa-565dc3baf25d":{"title":"Divi Pixel","condition":"divi-pixel\/divi-pixel.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js",".dipi_preloader_wrapper_outer","\/divi-pixel\/dist\/public\/js\/hamburger.min.js"],"icon_url":"","type":"plugin","id":"plugin:dd2494945a487a6cc74d3ab1b2137ccb","is_default":0,"created_at":1686859169},"85f5c099-c481-4c38-bbb9-8b76113bdfd5":{"title":"Divi Supreme Pro","condition":"supreme-modules-pro-for-divi\/supreme-modules-pro-for-divi.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","elm.style.display","\/supreme-modules-pro-for-divi\/includes\/modules\/ImageCarousel\/frontend.min.js","\/supreme-modules-pro-for-divi\/public\/js\/swiper-bundle.min.js"],"icon_url":"","type":"plugin","id":"plugin:3d5f0ae7751702fd1bb490fcf991a334","is_default":0,"created_at":1695118162},"0b78d762-c7be-45de-9aae-0c5078ec0619":{"id":"plugin:b5fc0101608d0b0627268dc49e3e1f8f","title":"Divi Toolbox","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","jQuery('.preloader')","\/divi-toolbox\/assets\/js\/toolbox-scripts.js"],"is_default":0,"condition":"divi-toolbox\/divi-toolbox.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"31a34440-1383-40c4-8920-effcf99f2165":{"title":"Dracula Dark Mode","condition":"dracula-dark-mode-premium\/plugin.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/wp-content\/plugins\/dracula-dark-mode-premium\/assets\/js\/dark-mode.js","\/wp-content\/plugins\/dracula-dark-mode-premium\/assets\/js\/frontend.js","\/wp-includes\/js\/dist\/vendor\/react-dom.min.js","\/wp-includes\/js\/dist\/vendor\/react.min.js","\/wp-includes\/js\/dist\/api-fetch.min.js","\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/dist\/i18n.min.js","draculaDarkMode"],"icon_url":"","type":"plugin","id":"plugin:5e8a5d8d3830136d84d0f3676f1bf5a5","is_default":0,"created_at":1704210236},"8baba0f8-4449-47d8-a87d-9b6a116e7684":{"title":"Dynamic Pricing & Discounts Lite for WooCommerce","condition":"woo-dynamic-pricing-discounts-lite\/dynamic-pricing-discounts-lite-for-woocommerce.php","exclusions":["\/woo-dynamic-pricing-discounts-lite\/assets\/OwlCarousel\/dist\/owl.carousel.min.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"icon_url":"","type":"plugin","id":"plugin:185062bf08db42515488e1853d1f4917","is_default":0,"created_at":1677857247},"0fa129f2-5869-4db7-9bf0-69e4b3549ee2":{"id":"plugin:27478327aa44075a86176fad95640d76","title":"Dynamic Product Gallery for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/woocommerce-dynamic-gallery\/","a3revWCDynamicGallery"],"is_default":0,"condition":"woocommerce-dynamic-gallery\/wc_dynamic_gallery_woocommerce.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"9958c6be-2f67-4791-95c3-a7ad96d599c0":{"title":"Dynamic Product Gallery Premium for WooCommerce","condition":"woocommerce-dynamic-gallery-pro\/wc_dynamic_gallery_woocommerce.php","exclusions":["\/jquery-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/jquery-migrate(.*)(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/woocommerce-dynamic-gallery-pro\/assets\/js\/mygallery\/jquery.a3-dgallery.js","settings_defaults_","a3revWCDynamicGallery"],"icon_url":"","type":"plugin","id":"plugin:11dc02a76019f00422f4ac85f47f5135","is_default":0,"created_at":1683208937},"ce26ed21-1be5-481f-80d4-31edfac6d890":{"title":"Dynamic.ooo - Dynamic Content for Elementor","condition":"dynamic-content-for-elementor\/dynamic-content-for-elementor.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","\/wp-includes\/js\/imagesloaded.min.js","ElementorProFrontendConfig","elementorFrontendConfig","\/dynamic-content-for-elementor\/assets\/","\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/dist\/i18n.min.js"],"icon_url":"","type":"plugin","id":"plugin:d2bd5b348abe016bdc722acce7755062","is_default":0,"created_at":1683355024},"6a3161a6-1a6f-457a-a9ee-54b376981927":{"id":"plugin:ee1dec033c6481a77fe88de5bef1a02d","title":"Easy Table of Contents","type":"plugin","icon":"","exclusions":["\/easy-table-of-contents\/assets\/js\/front.min.js"],"is_default":0,"condition":"easy-table-of-contents\/easy-table-of-contents.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"25a534a0-2c1f-4cf4-9e19-7941bc032b3a":{"title":"Ecwid Ecommerce Shopping Cart","condition":"ecwid-shopping-cart\/ecwid-shopping-cart.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","app.ecwid.com\/script.js","\/ecwid-shopping-cart\/js\/frontend.js","\/ecwid-shopping-cart\/js\/static-page.js","ecwidParamswindow.ec","jQuery.mobile","xSearch","xCategoriesV2","xProductBrowser","Ecwid.init"],"icon_url":"","type":"plugin","id":"plugin:41c8f5f0ab00cb39654aedd783d194e0","is_default":0,"created_at":1704734846},"40464325-5bae-4a20-bc97-553499e09a73":{"title":"Elementor","condition":"elementor\/elementor.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","\/wp-includes\/js\/imagesloaded.min.js","ElementorProFrontendConfig","elementorFrontendConfig","\/happy-elementor-addons-pro\/","\/header-footer-elementor\/inc\/js\/frontend.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/wp-includes\/js\/dist\/api-fetch.min.js","\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/dist\/i18n.min.js"],"icon_url":"","type":"plugin","id":"plugin:1d15783218a3137bec4ee8df5353e218","is_default":0,"created_at":1694425872},"ac86b64c-c80a-4053-894d-6caa8b4fdce8":{"title":"Elementor Loop Carrousel","condition":"elementor\/elementor.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/wp-includes\/js\/dist\/api-fetch.min.js","\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/dist\/i18n.min.js"],"icon_url":"","type":"plugin","id":"plugin:0eb8d0bbd1c7ca05ac133ea634f676b7","is_default":0,"created_at":1694442056},"a8fc9fd1-f6d3-41eb-abe9-ef176de6d7e2":{"title":"Elementor - Lazy Load Background Images","condition":"elementor\/elementor.php","exclusions":["lazyloadRunObserver"],"icon_url":"","type":"plugin","id":"plugin:bf248cb2876558452a566c5dd89262b8","is_default":0,"created_at":1694453032},"1948aff5-7850-4979-91fa-0ce181484508":{"id":"plugin:de658ae6c2d05a5a4a947efecf5e0c16","title":"Elementor Custom Skin","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/ele-custom-skin(.*)\/assets\/js\/"],"is_default":0,"condition":"ele-custom-skin\/ele-custom-skin.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"25708299-c596-4416-8ad8-740aee0f2752":{"title":"Elementor Pro","condition":"elementor-pro\/elementor-pro.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","\/wp-includes\/js\/imagesloaded.min.js","ElementorProFrontendConfig","elementorFrontendConfig","\/happy-elementor-addons-pro\/","\/header-footer-elementor\/inc\/js\/frontend.js"],"icon_url":"","type":"plugin","id":"plugin:030ad23e3851ed7adfa7b9b6c13cf5a6","is_default":0,"created_at":1679490021},"f34dd874-4b34-41e6-a31c-ece3c1efbffc":{"id":"plugin:305581ad4294a30eeb1247982f626005","title":"Elementor Pro - SmartMenus","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor-pro\/assets\/lib\/smartmenus\/jquery.smartmenus.min.js","\/elementor-pro\/assets\/js\/preloaded-elements-handlers.min.js"],"is_default":0,"condition":"elementor-pro\/elementor-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"111cc8b2-0be9-438b-9aa3-7f1e301a5697":{"id":"plugin:5ae9f5d99224d5ebc7d0c0bbf5b99787","title":"Elementor Pro - User Cache","type":"plugin","icon":"","exclusions":["\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/wp-includes\/js\/backbone.min.js","elementorAdminBarConfig","elementorCommonConfig","elementorWebCliConfig","elementorDevToolsConfig"],"is_default":0,"condition":"elementor-pro\/elementor-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"c1713bf8-e0c3-4cb5-8b3f-841b06aa87ed":{"title":"ElementsKit Lite - Megamenu","condition":"elementskit-lite\/elementskit-lite.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/elementskit(.*)\/"],"icon_url":"","type":"plugin","id":"plugin:b91fed2fc4478dbb7067742c1ee4691b","is_default":0,"created_at":1683270249},"706ff35d-8e33-4b04-a986-346faff704e9":{"id":"plugin:417192424139d89fb2a5b1ee1f2b9613","title":"Essential Addons for Elementor","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/essential-addons(-for)?-elementor(-lite)?\/.*(.min)?.js"],"is_default":0,"condition":"essential-addons-for-elementor-lite\/essential_adons_elementor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"b38556dc-2bc4-430f-9c55-7191cf7773db":{"id":"plugin:057757d0593ad9d2dc58124f0077a5df","title":"Essential Addons for Elementor Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/essential-addons(-for)?-elementor(-lite)?\/.*(.min)?.js"],"is_default":0,"condition":"essential-addons-elementor\/essential_adons_elementor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"719b988f-0d60-40c2-ba46-88f943119cb1":{"id":"plugin:c8e6c490f6438f566ade600c33531a85","title":"Essential Grid","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/essential-grid\/","lightboxOptions"],"is_default":0,"condition":"essential-grid\/essential-grid.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"47d3d2ab-160d-4b07-ac25-8250b9e6a951":{"id":"plugin:dafd19fa48a1fef890dc4348052fcb75","title":"EventON Lite","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/eventon-lite\/assets\/js\/(.*)"],"is_default":0,"condition":"eventon-lite\/eventon.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"219968d7-cf1f-4ee0-917a-db35dcc93a3e":{"id":"plugin:49ff465628fc3cb6d7f23ff81d9b8339","title":"FacetWP","type":"plugin","icon":"","exclusions":["\/facetwp\/assets\/js\/dist\/front.min.js","window.FWP_"],"is_default":0,"condition":"facetwp\/index.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"acce5701-5917-48d5-83ab-3e626aa420c5":{"id":"plugin:78a1c88a56fa957c802074b6418c6fac","title":"FacetWP - Flyout menu","type":"plugin","icon":"","exclusions":["\/facetwp-flyout\/assets\/js\/front.js"],"is_default":0,"condition":"facetwp-flyout\/facetwp-flyout.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f2a5b95f-1a22-46d2-8b72-42a53e46ae3f":{"id":"plugin:5d7555892a3a9968fde3fa3a335fc3d8","title":"FiboSearch - Ajax Search for WooCommerce","type":"plugin","icon":"","exclusions":["\/wp-includes\/js\/jquery\/jquery.js","\/wp-includes\/js\/jquery\/jquery-migrate.js","\/ajax-search-for-woocommerce-premium\/assets\/js\/search.js"],"is_default":0,"condition":"ajax-search-for-woocommerce\/ajax-search-for-woocommerce.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"7d1404e9-be76-449c-87aa-919557abe82d":{"id":"plugin:ad46179e8b0584abaf52056b846da227","title":"FlexBlock","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/flo-flex-builder\/dist\/flex-public.min.js","flexDebug"],"is_default":0,"condition":"flo-flex-builder\/flo-flex-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"b9c6a2dc-b226-4e2c-b85e-29ee55b8f751":{"id":"plugin:567a2b15db30ef6bd4904e4317139aac","title":"Fluent Forms","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/fluentform\/public\/js\/(.*).js","\/fluentformpro\/public\/js\/(.*).js"],"is_default":0,"condition":"fluentform\/fluentform.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"10874f8a-2855-4e80-bc46-e484589b76a8":{"id":"plugin:e78c153103f698b2b34892332d6b3b62","title":"Flying Images","type":"plugin","icon":"","exclusions":["flyingImages"],"is_default":0,"condition":"nazy-load\/flying-images.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"53958499-dacd-41d6-93bc-1534fe7d9eda":{"id":"plugin:5a0e40a6c5783856893b803189de1404","title":"FooGallery Premium","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/plugins\/foobox-image-lightbox\/free\/js\/foobox.free.min.js","\/plugins\/foogallery-premium\/pro\/extensions\/default-templates\/shared\/js\/foogallery.min.js"],"is_default":0,"condition":"foogallery-premium\/foogallery.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"7870d704-2024-4622-838c-fad37d5c6753":{"id":"plugin:ebb5efb57b19ae60e734e456ca2df3f8","title":"Formidable Forms","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","frmSigs","\/formidable-signature\/js\/frm.signature.min.js"],"is_default":0,"condition":"formidable\/formidable.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"3f24f9b3-e59e-400f-a784-999f93f60fab":{"id":"plugin:0b08523445b8869a67ca40e777704692","title":"Forminator","type":"plugin","icon":"","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","forminatorFront","\/forminator\/build\/front\/front.multi.min.js","\/forminator\/assets\/js\/library\/jquery.validate.min.js","\/forminator\/assets\/forminator-ui\/js\/forminator-form.min.js","\/forminator\/assets\/forminator-ui\/js\/select2.full.min.js","\/wp-includes\/js\/jquery\/ui\/datepicker.min.js","\/wp-includes\/js\/dist\/vendor\/moment.min.js"],"is_default":0,"condition":"forminator\/forminator.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"3a600ded-3454-48fb-9811-46afa2ab3c05":{"id":"plugin:5759bf0d47ac3457485314b381a9b528","title":"GDPR Cookie Compliance","type":"plugin","icon":"","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/gdpr-cookie-compliance\/dist\/scripts\/main.js"],"is_default":0,"condition":"gdpr-cookie-compliance\/moove-gdpr.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"e21aaa5e-7354-471d-ab86-85f99f48830c":{"id":"plugin:ffb40036ab0583218561de7c28c6bd9b","title":"GDPR Cookie Consent","type":"plugin","icon":"","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/public\/js\/cookie-law-info-public.js","Cli_Data"],"is_default":0,"condition":"webtoffee-gdpr-cookie-consent\/cookie-law-info.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"c11ca4ea-1a23-49ee-9a6b-1e549de50ea2":{"id":"plugin:3877953c5ec1e66db92ad844ae8ebafc","title":"Getwid - Gutenberg Blocks","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/wp-includes\/js\/jquery\/ui\/tabs.min.js","\/wp-includes\/js\/jquery\/ui\/core.min.js"],"is_default":0,"condition":"getwid\/getwid.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"79b33eb9-bc92-4d8a-afd8-1c61e70bed8f":{"title":"GiveWP","condition":"give\/give.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/give\/assets\/dist\/js\/give.js","\/wp-includes\/js\/dist\/api-fetch.min.js","\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/dist\/i18n.min.js"],"icon_url":"","type":"plugin","id":"plugin:0fb3af06fc5c710a670220b054c292c5","is_default":0,"created_at":1706652232},"3773bb33-b168-4f68-9963-512da24ac4da":{"title":"GoodLayers Core","condition":"goodlayers-core\/goodlayers-core.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/goodlayers-core\/plugins\/script.js","\/goodlayers-core\/include\/js\/page-builder.js"],"icon_url":"","type":"plugin","id":"plugin:5f124509a56ca2e0644246919ec70434","is_default":0,"created_at":1704734904},"2adabe9b-6e03-4a67-959f-492813d40f69":{"title":"Google Tag Manager for WooCommerce PRO","condition":"gtm-ecommerce-woo-pro\/gtm-ecommerce-woo-pro.php","exclusions":["\/gtm-ecommerce-woo-pro\/assets\/gtm-ecommerce-woo-pro.js"],"icon_url":"","type":"plugin","id":"plugin:e54fd4313007b6fedf8ab4df0e05277a","is_default":0,"created_at":1691218549},"7bf261ac-89d4-492f-8a3d-1c5809b9579a":{"title":"Gravity Forms","condition":"gravityforms\/gravityforms.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/gravityforms\/","gform","recaptcha","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/wp-includes\/js\/plupload\/plupload.min.js","\/wp-includes\/js\/plupload\/moxie.min.js"],"icon_url":"","type":"plugin","id":"plugin:7a1c1606d094f6bff83c0ee155908367","is_default":0,"created_at":1694457903},"12340193-5c35-4b0d-b0bc-bea690cf1cae":{"id":"plugin:2f3112dd98c39aeb6bde618c9026a29f","title":"Green Forms","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","leform.min.js","leform_customjs_handlers","leform_ajax_url"],"is_default":0,"condition":"green-forms\/green-forms.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"4d20b427-47cf-4cdf-91c7-ff53602d3b2a":{"id":"plugin:0eb769dddc58f998e913345841b1d0b3","title":"GTM4WP","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","dataLayer"],"is_default":0,"condition":"duracelltomi-google-tag-manager\/duracelltomi-google-tag-manager-for-wordpress.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"a2b3c237-728c-49d6-882a-e3885444e9b4":{"id":"plugin:3b085ccda851ccf129d9506462f0cd65","title":"GTranslate","type":"plugin","icon":"","exclusions":["translate.google.com","googleTranslateElementInit"],"is_default":0,"condition":"gtranslate\/gtranslate.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"40cd9336-e73f-4a61-a7f6-27ec1ca6892c":{"id":"plugin:e1f17c1eac230219e6fec3ac07406a0d","title":"HBook","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/hbook\/","hb_booking_form_data","hb_max_date"],"is_default":0,"condition":"hbook\/hbook.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"192224c7-df72-4e3d-8f13-3206ac5b2e90":{"title":"Helper - OpenAI Chatbot for WordPress","condition":"\/helper\/index.php","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/helper\/js\/helper.min.js","mdpHelper"],"icon_url":"","type":"plugin","id":"plugin:07311d992a8a9d6af91e4766d2cb9ac9","is_default":0,"created_at":1691599768},"99cfbb2e-5678-42c2-928f-5cb09d7e43da":{"id":"plugin:269c5766fba124a838ac012a4b5a1a13","title":"HUSKY - Products Filter for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/woocommerce-products-filter\/(.*)","woof"],"is_default":0,"condition":"woocommerce-products-filter\/index.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"3a964eac-4aeb-49a7-9fd6-4c31b2645dee":{"id":"plugin:d457acfec0f86aac6733f1446f4fc94f","title":"Instagram Feed Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/instagram-feed-pro\/js\/sbi-scripts.min.js","sb_instagram_js_options"],"is_default":0,"condition":"instagram-feed-pro\/instagram-feed.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"8f9f4788-1b8d-468b-b291-1fcbd48618b9":{"id":"plugin:513b0c0ec8e12130af9b4bbbb17d7275","title":"Interactive Geo Maps","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/interactive-geo-maps-premium\/assets\/public\/map-service\/app.min.js","\/interactive-geo-maps\/assets\/public\/map-service\/app.js","iMapsData","cdn.amcharts.com\/lib\/"],"is_default":0,"condition":"interactive-geo-maps\/interactive-geo-maps.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"cf650ca3-afa0-4a13-9e4f-f7cca19abac6":{"title":"Ivory Search","condition":"add-search-to-menu\/add-search-to-menu.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/add-search-to-menu\/public\/js\/ivory-search.min.js"],"icon_url":"","type":"plugin","id":"plugin:7430e9d2c985ae0a3339a7b7e1acc318","is_default":0,"created_at":1677852711},"17a5dd54-1f5e-4d57-a56d-a8a970651954":{"id":"plugin:1c8a1e1ba89a601f88654f094139b469","title":"JetBlocks","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jet-blocks\/assets\/js\/jet-blocks.min.js"],"is_default":0,"condition":"jet-blocks\/jet-blocks.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"b6f78c90-9823-459a-8dc1-1257e5f0d4e3":{"id":"plugin:dac9ec782180f33d0fcc7c4e0e569b9d","title":"JetBlog","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor-pro\/","\/elementor\/","\/jet-blog\/","ElementorProFrontendConfig","elementorFrontendConfig","hasJetBlogPlaylist"],"is_default":0,"condition":"jet-blog\/jet-blog.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"e17173d8-6ef8-4e27-ba0f-379c9aea7eda":{"id":"plugin:0fe8895d1da5247b73a5d0b482df4ac4","title":"JetElements","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/jet-elements\/","hasJetBlogPlaylist","jetElements","\/wp-includes\/js\/jquery\/ui\/"],"is_default":0,"condition":"jet-elements\/jet-elements.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"cfd77501-9c9e-4f11-b994-0178a592fc08":{"title":"JetEngine","condition":"jet-engine\/jet-engine.php","exclusions":["\/jet-engine\/"],"icon_url":"","type":"plugin","id":"plugin:bc998e71546860c8c7f70c45a6c18972","is_default":0,"created_at":1686208296},"36fed829-a2d9-41b5-94f6-2c3b9f07a94e":{"id":"plugin:433a3173f2d06f7d02c7b91c06ed215d","title":"JetMenu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor-pro\/","\/elementor\/","\/jet-blog\/assets\/js\/lib\/slick\/slick.min.js","\/jet-elements\/","\/jet-menu\/","elementorFrontendConfig","ElementorProFrontendConfig","hasJetBlogPlaylist","JetEngineSettings","jetMenuPublicSettings","\/jet-reviews\/assets\/js\/lib\/vue.min.js"],"is_default":0,"condition":"jet-menu\/jet-menu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"580cfed7-f034-4e39-bc7a-cdd01923ce87":{"id":"plugin:51714cfdb43f231a1c93e7cffb1007ab","title":"JetPopup","type":"plugin","icon":"","exclusions":["\/jet-popup\/assets\/js\/lib\/anime-js\/anime.min.js","\/jet-popup\/assets\/js\/jet-popup-frontend.js","\/jet-woo-builder\/","var jetPopupData"],"is_default":0,"condition":"jet-popup\/jet-popup.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"d9cd2730-12e2-42d7-a082-6f0efcd466cc":{"id":"plugin:df3bc4b6a8a9f28a5ba24cb7496bbc72","title":"JetProductGallery","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jet-woo-product-gallery\/assets\/lib\/swiper\/swiper.min.js","\/jet-woo-product-gallery\/assets\/js\/jet-woo-product-gallery.min.js"],"is_default":0,"condition":"jet-woo-product-gallery\/jet-woo-product-gallery.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"544aa37b-4d52-4182-99e8-abe23585da14":{"id":"plugin:5921fc95965ac7fccb7296957bd9abff","title":"JetReviews","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jet-reviews\/assets\/js\/jet-reviews-frontend.js","\/jet-reviews\/assets\/js\/lib\/vue.min.js","jetReviewsWidget"],"is_default":0,"condition":"jet-reviews\/jet-reviews.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"963c7804-eede-4570-bd63-67066588b758":{"title":"JetSearch - Search results popup","condition":"jet-search\/jet-search.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/jet-search\/assets\/lib\/chosen\/chosen.jquery.min.js","\/jet-search\/assets\/js\/jet-search.js","\/jet-search\/assets\/lib\/jet-plugins\/jet-plugins.js"],"icon_url":"","type":"plugin","id":"plugin:13e8760379022187de982df2226a5be4","is_default":0,"created_at":1708541675},"a8460089-34b4-4f8f-8694-5d92fa48aa82":{"title":"JetSmartFilters","condition":"jet-smart-filters\/jet-smart-filters.php","exclusions":["jetOffcanvasInitialized"],"icon_url":"","type":"plugin","id":"plugin:0cd63a514de1f1acb88e2bde65c4bc8d","is_default":0,"created_at":1694447256},"fe3c4915-6f8b-49b7-aa9c-c97b264d9f12":{"id":"plugin:a346b60514ef52afeffc6e2ef2793da3","title":"JetSticky","type":"plugin","icon":"","exclusions":["\/jetsticky-for-elementor\/"],"is_default":0,"condition":"jetsticky-for-elementor\/jetsticky-for-elementor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"853479dc-fff5-47cf-9a60-bf9b00f71fc4":{"title":"JetTabs for Elementor","condition":"jet-tabs\/jet-tabs.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/elementor\/","\/elementor-pro\/","\/wp-includes\/js\/imagesloaded.min.js","ElementorProFrontendConfig","elementorFrontendConfig","\/wp-content\/plugins\/jet-tabs\/assets\/js\/jet-tabs-frontend.min.js"],"icon_url":"","type":"plugin","id":"plugin:d887a6ffea25d759e8aecdb6b78917f7","is_default":0,"created_at":1697130971},"b7f89562-230c-4f63-8360-7aad6df31e02":{"id":"plugin:829272546b040d5aaeeeaf976b6cd4ec","title":"JetTricks","type":"plugin","icon":"","exclusions":["\/jet-tricks\/"],"is_default":0,"condition":"jet-tricks\/jet-tricks.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"90451e2a-553a-4496-9fa4-cffedbe69d43":{"id":"plugin:f44f3dbd09149f57db370e4132b057db","title":"JetWoo Widgets For Elementor","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/jetwoo-widgets-for-elementor\/assets\/js\/jet-woo-widgets.js","\/jet-woo-builder\/assets\/js\/jet-woo-builder.min.js","\/jet-woo-builder\/assets\/js\/frontend.min.js","\/wp-includes\/js\/imagesloaded.min.js"],"is_default":0,"condition":"jet-woo-builder\/jet-woo-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"944718c2-48c6-4f53-aaa2-460d07e033cc":{"id":"plugin:ed318a971f8a047bed5b02ad546a9c18","title":"JetWooBuilder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/dist\/i18n.min.js","\/elementor-pro\/","\/elementor\/","elementorFrontendConfig","ElementorProFrontendConfig","JetEngineSettings","\/jet-woo-builder\/","\/jet-woo-builder-custom-quantity-selectors-main\/assets\/js\/main.js"],"is_default":0,"condition":"jet-woo-builder\/jet-woo-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f5b62f59-1dae-4cdf-ac3f-f5e846fc9918":{"id":"plugin:9562e253cd4ac2b1e1f70e32cb4e32dc","title":"Layer Slider","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/LayerSlider\/assets\/static\/layerslider\/js\/layerslider.utils.js","\/LayerSlider\/assets\/static\/layerslider\/js\/layerslider.kreaturamedia.jquery.js","\/LayerSlider\/assets\/static\/layerslider\/js\/layerslider.transitions.js","initLayerSlider"],"is_default":0,"condition":"LayerSlider\/layerslider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e2be718d-83a2-4fa0-bc98-f0df52be3dc1":{"id":"plugin:1425e2735306796fe1539d9184a77e10","title":"LoftLoader Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","loftloader.min.js"],"is_default":0,"condition":"loftloader-pro\/loftloader-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"cfa18552-656e-453c-9e14-c07522dc6598":{"id":"plugin:0bf67b8ba84771e1a367fe24590ef09c","title":"MailUp for WordPress","type":"plugin","icon":"","exclusions":["\/mailup-email-and-newsletter-subscription-form\/public\/js\/mailup-public.js","mailup-js-extra"],"is_default":0,"condition":"mailup-email-and-newsletter-subscription-form\/mailup.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"c5330c66-ba7b-45b1-87e4-ce590ab005dd":{"id":"plugin:10d0de28911c5f66463b9c8783f8148a","title":"Maintenance","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/maintenance\/"],"is_default":0,"condition":"maintenance\/maintenance.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"267aef71-afa0-4848-b6f8-3e1ca15c3a23":{"id":"plugin:9460789bdfe77425c895f130991a4cb4","title":"Maps Marker Pro","type":"plugin","icon":"","exclusions":["\/maps-marker-pro\/js\/mapsmarkerpro.js","var mapsMarkerPro"],"is_default":0,"condition":"maps-marker-pro\/maps-marker-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"b5a88b63-e906-49b3-8134-420139915ea6":{"title":"Master Popups","condition":"master-popups\/master-popups.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/plugins\/master-popups\/assets\/public\/js\/master-popups-libs.min.js"],"icon_url":"","type":"plugin","id":"plugin:8fd7bd2c8b0a33e62798573abd12be63","is_default":0,"created_at":1681305305},"4be41549-bf4d-4c49-8346-0f8a3b88fdba":{"id":"plugin:de888634cc4bd51576eed319d5a528fd","title":"Master Slider","type":"plugin","icon":"","exclusions":["masterslider"],"is_default":0,"condition":"master-slider\/master-slider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"087bee18-7cd1-4c10-8acc-19e1b7c4f4cd":{"id":"plugin:b71309a89bf3c8b558b6fca5d6531919","title":"Max Mega Menu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/hoverIntent.min.js","\/megamenu\/js\/maxmegamenu.js","var megamenu"],"is_default":0,"condition":"megamenu\/megamenu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"cf22f0b9-01f4-409e-8a93-ad6743095abd":{"id":"plugin:94a7bae84ef2816494be4af66c577bfc","title":"Meta Slider","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ml-slider\/","var metaslider"],"is_default":0,"condition":"ml-slider\/ml-slider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"bb2cbc0d-20da-415e-8218-c17f1db53579":{"title":"Monarch","condition":"monarch\/monarch.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","dt-place-monarch-icons"],"icon_url":"","type":"plugin","id":"plugin:b7335d6d6d5c5134ea10ac2d9b04226c","is_default":0,"created_at":1677853476},"a98d6a80-4610-4ede-bd33-c3e15bed0a95":{"id":"plugin:4f8651262425ef6d7c223c68a2ec2063","title":"Monster Insights","type":"plugin","icon":"","exclusions":["__gtagTracker","monsterinsights_frontend","\/google-analytics-for-wordpress\/assets\/js\/frontend-gtag.min.js"],"is_default":0,"condition":"google-analytics-for-wordpress\/googleanalytics.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"26e1a36e-7a03-449e-8ecc-e42c41ca291c":{"id":"plugin:f8fc66b302dec2327bdec0434a3b275b","title":"Motion.page","type":"plugin","icon":"","exclusions":["\/motionpage\/core\/includes\/assets\/js\/(.*)","\/motionpage\/core\/includes\/assets\/js\/gsap\/(.*)","\/motionpage\/assets\/js\/(.*)","\/motionpage\/assets\/js\/gsap\/(.*)"],"is_default":0,"condition":"motionpage\/motionpage.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"459fd663-7f80-45fd-8308-d3484981e161":{"title":"Ninja Forms","condition":"ninja-forms\/ninja-forms.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/backbone.min.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/ninja-forms\/assets\/js\/min\/front-end-deps.js","\/ninja-forms\/assets\/js\/min\/front-end.js","nf-"],"icon_url":"","type":"plugin","id":"plugin:1d3ae9c1a96d5062616968b81eef319d","is_default":0,"created_at":1703190792},"c97440dd-7592-40e7-8c98-dac20d39808f":{"id":"plugin:723a588dcd49285ea9f7404e2379b47f","title":"Ninja Tables","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ninja-tables(.*)\/assets\/","\/ninja-tables(.*)\/public\/","\/wp-includes\/js\/dist\/vendor\/moment.min.js","ninja_table_instance_","ninja_filter_","ninja_table_ready_init_table_id"],"is_default":0,"condition":"ninja-tables\/ninja-tables.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"ebc01f06-8c35-47fa-9c63-8959c5cbd915":{"id":"plugin:f41a52ab1dd50a81cd3a5e341af0007c","title":"NotificationX","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/notificationx\/assets\/public\/js\/(.*).js","notificationXArr"],"is_default":0,"condition":"notificationx\/notificationx.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"3aaf4a1b-591a-48b7-8d60-e6d65c0f94c9":{"id":"plugin:be8fc72a8b8e8eb5958be13737cff47c","title":"Ocean Elementor Widgets","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/ocean-elementor-widgets\/"],"is_default":0,"condition":"ocean-elementor-widgets\/ocean-elementor-widgets.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f053a7d3-62b0-4312-b0ca-6ff63380eb0b":{"id":"plugin:1a14afe852fefe7b22ccad3893672a29","title":"One Click Accessibility","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/pojo-accessibility\/assets\/js\/app.min.js"],"is_default":0,"condition":"pojo-accessibility\/pojo-accessibility.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"61e11800-48a9-4354-8a4c-ac9a2b4b033a":{"id":"plugin:b9ed0fe6f2cdbd305691a6b857f4b3dc","title":"OoohBoi Steroids for Elementor","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/ooohboi-steroids-for-elementor\/"],"is_default":0,"condition":"ooohboi-steroids-for-elementor\/ooohboi-steroids.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"560b78a2-f051-490b-9dc6-a602dece0d81":{"id":"plugin:f1ff18a3e04c4e0995fca9cabffe57a7","title":"Optimole","type":"plugin","icon":"","exclusions":["optimoleData"],"is_default":0,"condition":"optimole-wp\/optimole-wp.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"b0fda458-4bf2-41e9-a159-60d4bb6102a6":{"id":"plugin:48ec18bd3f59772d98f85dddab75e305","title":"OSM - OpenStreetMap","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/osm\/js\/OL\/","\/osm\/js\/osm-v3-plugin-lib.js","vectorM"],"is_default":0,"condition":"osm\/osm.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"3743ed67-e0d1-4243-bb1f-ee48a445dd10":{"id":"plugin:9eacf0b76484af0259cd788f4923f20c","title":"OxyExtras","type":"plugin","icon":"","exclusions":["vime","vime.esm.js"],"is_default":0,"condition":"oxyextras\/plugin.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"52a21e27-af5b-4476-8d6d-54c323fd1443":{"id":"plugin:e852555c4b4789d78a96d76f503b3262","title":"Oxygen Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/component-framework\/vendor\/aos\/aos.js","AOS.init","oxygen_init_pro_menu","oxy-pro-menu-show-dropdown","oxy-shape-divider","oxygenVSBInitToggleJs"],"is_default":0,"condition":"oxygen\/functions.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"ebd282b9-e175-4b83-90a2-fe12389ccd11":{"id":"plugin:6f9419e58ec86c94e7698aaaaf9dc715","title":"PageLoader by Bonfire","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/pageloader-by-bonfire\/pageloader.js","bonfire-pageloader-overlay"],"is_default":0,"condition":"pageloader-by-bonfire\/pageloader-by-bonfire.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"0baf6353-aa70-41a9-a3bc-d89870a5839b":{"id":"plugin:3a4c4518eb0f60108ab4934fab27d335","title":"PDF Embedder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/pdf-embedder\/js\/(.*).js"],"is_default":0,"condition":"pdf-embedder\/pdf_embedder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"cba51ec1-87cc-44eb-b12b-d652e3446507":{"id":"plugin:4f90aca5957cccbf623e3bbc31afa204","title":"Perfect Brands for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/perfect-woocommerce-brands\/assets\/lib\/slick\/slick.min.js","\/perfect-woocommerce-brands\/assets\/js\/functions-frontend.min.js"],"is_default":0,"condition":"perfect-woocommerce-brands\/perfect-woocommerce-brands.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"808e7a4e-025c-4fae-bf82-de3716e5eb0d":{"id":"plugin:84fe214646388d7c021dda25003ac165","title":"Photonic","type":"plugin","icon":"","exclusions":["\/photonic\/include\/js\/front-end\/module\/photonic-baguettebox.min.js"],"is_default":0,"condition":"photonic\/photonic.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"936aff7d-a8ac-4473-a7b5-4b1611b6c557":{"id":"plugin:6838be282f853f71be282783cb1c162b","title":"Pixel Caffein","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/pixel-caffeine\/build\/frontend.js","aepc_pixel"],"is_default":0,"condition":"pixel-caffeine\/pixel-caffeine.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"ab3a4ef5-2732-4b46-a7c3-17b4e9405cd1":{"id":"plugin:afe0eb7c64d4556a7111c56dd8c4d307","title":"Pixel Manager for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/woocommerce-pixel-manager-pro\/js\/public\/","wpm"],"is_default":0,"condition":"woocommerce-pixel-manager-pro\/woocommerce-pixel-manager.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"2774f964-50b2-425e-8a30-0a02f421b7e4":{"id":"plugin:38d4b2986868f543639cd1ebc3e510aa","title":"Popup Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/popup-builder\/public\/js\/(.*).js","\/popupbuilder-exit-intent\/public\/javascript\/ExitIntent.js","var sgpbPublicUrl","SGPB_POPUP_PARAMS"],"is_default":0,"condition":"popup-builder\/popup-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"82dbb1e5-31f9-43d7-b522-52819aa49ba5":{"id":"plugin:786717922362642f34a7ff58e919bd95","title":"Popup Maker","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/pum\/pum-site-scripts.js","pum","\/plugins\/popup-maker\/assets\/js\/site.min.js"],"is_default":0,"condition":"popup-maker\/popup-maker.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"48e08305-1f1c-4ef4-9f13-24af1b155abc":{"id":"plugin:17831cbb64e469c7f66224c8c63d0a58","title":"PowerPack Addons for Elementor","type":"plugin","icon":"","exclusions":["\/powerpack-lite-for-elementor\/assets\/js\/min\/frontend.min.js"],"is_default":0,"condition":"powerpack-lite-for-elementor\/powerpack-lite-elementor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e037ae2f-e36b-4f1a-ada8-eb8fde6746f2":{"id":"plugin:80e1283ea1afead3ca904fad792643c5","title":"Preloader Plus","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/preloader-plus\/(.*)"],"is_default":0,"condition":"preloader-plus\/preloader-plus.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"90fed478-e89a-455c-8371-836bee58fb81":{"title":"Premium Addons for Elementor","condition":"premium-addons-for-elementor\/premium-addons-for-elementor.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/premium-addons-for-elementor\/assets\/frontend\/min-js\/premium-addons.min.js","\/premium-addons-for-elementor\/assets\/frontend\/min-js\/isotope.min.js","\/premium-addons-elementor\/pa-frontend-(.*).min.js","\/premium-addons-for-elementor\/assets\/frontend\/min-js\/slick.min.js","\/premium-addons-pro\/assets\/frontend\/min-js\/tooltipster.min.js","window.scopes_array","lottie.min.js","\/premium-addons-for-elementor\/assets\/frontend\/min-js\/premium-nav-menu.min.js"],"icon_url":"","type":"plugin","id":"plugin:debbfbbcbdf9ffb465bbc40008d99f02","is_default":0,"created_at":1693315214},"7e43c261-77be-48fc-b25a-8953a654ae85":{"id":"plugin:100a0382fcf3d1b6b22da928bce46ea8","title":"Presto Player","type":"plugin","icon":"","exclusions":["\/wp-includes\/js\/dist\/vendor\/regenerator-runtime.min.js","\/presto-player\/dist\/components\/web-components\/web-components.esm.js","\/presto-player\/src\/player\/player-static.js","var player","\/wp-includes\/js\/dist\/api-fetch.min.js","\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/dist\/i18n.min.js"],"is_default":0,"condition":"presto-player\/presto-player.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"3d6f509f-d040-4279-9a2f-a4e6eae1e9df":{"id":"plugin:c0fce700121492b566517e68301db382","title":"Price Based on Country for WooCommerce Pro","type":"plugin","icon":"","exclusions":["\/woocommerce-product-price-based-on-countries\/assets\/js\/ajax-geolocation.min.js","\/woocommerce-price-based-country-pro-addon\/assets\/js\/currency-switcher.min.js","add-to-cart.min.js","cart-fragments.min.js"],"is_default":0,"condition":"woocommerce-price-based-country-pro-addon\/woocommerce-price-based-country-pro-addon.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"b970bc8a-bcbe-4d08-8ac0-a6853ab3f036":{"id":"plugin:f1ecfe258440b371124999ca3bfbfff3","title":"Prime Slider","type":"plugin","icon":"","exclusions":["\/plugins\/bdthemes-prime-slider-lite\/assets\/js\/bdt-uikit.min.js"],"is_default":0,"condition":"bdthemes-prime-slider-lite\/bdthemes-prime-slider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e5458963-f167-4b68-88e4-77dd39af2842":{"id":"plugin:29ea8f4dd72f5a5c5927917fb0665a05","title":"PRO Elements","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/pro-elements\/"],"is_default":0,"condition":"pro-elements\/pro-elements.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"b119ad72-f498-4576-bb71-9e6d8c37b68f":{"title":"Product Filter by WBW (for WooCommerce)","condition":"woo-product-filter\/woo-product-filter.php","exclusions":["\/jquery-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/jquery-migrate(.*)(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/wp-content\/plugins\/woo-product-filter\/modules\/woofilters\/js\/frontend.woofilters.js","\/wp-includes\/js\/jquery\/ui\/mouse.min.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/wp-includes\/js\/jquery\/ui\/slider.min.js"],"icon_url":"","type":"plugin","id":"plugin:e57ad91e0d94fab011353af544873743","is_default":0,"created_at":1685686062},"7b779aca-e497-4da3-8e51-fa12837d15ab":{"title":"Product Filters for WooCommerce","condition":"woocommerce-product-filters\/woocommerce-product-filters.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/woocommerce-product-filters\/","\/woocommerce\/assets\/js\/accounting\/accounting.min.js","\/wp-includes\/js\/jquery\/ui\/","wcpf-load-project","WCPFData"],"icon_url":"","type":"plugin","id":"plugin:719469f1c977f7109d3d6ee21ecd5a16","is_default":0,"created_at":1691235154},"2b2a51f2-bd47-4591-92d8-4a690bce5d99":{"id":"plugin:a898898b2b0ea2cd82e20a6d3a3aa47b","title":"Product Gallery Slider for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/twist\/assets\/js\/slick.min.js","wpgs-public-js-after"],"is_default":0,"condition":"twist\/twist.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"062c5be3-e5ea-4958-9619-44e3410f237e":{"title":"Product Video Gallery for Woocommerce","condition":"product-video-gallery-slider-for-woocommerce\/product-video-gallery-slider-for-woocommerce.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/product-video-gallery-slider-for-woocommerce\/public\/js\/nickx.front.js"],"icon_url":"","type":"plugin","id":"plugin:bbc653a91f0635cd2edb0b741aa62b85","is_default":0,"created_at":1693512477},"34d225a4-688c-476b-846b-420774160d6b":{"id":"plugin:e0b123d324c6fc85b8682660c34f8829","title":"Rank Math SEO","type":"plugin","icon":"","exclusions":["local_ga_js"],"is_default":0,"condition":"seo-by-rank-math\/rank-math.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"02305ca0-2c2a-4eef-a802-b8a942771ecc":{"title":"Retainful","condition":"retainful-next-order-coupon-for-woocommerce\/retainful-next-order-coupon-for-woocommerce.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/retainful-next-order-coupon-for-woocommerce\/src\/premium\/assets\/js\/atc-popup.min.js","\/retainful-next-order-coupon-for-woocommerce\/src\/premium\/assets\/js\/exit-intent-popup.js","retainful.com","rnoc-add-to-cart-js-before","rnoc_redirect_coupon_popup"],"icon_url":"","type":"plugin","id":"plugin:f9fdee19ba6aed961d96d86e1521a761","is_default":0,"created_at":1679331508},"b4055250-5813-400f-b663-d390fee989e4":{"id":"plugin:d6a4d07d1b4022d886df52322dcd8a6f","title":"Revolution Slider","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/revslider\/public\/assets\/js\/","\/revslider-(.*)-addon\/","setREVStartSize","rev_slider_","revslider_","window.RS_MODULES"],"is_default":0,"condition":"revslider\/revslider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"0b4e061a-b366-4d5a-a00e-bded4b107133":{"title":"Royal Elementor Addons","condition":"royal-elementor-addons\/wpr-addons.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/royal-elementor-addons\/assets\/js\/frontend.min.js","\/royal-elementor-addons\/assets\/js\/lib\/jarallax\/jarallax.min.js"],"icon_url":"","type":"plugin","id":"plugin:c4b464373716d7ac8e3cfb019aaa6102","is_default":0,"created_at":1688124503},"1b19ec89-171a-4f85-8c4b-b1bcfc6b1433":{"id":"plugin:5e3f85d8c82cc184b945415d1a862601","title":"Sassy Social Share","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/sassy-social-share\/public\/js\/sassy-social-share-public.js","heateorSssLoadEvent"],"is_default":0,"condition":"sassy-social-share\/sassy-social-share.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"f5899925-2ab7-43b6-abc4-51b76d664ca6":{"title":"Scrollsequence","condition":"scrollsequence-pro\/scrollsequence-pro.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/scrollsequence-pro\/public\/js\/gsap__premium_only.js","\/scrollsequence-pro\/public\/js\/gsap-scrolltrigger__premium_only.js","\/scrollsequence-pro\/public\/js\/ssq-lib__premium_only.js","scrollsequence-input-script"],"icon_url":"","type":"plugin","id":"plugin:3df51830b6b80668fc342c8dcea495cf","is_default":0,"created_at":1678111131},"043827fc-3df8-45d6-9cd2-14fbe962987a":{"id":"plugin:9d60b5d2de4d828b78c7b088024377d6","title":"ShiftNav Pro - Responsive Mobile Menu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/shiftnav-pro\/assets\/js\/shiftnav(.*).js"],"is_default":0,"condition":"shiftnav-pro\/shiftnav.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"bcbaf240-e76f-4620-b7d5-4852c46d4be7":{"id":"plugin:56279bd768c8f27ad1972b6774738bcf","title":"ShiftNav \u2013 Responsive Mobile Menu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/shiftnav-responsive-mobile-menu\/"],"is_default":0,"condition":"shiftnav-responsive-mobile-menu\/shiftnav-responsive-mobile-menu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"bbe0543b-b5af-467b-a90d-e2975d892d8d":{"title":"Short Pixel Adaptive Image","condition":"shortpixel-adaptive-images\/short-pixel-ai.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/shortpixel-adaptive-images\/assets\/js\/ai(.*).min.js","spai_settings"],"icon_url":"","type":"plugin","id":"plugin:1bc7ac87d8ab2301a1b904919dc7a798","is_default":0,"created_at":1704734942},"543ab43a-6bd3-4948-a09e-3b95e7c9209d":{"title":"Showcase IDX","condition":"showcase-idx\/showcaseidx.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","SIDX","search.showcaseidx.com\/js\/app-(.*).js","cdn.shortpixel.ai"],"icon_url":"","type":"plugin","id":"plugin:ce4dea8ddc3caa8d00e95cec3202d32a","is_default":0,"created_at":1704734988},"a16bcab7-1169-46b9-a425-b091478d8312":{"id":"plugin:3ea7d9f75ad03620b0bce2517bd5b8d1","title":"Side Cart WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/plugins\/woocommerce\/assets\/js\/frontend\/cart-fragments.min.js","\/plugins\/woocommerce\/assets\/js\/frontend\/add-to-cart.min.js","\/plugins\/woocommerce\/assets\/js\/jquery-blockui\/jquery.blockUI.min.js","\/plugins\/woocommerce\/assets\/js\/js-cookie\/js.cookie.min.js"],"is_default":0,"condition":"side-cart-woocommerce\/xoo-wsc-main.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"521f748e-cf09-4019-bd28-b52daef5f16f":{"id":"plugin:7843983bf90dbae16c6e889382c71b23","title":"Simple Banner","type":"plugin","icon":"","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/simple-banner\/","simpleBannerScriptParams"],"is_default":0,"condition":"simple-banner\/simple-banner.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"76026e82-d9cf-482c-b480-55c57693a184":{"id":"plugin:b6825f971d35a5515d095564a2e40936","title":"Site Kit by Google","type":"plugin","icon":"","exclusions":["google-analytics.com\/analytics.js","ga\\( '","ga\\('","\/gtag\/js","gtag\\(","\/gtm.js"],"is_default":0,"condition":"google-site-kit\/google-site-kit.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"79c458d7-f7f7-4072-919d-ad337bde6ae3":{"title":"Slick Menu","condition":"slick-menu\/slick-menu.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/slick-menu\/"],"icon_url":"","type":"plugin","id":"plugin:5ce5dfecdc9d3292c69a1413bbd17d3c","is_default":0,"created_at":1704735027},"99cf4942-49ea-4687-b156-405ed1ce1cfa":{"title":"Slide Anything","condition":"slide-anything\/slide-anything.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/slide-anything\/owl-carousel\/owl.carousel.min.js","owl_goto.trigger"],"icon_url":"","type":"plugin","id":"plugin:fff874cc48b80940210228c975df395c","is_default":0,"created_at":1702907355},"dd0ea584-0c99-4c30-b46d-da35b94c9f0a":{"title":"Slider by Soliloquy","condition":"soliloquy-lite\/soliloquy-lite.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","soliloquy-min.js","soliloquy_slider"],"icon_url":"","type":"plugin","id":"plugin:ffb5f8cc0ea17886dbd05f601ca3eec0","is_default":0,"created_at":1704735068},"ecb2fffc-d289-4f68-ae94-71131f17deee":{"title":"Smart Slider 3","condition":"smart-slider-3\/smart-slider-3.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/smart-slider-3\/(.*).js","_N2"],"icon_url":"","type":"plugin","id":"plugin:2f373822dceb191c31c8ad2183d51869","is_default":0,"created_at":1704735119},"284ede43-bf80-419e-8414-46c26cb746f0":{"title":"Smart Slider 3 Pro","condition":"nextend-smart-slider3-pro\/nextend-smart-slider3-pro.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/SmartSlider3\/(.*).js","_N2"],"icon_url":"","type":"plugin","id":"plugin:720ec9fbbd8a52ce525959a68a5310b3","is_default":0,"created_at":1704735152},"be70034f-def5-4771-9b3f-662eb218da2a":{"title":"Spectra - Show Slider Images","condition":"ultimate-addons-for-gutenberg\/ultimate-addons-for-gutenberg.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/ultimate-addons-for-gutenberg\/assets\/js\/spectra-animations.min.js","\/ultimate-addons-for-gutenberg\/assets\/js\/post.min.js","\/ultimate-addons-for-gutenberg\/assets\/js\/aos.min.js","\/slick.min.js","\/imagesloaded.min.js","UAGBPostCarousel"],"icon_url":"","type":"plugin","id":"plugin:af16af31f83a874b9d0a9570d9c15ff7","is_default":0,"created_at":1706824485},"c3334c29-4160-42df-a1ce-f8aeeaee8668":{"title":"Super Socializer","condition":"super-socializer\/super_socializer.php","exclusions":["theChamp","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"icon_url":"","type":"plugin","id":"plugin:660defe26748470c3a47366cd4012579","is_default":0,"created_at":1677853633},"f18b4242-fe3f-4e2b-bfc9-ac2fb3939a90":{"title":"Superfly Menu","condition":"superfly-menu\/main.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate((.*?)(.min?)?).js","\/superfly-menu\/includes\/vendor\/looks_awesome\/icon_manager\/js\/md5.js","\/superfly-menu\/includes\/vendor\/looks_awesome\/icon_manager\/js\/util.js","\/superfly-menu\/js\/public.min.js","window.SFM_is_mobile","var SFM_skew_disabled","var SFM_template"],"icon_url":"","type":"plugin","id":"plugin:ccb15175093bc6c437b78797f0698a7b","is_default":0,"created_at":1684301673},"1a05c00a-8562-45bc-80e8-987a4574b1c9":{"title":"Symplr Ads","condition":"symplr-ads\/symplr-plugin.php","exclusions":["\/symplr-ads\/","cdns.symplr.de"],"icon_url":"","type":"plugin","id":"plugin:3b6d39e28a87e86c4659491e2368ff61","is_default":0,"created_at":1692199959},"858d2d7f-bdac-4d27-ba26-baa9ace96ba4":{"id":"plugin:7d93008296bb5c7c43d4cba185ed2632","title":"Tabby Responsive Tabs","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/tabby-responsive-tabs\/js\/tabby.js","RESPONSIVEUI"],"is_default":0,"condition":"tabby-responsive-tabs\/tabby-responsive-tabs.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e44a5c93-bb77-4624-a121-d846905137ea":{"id":"plugin:2f563bbb7e92363ec3fb2989a1c7dffe","title":"The Plus Addons for Elementor","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/theplus-addons\/(.*)"],"is_default":0,"condition":"the-plus-addons-for-elementor-page-builder\/theplus_elementor_addon.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"2bbac961-b000-4802-ae97-d52472ec6750":{"title":"The Plus Addons for Elementor Premium","condition":"theplus_elementor_addon\/theplus_elementor_addon.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/wp-content\/plugins\/theplus_elementor_addon\/","\/elementor\/","\/elementor-pro\/","\/wp-includes\/js\/imagesloaded.min.js","ElementorProFrontendConfig","elementorFrontendConfig"],"icon_url":"","type":"plugin","id":"plugin:6e127deaaeefbe57ff945b1f9e274518","is_default":0,"created_at":1688143611},"666b45e8-749c-4140-bd17-e1cd589e03ee":{"id":"plugin:b9c418b47c986935a1151ab9b42f8971","title":"ThemeREX Addons","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/trx_addons\/js\/__scripts-full.js","\/trx_addons\/components\/cpt\/layouts\/shortcodes\/menu\/superfish.min.js"],"is_default":0,"condition":"trx_addons\/trx_addons.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"a750cada-eb58-4df4-9966-21c8a69332ba":{"id":"plugin:75af9efe22c5cc776636266feb55adf1","title":"Thrive Architect","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"is_default":0,"condition":"thrive-visual-editor\/thrive-visual-editor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"13714cde-680e-4ca4-8607-c35952d6a5f2":{"title":"Thrive Comments","condition":"thrive-comments\/thrive-comments.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/thrive-leads\/","window.TL_Const","var ml=","\/thrive-comments\/assets\/js\/","ThriveComments","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/backbone.min.js"],"icon_url":"","type":"plugin","id":"plugin:6a72d06ca2f6a888b0d9d5ea93af2edc","is_default":0,"created_at":1677852974},"aa7ca898-499f-4f04-b419-3de199996969":{"id":"plugin:b84d82c02cade64ade00712b9c5652aa","title":"Thrive Leads","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/thrive-leads\/","window.TL_Const","var ml=","\/thrive-comments\/assets\/js\/","ThriveComments","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/backbone.min.js"],"is_default":0,"condition":"thrive-leads\/thrive-leads.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"9eee297a-8241-4ef2-af97-46074bd0898c":{"id":"plugin:5bb61b0559b0a3fd578315b553451327","title":"Thrive Quiz Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"is_default":0,"condition":"thrive-quiz-builder\/thrive-quiz-builder.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"c2f3ec2a-5b09-4845-aa95-84841783fbfc":{"id":"plugin:a7f3e5206abff19ca7cf142260181738","title":"Thrive Ultimatum","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/thrive-ultimatum\/","var TVE_Ult_"],"is_default":0,"condition":"thrive-ultimatum\/thrive-ultimatum.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"d48b8d2f-e071-4a30-840a-306154a115a0":{"id":"plugin:f57be2014b6a489d053f8367fa6c0f9f","title":"Tidio Chat","type":"plugin","icon":"","exclusions":["document.tidioChatCode"],"is_default":0,"condition":"tidio-live-chat\/tidio-elements.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"cb6d33ed-7eb4-4ff9-9ad0-7fc54fbecf6f":{"id":"plugin:c9e0485ec256d4a6a8d92a98c18d76fc","title":"Toolset Blocks","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","toolsetCommonEs.fontToHead","toolsetCommonEs.styleToHead","\/toolset-blocks\/vendor\/toolset\/blocks\/public\/js\/frontend.js","\/toolset-blocks\/vendor\/toolset\/common-es\/public\/toolset-common-es-frontend.js","\/toolset-blocks\/public\/js\/views-frontend.js","\/wp-includes\/js\/underscore.min.js"],"is_default":0,"condition":"toolset-blocks\/wp-views.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"4bac6350-0925-49fb-904a-372f22fd6baf":{"id":"plugin:71beda322b37f7fc7d456822493cb972","title":"Top Bar Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/plugins\/topbar-pro\/js\/tpbr_front.min.js","\/plugins\/topbar-pro\/js\/jquery.cookie.js"],"is_default":0,"condition":"topbar-pro\/topbar_pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"033486e7-0ddc-4915-a848-31504d00448e":{"title":"Twenty20 Image Before-After","condition":"twenty20\/ttwenty.php","exclusions":["\/twenty20\/assets\/js\/(.*).js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","twentytwenty-container"],"icon_url":"","type":"plugin","id":"plugin:23441bba9d3602bc932d697c7cb8aa1f","is_default":0,"created_at":1677858089},"7675a34d-006e-4672-99d5-a81e1b8e47f9":{"id":"plugin:3d59cc34167a7f8123e66b627148e0b7","title":"UberMenu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ubermenu\/assets\/js\/ubermenu.min.js"],"is_default":0,"condition":"ubermenu\/ubermenu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"8233178a-e7b3-43ce-b193-bd0d9c960933":{"id":"plugin:86424c46157c1c7e2e1571055813beee","title":"Ultimate Addons for Elementor","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ultimate-elementor\/assets\/lib\/slick\/slick.min.js","\/ultimate-elementor\/assets\/min-js\/uael-frontend.min.js","\/ultimate-elementor\/assets\/lib\/isotope\/isotope.min.js","\/ultimate-elementor\/assets\/lib\/jquery-element-resize\/jquery_resize.min.js","\/ultimate-elementor\/assets\/lib\/fancybox\/jquery_fancybox.min.js","\/ultimate-elementor\/assets\/lib\/justifiedgallery\/justifiedgallery.min.js","\/elementor-pro\/assets\/js\/frontend.min.js","\/wp-includes\/js\/imagesloaded.min.js","\/js_composer\/assets\/js\/dist\/js_composer_front.min.js","\/elementor\/assets\/lib\/swiper\/swiper.min.js","\/nasa-core\/assets\/js\/min\/jquery.slick.min.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig"],"is_default":0,"condition":"ultimate-elementor\/ultimate-elementor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"8bddf484-6c78-4147-a4e6-d3039904e5f6":{"title":"Ultimate Addons for Elementor - Mobile Menu","condition":"ultimate-elementor\/ultimate-elementor.php","exclusions":["\/jquery-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/jquery-migrate(.*)(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/ultimate-elementor\/assets\/js\/uael-nav-menu.js","\/ultimate-elementor\/assets\/min-js\/uael-nav-menu.min.js"],"icon_url":"","type":"plugin","id":"plugin:70cfade3a7adbb54196f6acccc5a176f","is_default":0,"created_at":1694771327},"028504f7-b1cd-4318-8a6d-ce186197e89d":{"id":"plugin:0f0a91f0c454021a5ff9fc25c3ed419f","title":"Ultimate Addons for WPBakery Page Builder","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/Ultimate_VC_Addons\/assets\/"],"is_default":0,"condition":"Ultimate_VC_Addons\/Ultimate_VC_Addons.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"5754af3d-a6af-49eb-b731-bdd82f26dc4e":{"id":"plugin:34db8636812bad84c8aea037c2ddc8c2","title":"Ultimate Responsive Image Slider","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","sliderPro"],"is_default":0,"condition":"ultimate-responsive-image-slider\/ultimate-responsive-image-slider.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"78ae882d-ae31-4179-b677-8893814938c7":{"title":"Unlimited Elements for Elementor Premium - Slider","condition":"unlimited-elements-for-elementor-premium\/unlimited-elements-pro.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elementor\/","\/elementor-pro\/","ElementorProFrontendConfig","elementorFrontendConfig","\/unlimited-elements-for-elementor-premium\/","uc_"],"icon_url":"","type":"plugin","id":"plugin:17260bc347b8c29bee0010e9ec164184","is_default":0,"created_at":1683270377},"051cbfbb-7ad2-4f06-a493-3cf423a80904":{"id":"plugin:6717ef5673a956bc08ca4a5117065d53","title":"Variation Swatches for WooCommerce","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jquery\/ui\/","\/woo-variation-swatches\/","\/woo-variation-swatches-pro\/","underscore.min.js"],"is_default":0,"condition":"woo-variation-swatches\/woo-variation-swatches.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"6879caba-7224-4eca-bcb2-370785b495ea":{"id":"plugin:57597b7683e01892932083413f085134","title":"Web Accessibility By accessiBe","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/accessibe\/","acsbJS"],"is_default":0,"condition":"accessibe\/accessiebe.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"bd6732fe-4c2b-40a1-9035-8464057e2da5":{"title":"WooCommerce - Cart Fragments","condition":"woocommerce\/woocommerce.php","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/woocommerce\/assets\/js\/frontend\/cart-fragments.min.js","\/woocommerce\/assets\/js\/js-cookie\/js.cookie.min.js"],"icon_url":"","type":"plugin","id":"plugin:201de694c6fc28c8d580a3b2ca484218","is_default":0,"created_at":1680937567},"d044900d-07e1-4533-9516-33106efcb259":{"title":"WooCommerce - Product description","condition":"woocommerce\/woocommerce.php","exclusions":["\/plugins\/woocommerce\/assets\/js\/frontend\/single-product.min.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"icon_url":"","type":"plugin","id":"plugin:a82644b4c9417ea3a240939a73344700","is_default":0,"created_at":1679309756},"bff953b1-2213-4666-8112-76a84a3cc207":{"title":"WooCommerce - Product Gallery","condition":"woocommerce\/woocommerce.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/woocommerce\/?(.*)\/assets\/js\/zoom\/jquery.zoom(.min)?.js","\/woocommerce\/?(.*)\/assets\/js\/photoswipe\/","\/woocommerce\/?(.*)\/assets\/js\/flexslider\/jquery.flexslider(.min)?.js","\/woocommerce\/?(.*)\/assets\/js\/frontend\/single-product(.min)?.js","wc_single_product_params"],"icon_url":"","type":"plugin","id":"plugin:7665868ff97c265628f376523a4f9ecc","is_default":0,"created_at":1686579689},"016e6ddf-c6e7-49ec-bd3f-2585d9e45895":{"title":"WooCommerce - Select2 library","condition":"woocommerce\/woocommerce.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/woocommerce\/assets\/js\/select2\/select2(.*).js"],"icon_url":"","type":"plugin","id":"plugin:4bca670bd5d55dd24b17fb0193b0891e","is_default":0,"created_at":1681459540},"b9b2c6d7-944f-4ae3-ae04-c9e2204b9dab":{"id":"plugin:9165c768e978d6ad3f696db8c78ccbb2","title":"WooCommerce Attribute Swatches","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/iconic-woo-attribute-swatches-premium\/assets\/frontend\/js\/main.min.js","\/iconic-woo-attribute-swatches-premium\/assets\/vendor\/flickity\/flickity.pkgd.min.js","iconic_was_vars"],"is_default":0,"condition":"iconic-woo-attribute-swatches-premium\/iconic-woo-attribute-swatches.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"4506c5e9-7349-44c9-9967-34370c83facb":{"title":"WooCommerce Bookings","condition":"woocommerce-bookings\/woocommerce-bookings.php","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/woocommerce-bookings\/dist\/frontend.js","\/wp-includes\/js\/dist\/date.min.js","\/wp-includes\/js\/dist\/vendor\/moment.min.js","\/wp-includes\/js\/jquery\/ui\/datepicker.min.js","\/wp-includes\/js\/underscore.min.js","\/woocommerce\/assets\/js\/jquery-blockui\/jquery.blockUI.min.js","\/wp-includes\/js\/dist\/hooks.min.js"],"icon_url":"","type":"plugin","id":"plugin:14dec6d289b9977fa3a74116feecebcc","is_default":0,"created_at":1693998405},"fec9cd04-c358-45da-a1a8-1668b964016b":{"id":"plugin:456f3b849ba3b6647246aca9d7cdaed5","title":"WooCommerce Product Reviews Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","wc_product_reviews_pro","\/woocommerce-product-reviews-pro\/assets\/js\/frontend\/wc-product-reviews-pro-frontend.min.js","\/woocommerce\/assets\/js\/jquery-tiptip\/jquery.tipTip.min.js"],"is_default":0,"condition":"woocommerce-product-reviews-pro\/woocommerce-product-reviews-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"551a9399-627f-4978-9bae-5cc8e0aefc82":{"id":"plugin:c8577e74eef3b082fb6403760d53f68c","title":"WooCommerce TM Extra Product Options","type":"plugin","icon":"","exclusions":["\/woocommerce-tm-extra-product-options\/assets\/js\/epo.min.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/jquery\/ui\/core.min.js","\/wp-includes\/js\/jquery\/ui\/mouse.min.js","\/wp-includes\/js\/jquery\/ui\/slider.min.js","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/wp-util.min.js","\/wp-includes\/js\/dist\/hooks.js","\/wp-includes\/js\/dist\/i18n.js"],"is_default":0,"condition":"woocommerce-tm-extra-product-options\/tm-woo-extra-product-options.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"3cac4650-6a52-448e-8e48-e99a772a59a2":{"id":"plugin:c6e6cab8c80fa3fe57d609f72d2d5c56","title":"WooLentor","type":"plugin","icon":"","exclusions":["\/woolementor\/assets\/third-party\/slick\/slick.min.js","\/woolentor-addons","woolentor_addons"],"is_default":0,"condition":"woolentor-addons\/woolentor_addons_elementor.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"21af073d-d2ec-4d46-bbda-2c69f87f3f98":{"title":"Woolentor - Fix product gallery","condition":"woolentor-addons\/woolentor_addons_elementor.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)",".woolentor-learg-img","\/woolentor-addons\/assets\/js\/slick.min.js","\/woolentor-addons-pro\/assets\/lib\/js\/tippy.min.js"],"icon_url":"","type":"plugin","id":"plugin:c5315e06dfc353cd57f85a60abe4e320","is_default":0,"created_at":1700061004},"67aeb4cb-1a00-4d10-a00c-34888b4c0dba":{"title":"WooThumbs for WooCommerce","condition":"woothumbs-premium\/woothumbs-premium.php","exclusions":["\/wp-includes\/js\/dist\/hooks.min.js","\/wp-includes\/js\/underscore.min.js","\/wp-includes\/js\/wp-embed.min.js","\/wp-includes\/js\/wp-util.min.js","\/woothumbs-premium\/(.*)"],"icon_url":"","type":"plugin","id":"plugin:b97b1d3f627769e1dd8305aa25af993c","is_default":0,"created_at":1679065404},"c7a14763-88d0-4344-a6af-e0a8dc5fa8d5":{"id":"plugin:31b9e812a025e5750a6ef0980ee7d2db","title":"WordPress Mega Menu \u2013 QuadMenu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/quadmenu","#private-menu","#public-menu"],"is_default":0,"condition":"quadmenu\/quadmenu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"f699fdbd-84a7-4f24-b729-3e4a4f83a4dd":{"id":"plugin:601f8fc7d10cad1c2ec2949c0d9b1651","title":"WP Armour","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/honeypot\/includes\/js\/wpa.js","\/wp-armour-extended\/includes\/js\/wpae.js","wpa_hidden_field","wpa_add_test"],"is_default":0,"condition":"wp-armour-extended\/wp-armour-extended.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"6a28aae5-ef91-43fc-8204-92e3a25642b4":{"id":"plugin:5728f3b9856dfe37a36ab15b0a637198","title":"WP Go Maps","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","maps.googleapis.com"],"is_default":0,"condition":"wp-google-maps\/wpGoogleMaps.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"c9b991d1-a653-404b-be85-e276b1814e7d":{"title":"WP Google Map Pro","condition":"wp-google-map-gold\/wp-google-map-gold.php","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","maps.google.com\/maps\/api\/js","\/wp-includes\/js\/masonry.min.js","\/wp-google-map-gold\/(.*)"],"icon_url":"","type":"plugin","id":"plugin:dc12a9b7b9c4c7ce3c532b6b377739f2","is_default":0,"created_at":1677858391},"1f8f9fbf-fbf0-4e3a-b77c-af0fa47e950d":{"id":"plugin:87f572f5f0ec143a8fceba77d0616197","title":"WP Google Maps Pro","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-google-maps(.*)","maps.googleapis.com","mgl_","wpgmza"],"is_default":0,"condition":"wp-google-maps-pro\/wp-google-maps-pro.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"41e4b98c-e63f-4800-a478-02592562322b":{"id":"plugin:3735ca768ede98b25795f4cb057ff4ed","title":"WP iCal Availability","type":"plugin","icon":"","exclusions":["\/wp-ical-availability\/js\/custom-select.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-ical-availability\/"],"is_default":0,"condition":"wp-ical-availability\/wp-ical-availability.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"2b06c5b8-dc32-4bb0-8504-3a9f1c3a1ec0":{"title":"WP MapIt","condition":"wp-mapit\/wp_mapit.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-mapit\/wp_mapit\/js\/leaflet.js","\/wp-mapit\/wp_mapit\/js\/wp_mapit_multipin.js"],"icon_url":"","type":"plugin","id":"plugin:ba8d1c7f294a3f5b593556eb3b0bc7d9","is_default":0,"created_at":1679331261},"2039eafd-1c11-4e21-a61b-30857f291ae3":{"id":"plugin:927b8bf7806f2d287559b86a0b455a59","title":"WP Responsive Menu","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-responsive-menu\/(.*)"],"is_default":0,"condition":"wp-responsive-menu\/wp-responsive-menu.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"e06be942-cccd-4b2d-a268-06dc78f0b820":{"title":"WP Search with Algolia","condition":"wp-search-with-algolia\/algolia.php","exclusions":["\/wp-search-with-algolia\/js\/algoliasearch\/dist\/algoliasearch-lite.umd.js","\/wp-search-with-algolia\/js\/autocomplete-noconflict.js","\/wp-search-with-algolia\/js\/autocomplete.js\/dist\/autocomplete.min.js","var algolia"],"icon_url":"","type":"plugin","id":"plugin:43267e659d599fbb6b42c719b49bb7a7","is_default":0,"created_at":1677857180},"4fc2a7ae-b9e6-410e-93cf-e6d1962add6a":{"title":"WP Smart Preloader","condition":"wp-smart-preloader\/wp-preloader.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-smart-preloader\/assets\/js\/wsp-main-script(.min)?.js"],"icon_url":"","type":"plugin","id":"plugin:4fb90fc73fc2b5d1e37ea2dadfd3cef3","is_default":0,"created_at":1704204597},"7ecf40ce-2bcd-412c-bb01-9e71fecf6be8":{"title":"WP Store Locator","condition":"wp-store-locator\/wp-store-locator.php","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-store-locator\/","\/wp-includes\/js\/underscore.min.js","maps.google.com"],"icon_url":"","type":"plugin","id":"plugin:d37bb5054a24471ca1675d9ab49d01b0","is_default":0,"created_at":1704735183},"7a1d19a2-3a48-40ab-8051-f642fc63ce2d":{"title":"WP Ultimate Post Grid","condition":"wp-ultimate-post-grid\/wp-ultimate-post-grid.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/wp-ultimate-post-grid\/dist\/public.js","\/wp-ultimate-post-grid-premium\/dist\/public-premium.js","wpupg_grid_args"],"icon_url":"","type":"plugin","id":"plugin:e24341fef49bd64b89682d583218c108","is_default":0,"created_at":1686597940},"76c86163-ddf3-4113-b620-de9d5058f505":{"title":"WPBakery Page Builder","condition":"js_composer\/js_composer.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/js_composer\/assets\/js\/dist\/js_composer_front.min.js"],"icon_url":"","type":"plugin","id":"plugin:517d7d24da9a7072ed389d0fb30374a0","is_default":0,"created_at":1704404852},"0b8ff2c0-c3cd-4ec1-b7f5-c7751de6101b":{"title":"WPBakery Page Builder - Carousel","condition":"js_composer\/js_composer.php","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/js_composer\/assets\/lib\/vc_carousel\/js\/vc_carousel.min.js"],"icon_url":"","type":"plugin","id":"plugin:76336ed3f04df091e669f89d908ef2ed","is_default":0,"created_at":1704405212},"4f5e5b98-c326-4b9f-9ada-3b257862132c":{"id":"plugin:1ec7138c950c355e7af60d49c81139fc","title":"wpDataTables","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wpdatatables\/","highcharts"],"is_default":0,"condition":"wpdatatables\/wpdatatables.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"18be1b8c-0bc4-4a01-abc6-a127aff380c6":{"id":"plugin:c62ca58ea081c1271de8dadfa7daac69","title":"WPForms","type":"plugin","icon":"","exclusions":["\/wpforms-offline-forms\/assets\/js\/wpforms-offline-forms.min.js","wpforms-offline-forms-js-extra","wpformsRecaptchaLoad"],"is_default":0,"condition":"wpforms\/wpforms.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"8a3cacb6-81bd-456a-a1cc-a4025f8e5234":{"id":"plugin:0992ac952c0a05bb35e18b1d5744d346","title":"WPForms Lite","type":"plugin","icon":"","exclusions":["wpformsRecaptchaLoad","\/wpforms-offline-forms\/assets\/js\/wpforms-offline-forms.min.js","wpforms-offline-forms-js-extra"],"is_default":0,"condition":"wpforms-lite\/wpforms.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"98bbd410-5b01-4244-a8eb-715765180328":{"title":"XL WooCommerce Sales Triggers","condition":"xl-woocommerce-sales-triggers\/xl-woocommerce-sales-triggers.php","exclusions":["\/xl-woocommerce-sales-triggers\/assets\/js\/wcst_combined.min.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"icon_url":"","type":"plugin","id":"plugin:ba9e526ddb0157e69757530c6b18b714","is_default":0,"created_at":1677856813},"bf9f9620-dd0e-4e6f-9a45-4eb78a148f42":{"id":"plugin:58663fc781232169e865f6fe7cf1afaa","title":"YITH WooCommerce Ajax Product Filter","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/yith-woocommerce-ajax-navigation\/assets\/js\/yith-wcan-shortcodes.min.js"],"is_default":0,"condition":"yith-woocommerce-ajax-navigation\/init.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"b053279d-e07c-438c-bb3e-3a1f4f5d7c5e":{"id":"plugin:68b637fd247e40c8e135e4771d739b07","title":"YITH WooCommerce AJAX Product Filter Premium","type":"plugin","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/yith-woocommerce-ajax-product-filter-premium\/assets\/js\/yith-wcan-shortcodes.min.js"],"is_default":0,"condition":"yith-woocommerce-ajax-product-filter-premium\/init.php","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"d94dbbf3-bcab-4e47-9fbb-6b3a7cf92787":{"title":"Yotpo Social Reviews for Woocommerce","condition":"yotpo-social-reviews-for-woocommerce\/wc_yotpo.php","exclusions":["\/yotpo-social-reviews-for-woocommerce\/assets\/js\/headerScript.js"],"icon_url":"","type":"plugin","id":"plugin:45ab742b3fccbd04d7bc973c8582be87","is_default":0,"created_at":1680686421}},"themes":{"9aeea459-91d3-44b6-8a26-b883dca8b402":{"title":"Agensy - Load page without User Interaction","condition":"agensy","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/themes\/agensy\/js\/scripts.js","\/themes\/agensy\/js\/scripts-single.js","\/themes\/agensy\/js\/wow.min.js","\/themes\/agensy\/js\/TweenMax.min.js","\/themes\/agensy\/js\/swiper.min.js","\/plugins\/visualcomposer\/assets\/lib\/bower\/isotope\/dist\/isotope.pkgd.min.js","\/wp-includes\/js\/imagesloaded.min.js"],"icon_url":"","type":"theme","id":"theme:7ab7dfeb0db9c0c74c020be318c2e6d9","is_default":0,"created_at":1707317936},"9c623554-5834-4669-9e96-1b894c1939b2":{"id":"theme:0193ea55fce2ada93b262f2824008c0f","title":"Andaman","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/andaman\/assets\/js\/","\/wp-andaman-plugins\/shortcodes\/vc_extend\/"],"is_default":0,"condition":"andaman","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"7374c5a5-69f8-460f-b44f-dee884a824cd":{"id":"theme:24cbda63f1b898ade5562ab4ec6d97a5","title":"Artale","type":"theme","icon":"","exclusions":["\/artale-elementor\/assets\/js\/modulobox.js","\/artale-elementor\/assets\/js\/artale-elementor.js","\/artale\/js\/jquery-stellar.js","\/artale\/js\/core\/artale-plugins.js","\/artale\/js\/core\/artale-custom.js","var loader"],"is_default":0,"condition":"artale","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"23b01203-2a70-4394-9326-d59824def2d7":{"title":"Ashe Pro Premium","condition":"ashe-pro-premium","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/ashe-pro-premium\/"],"icon_url":"","type":"theme","id":"theme:4791da3cbbd1ed86253a087f0287aeb4","is_default":0,"created_at":1704912793},"03a9cc62-c167-447d-beb2-65c76c96b056":{"title":"Astra","condition":"astra","exclusions":["\/astra\/assets\/js\/minified\/frontend.min.js"],"icon_url":"","type":"theme","id":"theme:3cce5f3eaf76e098ba8e28f7bbba3f92","is_default":0,"created_at":1702486947},"2a2b54cb-8e1d-49d2-bfca-93eee231e470":{"id":"theme:72a8d63e59c10bdf512a62b862d143a7","title":"Astra - Carousel","type":"theme","icon":"","exclusions":["var astra","\/astra\/assets\/js\/minified\/style.min.js"],"is_default":0,"condition":"astra","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"7783361f-66fc-4d95-a054-4e9545bb5b48":{"title":"Auteur","condition":"g5plus-auteur","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/g5plus-auteur\/assets\/js\/core.min.js","\/g5plus-auteur\/assets\/vendors\/","\/auteur-framework\/libs\/smart-framework\/assets\/vendors\/perfect-scrollbar\/js\/perfect-scrollbar.jquery.min.js","\/wp-includes\/js\/imagesloaded.min.js"],"icon_url":"","type":"theme","id":"theme:6207fe478e269e7547bda70a46607a49","is_default":0,"created_at":1679737107},"4c618038-8fc7-4d48-8d41-a32da14e5c1e":{"title":"AutoTrader","condition":"autotrader","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/autotrader\/(.*).js"],"icon_url":"","type":"theme","id":"theme:046dfeee2b77390c53e0e7f93b6a3792","is_default":0,"created_at":1679736741},"18f04f23-35a0-4c45-8cb6-a91d57ca1790":{"id":"theme:835da12f43373029659f766920e81b47","title":"Avada - Animations & mobile-specific actions","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/uploads\/fusion-scripts\/(.*).js","window.off_canvas_","\/plugins\/fusion-builder\/","\/plugins\/fusion-core\/","\/Avada\/includes\/"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"90135867-1b95-498b-80d6-f5dbf2f6b318":{"title":"Avada - FAQ shortcode","condition":"Avada","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/plugins\/fusion-core\/js\/min\/avada-faqs.js"],"icon_url":"","type":"theme","id":"theme:b084708c80d8582546e5430219aa4670","is_default":0,"created_at":1678277160},"d23b5bb1-1d7f-4109-bf69-b20a2be2d337":{"id":"theme:5e7a2248e1a53d9bb27b187deb541248","title":"Avada - Fusion carousel","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/includes\/lib\/assets\/min\/js\/library\/jquery.carouFredSel.js","\/includes\/lib\/assets\/min\/js\/general\/fusion-carousel.js","fusionCarouselVars"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"98dfa8c1-e72a-4cef-a0b2-8f0c322490fc":{"id":"theme:f16fb109027f4994a7649a8b1663e6f7","title":"Avada - Fusion form","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/fusion-builder\/assets\/js\/min\/general\/fusion-form.js","\/fusion-builder\/assets\/js\/min\/general\/fusion-form-logics.js","\/includes\/lib\/assets\/min\/js\/library\/cssua.js","\/includes\/lib\/assets\/min\/js\/general\/fusion.js","\/includes\/lib\/assets\/min\/js\/library\/modernizr.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"026801fa-af67-47ba-b966-347693f0585f":{"id":"theme:33f50696d353d8bd4eb59ff6e8f44c97","title":"Avada - Fusion grid gallery","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/fusion-builder\/assets\/js\/min\/general\/fusion-gallery.js","\/includes\/lib\/assets\/min\/js\/library\/imagesLoaded.js","\/includes\/lib\/assets\/min\/js\/library\/isotope.js","\/includes\/lib\/assets\/min\/js\/library\/packery.js","\/includes\/lib\/assets\/min\/js\/library\/lazysizes.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"c8349314-15a3-481e-973b-e4d936e4420e":{"id":"theme:56fa9993a573540c83eda9c49fae5e3c","title":"Avada - Fusion slider","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/fusion-core\/js\/min\/avada-fusion-slider.js","\/Avada\/includes\/"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"7a04bc85-0fec-4487-ae05-bb2e5d8d0420":{"title":"Avada - Load Portfolio on pageload","condition":"Avada","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/library\/packery.js","\/library\/isotope.js","\/library\/imagesLoaded.js","\/general\/fusion-lightbox.js","\/fusion-core\/js\/min\/avada-portfolio.js"],"icon_url":"","type":"theme","id":"theme:c3f0ed4d94499b68c77d95db37d1d399","is_default":0,"created_at":1696601814},"55bd510c-78aa-49d5-8304-8be2ee2ab0da":{"id":"theme:2189c1c769d65cfc2182e4822847071b","title":"Avada - Mobile menu","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/assets\/min\/js\/general\/avada-menu.js","\/includes\/lib\/assets\/min\/js\/library\/modernizr.js","\/includes\/lib\/assets\/min\/js\/library\/jquery.easing.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"ddf00672-c35c-4b68-aeca-925e68bf12b2":{"id":"theme:97a185f08af70c39c7e221faab0f73eb","title":"Avada - OffCanvas","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/uploads\/fusion-scripts\/(.*).min.js","window.off_canvas_"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"17544cc3-9d3a-4611-bc5d-44d04e2786fa":{"title":"Avada - Show the Portfolio grid on page load","condition":"Avada","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/includes\/lib\/assets\/min\/js\/library\/imagesLoaded.js","\/includes\/lib\/assets\/min\/js\/library\/isotope.js","\/includes\/lib\/assets\/min\/js\/library\/lazysizes.js","\/includes\/lib\/assets\/min\/js\/library\/modernizr.js","\/includes\/lib\/assets\/min\/js\/library\/packery.js","\/fusion-core\/js\/min\/avada-portfolio.js","avadaPortfolioVars"],"icon_url":"","type":"theme","id":"theme:9d1a9b0c2ca20fca764a82f197b962fd","is_default":0,"created_at":1696601823},"c6c3347c-14e0-4766-afa5-df33a47f5a5a":{"id":"theme:3ff44421b404c5efffa25e78e479e4ea","title":"Avada - Sticky menu","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/Avada\/assets\/min\/js\/general\/avada-menu.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"232596c1-6a6a-4fe8-a5c3-a60fa74a9456":{"id":"theme:0d727d80bb132f17c737e55883fe4be0","title":"Avada - WooCommerce product gallery","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/assets\/min\/js\/general\/avada-woo-product-images.js","\/includes\/lib\/assets\/min\/js\/library\/jquery.flexslider.js"],"is_default":0,"condition":"Avada","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"95ece7e4-3b19-45e5-aa28-14f833c9afca":{"title":"Avesa","condition":"avesa","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/avesa\/js\/main.js","\/avesa\/js\/isotope.js","\/sw_core\/js\/slick.min.js","\/avesa\/js\/bootstrap-datetimepicker.min.js","\/avesa\/js\/bootstrap.min.js"],"icon_url":"","type":"theme","id":"theme:aad8bfcc594eec02e3b0d635198dee5e","is_default":0,"created_at":1679737993},"f2bfe477-4e45-4e52-a7d9-4d0ba3a92258":{"title":"Besa","condition":"besa","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/besa\/js\/"],"icon_url":"","type":"theme","id":"theme:c238e89523c46ca28b08e401f42f6ccc","is_default":0,"created_at":1679738204},"bd94908c-8138-4995-986b-47ec66494bdd":{"title":"BeTheme","condition":"betheme","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/betheme\/","mfn","\/wp-includes\/js\/jquery\/ui\/tabs.min.js","\/wp-includes\/js\/jquery\/ui\/core.min.js"],"icon_url":"","type":"theme","id":"theme:b99156eb9eeb357c0a70bd3bda6861cc","is_default":0,"created_at":1679738639},"190d2f1a-72a6-40ca-b08a-5c7ee7b0a6a5":{"title":"Bosa Online Education - Fixes animations and preloader","condition":"bosa-online-education","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/bosa\/assets\/js\/jquery.slicknav.min.js","\/bosa\/assets\/slick\/slick.min.js","\/bosa\/assets\/js\/navigation.js","\/bosa\/assets\/js\/custom.min.js","\/bosa\/assets\/js\/theia-sticky-sidebar.min.js"],"icon_url":"","type":"theme","id":"theme:5430bf7b83c83a3687b3b7b437e961b0","is_default":0,"created_at":1708371742},"6fb2b9d7-6ecc-4260-999c-938fbebdbf01":{"id":"theme:de8504b73ea228d0ea9bbce69752092e","title":"Bridge","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/bridge-creative\/bridge\/js\/","\/wp-includes\/js\/"],"is_default":0,"condition":"bridge","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"65698b6b-85dd-41ef-8fd7-718f1e983dba":{"title":"Car Dealer","condition":"cardealer","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/jquery\/(.*)","\/cardealer\/js\/(.*)"],"icon_url":"","type":"theme","id":"theme:b1111424fff61af8d1e152dcdd6810f6","is_default":0,"created_at":1679737517},"3927d724-5a0a-402b-a838-858d30b54ea9":{"title":"Cardea - Show Page Content on Load","condition":"cardea-wp","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/themes\/cardea-wp\/js\/main.js","\/themes\/cardea-wp\/js\/jquery.sticky.js","\/themes\/cardea-wp\/js\/jquery.fitvids.js","\/themes\/cardea-wp\/js\/jquery.smartmenus.min.js"],"icon_url":"","type":"theme","id":"theme:d65d1a8303b0c7508278884520e4bec7","is_default":0,"created_at":1698677525},"087fb457-a09d-4140-84bd-c9bc1e8195b7":{"title":"CheerUp","condition":"cheerup","exclusions":["\/cheerup\/js\/jquery.sticky-sidebar.js","\/cheerup\/js\/object-fit-images.js","\/cheerup\/js\/jquery.fitvids.js","\/cheerup\/js\/jquery.mfp-lightbox.js","\/cheerup\/js\/ie-polyfills.js","\/cheerup\/js\/theme.js","\/wp-includes\/js\/imagesloaded.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/wp-includes\/js\/jquery\/jquery.min.js"],"icon_url":"","type":"theme","id":"theme:13bcf562f45afb245dc4f76fecfba6d6","is_default":0,"created_at":1696429398},"eb86aedb-91e6-480c-b76c-756ac1da41be":{"title":"Clover","condition":"clover-theme","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/clover-theme\/"],"icon_url":"","type":"theme","id":"theme:89372f3d9321ae09c94488592084da29","is_default":0,"created_at":1679738878},"6e90b649-5736-497f-9bc6-515900cfea8a":{"title":"Divi - Animations","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js",".dipi_preloader_wrapper_outer","\/Divi\/js\/scripts.min.js","\/Divi\/js\/custom.unified.js","\/js\/magnific-popup.js","var DIVI"],"icon_url":"","type":"theme","id":"theme:c0abf30dba4ff13db836d1b01685953a","is_default":0,"created_at":1679737389},"70916c43-4e02-4932-b6aa-91a1815bc755":{"title":"Divi - Background video","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/Divi\/js\/custom.unified.js","\/js\/mediaelement\/(.*)","mejs"],"icon_url":"","type":"theme","id":"theme:c7edea41ae6716291e2d32a2ab429209","is_default":0,"created_at":1679738240},"08531785-9818-4e30-903e-564637a2ad7a":{"title":"Divi - Counter module","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js",".dipi_preloader_wrapper_outer","\/Divi\/js\/scripts.min.js","\/Divi\/js\/custom.unified.js","\/js\/magnific-popup.js","var DIVI","\/Divi\/includes\/builder\/feature\/dynamic-assets\/assets\/js\/easypiechart.js"],"icon_url":"","type":"theme","id":"theme:2c46b9f5a770f260c3f7115bb330b2d5","is_default":0,"created_at":1679736810},"b996762a-84ef-440d-a089-73a187936fbf":{"title":"Divi - Mobile menu","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/Divi\/js\/scripts.min.js","\/Divi\/js\/custom.unified.js"],"icon_url":"","type":"theme","id":"theme:b9116994f4e4b9b9fa574440c00d2f0d","is_default":0,"created_at":1679738580},"ae096e1e-9c36-46ad-a3d1-c26ea507276b":{"title":"Divi - Sticky elements","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js",".dipi_preloader_wrapper_outer","\/Divi\/js\/scripts.min.js","\/Divi\/includes\/builder\/feature\/dynamic-assets\/assets\/js\/sticky-elements.js","var DIVI"],"icon_url":"","type":"theme","id":"theme:8b62db03c90245f3e690335b079b05dc","is_default":0,"created_at":1679737191},"349f31f0-dd10-41d3-b0a4-9c5df64879f8":{"title":"Divi - Sticky menu","condition":"Divi","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/js\/jquery\/jquery-migrate.min.js","\/Divi\/js\/scripts.min.js","\/Divi\/includes\/builder\/feature\/dynamic-assets\/assets\/js\/magnific-popup.js","jqueryParams","firstHeader"],"icon_url":"","type":"theme","id":"theme:b7b84aca0f0dc6a1ced31d38626c50ea","is_default":0,"created_at":1679738821},"59563458-5f04-4959-b3e2-53e49e169d67":{"title":"Divi - WooCommerce Single Product Images","condition":"Divi","exclusions":["\/Divi\/js\/scripts.min.js"],"icon_url":"","type":"theme","id":"theme:f9c5bdba8b39fc877b41dea00fa756f9","is_default":0,"created_at":1684342262},"6426539e-4e43-4fef-ab5a-3eb7b2a8b057":{"title":"Eikra","condition":"eikra","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/eikra\/assets\/js\/","EikraObj"],"icon_url":"","type":"theme","id":"theme:55d2581ad975eb6325bc97fc3d3b0cb8","is_default":0,"created_at":1679738450},"59020bd6-069f-4f2d-afa2-fbdefa03211c":{"title":"Ekko","condition":"ekko","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ekko\/"],"icon_url":"","type":"theme","id":"theme:2c06f4a1949f8ba4e77042a47674fd9e","is_default":0,"created_at":1679737803},"d82f5cdd-c5d3-4596-94dc-1e25aaff2083":{"title":"Elessi","condition":"elessi-theme","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/elessi-theme\/assets\/js\/min\/functions.min.js","\/elessi-theme\/assets\/js\/min\/main.min.js"],"icon_url":"","type":"theme","id":"theme:d5d2b7fda7b8a2b5b91d430f7602e230","is_default":0,"created_at":1679737773},"f0587c21-54d0-429d-8efe-18a93dacb18d":{"id":"theme:5fc04cc678cb54567aedb51027933002","title":"Enfold","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/dynamic_avia\/avia-footer-scripts-(.*).js","var avia_is_mobile"],"is_default":0,"condition":"enfold","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"cc0550cb-918e-419d-b4f2-1809cf666dbb":{"id":"theme:eb759a03d0ca292c948f09d004a2963f","title":"Enfold - LayerSlider","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","layerslider"],"is_default":0,"condition":"enfold","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"ec883654-4f63-4fae-a3ef-923dcbc2426d":{"title":"Enfold - Shortcodes","condition":"enfold","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/enfold\/js\/avia.js","\/enfold\/js\/shortcodes.js","\/enfold\/config-templatebuilder\/avia-shortcodes\/","\/enfold\/js\/avia-compat.js","\/enfold\/js\/waypoints\/waypoints.min.js","\/enfold\/js\/avia-snippet-(.*).js"],"icon_url":"","type":"theme","id":"theme:072fc4077d7071791d774d6ddbf5dc2a","is_default":0,"created_at":1684519716},"fe3546f0-be3e-4173-8992-a7f6f203b82f":{"title":"Envision","condition":"envision","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/envision\/lib\/js\/app.min.js","var CloudFwOp"],"is_default":1,"icon_url":"","type":"theme","id":"theme:fc5f7d69b646ed95835badc0fc23bc11","created_at":1679737494},"d997b942-19de-4710-9c81-79d3c65cbd76":{"id":"theme:047f009f2a1f4cdf2088c46be47e385b","title":"Ewebot","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/gt3-themes-core\/","\/uploads\/gt3-assets\/js\/(.*)","\/wp-includes\/js\/imagesloaded.min.js"],"is_default":0,"condition":"ewebot","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"53d29aec-8ae4-4273-b748-f5bd52dfe177":{"title":"Farvis","condition":"farvis","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/farvis\/"],"icon_url":"","type":"theme","id":"theme:26bff2f3a6ff6347d35edf5c77a35687","is_default":0,"created_at":1679737972},"fb01246b-a5f8-4021-b514-c02cf55e80bd":{"title":"Flatsome","condition":"flatsome","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/flatsome\/assets\/js\/flatsome.js","\/flatsome\/assets\/libs\/packery.pkgd.min.js","\/flatsome\/assets\/js\/woocommerce.js"],"icon_url":"","type":"theme","id":"theme:26fb1cf80f074ca199d8a7e94c5fc796","is_default":0,"created_at":1679738732},"4d65dc12-9ce7-4171-94a7-9821fd95240e":{"id":"theme:28a6f8b3319c107a34603be0f01a4bcf","title":"Flatsome - Google map","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","maps.googleapis.com","google.maps.LatLng","\/wp-includes\/js\/hoverIntent.min.js"],"is_default":0,"condition":"flatsome","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"890e15b6-c66b-4a9e-9b7d-55417df94916":{"title":"Flatsome - Images","condition":"flatsome","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/flatsome\/inc\/integrations\/wp-rocket\/flatsome-wp-rocket.js","\/flatsome\/assets\/js\/flatsome.js","\/flatsome\/inc\/extensions\/flatsome-lazy-load\/flatsome-lazy-load.js"],"icon_url":"","type":"theme","id":"theme:f2d60aad9f2f5395e3e145cf8f8ab165","is_default":0,"created_at":1679737691},"cb54d070-8ee0-4c35-9fa9-b2bac73ccf39":{"title":"Frida","condition":"frida","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/frida\/"],"icon_url":"","type":"theme","id":"theme:109ddf56796a5133e12279f3daa5ff62","is_default":0,"created_at":1679738013},"9e78539a-03d9-442b-ab94-dd3b7a9658e4":{"id":"theme:80a330247d61d729fcd78dc01de6ed2f","title":"GeneratePress - Mobile menu","type":"theme","icon":"","exclusions":["\/generatepress\/assets\/js\/menu.min.js","generatepressMenu","\/gp-premium\/menu-plus\/functions\/js\/offside.min.js"],"is_default":0,"condition":"generatepress","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"6373bbb2-877c-4075-b6e4-7c58d686b25c":{"title":"HealthFirst - Prevent console errors","condition":"healthfirst","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/wp-includes\/js\/hoverIntent.min.js","\/wp-content\/plugins\/healthfirst-core\/assets\/js\/healthfirst-core.min.js","\/wp-content\/plugins\/healthfirst-core\/assets\/plugins\/modernizr\/modernizr.js","\/wp-content\/plugins\/healthfirst-core\/assets\/plugins\/perfect-scrollbar\/perfect-scrollbar.jquery.min.js","\/wp-content\/themes\/healthfirst\/assets\/js\/main.min.js","\/wp-content\/themes\/healthfirst\/assets\/plugins\/waitforimages\/jquery.waitforimages.js"],"icon_url":"","type":"theme","id":"theme:d244b3c692f8d023048207dbe9eb84da","is_default":0,"created_at":1699370973},"2c72e7e6-cb77-44e9-af87-d5c42ae6db52":{"title":"Honor - WPBakery fix","condition":"honor","exclusions":["\/honor\/js\/__scripts.js","HONOR_STORAGE","\/js_composer\/"],"icon_url":"","type":"theme","id":"theme:9f228373ff4d172655dbf5cb3b1bc23a","is_default":0,"created_at":1679736895},"9309d1d3-1035-4a2c-8ced-075bc3ff9957":{"title":"HotelMaster","condition":"hotelmaster","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/hotelmaster\/javascript\/gdlr-script.js","\/hotelmaster\/plugins\/dl-menu\/modernizr.custom.js","\/hotelmaster\/plugins\/dl-menu\/jquery.dlmenu.js","\/hotelmaster\/plugins\/superfish\/js\/superfish.js","\/hotelmaster\/plugins\/jquery.easing.js"],"icon_url":"","type":"theme","id":"theme:978eaddad3b1047e479407b6d92197aa","is_default":0,"created_at":1679738595},"4a09f745-cbb1-47c8-b50a-c8014d5d1335":{"id":"theme:e813a548bceac6765a1cdf2316f1a6ab","title":"HotelMaster - Blog","type":"theme","icon":"","exclusions":["\/wp-includes\/js\/masonry.min.js","\/gp-premium\/blog\/functions\/js\/scripts.min.js","\/wp-includes\/js\/imagesloaded.min.js"],"is_default":0,"condition":"hotelmaster","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"f2d8f704-ec68-4278-9ca2-885daa0c1ce5":{"id":"theme:398a264e302e42640553681e8759cd07","title":"HotelMaster - Masonry","type":"theme","icon":"","exclusions":["\/gp-premium\/menu-plus\/functions\/js\/offside.min.js","offSide"],"is_default":0,"condition":"hotelmaster","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"92b2e258-1f44-41c1-b1bd-f117f61ee49d":{"title":"Jannah Theme - Fix masonry grid","condition":"jannah","exclusions":["\/wp-includes\/js\/jquery\/jquery.min.js","\/wp-includes\/js\/masonry.min.js","\/wp-includes\/js\/jquery\/jquery.masonry.min.js","tie-"],"icon_url":"","type":"theme","id":"theme:35f7f183089309f52046377ca65e905a","is_default":0,"created_at":1699642920},"df52436c-53d6-461a-b81a-cd0b21680524":{"title":"JNews","condition":"jnews","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/jnews\/assets\/js\/","jnews","jfla"],"icon_url":"","type":"theme","id":"theme:5d90e451984f9d894b1aabb0d00f30a2","is_default":0,"created_at":1679738860},"87ed69a2-3295-4fad-a82e-eeb02925a5dc":{"title":"Jobify","condition":"jobify","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jobify\/js\/jobify.min.js","\/jobify\/js\/select2.full.min.js"],"icon_url":"","type":"theme","id":"theme:592006aa4562a6915e344e5e2a09e5ee","is_default":0,"created_at":1704735224},"28a0b1ea-8d2f-4931-a48a-166b8df8a773":{"title":"JOYN","condition":"joyn","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/swift-framework\/includes\/page-builder\/frontend-assets\/js\/lib\/modernizr-custom.js","\/swift-framework\/includes\/page-builder\/frontend-assets\/js\/spb-functions.min.js","\/swift-framework\/includes\/swift-slider\/assets\/js\/swift-slider.min.js","\/swift-framework\/public\/js\/lib\/imagesloaded.pkgd.min.js","\/joyn\/js\/owl.carousel.min.js","\/joyn\/js\/theme-scripts.js","\/joyn\/js\/functions.js"],"icon_url":"","type":"theme","id":"theme:c395470ad2d4d681836cd942bbb03120","is_default":0,"created_at":1679738527},"542be60a-2346-4740-9a41-8a580c4f013c":{"title":"Juno Toys","condition":"junotoys","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate.min.js","\/junotoys\/fw\/js\/core.init.js","\/junotoys\/fw\/js\/core.utils.js","\/junotoys\/fw\/js\/superfish.js","\/junotoys\/fw\/js\/swiper\/swiper.js","\/trx_utils\/shortcodes\/theme.shortcodes.js","\/wp-includes\/js\/jquery\/ui\/(.*)"],"icon_url":"","type":"theme","id":"theme:2acab38e8356d36355bb81d931e7fba4","is_default":0,"created_at":1679737788},"06167710-10c7-446e-a08b-ce676e444102":{"title":"Jupiter","condition":"jupiter","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jupiter\/","\/wp-includes\/js\/underscore.min.js","WebFont.load"],"icon_url":"","type":"theme","id":"theme:89c5c30498c2989611f9044be006197c","is_default":0,"created_at":1679738430},"5d042e1f-7e62-4ec4-ba31-30d396004522":{"title":"JupiterX","condition":"jupiterx","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jupiterx\/(.*).js","\/wp-includes\/js\/underscore.min.js","WebFont.load"],"icon_url":"","type":"theme","id":"theme:b06632962a4948d4944fd8d79ffbfceb","is_default":0,"created_at":1679737312},"c4b030ea-66a1-4729-85bf-a484e373a316":{"title":"Kadence","condition":"kadence","exclusions":["\/kadence\/assets\/js\/navigation.min.js","mobile_menu_breakpoint","kadenceConfig"],"icon_url":"","type":"theme","id":"theme:4b7907ee68218db279648da9bf7102d1","is_default":0,"created_at":1704735260},"20c605b4-3e3a-4bb0-a5e5-a08e2cb0f31f":{"title":"Kalium","condition":"kalium","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/kalium\/assets\/js\/main.min.js","mobile_menu_breakpoint","var _k"],"icon_url":"","type":"theme","id":"theme:1fcb99a1ab06e1e36635365ed3e59ce5","is_default":0,"created_at":1679737406},"e1e04a7d-635a-4e28-83d9-e345ce40e354":{"title":"Kava","condition":"kava","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/kava\/assets\/js\/theme-script.js"],"icon_url":"","type":"theme","id":"theme:359d67efbf530c998245225dd3245a88","is_default":0,"created_at":1679738609},"e833c36e-ee89-4924-b608-3f28327c2f85":{"title":"Lay","condition":"lay","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/backbone.min.js","\/wp-includes\/js\/underscore.min.js","\/lay\/","\/laytheme-carousel\/","window.laytheme"],"icon_url":"","type":"theme","id":"theme:7c718c6da874ea6e4b27c6d70bc4e7e8","is_default":0,"created_at":1679737453},"2df2ef47-a833-4711-ba54-48dc62586f37":{"id":"theme:85d9922ac61ed833fd047a67029df8e5","title":"LazaNews","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/jquery.custom.js"],"is_default":0,"condition":"lazanews","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"9443304a-34e9-4700-a03a-5f8f62f83ed1":{"title":"Listeo","condition":"listeo","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/listeo\/js\/"],"icon_url":"","type":"theme","id":"theme:db7da585545001f5ae614a2810f08f3a","is_default":0,"created_at":1679737244},"77afa73c-c4a8-42a8-aaee-43f6a761364e":{"title":"ListingPro","condition":"listingpro","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/listingpro\/assets\/lib\/jquerym.menu\/js\/jquery.mmenu.min.all.js","\/listingpro\/assets\/lib\/Magnific-Popup-master\/jquery.magnific-popup.min.js","\/listingpro\/assets\/js\/select2.full.min.js","\/listingpro\/assets\/js\/jquery.city-autocomplete.js","\/listingpro\/assets\/js\/chosen.jquery.min.js","\/listingpro\/assets\/lib\/bootstrap\/js\/bootstrap-slider.js","\/listingpro\/assets\/js\/jquery-ui.js","\/listingpro\/assets\/js\/mapbox.js","\/listingpro\/assets\/js\/main.js","\/listingpro\/assets\/js\/leaflet.markercluster.js","maps"],"icon_url":"","type":"theme","id":"theme:0b365e43dfc65d2b1b70fac6510c7c9c","is_default":0,"created_at":1679737938},"01b369b5-b578-4314-8e95-40b67a41d75a":{"title":"Master Study","condition":"masterstudy","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/masterstudy\/assets\/js\/custom.js","\/masterstudy\/assets\/vendors\/jquery.fancybox.min.js","\/masterstudy\/assets\/js\/select2.full.min.js"],"icon_url":"","type":"theme","id":"theme:0ee224c20e4ef7d546733d933db598f2","is_default":0,"created_at":1704735299},"6b000cc7-d33b-4109-9c39-6119a5d81cde":{"title":"Maya","condition":"maya","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/maya\/js\/jquery.mobilemenu.js","\/maya\/js\/jquery.custom.js","\/maya\/core\/includes\/js\/jquery.tipsy.js"],"icon_url":"","type":"theme","id":"theme:719fe28004fcdd81a820602924aa8074","is_default":0,"created_at":1679737916},"ef3c76d6-1041-473d-81ea-a5a6e8c86735":{"title":"MH Magazine","condition":"mh-magazine","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/mh-magazine\/"],"icon_url":"","type":"theme","id":"theme:2a0cd6efc2f46be69de61712729a2ec9","is_default":0,"created_at":1679737743},"9cbb2777-5524-43b8-af36-692b27452c0d":{"title":"Minimog","condition":"minimog","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/minimog\/"],"icon_url":"","type":"theme","id":"theme:61c0c235042359ee7d2a9035e79a7da2","is_default":0,"created_at":1679738135},"7eb81c74-8062-4a6c-bf66-b7c5bc160141":{"title":"Moozo Elementor","condition":"moozo-elementor","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/moozo-elementor\/assets\/js\/countdown.js","\/moozo-elementor\/assets\/vendor\/countdown\/countdown.min.js"],"icon_url":"","type":"theme","id":"theme:2ddb538c8e6b6c766fffd0d5c861fd82","is_default":0,"created_at":1679738623},"e90b7bfa-9ff6-4e1a-bf29-6207d55fdd39":{"title":"Motor","condition":"motor","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/motor\/js\/"],"icon_url":"","type":"theme","id":"theme:b33538179f5661a86cbe327a1793e199","is_default":0,"created_at":1683973354},"445e625a-f955-41fa-84de-65d9ea19be07":{"title":"My Listing","condition":"my-listing","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/my-listing\/assets\/","\/wp-includes\/js\/dist\/vendor\/moment.min.js","maps.googleapis.com","MyListing","_Explore_Settings"],"icon_url":"","type":"theme","id":"theme:afacb777229ddf5cabceacc64948057d","is_default":0,"created_at":1679737725},"00b8cd2d-2781-4fbb-ac5d-00750ba94ac9":{"title":"Neve - Mobile menu","condition":"neve","exclusions":["\/neve\/assets\/js\/build\/modern\/frontend.js"],"icon_url":"","type":"theme","id":"theme:5ae731cc06dd9284f8172675a6fe81ab","is_default":0,"created_at":1679738714},"483abc54-f1fc-47dc-bfc1-a269c7d1c849":{"title":"Newspaper - Images","condition":"Newspaper","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","tagdiv_theme.min.js","tdBlocksArray","\/wp-includes\/js\/underscore.min.js","\/td-cloud-library\/assets\/js\/","\/npm\/slick-carousel@1.8.1\/slick\/slick.min.js","tdb-gallery-wrap","tdBlocksArray","tdb_"],"icon_url":"","type":"theme","id":"theme:649ff22527bac2b1c8e0115cd3851d53","is_default":0,"created_at":1695805761},"50db8d14-d421-4237-be14-a6f7b5c11ec5":{"title":"Newspaper - Slider & YouTube","condition":"Newspaper","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","tagdiv_theme.min.js","tdBlocksArray","tdb_globals","td_youtube_list_ids","iosSlider","\/td-cloud-library\/assets\/js\/js_files_for_front.min.js","\/wp-includes\/js\/underscore.min.js","\/td-cloud-library\/assets\/js\/","\/npm\/slick-carousel@1.8.1\/slick\/slick.min.js","tdb-gallery-wrap","tdBlocksArray","tdb_"],"icon_url":"","type":"theme","id":"theme:7e2eeee57ae458c5959342eda6526bf1","is_default":0,"created_at":1695805747},"514f4c30-2b67-4648-960e-dfe1cc401ca5":{"title":"Niva","condition":"niva","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/niva\/js\/","\/sweetthemes-framework\/js\/","mt_typed"],"icon_url":"","type":"theme","id":"theme:c4838f73a344b829ed626635e210dcf4","is_default":0,"created_at":1679738256},"e67ee504-c3b1-455e-88ab-1fae8c830652":{"title":"OceanWP","condition":"oceanwp","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/oceanwp\/"],"icon_url":"","type":"theme","id":"theme:db37af4b7d12695d37d9256313a5f37a","is_default":0,"created_at":1679737552},"e44e240a-8765-4f4f-b67e-d54e4b727506":{"title":"OceanWP - Mobile menu","condition":"oceanwp","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/ocean-side-panel\/assets\/js\/side-panel.min.js","\/oceanwp\/assets\/js\/theme.vanilla.min.js"],"icon_url":"","type":"theme","id":"theme:9babbcd52b2ce558d299a06cd1130a11","is_default":0,"created_at":1679738463},"897b0100-958d-4a02-b6b2-1e753e9869f4":{"title":"PenNews","condition":"pennews","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/pennews\/js\/script.min.js","\/pennews\/js\/script.lib.min.js"],"icon_url":"","type":"theme","id":"theme:02811fa00bc1471bb5be0457ce0ee005","is_default":0,"created_at":1704735339},"edd3ba03-e0fd-4b6e-911b-60b29f3471bf":{"title":"Pharmacy Mentor","condition":"pharmacymentor","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/pharmacymentor\/"],"icon_url":"","type":"theme","id":"theme:3188aaf1ef2c39937450f2a14ebb1174","is_default":0,"created_at":1679738214},"725415ff-cc76-45cc-a131-3170e5aa30fc":{"title":"Porto","condition":"porto","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/jquery\/ui\/","\/porto\/js\/theme.js","\/porto\/js\/theme.min.js"],"icon_url":"","type":"theme","id":"theme:8493f398f200c8dffe60d46439dd3360","is_default":0,"created_at":1679737758},"2c19bcec-f3ff-4873-bfd7-db6bc0f6433c":{"title":"Porto - Owl Carousel","condition":"porto","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/wp-includes\/js\/jquery\/ui\/","\/porto\/js\/theme(|.min).js","\/porto\/js\/libs\/owl.carousel(|.min).js","\/porto\/js\/theme-async(|.min).js","\/prettyPhoto\/jquery.prettyPhoto(|.min).js"],"icon_url":"","type":"theme","id":"theme:f34f5199fb7fca78852cd3fb7758f178","is_default":0,"created_at":1687527252},"5b11ec89-1cb2-4793-8b77-79e917e810a0":{"title":"Pro Theme - Fix menu and accordions","condition":"pro","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/pro\/cornerstone\/assets\/js\/site\/cs-classic.(.*).js"],"icon_url":"","type":"theme","id":"theme:8f30d70dd2d9a0386445aef8fdd534a9","is_default":0,"created_at":1708100602},"31347ccb-f69e-4cd3-bd47-b80ce14ac76e":{"title":"ProPhoto","condition":"prophoto7","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/prophoto7\/js\/bundle.front.js","\/wp-includes\/js\/underscore.min.js","PROPHOTO"],"icon_url":"","type":"theme","id":"theme:a5836a56c4472fade4dc6ebfe2281554","is_default":0,"created_at":1679737425},"a8208c04-865c-49aa-ab96-41e378d391c8":{"title":"Publisher","condition":"publisher","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","\/publisher\/js\/"],"icon_url":"","type":"theme","id":"theme:32c73be0cb175da278c8e2af0811b0d1","is_default":0,"created_at":1679738169},"a0d69f3d-1356-4a1d-a600-2f2f788b8a9a":{"title":"REHub","condition":"rehub-theme","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/rehub-theme\/js\/custom_floatpanel.js"],"icon_url":"","type":"theme","id":"theme:321af1febb74f488cf911380893739b2","is_default":0,"created_at":1679738502},"8b74bbe5-7f32-42df-908f-78c99a8cad82":{"title":"Rey","condition":"rey","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/rey\/scripts-(.*).js","\/rey-core\/assets\/js\/"],"icon_url":"","type":"theme","id":"theme:e46567cd0f3ec9b37e7230dc87eac367","is_default":0,"created_at":1679737011},"5c9115d3-bcbd-49d6-8feb-4880d2b82bfe":{"title":"Rife Free","condition":"rife-free","exclusions":["\/rife-free\/js\/script.min.js","\/rife-free\/js\/isotope.pkgd.min.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","var reJS"],"icon_url":"","type":"theme","id":"theme:74a449954de79625eccc6750e87af8f6","is_default":0,"created_at":1679738107},"6542b2fd-1f91-4862-aa18-11eecc02faaf":{"title":"Roisin","condition":"roisin","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/themes\/roisin\/assets\/js\/main.min.js","\/plugins\/roisin-core\/assets\/js\/roisin-core.min.js","\/wp-includes\/js\/hoverIntent.min.js"],"icon_url":"","type":"theme","id":"theme:8f38fe58034772931110930b91cb6797","is_default":0,"created_at":1685964523},"5a192ad9-d150-4aa0-8efc-d68131cb7a37":{"title":"Sahifa - Mobile Menu","condition":"sahifa","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/themes\/sahifa\/js\/ilightbox.packed.js","\/translate_a\/element.js"],"icon_url":"","type":"theme","id":"theme:06ebe49f4c1e5b04cece831f8bb198a3","is_default":0,"created_at":1687540363},"7ae9d978-d63c-4a58-beb3-418bebb5b23c":{"title":"Salient","condition":"salient","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/salient\/","winW > bodyW"],"icon_url":"","type":"theme","id":"theme:b3e12d57ac23897be1bb2c673e3fc761","is_default":0,"created_at":1704735382},"35aaa6c5-4a37-4161-b504-fb3ebc4b1148":{"title":"Salient - Nectar slider","condition":"salient","exclusions":["\/salient-nectar-slider\/js\/nectar-slider.js","\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js"],"icon_url":"","type":"theme","id":"theme:d612db1dd8dc76faa6a36a9ebfd336dc","is_default":0,"created_at":1704735415},"84c95206-3e59-4eb3-a0c9-e2231a1c0a48":{"title":"SEO Lounge","condition":"seolounge","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?$","\/js_composer\/assets\/js\/dist\/js_composer_front.min.js","\/seolounge\/js\/radiantthemes-custom.js","\/seolounge\/js\/radiantthemes-core.min.js"],"icon_url":"","type":"theme","id":"theme:3d72b779d9c4ba6b51cc5b245b141433","is_default":0,"created_at":1691695809},"cd44aa56-088a-40dd-bf1e-f835efa68626":{"title":"Shoptimizer","condition":"shoptimizer","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/shoptimizer\/assets\/js\/lazyload-bg.js","\/shoptimizer\/assets\/js\/main.min.js"],"icon_url":"","type":"theme","id":"theme:6c32b43f4da639e5901574fac6b7d387","is_default":0,"created_at":1679737143},"d2c48a48-430a-4eea-bc05-99b66f1f6a7b":{"title":"SmartMag","condition":"smart-mag","exclusions":["\/smart-mag\/js\/lazyload.js"],"icon_url":"","type":"theme","id":"theme:23d6b7878bd0087addb067db3fa39864","is_default":0,"created_at":1679738490},"dd0d9133-ef17-4dac-b174-9f25d535838f":{"title":"Soledad","condition":"soledad","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/soledad\/js\/main.js","\/soledad\/js\/more-post.js","\/soledad\/js\/libs-script.min.js"],"icon_url":"","type":"theme","id":"theme:d3f78b26c2d11c99230171cc6378d06e","is_default":0,"created_at":1679737664},"3b85dd6e-9534-477e-9b15-940d0e155c8d":{"title":"Spacious - Mobile Menu","condition":"spacious","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/spacious\/js\/navigation.js"],"icon_url":"","type":"theme","id":"theme:d423c1f002b10b8682ee24d616b19c9c","is_default":0,"created_at":1703192854},"d657dc56-5c04-439a-8987-401f89a65bf9":{"title":"Stockholm","condition":"stockholm","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/stockholm\/js\/"],"icon_url":"","type":"theme","id":"theme:fcfff492e00727b63cf5dff9f59bc2a4","is_default":0,"created_at":1679738378},"121f9b1b-d3cd-4dde-915e-0b348abf6687":{"title":"Storefront","condition":"storefront","exclusions":["\/storefront\/assets\/js\/navigation.min.js"],"icon_url":"","type":"theme","id":"theme:f0dca7e4eaedf573d4664be249845942","is_default":0,"created_at":1679738793},"41cfc83f-ff02-4a35-a3b7-e92db213b224":{"title":"StreamTube","condition":"streamtube","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/streamtube\/","\/streamtube-core\/"],"icon_url":"","type":"theme","id":"theme:9772ccddd470688f6bc6aee86e34d29b","is_default":0,"created_at":1679331431},"aec0a548-4c6b-400a-80ed-19a49e0faef0":{"title":"The7","condition":"dt-the7","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/wp-includes\/js\/jquery\/jquery-migrate.min.js","loader-removed","\/Ultimate_VC_Addons\/assets\/min-js\/","\/dt-the7\/","\/js_composer\/"],"icon_url":"","type":"theme","id":"theme:7934c689fd20e30b6bfc69bb9d46cb63","is_default":0,"created_at":1679737892},"538354ff-d69f-40be-b0cc-df3790599dd2":{"title":"TheGem","condition":"thegem","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/thegem\/js\/","gemSettings","thegemSlideshow","tgpLazyItemsOptions"],"icon_url":"","type":"theme","id":"theme:153c54fe73897da838ce39152b1db5a8","is_default":0,"created_at":1679738477},"84d95a79-270c-4223-b459-bb49c6acfaf1":{"title":"Theme Electiman - Mobile Menu","condition":"electiman","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/themes\/electiman\/assets\/js\/navigation.js","\/themes\/electiman\/assets\/js\/theme-pluginjs.js","\/themes\/electiman\/assets\/js\/theme.js","\/themes\/electiman\/assets\/js\/slick.min.js","\/themes\/electiman\/venobox\/venobox.min.js","\/themes\/electiman\/assets\/js\/owl.carousel.min.js","\/wp-includes\/js\/imagesloaded.min.js"],"icon_url":"","type":"theme","id":"theme:a59c888391c869ed4f3417c02d71fe15","is_default":0,"created_at":1702923332},"68f2de3b-e2b8-4edf-b82f-93fd7834c65f":{"title":"Total","condition":"Total","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/Total\/assets\/js\/total.min.js"],"icon_url":"","type":"theme","id":"theme:96b0141273eabab320119c467cdcaf17","is_default":0,"created_at":1679737571},"6dc1cb35-6b50-4da0-9834-dddf169edaa6":{"id":"theme:7c37c885d7fecf788f635734f99e8610","title":"Townhub","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/townhub-add-ons\/assets\/js\/(.*)","\/wp-includes\/js\/dist\/vendor\/react.js","\/wp-includes\/js\/dist\/vendor\/react-dom.js"],"is_default":0,"condition":"townhub","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f484f86b-e316-4871-9322-dee3925349fe":{"title":"Travel Monster - Owl Carousel","condition":"travel-monster","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/wp-content\/plugins\/wp-travel-engine\/assets\/lib\/owl-carousel(.*)\/owl.carousel(|.min).js","var isRtl"],"icon_url":"","type":"theme","id":"theme:d3e8da87b3affd399205438fbc8a4f05","is_default":0,"created_at":1690822771},"3ec96c3f-a6bf-4748-9b7e-78864bd24add":{"title":"uDesign - Mobile Menu","condition":"u-design","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/wp-content\/themes\/u-design\/assets\/js\/theme.min.js","\/wp-content\/themes\/u-design\/framework\/assets\/js\/framework.min.js","\/wp-content\/themes\/u-design\/framework\/assets\/js\/framework-async.min.js"],"icon_url":"","type":"theme","id":"theme:31ce70b0a02f8720a86d993816676943","is_default":0,"created_at":1699292981},"cb523239-27cc-461e-973d-c984a83223ac":{"title":"uDesign - Show Page Content on Load","condition":"u-design","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>|$)","\/wp-content\/themes\/u-design\/assets\/js\/theme.min.js","\/wp-content\/themes\/u-design\/framework\/assets\/js\/framework.min.js"],"icon_url":"","type":"theme","id":"theme:c55edd40ad3f9321da577dad70bb130c","is_default":0,"created_at":1698778683},"14cb0a85-8bee-491e-99d7-5f20a07f4bdd":{"title":"Uncode","condition":"uncode","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/uncode\/library\/js\/init(.min)?.js","\/uncode\/library\/js\/plugins(.min)?.js","\/uncode\/library\/js\/app(.min)?.js","\/uncode\/library\/js\/woocommerce-uncode(.min)?.js","\/wp-includes\/js\/mediaelement\/mediaelement-and-player.min.js","initHeader","initBox","fixMenuHeight","initRow"],"icon_url":"","type":"theme","id":"theme:18ba19b98aefbb6c0fde6c6bf92e9cfc","is_default":0,"created_at":1679738154},"a1fbf155-720a-4704-9794-d6749ad6df59":{"title":"Vivo theme - Fix blank page","condition":"vivo","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/vivo\/framework\/assets\/js\/bt_framework_misc.js"],"icon_url":"","type":"theme","id":"theme:a140e640fed504586e24e7c0df30376b","is_default":0,"created_at":1704308662},"88e96479-1aa2-4adc-8f07-20bc0368a63f":{"title":"Werkstatt","condition":"werkstatt","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/js\/underscore.min.js","\/werkstatt\/assets\/js\/vendor.min.js","\/werkstatt\/assets\/js\/fullscreen.min.js","\/werkstatt\/assets\/js\/app.min.js"],"icon_url":"","type":"theme","id":"theme:38faa29db5a07b8fef6aee9cc11cafec","is_default":0,"created_at":1679737639},"60c4110b-a960-4d44-b619-6d79514dbf75":{"title":"Woodmart","condition":"woodmart","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/wp-includes\/js\/imagesloaded.min.js","\/woodmart\/js\/scripts\/wc\/","\/woodmart\/js\/scripts\/global\/","\/woodmart\/js\/libs\/owl.carousel.min.js","\/woodmart\/js\/libs\/owl.carousel.js","\/woodmart\/js\/libs\/slick.js","\/woodmart\/js\/libs\/autocomplete.min.js"],"icon_url":"","type":"theme","id":"theme:06338f13cb89e5309ad2eb7e4d457be4","is_default":0,"created_at":1695633901},"a4547b5b-10ab-407c-969c-269fddec07b8":{"title":"Woodmart - Cart Fragments","condition":"woodmart","exclusions":["\\\/jquery(-migrate)?-?([0-9.]+)?(.min|.slim|.slim.min)?.js(\\?(.*))?( |'|\"|>)","\/woocommerce\/assets\/js\/frontend\/cart-fragments.min.js","\/woocommerce\/assets\/js\/js-cookie\/js.cookie.min.js","\/woodmart\/js\/scripts\/wc\/updateCartFragmentsFix.js"],"icon_url":"","type":"theme","id":"theme:591f4f1b2e86b1e987cd8789df3ffce3","is_default":0,"created_at":1700584689},"119ebd1c-6b46-4f07-8d6a-3498d9c8814f":{"title":"XStore","condition":"xstore","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/xstore\/js\/","\/et-core-plugin\/packages\/st-woo-swatches\/public\/js\/frontend.min.js"],"icon_url":"","type":"theme","id":"theme:3de9d9ba385200548f177d9c704ae92a","is_default":0,"created_at":1679738190},"9a7a548c-07a1-4dff-93fc-6e8230b67853":{"id":"theme:119d329456073aa10969d7cbd9760f28","title":"YOOtheme Pro","type":"theme","icon":"","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","uikit.min.js"],"is_default":0,"condition":"yootheme","created_at":1676435704,"updated_at":"2023-02-15T04:32:17.000000Z","icon_url":""},"f74c499e-b7d9-4590-8671-379f51f468c8":{"title":"Zeen","condition":"zeen","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","\/zeen\/assets\/js\/","\/js.cookie.min.js"],"icon_url":"","type":"theme","id":"theme:acb52844f996627788836366404a3245","is_default":0,"created_at":1679737859}},"scripts":{"dd0c5a5b-ec56-49f9-9aa4-89e1e3a6a28a":{"title":"Amazon Ads","exclusions":["amazon-adsystem.com"],"icon_url":"","type":"script","id":"script:b82a5936d8ea0745016caeb71629ae5d","is_default":0,"created_at":1681390276},"980edf32-c64b-4370-bf23-c62b079e71c3":{"title":"Google AdSense","exclusions":["adsbygoogle"],"icon_url":"","type":"script","id":"script:0206e6040c8ff64b8d6ee5fef2ce1c90","is_default":0,"created_at":1681377840},"2499bb90-0753-4b2b-9bd4-1525f94c7437":{"title":"Google Analytics","exclusions":["google-analytics.com\/analytics.js","ga\\( '","ga\\('"],"icon_url":"","type":"script","id":"script:d86cf69a8b82547a94ca3f6a307cf9a6","is_default":0,"created_at":1681388311},"6f460036-3106-4b8c-9951-d32de9b1258f":{"title":"Google Maps","exclusions":["maps.googleapis.com","maps.google.com"],"icon_url":"","type":"script","id":"script:4d60ab2c6d11d753267484006c23e54c","is_default":0,"created_at":1681390259},"ac2d5720-9418-468c-80a0-3874ee743c0f":{"title":"Google Optimize","exclusions":["a,s,y,n,c,h,i,d,e","googleoptimize.com\/optimize.js","async-hide"],"icon_url":"","type":"script","id":"script:031a0cece38c4739df67f910dcabf1bd","is_default":0,"created_at":1681390261},"122e6ebb-51fd-477f-97fb-559593f1a48b":{"title":"Google Recaptcha","exclusions":["recaptcha"],"icon_url":"","type":"script","id":"script:032cb16577cbf07bc7c02bac83bd936d","is_default":0,"created_at":1681390264},"219277ae-b2ac-4d42-913d-eaea40985295":{"title":"Google Tag Manager","exclusions":["\/gtag\/js","gtag\\(","\/gtm.js","async-hide"],"icon_url":"","type":"script","id":"script:1d3c65b2b03ef35e14df6b163ea3a1f6","is_default":0,"created_at":1681390266},"f632e3f4-20e6-471e-a78d-86afbea63586":{"title":"HubSpot","exclusions":["\/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js","\/jquery-migrate(.min)?.js","js.hsforms.net","hbspt.forms.create"],"icon_url":"","type":"script","id":"script:de4bd8ef4675ebb85a055955de76d0ee","is_default":0,"created_at":1679331623},"5d606add-ffb8-4a06-b295-5f722710fbfd":{"title":"Refari","exclusions":["widget.refari.co","refari"],"icon_url":"","type":"script","id":"script:a705e197b13b47e72a105c923e044358","is_default":0,"created_at":1683797056},"742ec14a-27a1-4789-b9c8-a9c3a3cf7042":{"title":"Reviews.io","exclusions":["\/carousel-inline-iframeless\/dist.js","carouselInlineWidget"],"icon_url":"","type":"script","id":"script:4df445c576f45889506ba175a4c39fdc","is_default":0,"created_at":1684389426},"05d3eb78-f574-49be-95e1-3f11714005d1":{"id":"script:ce7566d1d08cc094b74cf283cf9c56a5","title":"Stripe","type":"script","icon":"","exclusions":["js.stripe.com"],"is_default":0,"condition":"","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""},"b56bf06c-2f8c-4757-b536-a689fb0e75f9":{"title":"Typekit","exclusions":["typekit"],"icon_url":"","type":"script","id":"script:7815e38b93e3b500a632681bd594bd61","is_default":0,"created_at":1681390268},"49c38c0a-43b9-4237-88cb-57ddd519f0ad":{"title":"Venatus Media","exclusions":["\/ad-manager.min.js","__vm_add"],"icon_url":"","type":"script","id":"script:abe11528732aed9a19a97e73b242faa5","is_default":0,"created_at":1681390272},"2c1d0998-8ab5-478c-8eb9-9e375b46363e":{"title":"Wistia","exclusions":["fast.wistia.com"],"icon_url":"","type":"script","id":"script:9a0111f8c3186c1cb3113587c660c041","is_default":0,"created_at":1681390274},"0627fe24-7e9d-400f-b064-d98bec2ba85e":{"id":"script:dbd1875130c71eb4b2ef768ad18d820c","title":"Yandex Ads","type":"script","icon":"","exclusions":["yandex.ru","window.yaContextCb"],"is_default":0,"condition":"","created_at":1676435704,"updated_at":"2023-02-15T04:32:16.000000Z","icon_url":""}}} diff --git a/dynamic-lists.json b/dynamic-lists.json index 0d259d5d63..d3bd49ea28 100644 --- a/dynamic-lists.json +++ b/dynamic-lists.json @@ -1 +1 @@ -{"rucss_inline_atts_exclusions":["rocket-lazyload-inline-css","divi-style-parent-inline-inline-css","gsf-custom-css","extra-style-inline-inline-css","woodmart-inline-css-inline-css","woodmart_shortcodes-custom-css","rs-plugin-settings-inline-css","divi-style-inline-inline-css","tcb-post-list-dynamic-style","n2-ss-","wpcf7-","siteorigin-panels-layouts-footer","xstore-inline-css-inline-css","assets.reviews.io","ezoicCSS"],"rucss_inline_content_exclusions":[".wp-container-",".wp-elements-","#wpv-expandable-",".custom-content-","#thb-",".et_pb_text_dap_","#gdlr-core-shape-divider","#ultib3-",".uvc-wrap-",".jet-listing-dynamic-post-",".vcex_",".wprm-advanced-list-",".adsslot_",".jnews_",".cp-info-bar.content-","#stockie-custom-","#ohio-custom-",".uid-","#wpfMainWrapper","#penci_","#penci-",".wpbs_s","#apcore_","#apress_","#zolo_",".extended-products-grid#style-",".preloader#style-preloader-",".thegem-heading-",".thegem-button-",".thegem-custom-",".thegem-popup-","#pattern-","#thegem-video-frame-","#thegem-",".qwery_inline_",".dcgd_submit_button",".irs-bar",".gallery-grid-",".cmplz-hidden","#sqbquizouter","#start_sqbquizouter",".flo-header--",".trx_addons_inline_"],"defer_js_inline_exclusions":["DOMContentLoaded","document.write","window.lazyLoadOptions","N.N2_","rev_slider_wrapper","FB3D_CLIENT_LOCALE","ewww_webp_supported","anr_captcha_field_div","renderInvisibleReCaptcha","bookingInProgress"],"defer_js_external_exclusions":["gist.github.com","content.jwplatform.com","js.hsforms.net","www.uplaunch.com","google.com\/recaptcha","widget.reviews.co.uk","verify.authorize.net\/anetseal","lib\/admin\/assets\/lib\/webfont\/webfont.min.js","app.mailerlite.com","widget.reviews.io","simplybook.(.*)\/v2\/widget\/widget.js","\/wp-includes\/js\/dist\/i18n.min.js","\/wp-content\/plugins\/wpfront-notification-bar\/js\/wpfront-notification-bar(.*).js","\/wp-content\/plugins\/oxygen\/component-framework\/vendor\/aos\/aos.js","\/wp-content\/plugins\/ewww-image-optimizer\/includes\/check-webp(.min)?.js","static.mailerlite.com\/data\/(.*).js","cdn.voxpow.com\/static\/libs\/v1\/(.*).js","cdn.voxpow.com\/media\/trackers\/js\/(.*).js","use.typekit.net","www.idxhome.com","\/wp-includes\/js\/dist\/vendor\/lodash(.min)?.js","\/wp-includes\/js\/dist\/api-fetch(.min)?.js","\/wp-includes\/js\/dist\/i18n(.min)?.js","\/wp-includes\/js\/dist\/vendor\/wp-polyfill(.min)?.js","\/wp-includes\/js\/dist\/url(.min)?.js","\/wp-includes\/js\/dist\/hooks(.min)?.js","www.paypal.com\/sdk\/js","js-eu1.hsforms.net","yanovis.Voucher.js","\/carousel-upsells-and-related-product-for-woocommerce\/assets\/js\/glide.min.js","use.typekit.com","\/artale\/modules\/kirki\/assets\/webfont.js","\/api\/scripts\/lb_cs.js","js.hscta.net\/cta\/current.js","widget.refari.co","player.vdocipher.com"],"delay_js_exclusions":["nowprocket","\/wp-includes\/js\/wp-embed.min.js","lazyLoadOptions","lazyLoadThumb","wp-rocket\/assets\/js\/lazyload\/(.*)","et_core_page_resource_fallback","window.\\$us === undefined","js-extra","fusionNavIsCollapsed","\/assets\/js\/smush-lazy-load","eio_lazy_vars","\\\/lazysizes(\\.min|-pre|-post)?\\.js","document\\.body\\.classList\\.remove\\(\"no-js\"\\)","document\\.documentElement\\.className\\.replace\\( 'no-js', 'js' \\)","et_animation_data","wpforms_settings","var nfForms","\/\/stats.wp.com","_stq.push","fluent_form_ff_form_instance_","cpLoadCSS","ninja_column_","var rbs_gallery_","var lepopup_","var billing_additional_field","var gtm4wp","var dataLayer_content","\/ewww-image-optimizer\/includes\/load[_-]webp(\\.min)?.js","\/ewww-image-optimizer\/includes\/check-webp(\\.min)?.js","ewww_webp_supported","\/dist\/js\/browser-redirect\/app.js","\/perfmatters\/js\/lazyload.min.js","lazyLoadInstance","scripts.mediavine.com\/tags\/","initCubePortfolio","simpli.fi","gforms_recaptcha_","\/jetpack-boost\/vendor\/automattic\/jetpack-lazy-images\/(.*)","jetpack-lazy-images-js-enabled","jetpack-boost-critical-css","wpformsRecaptchaCallback","booking-suedtirol-js","wpcp_css_disable_selection","\/gravityforms\/js\/conditional_logic.min.js","statcounter.com\/counter\/counter.js","var sc_project","\/jetpack\/jetpack_vendor\/automattic\/jetpack-lazy-images\/(.*)","\/themify-builder\/themify\/js\/modules\/fallback(\\.min)?.js","handlePixMessage","var corner_video","cdn.pixfuture.com\/hb_v2.js","cdn.pixfuture.com\/pbix.js","served-by.pixfuture.com\/www\/delivery\/ads.js","served-by.pixfuture.com\/www\/delivery\/headerbid_sticky_refresh.js","serv-vdo.pixfuture.com\/vpaid\/ads.js","wprRemoveCPCSS","window.jdgmSettings","\/photonic\/include\/js\/front-end\/nomodule\/photonic-baguettebox.min.js","\/photonic\/include\/ext\/baguettebox\/baguettebox.min.js","window.wsf_form_json_config","et_link_options_data","FuseboxPlayerAPIKey","js.hscta.net\/cta\/current.js","hbspt.cta.load","consent.cookiebot.com\/uc.js","\/woofilter-pro\/woofilterpro\/js\/ion.rangeSlider.min.js","barra.r7.com\/barra.js","rocket_css_lazyload_launch","#wpr-lazyload-bg","\/borlabs-cookie\/assets\/javascript\/","borlabs-cookie-config"],"js_minify_external":["html5.js","show_ads.js","histats.com\/js","ws.amazon.com\/widgets","\/ads\/","intensedebate.com","scripts.chitika.net\/","jotform.com\/","gist.github.com","forms.aweber.com","video.unrulymedia.com","stats.wp.com","stats.wordpress.com","widget.rafflecopter.com","widget-prime.rafflecopter.com","releases.flowplayer.org","c.ad6media.fr","cdn.stickyadstv.com","www.smava.de","contextual.media.net","app.getresponse.com","adserver.reklamstore.com","s0.wp.com","wprp.zemanta.com","files.bannersnack.com","smarticon.geotrust.com","js.gleam.io","ir-na.amazon-adsystem.com","web.ventunotech.com","verify.authorize.net","ads.themoneytizer.com","embed.finanzcheck.de","imagesrv.adition.com","js.juicyads.com","form.jotformeu.com","speakerdeck.com","content.jwplatform.com","ads.investingchannel.com","app.ecwid.com","www.industriejobs.de","s.gravatar.com","googlesyndication.com","a.optmstr.com","a.optmnstr.com","a.opmnstr.com","adthrive.com","mediavine.com","js.hsforms.net","googleadservices.com","f.convertkit.com","recaptcha\/api.js","mailmunch.co","apps.shareaholic.com","dsms0mj1bbhn4.cloudfront.net","nutrifox.com","code.tidio.co","www.uplaunch.com","widget.reviewability.com","embed-cdn.gettyimages.com\/widgets.js","app.mailerlite.com","ck.page","cdn.jsdelivr.net\/gh\/AmauriC\/","static.klaviyo.com\/onsite\/js\/klaviyo.js","a.omappapi.com\/app\/js\/api.min.js","static.zdassets.com","feedbackcompany.com\/widgets\/feedback-company-widget.min.js","widget.gleamjs.io","phonewagon.com","simplybook.asia\/v2\/widget\/widget.js","simplybook.it\/v2\/widget\/widget.js","simplybook.me\/v2\/widget\/widget.js","static.botsrv.com\/website\/js\/widget2.36cf1446.js","static.mailerlite.com\/data\/","cdn.voxpow.com","loader.knack.com","embed.lpcontent.net\/leadboxes\/current\/embed.js","cc.cdn.civiccomputing.com\/9\/cookieControl-9.x.min.js","cse.google.com\/cse.js","kit.fontawesome.com","cdn.jsdelivr.net\/npm\/mathjax@3\/es5\/tex-mml-chtml.js","static.leadpages.net\/leadbars\/current\/embed.js","booqable.com\/v2\/booqable.js","googleoptimize.com","cdna.hubpeople.com\/js\/widget_standalone_two_modes.js","s3.tradingview.com","www.vbt.io\/ext\/vbtforms.js","cdn.callrail.com","documentcloud.adobe.com\/view-sdk\/main.js","static.cleverpush.com","js.afterpay.com","cdn.enable.co.il\/licenses\/enable-","hcaptcha.com\/1\/api.js","voucher.getavo.it\/public\/js\/yanovis.Voucher.js","js-eu1.hsforms.net","statcounter.com\/counter\/counter.js","snapppt.com","use.typekit.com","secure.gravatar.com\/js\/gprofiles.js","cdn.jsdelivr.net\/npm\/hockeystack","widget.prod.faslet.net","ga.getresponse.com\/script\/ga.js","cognitoforms.com","usercentrics.eu","cdn.amcharts.com","umami","cdn.popt.in\/pixel.js","m2d.m2.ai","pubguru.net","trustindex.io","cdnjs.cloudflare.com\/ajax\/libs\/prism\/","podigee-podcast-player.js","tarteaucitron.io\/load.js","osm.klarnaservices.com\/lib.js","mein.clickskeks.at\/app.js","barra.r7.com\/barra.js","widget.refari.co","widget.reviews.co.uk","player.vdocipher.com","www.instagram.com\/embed.js","smartframe.io","challenges.cloudflare.com\/turnstile\/"],"js_move_after_combine":["map_fusion_map_","ec:addProduct","ec:addImpression","clear_better_facebook_comments","vc-row-destroy-equal-heights-","dfd-icon-list-","SFM_template","WLTChangeState","wlt_star_","wlt_pop_distance_","smart_list_tip","gd-wgt-pagi-","data-rf-id=","tvc_po=","scrapeazon","startclock","it_logo_field_owl-box_","td_live_css_uid","wpvl_paramReplace","tdAjaxCount","mec_skin_","_wca","_taboola","fbq('trackCustom'","fbq('track'","data.token","sharrre","dfads_ajax_load_ads","tie_postviews","wmp_update","h5ab-print-article","gform_ajax_frame_","gform_post_render","mts_view_count","act_css_tooltip","window.SLB","wpt_view_count","var dateNow","gallery_product_",".flo-block-slideshow-","data='api-key=ct-","ip_common_function()","(\"style#gsf-custom-css\").append","a3revWCDynamicGallery_","#owl-carousel-instagram-","window.FlowFlowOpts","jQuery('.td_uid_","jQuery(\".slider-","#dfd-vcard-widget-","#sf-instagram-widget-",".woocommerce-tabs-","penci_megamenu__","vc_prepareHoverBox","wp-temp-form-div","_wswebinarsystem_already_","#views-extra-css\").text","fusetag.setTargeting","hit.uptrendsdata.com","callback:window.renderBadge","test_run_nf_conditional_logic","cb_nombre","$('.fl-node-","function($){google_maps_","$(\"#myCarousel","et_animation_data=","current_url=\"","CustomEvent.prototype=window.Event.prototype","electro-wc-product-gallery","woof_is_mobile","jQuery('.videonextup","wpp_params","us.templateDirectoryUri=",".fat-gallery-item",".ratingbox","user_rating.prototype.eraseCookie","test_run_nf_conditional","dpsp-networks-btns-wrapper","pa_woo_product_info","sharing_enabled_on_post_via_metabox","#product-search-field-","GOTMLS_login_offset","berocket_aapf_time_to_fix_products_style","window.vc_googleMapsPointer","sinceID_","#ut-background-video-ut-section","+window.comment_tab_width+","dfd-button-hover-in","wpseo-address-wrapper","platform.stumbleupon.com","#woo_pp_ec_button_mini_cart","#supercarousel","blockClass","tdbMenuItem","tdbSearchItem","best_seller_badge","jQuery('#product-top-bar","fb_desc-","FC_regenerate_captcha","wp_post_blocks_vars.listed_posts=[","captcha-hash","mapdata={",".ywpc-char-",").countdowntimer(","jQuery(\"#td_uid_","find('#td_uid_","variation_estimate_msg"],"js_excluded_inline":["document.write","google_ad","edToolbar","gtag","_gaq.push","_gaLt","GoogleAnalyticsObject","syntaxhighlighter","adsbygoogle","ci_cap_","_stq","nonce","post_id","LogHuman","idcomments_acct","ch_client","sc_online_t","_stq","bannersnack_embed","vtn_player_type","ven_video_key","ANS_customer_id","tdBlock","tdLocalCache","wpRestNonce","\"url\":","lazyLoadOptions","adthrive","loadCSS","google_tag_params","clicky_custom","clicky_site_ids","NSLPopupCenter","_paq","gtm","dataLayer","RecaptchaLoad","WPCOM_sharing_counts","jetpack_remote_comment","subscribe-field","contextly","_mmunch","gt_request_uri","doGTranslate","docTitle","bs_ajax_paginate_","bs_deferred_loading_","theChampRedirectionUrl","theChampFBCommentUrl","theChampTwitterRedirect","theChampRegRedirectionUrl","ESSB_CACHE_URL","oneall_social_login_providers_","betterads_screen_width","woocommerce_wishlist_add_to_wishlist_url","arf_conditional_logic","heateorSsHorSharingShortUrl","TL_Const","bimber_front_microshare","setAttribute(\"id\"","setAttribute( \"id\"","TribeEventsPro","peepsotimedata","wphc_data","hc_rand_id","RBL_ADD","AfsAnalyticsObject","_thriveCurrentPost","esc_login_url","fwduvpMainPlaylist","Bibblio.initRelatedContent","showUFC()","#iphorm-","#fancy-","ult-carousel-","theChampLJAuthUrl","f._fbq","Insticator","w2dc_js_objects","cherry_ajax","ad_block_","elementorFrontendConfig","zeen_","disqusIdentifier","currentAjaxUrl","geodir_event_call_calendar_","atatags-","hbspt.forms.create","function(c,h,i,m,p)","dataTable({","rankMath = {","_atrk_opts","quicklinkOptions","ct_checkjs_","WP_Statistics_http","penci_block_","omapi_localized","omapi_data","OptinMonsterApp","tminusnow","nfForms","galleries.gallery_","wcj_evt.prodID","advads_tracking_ads","advadsGATracking.postContext","woopack_config","ulp_content_id","wp-cumulus\/tagcloud.swf?r=","ctSetCookie('ct_checkjs'","woof_really_curr_tax","uLogin.customInit","i18n_no_matching_variations_text","alsp_map_markers_attrs","var inc_opt =","iworks_upprev","yith_wcevti_tickets","window.metrilo.ensure_cbuid","metrilo.event","wordpress_page_root","wcct_info","Springbot.product_id","pysWooProductData","dfd-heading","owl=$(\"#","penci_megamenu","fts_security","algoliaAutocomplete","avia_framework_globals","tabs.easyResponsiveTabs","searchlocationHeader","yithautocomplete","data-parallax-speed","currency_data=","cedexisData","function reenableButton","#wpnbio-show","e.Newsletter2GoTrackingObject","var categories_","\"+nRemaining+\"","cartsguru_cart_token","after_share_easyoptin","location_data.push","thirstyFunctions.isThirstyLink","styles: ' #custom-menu-","function svc_center_","#svc_carousel2_container_","advads.move","elementid","advads_has_ads","wpseo_map_init","mdf_current_page_url","tptn_tracker","dpsp_pin_button_data","searchwp_live_search_params","wpp_params","top.location,thispage","selection+pagelink","ic_window_resolution","PHP.wp_p_id","ShopifyBuy.UI.onReady(client)","orig_request_uri","gie.widgets.load","Adman.Flash","PHP.wp_p_id","window.broadstreetKeywords","var productId =","var flatsomeVars","wc_product_block_data","static.mailerlite.com","amzn_assoc","_bs_getParameterByName","_stq.push","h._remove","var FlowFlowOpts","var WCPFData =","var _beeketing","var _statcounter","var actions =","var current_url","var object_name","var the_ajax_script","var wc_cart_fragments_params","var woocommerce_params","var wpml_cookies","wc_add_to_cart_params","window.broadstreetKeywords","window.wc_ga_pro.available_gateways","xa.prototype","HOUZEZ_ajaxcalls_vars","w2dc_maps_objects","w2dc_controller_args_array","w2dc_map_markers_attrs","YT.Player","WPFC.data","function current_video_","var videodiv","var slider_wppasrotate","wppas_ga","var blockClass","tarteaucitron","pw_brand_product_list","tminusCountDown","pysWooSelectContentData","wpvq_ans89733","_isp_version","price_range_data","window.FeedbackCompanyWidgets","woocs_current_currency","woo_variation_swatches_options","woocommerce_price_slider_params","scriptParams","form-adv-pagination","borlabsCookiePrioritize","urls_wpwidgetpolylang","quickViewNonce","frontendscripts_params","nj-facebook-messenger","var fb_mess_position","init_particles_row_background_script","setREVStartSize","fl-node","PPAccordion","soliloquy_","wprevpublicjs_script_vars","DTGS_NONCE_FRONTEND","et_animation_data","archives-dropdown","loftloaderCache","SmartSliderSimple","var nectarLove","var incOpt","RocketBrowserCompatibilityChecker","RocketPreloadLinksConfig","placementVersionId","var useEdit","var DTGS_NONCE_FRONTEND","n2jQuery","et_core_api_spam_recaptcha","cnArgs","__CF$cv$params","trustbox_settings","aepro","cdn.jst.ai","w2dc_fields_in_categories","jetMenuPublicSettings","JetTricksSettings","aepc_pixel","avadaWooCommerceVars","var isb","fcaPcPost","csrf_token","icwp_wpsf_vars_lpantibot","wpvViewHead","ed_school_plugin","aps_comp_","guaven_woos","__lm_redirect_to","__wpdm_view_count","bookacti.booking_system","nfFrontEnd","view_quote_cart_link","__eae_decode_emails","divioverlays_ajaxurl","var _EPYT_","#ins-heading-","#ins-button-","tve_frontend_options","lb24.src","amazon_Login_accessToken","porto_infinite_scroll",".adace-loader-","adace_load_","tagGroupsAccordiontaggroupscloudaccordion","tagGroupsTabstaggroupscloudtabs","jrRelatedWidgets","UNCODE.initRow","amp_mobile_redirect_disabled","wpgdprcData","wpml_browser_redirect_params","swPreRegister","kboard_settings","ct_ultimate_gdpr_cookie","wcpv_registration_local","www.idxhome.com","arf_footer_cl_logic_call","reload_attached_coupons","var ftpp","forminatorFront","_EPYT_","edd_free_downloads_vars","edd_stripe_vars","var ASP","ecwidOriginalTitle","defaultCategoryId","translation-revision-date","google_conversion_id","hbspt","var marker_locations_","var AdmMyAjax","ifso_page_url","referrer_for_pageload","WoocommerceWidget\/woocommerceWidget.js","var ht_ctc_chat_var","spuvar","var wpilFrontend","urls_polylangREPLACETOID","e.setAttribute('unselectable',on);","try{Typekit.load","iMapsData","var wpforms_user_journey","rocket_lazyload_css_data"],"cache_ignored_parameters":["utm_source","utm_medium","utm_campaign","utm_expid","utm_term","utm_content","utm_id","utm_source_platform","utm_creative_format","utm_marketing_tactic","mtm_source","mtm_medium","mtm_campaign","mtm_keyword","mtm_cid","mtm_content","pk_source","pk_medium","pk_campaign","pk_keyword","pk_cid","pk_content","fb_action_ids","fb_action_types","fb_source","fbclid","campaignid","adgroupid","adid","gclid","age-verified","ao_noptimize","usqp","cn-reloaded","_ga","sscid","gclsrc","_gl","mc_cid","mc_eid","_bta_tid","_bta_c","trk_contact","trk_msg","trk_module","trk_sid","gdfms","gdftrk","gdffi","_ke","_kx","redirect_log_mongo_id","redirect_mongo_id","sb_referer_host","mkwid","pcrid","ef_id","s_kwcid","msclkid","dm_i","epik","pp","gbraid","wbraid","ssp_iabi","ssp_iaba","gad","vgo_ee"],"preload_exclusions":["void\\(.*;","(.*)__trashed(.*)","\/jet-menu\/(.*)","\/jet-popup\/(.*)"],"exclude_js_files":["\/wp-includes\/js\/dist\/i18n.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/html2canvas.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/pdf.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/three.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/3d-flip-book.min.js","\/google-site-kit\/dist\/assets\/js\/(.*).js","\/wp-live-chat-support\/public\/js\/callus(.*).js","\/borlabs-cookie\/assets\/javascript\/(.*).js"],"staging_domains":[".wpengine.com",".wpenginepowered.com",".pantheonsite.io",".flywheelsites.com",".flywheelstaging.com",".kinsta.com",".kinsta.cloud",".cloudwaysapps.com",".azurewebsites.net",".wpserveur.net","-liquidwebsites.com",".myftpupload.com",".dream.press",".sg-host.com",".platformsh.site",".wpstage.net",".bigscoots-staging.com",".wpsc.site",".runcloud.link",".onrocket.site",".singlestaging.com",".myraidbox.de",".instawp.xyz",".instawp.co",".instawp.link",".instawp.app"]} \ No newline at end of file +{"rucss_inline_atts_exclusions":["rocket-lazyload-inline-css","divi-style-parent-inline-inline-css","gsf-custom-css","extra-style-inline-inline-css","woodmart-inline-css-inline-css","woodmart_shortcodes-custom-css","rs-plugin-settings-inline-css","divi-style-inline-inline-css","tcb-post-list-dynamic-style","n2-ss-","wpcf7-","siteorigin-panels-layouts-footer","xstore-inline-css-inline-css","assets.reviews.io","ezoicCSS","stk-"],"rucss_inline_content_exclusions":[".wp-container-",".wp-elements-","#wpv-expandable-",".custom-content-","#thb-",".et_pb_text_dap_","#gdlr-core-shape-divider","#ultib3-",".uvc-wrap-",".jet-listing-dynamic-post-",".vcex_",".wprm-advanced-list-",".adsslot_",".jnews_",".cp-info-bar.content-","#stockie-custom-","#ohio-custom-",".uid-","#wpfMainWrapper","#penci_","#penci-",".wpbs_s","#apcore_","#apress_","#zolo_",".extended-products-grid#style-",".preloader#style-preloader-",".thegem-heading-",".thegem-button-",".thegem-custom-",".thegem-popup-","#pattern-","#thegem-video-frame-","#thegem-",".qwery_inline_",".dcgd_submit_button",".irs-bar",".gallery-grid-",".cmplz-hidden","#sqbquizouter","#start_sqbquizouter",".flo-header--",".trx_addons_inline_",".wpp-cardview-compact",".e-loop-item-"],"defer_js_inline_exclusions":["DOMContentLoaded","document.write","window.lazyLoadOptions","N.N2_","rev_slider_wrapper","FB3D_CLIENT_LOCALE","ewww_webp_supported","anr_captcha_field_div","renderInvisibleReCaptcha","bookingInProgress"],"defer_js_external_exclusions":["gist.github.com","content.jwplatform.com","js.hsforms.net","www.uplaunch.com","google.com\/recaptcha","widget.reviews.co.uk","verify.authorize.net\/anetseal","lib\/admin\/assets\/lib\/webfont\/webfont.min.js","app.mailerlite.com","widget.reviews.io","simplybook.(.*)\/v2\/widget\/widget.js","\/wp-includes\/js\/dist\/i18n.min.js","\/wp-content\/plugins\/wpfront-notification-bar\/js\/wpfront-notification-bar(.*).js","\/wp-content\/plugins\/oxygen\/component-framework\/vendor\/aos\/aos.js","\/wp-content\/plugins\/ewww-image-optimizer\/includes\/check-webp(.min)?.js","static.mailerlite.com\/data\/(.*).js","cdn.voxpow.com\/static\/libs\/v1\/(.*).js","cdn.voxpow.com\/media\/trackers\/js\/(.*).js","use.typekit.net","www.idxhome.com","\/wp-includes\/js\/dist\/vendor\/lodash(.min)?.js","\/wp-includes\/js\/dist\/api-fetch(.min)?.js","\/wp-includes\/js\/dist\/i18n(.min)?.js","\/wp-includes\/js\/dist\/vendor\/wp-polyfill(.min)?.js","\/wp-includes\/js\/dist\/url(.min)?.js","\/wp-includes\/js\/dist\/hooks(.min)?.js","www.paypal.com\/sdk\/js","js-eu1.hsforms.net","yanovis.Voucher.js","\/carousel-upsells-and-related-product-for-woocommerce\/assets\/js\/glide.min.js","use.typekit.com","\/artale\/modules\/kirki\/assets\/webfont.js","\/api\/scripts\/lb_cs.js","js.hscta.net\/cta\/current.js","widget.refari.co","player.vdocipher.com","\/wp-content\/plugins\/wp-rocket\/assets\/js\/lcp-beacon(.min)?.js"],"delay_js_exclusions":["nowprocket","\/wp-includes\/js\/wp-embed.min.js","lazyLoadOptions","lazyLoadThumb","wp-rocket\/assets\/js\/lazyload\/(.*)","et_core_page_resource_fallback","window.\\$us === undefined","js-extra","fusionNavIsCollapsed","\/assets\/js\/smush-lazy-load","eio_lazy_vars","\\\/lazysizes(\\.min|-pre|-post)?\\.js","document\\.body\\.classList\\.remove\\(\"no-js\"\\)","document\\.documentElement\\.className\\.replace\\( 'no-js', 'js' \\)","et_animation_data","wpforms_settings","var nfForms","\/\/stats.wp.com","_stq.push","fluent_form_ff_form_instance_","cpLoadCSS","ninja_column_","var rbs_gallery_","var lepopup_","var billing_additional_field","var gtm4wp","var dataLayer_content","\/ewww-image-optimizer\/includes\/load[_-]webp(\\.min)?.js","\/ewww-image-optimizer\/includes\/check-webp(\\.min)?.js","ewww_webp_supported","\/dist\/js\/browser-redirect\/app.js","\/perfmatters\/js\/lazyload.min.js","lazyLoadInstance","scripts.mediavine.com\/tags\/","initCubePortfolio","simpli.fi","gforms_recaptcha_","\/jetpack-boost\/vendor\/automattic\/jetpack-lazy-images\/(.*)","jetpack-lazy-images-js-enabled","jetpack-boost-critical-css","wpformsRecaptchaCallback","booking-suedtirol-js","wpcp_css_disable_selection","\/gravityforms\/js\/conditional_logic.min.js","statcounter.com\/counter\/counter.js","var sc_project","\/jetpack\/jetpack_vendor\/automattic\/jetpack-lazy-images\/(.*)","\/themify-builder\/themify\/js\/modules\/fallback(\\.min)?.js","handlePixMessage","var corner_video","cdn.pixfuture.com\/hb_v2.js","cdn.pixfuture.com\/pbix.js","served-by.pixfuture.com\/www\/delivery\/ads.js","served-by.pixfuture.com\/www\/delivery\/headerbid_sticky_refresh.js","serv-vdo.pixfuture.com\/vpaid\/ads.js","wprRemoveCPCSS","window.jdgmSettings","\/photonic\/include\/js\/front-end\/nomodule\/photonic-baguettebox.min.js","\/photonic\/include\/ext\/baguettebox\/baguettebox.min.js","window.wsf_form_json_config","et_link_options_data","FuseboxPlayerAPIKey","js.hscta.net\/cta\/current.js","hbspt.cta.load","consent.cookiebot.com\/uc.js","\/woofilter-pro\/woofilterpro\/js\/ion.rangeSlider.min.js","barra.r7.com\/barra.js","rocket_css_lazyload_launch","#wpr-lazyload-bg","\/wp-content\/plugins\/wp-rocket\/assets\/js\/lcp-beacon(.min)?.js"],"js_minify_external":["html5.js","show_ads.js","histats.com\/js","ws.amazon.com\/widgets","\/ads\/","intensedebate.com","scripts.chitika.net\/","jotform.com\/","gist.github.com","forms.aweber.com","video.unrulymedia.com","stats.wp.com","stats.wordpress.com","widget.rafflecopter.com","widget-prime.rafflecopter.com","releases.flowplayer.org","c.ad6media.fr","cdn.stickyadstv.com","www.smava.de","contextual.media.net","app.getresponse.com","adserver.reklamstore.com","s0.wp.com","wprp.zemanta.com","files.bannersnack.com","smarticon.geotrust.com","js.gleam.io","ir-na.amazon-adsystem.com","web.ventunotech.com","verify.authorize.net","ads.themoneytizer.com","embed.finanzcheck.de","imagesrv.adition.com","js.juicyads.com","form.jotformeu.com","speakerdeck.com","content.jwplatform.com","ads.investingchannel.com","app.ecwid.com","www.industriejobs.de","s.gravatar.com","googlesyndication.com","a.optmstr.com","a.optmnstr.com","a.opmnstr.com","adthrive.com","mediavine.com","js.hsforms.net","googleadservices.com","f.convertkit.com","recaptcha\/api.js","mailmunch.co","apps.shareaholic.com","dsms0mj1bbhn4.cloudfront.net","nutrifox.com","code.tidio.co","www.uplaunch.com","widget.reviewability.com","embed-cdn.gettyimages.com\/widgets.js","app.mailerlite.com","ck.page","cdn.jsdelivr.net\/gh\/AmauriC\/","static.klaviyo.com\/onsite\/js\/klaviyo.js","a.omappapi.com\/app\/js\/api.min.js","static.zdassets.com","feedbackcompany.com\/widgets\/feedback-company-widget.min.js","widget.gleamjs.io","phonewagon.com","simplybook.asia\/v2\/widget\/widget.js","simplybook.it\/v2\/widget\/widget.js","simplybook.me\/v2\/widget\/widget.js","static.botsrv.com\/website\/js\/widget2.36cf1446.js","static.mailerlite.com\/data\/","cdn.voxpow.com","loader.knack.com","embed.lpcontent.net\/leadboxes\/current\/embed.js","cc.cdn.civiccomputing.com\/9\/cookieControl-9.x.min.js","cse.google.com\/cse.js","kit.fontawesome.com","cdn.jsdelivr.net\/npm\/mathjax@3\/es5\/tex-mml-chtml.js","static.leadpages.net\/leadbars\/current\/embed.js","booqable.com\/v2\/booqable.js","googleoptimize.com","cdna.hubpeople.com\/js\/widget_standalone_two_modes.js","s3.tradingview.com","www.vbt.io\/ext\/vbtforms.js","cdn.callrail.com","documentcloud.adobe.com\/view-sdk\/main.js","static.cleverpush.com","js.afterpay.com","cdn.enable.co.il\/licenses\/enable-","hcaptcha.com\/1\/api.js","voucher.getavo.it\/public\/js\/yanovis.Voucher.js","js-eu1.hsforms.net","statcounter.com\/counter\/counter.js","snapppt.com","use.typekit.com","secure.gravatar.com\/js\/gprofiles.js","cdn.jsdelivr.net\/npm\/hockeystack","widget.prod.faslet.net","ga.getresponse.com\/script\/ga.js","cognitoforms.com","usercentrics.eu","cdn.amcharts.com","umami","cdn.popt.in\/pixel.js","m2d.m2.ai","pubguru.net","trustindex.io","cdnjs.cloudflare.com\/ajax\/libs\/prism\/","podigee-podcast-player.js","tarteaucitron.io\/load.js","osm.klarnaservices.com\/lib.js","mein.clickskeks.at\/app.js","barra.r7.com\/barra.js","widget.refari.co","widget.reviews.co.uk","player.vdocipher.com","www.instagram.com\/embed.js","smartframe.io","challenges.cloudflare.com\/turnstile\/","script.roboassist.ai","cdn.hu-manity.co"],"js_move_after_combine":["map_fusion_map_","ec:addProduct","ec:addImpression","clear_better_facebook_comments","vc-row-destroy-equal-heights-","dfd-icon-list-","SFM_template","WLTChangeState","wlt_star_","wlt_pop_distance_","smart_list_tip","gd-wgt-pagi-","data-rf-id=","tvc_po=","scrapeazon","startclock","it_logo_field_owl-box_","td_live_css_uid","wpvl_paramReplace","tdAjaxCount","mec_skin_","_wca","_taboola","fbq('trackCustom'","fbq('track'","data.token","sharrre","dfads_ajax_load_ads","tie_postviews","wmp_update","h5ab-print-article","gform_ajax_frame_","gform_post_render","mts_view_count","act_css_tooltip","window.SLB","wpt_view_count","var dateNow","gallery_product_",".flo-block-slideshow-","data='api-key=ct-","ip_common_function()","(\"style#gsf-custom-css\").append","a3revWCDynamicGallery_","#owl-carousel-instagram-","window.FlowFlowOpts","jQuery('.td_uid_","jQuery(\".slider-","#dfd-vcard-widget-","#sf-instagram-widget-",".woocommerce-tabs-","penci_megamenu__","vc_prepareHoverBox","wp-temp-form-div","_wswebinarsystem_already_","#views-extra-css\").text","fusetag.setTargeting","hit.uptrendsdata.com","callback:window.renderBadge","test_run_nf_conditional_logic","cb_nombre","$('.fl-node-","function($){google_maps_","$(\"#myCarousel","et_animation_data=","current_url=\"","CustomEvent.prototype=window.Event.prototype","electro-wc-product-gallery","woof_is_mobile","jQuery('.videonextup","wpp_params","us.templateDirectoryUri=",".fat-gallery-item",".ratingbox","user_rating.prototype.eraseCookie","test_run_nf_conditional","dpsp-networks-btns-wrapper","pa_woo_product_info","sharing_enabled_on_post_via_metabox","#product-search-field-","GOTMLS_login_offset","berocket_aapf_time_to_fix_products_style","window.vc_googleMapsPointer","sinceID_","#ut-background-video-ut-section","+window.comment_tab_width+","dfd-button-hover-in","wpseo-address-wrapper","platform.stumbleupon.com","#woo_pp_ec_button_mini_cart","#supercarousel","blockClass","tdbMenuItem","tdbSearchItem","best_seller_badge","jQuery('#product-top-bar","fb_desc-","FC_regenerate_captcha","wp_post_blocks_vars.listed_posts=[","captcha-hash","mapdata={",".ywpc-char-",").countdowntimer(","jQuery(\"#td_uid_","find('#td_uid_","variation_estimate_msg"],"js_excluded_inline":["document.write","google_ad","edToolbar","gtag","_gaq.push","_gaLt","GoogleAnalyticsObject","syntaxhighlighter","adsbygoogle","ci_cap_","_stq","nonce","post_id","LogHuman","idcomments_acct","ch_client","sc_online_t","_stq","bannersnack_embed","vtn_player_type","ven_video_key","ANS_customer_id","tdBlock","tdLocalCache","wpRestNonce","\"url\":","lazyLoadOptions","adthrive","loadCSS","google_tag_params","clicky_custom","clicky_site_ids","NSLPopupCenter","_paq","gtm","dataLayer","RecaptchaLoad","WPCOM_sharing_counts","jetpack_remote_comment","subscribe-field","contextly","_mmunch","gt_request_uri","doGTranslate","docTitle","bs_ajax_paginate_","bs_deferred_loading_","theChampRedirectionUrl","theChampFBCommentUrl","theChampTwitterRedirect","theChampRegRedirectionUrl","ESSB_CACHE_URL","oneall_social_login_providers_","betterads_screen_width","woocommerce_wishlist_add_to_wishlist_url","arf_conditional_logic","heateorSsHorSharingShortUrl","TL_Const","bimber_front_microshare","setAttribute(\"id\"","setAttribute( \"id\"","TribeEventsPro","peepsotimedata","wphc_data","hc_rand_id","RBL_ADD","AfsAnalyticsObject","_thriveCurrentPost","esc_login_url","fwduvpMainPlaylist","Bibblio.initRelatedContent","showUFC()","#iphorm-","#fancy-","ult-carousel-","theChampLJAuthUrl","f._fbq","Insticator","w2dc_js_objects","cherry_ajax","ad_block_","elementorFrontendConfig","zeen_","disqusIdentifier","currentAjaxUrl","geodir_event_call_calendar_","atatags-","hbspt.forms.create","function(c,h,i,m,p)","dataTable({","rankMath = {","_atrk_opts","quicklinkOptions","ct_checkjs_","WP_Statistics_http","penci_block_","omapi_localized","omapi_data","OptinMonsterApp","tminusnow","nfForms","galleries.gallery_","wcj_evt.prodID","advads_tracking_ads","advadsGATracking.postContext","woopack_config","ulp_content_id","wp-cumulus\/tagcloud.swf?r=","ctSetCookie('ct_checkjs'","woof_really_curr_tax","uLogin.customInit","i18n_no_matching_variations_text","alsp_map_markers_attrs","var inc_opt =","iworks_upprev","yith_wcevti_tickets","window.metrilo.ensure_cbuid","metrilo.event","wordpress_page_root","wcct_info","Springbot.product_id","pysWooProductData","dfd-heading","owl=$(\"#","penci_megamenu","fts_security","algoliaAutocomplete","avia_framework_globals","tabs.easyResponsiveTabs","searchlocationHeader","yithautocomplete","data-parallax-speed","currency_data=","cedexisData","function reenableButton","#wpnbio-show","e.Newsletter2GoTrackingObject","var categories_","\"+nRemaining+\"","cartsguru_cart_token","after_share_easyoptin","location_data.push","thirstyFunctions.isThirstyLink","styles: ' #custom-menu-","function svc_center_","#svc_carousel2_container_","advads.move","elementid","advads_has_ads","wpseo_map_init","mdf_current_page_url","tptn_tracker","dpsp_pin_button_data","searchwp_live_search_params","wpp_params","top.location,thispage","selection+pagelink","ic_window_resolution","PHP.wp_p_id","ShopifyBuy.UI.onReady(client)","orig_request_uri","gie.widgets.load","Adman.Flash","PHP.wp_p_id","window.broadstreetKeywords","var productId =","var flatsomeVars","wc_product_block_data","static.mailerlite.com","amzn_assoc","_bs_getParameterByName","_stq.push","h._remove","var FlowFlowOpts","var WCPFData =","var _beeketing","var _statcounter","var actions =","var current_url","var object_name","var the_ajax_script","var wc_cart_fragments_params","var woocommerce_params","var wpml_cookies","wc_add_to_cart_params","window.broadstreetKeywords","window.wc_ga_pro.available_gateways","xa.prototype","HOUZEZ_ajaxcalls_vars","w2dc_maps_objects","w2dc_controller_args_array","w2dc_map_markers_attrs","YT.Player","WPFC.data","function current_video_","var videodiv","var slider_wppasrotate","wppas_ga","var blockClass","tarteaucitron","pw_brand_product_list","tminusCountDown","pysWooSelectContentData","wpvq_ans89733","_isp_version","price_range_data","window.FeedbackCompanyWidgets","woocs_current_currency","woo_variation_swatches_options","woocommerce_price_slider_params","scriptParams","form-adv-pagination","borlabsCookiePrioritize","urls_wpwidgetpolylang","quickViewNonce","frontendscripts_params","nj-facebook-messenger","var fb_mess_position","init_particles_row_background_script","setREVStartSize","fl-node","PPAccordion","soliloquy_","wprevpublicjs_script_vars","DTGS_NONCE_FRONTEND","et_animation_data","archives-dropdown","loftloaderCache","SmartSliderSimple","var nectarLove","var incOpt","RocketBrowserCompatibilityChecker","RocketPreloadLinksConfig","placementVersionId","var useEdit","var DTGS_NONCE_FRONTEND","n2jQuery","et_core_api_spam_recaptcha","cnArgs","__CF$cv$params","trustbox_settings","aepro","cdn.jst.ai","w2dc_fields_in_categories","jetMenuPublicSettings","JetTricksSettings","aepc_pixel","avadaWooCommerceVars","var isb","fcaPcPost","csrf_token","icwp_wpsf_vars_lpantibot","wpvViewHead","ed_school_plugin","aps_comp_","guaven_woos","__lm_redirect_to","__wpdm_view_count","bookacti.booking_system","nfFrontEnd","view_quote_cart_link","__eae_decode_emails","divioverlays_ajaxurl","var _EPYT_","#ins-heading-","#ins-button-","tve_frontend_options","lb24.src","amazon_Login_accessToken","porto_infinite_scroll",".adace-loader-","adace_load_","tagGroupsAccordiontaggroupscloudaccordion","tagGroupsTabstaggroupscloudtabs","jrRelatedWidgets","UNCODE.initRow","amp_mobile_redirect_disabled","wpgdprcData","wpml_browser_redirect_params","swPreRegister","kboard_settings","ct_ultimate_gdpr_cookie","wcpv_registration_local","www.idxhome.com","arf_footer_cl_logic_call","reload_attached_coupons","var ftpp","forminatorFront","_EPYT_","edd_free_downloads_vars","edd_stripe_vars","var ASP","ecwidOriginalTitle","defaultCategoryId","translation-revision-date","google_conversion_id","hbspt","var marker_locations_","var AdmMyAjax","ifso_page_url","referrer_for_pageload","WoocommerceWidget\/woocommerceWidget.js","var ht_ctc_chat_var","spuvar","var wpilFrontend","urls_polylangREPLACETOID","e.setAttribute('unselectable',on);","try{Typekit.load","iMapsData","var wpforms_user_journey","rocket_lazyload_css_data","wcStoreApiNonceTimestamp","createNonceMiddleware"],"cache_ignored_parameters":["utm_source","utm_medium","utm_campaign","utm_expid","utm_term","utm_content","utm_id","utm_source_platform","utm_creative_format","utm_marketing_tactic","mtm_source","mtm_medium","mtm_campaign","mtm_keyword","mtm_cid","mtm_content","pk_source","pk_medium","pk_campaign","pk_keyword","pk_cid","pk_content","fb_action_ids","fb_action_types","fb_source","fbclid","campaignid","adgroupid","adid","gclid","age-verified","ao_noptimize","usqp","cn-reloaded","_ga","sscid","gclsrc","_gl","mc_cid","mc_eid","_bta_tid","_bta_c","trk_contact","trk_msg","trk_module","trk_sid","gdfms","gdftrk","gdffi","_ke","_kx","redirect_log_mongo_id","redirect_mongo_id","sb_referer_host","mkwid","pcrid","ef_id","s_kwcid","msclkid","dm_i","epik","pp","gbraid","wbraid","ssp_iabi","ssp_iaba","gad","vgo_ee","gad_source"],"preload_exclusions":["void\\(.*;","(.*)__trashed(.*)","\/jet-menu\/(.*)","\/jet-popup\/(.*)"],"exclude_js_files":["\/wp-includes\/js\/dist\/i18n.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/html2canvas.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/pdf.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/three.min.js","\/interactive-3d-flipbook-powered-physics-engine\/assets\/js\/3d-flip-book.min.js","\/google-site-kit\/dist\/assets\/js\/(.*).js","\/wp-live-chat-support\/public\/js\/callus(.*).js","\/borlabs-cookie\/assets\/javascript\/(.*).js","\/wp-content\/plugins\/wp-rocket\/assets\/js\/lcp-beacon(.min)?.js"],"staging_domains":[".wpengine.com",".wpenginepowered.com",".pantheonsite.io",".flywheelsites.com",".flywheelstaging.com",".kinsta.com",".kinsta.cloud",".cloudwaysapps.com",".azurewebsites.net",".wpserveur.net","-liquidwebsites.com",".myftpupload.com",".dream.press",".sg-host.com",".platformsh.site",".wpstage.net",".bigscoots-staging.com",".wpsc.site",".runcloud.link",".onrocket.site",".singlestaging.com",".myraidbox.de",".instawp.xyz",".instawp.co",".instawp.link",".instawp.app",".hstgr.cloud",".myhostpoint.ch"]} diff --git a/gulpfile.js b/gulpfile.js index 7a97ba5367..7aea5167a2 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -195,11 +195,26 @@ const bundleLazyloadJsWithoutWatch = () => { .pipe(gulp.dest('assets/js')) } +const bundleLcpBeaconWithoutWatch = () => { + var bundle = browserify({ + entries: './assets/js/lcp-beacon.js', + debug: true + }).transform(babel); + + return bundle.bundle() + .pipe(source('lcp-beacon.js')) + .pipe(buffer()) + .pipe(uglify()) + .pipe(sourcemaps.init({loadMaps: false})) + .pipe(sourcemaps.write('./')) + .pipe(rename({suffix: '.min'})) + .pipe(gulp.dest('assets/js')); +} + exports.bundleLazyloadJsWithoutWatch = bundleLazyloadJsWithoutWatch; // Run build without watching: watching keeps git actions stuck on 'build' -gulp.task('run:build', gulp.parallel(bundleJsWithoutWatch, bundleLazyloadJsWithoutWatch, 'run:build:sass')); - +gulp.task('run:build', gulp.parallel(bundleJsWithoutWatch, bundleLazyloadJsWithoutWatch, bundleLcpBeaconWithoutWatch, 'run:build:sass')); /** * Compiles a standalone script file. * diff --git a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php index fd2ca2d038..70a01e5749 100644 --- a/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php +++ b/inc/Engine/Media/AboveTheFold/Database/Rows/AboveTheFold.php @@ -88,4 +88,25 @@ public function __construct( $item ) { $this->modified = empty( $this->modified ) ? 0 : strtotime( (string) $this->modified ); $this->last_accessed = empty( $this->last_accessed ) ? 0 : strtotime( (string) $this->last_accessed ); } + + /** + * Checks if the object has a valid LCP (Largest Contentful Paint) value. + * + * @return bool Returns true if the object's status is 'completed' and the LCP value is not empty or 'not found', false otherwise. + */ + public function has_lcp() { + if ( 'completed' !== $this->status ) { + return false; + } + + if ( empty( $this->lcp ) ) { + return false; + } + + if ( 'not found' !== $this->lcp ) { + return false; + } + + return true; + } } diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index a21005fe2a..602f49dd0c 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -3,11 +3,11 @@ namespace WP_Rocket\Engine\Media\AboveTheFold\Frontend; +use WP_Filesystem_Direct; use WP_Rocket\Admin\Options_Data; use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; use WP_Rocket\Engine\Media\AboveTheFold\Context\Context; use WP_Rocket\Engine\Optimization\RegexTrait; -use WP_Rocket\Engine\Common\JobManager\Managers\ManagerInterface; class Controller { use RegexTrait; @@ -33,16 +33,26 @@ class Controller { */ private $context; + /** + * WordPress filesystem. + * + * @var WP_Filesystem_Direct + */ + protected $filesystem; + /** * Constructor * - * @param Options_Data $options Options instance. - * @param ATFQuery $query Queries instance. - * @param Context $context Context instance. */ - public function __construct( Options_Data $options, ATFQuery $query, Context $context ) { - $this->options = $options; - $this->query = $query; - $this->context = $context; + * @param Options_Data $options Options instance. + * @param ATFQuery $query Queries instance. + * @param Context $context Context instance. + * @param WP_Filesystem_Direct|null $filesystem WordPress filesystem. + */ + public function __construct( Options_Data $options, ATFQuery $query, Context $context, WP_Filesystem_Direct $filesystem = null ) { + $this->options = $options; + $this->query = $query; + $this->context = $context; + $this->filesystem = $filesystem ?: rocket_direct_filesystem(); } /** @@ -64,17 +74,14 @@ public function lcp( $html ): string { $row = $this->query->get_row( $url, $is_mobile ); if ( empty( $row ) ) { - $this->manager->add_url_to_the_queue( $url, $is_mobile ); - return $html; + return $this->inject_beacon( $html ); } - if ( 'completed' !== $row->status || empty( $row->lcp ) || 'not found' === $row->lcp ) { + if ( ! $row->has_lcp() ) { return $html; } - $html = $this->preload_lcp( $html, $row ); - - return $html; + return $this->preload_lcp( $html, $row ); } /** @@ -326,4 +333,28 @@ private function is_mobile(): bool { && $this->options->get( 'do_caching_mobile_files', 0 ) && wp_is_mobile(); } + + /** + * The `inject_beacon` function is used to inject a JavaScript beacon into the HTML content. + * + * @param string $html The HTML content where the beacon will be injected. + * + * @return string The modified HTML content with the beacon script injected just before the closing body tag. + */ + public function inject_beacon( $html ): string { + $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; + + if ( ! $this->filesystem->exists( rocket_get_constant( 'WP_ROCKET_ASSETS_JS_PATH' ) . 'lcp-beacon' . $min . '.js' ) ) { + return $html; + } + + // Get the URL of the script. + $script_url = rocket_get_constant( 'WP_ROCKET_ASSETS_JS_URL' ) . 'lcp-beacon' . $min . '.js'; + + // Create the script tag. + $script_tag = ""; // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript + + // Append the script tag just before the closing body tag. + return str_replace( '', $script_tag . '', $html ); + } } diff --git a/tests/Fixtures/inc/Engine/CDN/CDN/HTML/siteURLWithPath/rewrite.html b/tests/Fixtures/inc/Engine/CDN/CDN/HTML/siteURLWithPath/rewrite.html index d6ec9948d9..6bd6b618e6 100644 --- a/tests/Fixtures/inc/Engine/CDN/CDN/HTML/siteURLWithPath/rewrite.html +++ b/tests/Fixtures/inc/Engine/CDN/CDN/HTML/siteURLWithPath/rewrite.html @@ -106,7 +106,7 @@ .wp-block-cover .wp-block-cover__inner-container h6 { color: #000000; } - + + + + +
+

(img-set-css-background-images)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ +
+

(img-set-css-background-images)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_bg_responsive_webkit_template.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_bg_responsive_webkit_template.php new file mode 100644 index 0000000000..8d66d0b5f5 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_bg_responsive_webkit_template.php @@ -0,0 +1,55 @@ + + + + + + + lcp_bg_responsive_template + + + +
+

(webkit-BG-images-external-domain)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+
+

(webkit2-BG-images-external-domain)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ +
+

(webkit3-BG-images-external-domain)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_bg_responsive_imgset_template.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_bg_responsive_imgset_template.php new file mode 100644 index 0000000000..68f7551be0 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_bg_responsive_imgset_template.php @@ -0,0 +1,50 @@ + + + + + + + lcp_bg_responsive_template + + + + +
+

(img-set-css-background-images)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ +
+

(img-set-css-background-images)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_bg_responsive_webkit_template.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_bg_responsive_webkit_template.php new file mode 100644 index 0000000000..10335dd88b --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_bg_responsive_webkit_template.php @@ -0,0 +1,55 @@ + + + + + + + lcp_bg_responsive_template + + + +
+

(webkit-BG-images-external-domain)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+
+

(webkit2-BG-images-external-domain)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ +
+

(webkit3-BG-images-external-domain)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php index 76a0aef574..29470e6741 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php @@ -48,5 +48,41 @@ ], 'expected' => $html_output, ], + 'shouldPreloadLcpResponsiveImgset' => [ + 'config' => [ + 'html' => file_get_contents(__DIR__ . '/HTML/input_lcp_bg_responsive_imgset_template.php'), + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => json_encode( (object) [ + 'type' => 'bg-img-set', + 'bg_set' => [ + ['src' => "http://example.org/wp-content/rocket-test-data/images/lcp/testavif.avif 1dppx"], + ['src' => "http://example.org/wp-content/rocket-test-data/images/lcp/testwebp.webp 2dppx"] + ] + ]), + 'viewport' => json_encode ( [] ), + ], + ], + 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_bg_responsive_imgset_template.php'), + ], + 'shouldPreloadLcpResponsiveWebkit' => [ + 'config' => [ + 'html' => file_get_contents(__DIR__ . '/HTML/input_lcp_bg_responsive_webkit_template.php'), + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => json_encode( (object) [ + 'type' => 'bg-img-set', + 'bg_set' => [ + ['src' => "https://fastly.picsum.photos/id/976/200/300.jpg?hmac=s1Uz9fgJv32r8elfaIYn7pLpQXps7X9oYNwC5XirhO8 1dppx"], + ['src' => "https://rocketlabsqa.ovh/wp-content/rocket-test-data/images/fixtheissue.jpg 2dppx"] + ] + ]), + 'viewport' => json_encode ( [] ), + ], + ], + 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_bg_responsive_webkit_template.php'), + ], ], ]; From f343a3f3c4d0a1cae5dad4afc7188e55e24b3444 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 16 Apr 2024 04:04:30 +0200 Subject: [PATCH 075/167] Closes #6534: Preload the layered bg img Preload layered background images --- assets/js/lcp-beacon.js | 47 +++++-------------- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- .../Subscriber/HTML/input_lcp_layered_bg.php | 34 ++++++++++++++ .../Subscriber/HTML/output_lcp_layered_bg.php | 34 ++++++++++++++ .../AboveTheFold/Frontend/Subscriber/lcp.php | 19 ++++++++ 6 files changed, 100 insertions(+), 38 deletions(-) create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_layered_bg.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_layered_bg.php diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index 69184d7fd1..25ffc9028b 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -16,23 +16,25 @@ function LCPCandidates(count) { if ( rect.width > 0 && rect.height > 0 && - isIntersecting(rect) + isIntersecting( rect ) ) { const visibleWidth = Math.min(rect.width, (window.innerWidth || document.documentElement.clientWidth) - rect.left); const visibleHeight = Math.min(rect.height, (window.innerHeight || document.documentElement.clientHeight) - rect.top); const area = visibleWidth * visibleHeight; const elementInfo = getElementInfo(element); if (elementInfo !== null) { + // Insert element into topCandidates in descending order of area for (let i = 0; i < topCandidates.length; i++) { if (area > topCandidates[i].area) { topCandidates.splice(i, 0, {element, area, elementInfo}); topCandidates.length = Math.min( count, topCandidates.length - ); + ); // Keep only specified number of elements break; } } + // If topCandidates is not full, append if (topCandidates.length < count) { topCandidates.push({element, area, elementInfo}); } @@ -40,39 +42,6 @@ function LCPCandidates(count) { } }); - potentialCandidates.forEach((element) => { - const rect = element.getBoundingClientRect(); - if ( - rect.width > 0 && - rect.height > 0 && - rect.top >= 0 && - rect.bottom <= window.innerHeight && - rect.left >= 0 && - rect.right <= window.innerWidth - ) { - const area = rect.width * rect.height; - const imageURL = getImageUrlFromElement(element); - if (imageURL !== null) { - // Insert element into topCandidates in descending order of area - for (let i = 0; i < topCandidates.length; i++) { - - if (area > topCandidates[i].area) { - topCandidates.splice(i, 0, { element, area, imageURL }); - topCandidates.length = Math.min( - count, - topCandidates.length - ); // Keep only specified number of elements - break; - } - } - // If topCandidates is not full, append - if (topCandidates.length < count) { - topCandidates.push({ element, area, imageURL }); - } - } - } - }); - return topCandidates.map((candidate) => ({ element: candidate.element, elementInfo: getElementInfo(candidate.element), @@ -120,8 +89,14 @@ function getElementInfo(element) { } const matches = [...full_bg_prop.matchAll(css_bg_url_rgx)]; + console.log('matches : '+ JSON.stringify(matches)); + element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim() + (m[2] ? " " + m[2].trim() : "")} : {}); console.log('element_info.bg_set : '+ JSON.stringify(element_info.bg_set)); + // Check if bg_set array is populated with empty objects + if (element_info.bg_set.every(item => item.src === "")) { + // If bg_set array is populated with empty objects, populate it with the URLs from the matches array + element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim()} : {}); + } - element_info.bg_set = matches.map(m => m[1] && m[2] ? m[1].trim() + " " + m[2].trim() : ""); if (element_info.bg_set.length > 0) { element_info.src = element_info.bg_set[0].src; if (element_info.type === "bg-img-set") { diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 3c42e4353b..53d003bfc6 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(r,i,c){function l(t,e){if(!i[t]){if(!r[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(s)return s(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return l(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var s=\"function\"==typeof require&&require,e=0;e\"none\"!==e).join(\"\");if(n.type=\"bg-img\",i.includes(\"image-set(\")&&(n.type=\"bg-img-set\"),!i||\"\"===i)return null;const c=[...i.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log(\"matches : \"+c),n.bg_set=c.map(e=>e[1]&&e[2]?e[1].trim()+\" \"+e[2].trim():\"\"),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),u=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img\"),n=0;ne.src===o.src)||i!==document||u.push({src:o.src,label:\"above-the-fold\"})}}console.log(u);var s=JSON.stringify(u);window.performance_images_json=s,console.log(s);const a=new FormData;a.append(\"action\",\"rocket_lcp\"),a.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),a.append(\"url\",rocket_lcp_data.url),a.append(\"is_mobile\",rocket_lcp_data.is_mobile),a.append(\"images\",s),a.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(r,i,c){function s(t,e){if(!i[t]){if(!r[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e\"none\"!==e).join(\"\");if(n.type=\"bg-img\",i.includes(\"image-set(\")&&(n.type=\"bg-img-set\"),!i||\"\"===i)return null;const c=[...i.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log(\"matches : \"+JSON.stringify(c)),n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),console.log(\"element_info.bg_set : \"+JSON.stringify(n.bg_set)),n.bg_set.every(e=>\"\"===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),console.log(\"element_info.bg_set 2 : \"+JSON.stringify(n.bg_set)),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),g=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img\"),n=0;ne.src===o.src)||i!==document||g.push({src:o.src,label:\"above-the-fold\"})}}console.log(g);var l=JSON.stringify(g);window.performance_images_json=l,console.log(l);const a=new FormData;a.append(\"action\",\"rocket_lcp\"),a.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),a.append(\"url\",rocket_lcp_data.url),a.append(\"is_mobile\",rocket_lcp_data.is_mobile),a.append(\"images\",l),a.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index 1797be8e5e..f71920bb4a 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function o(r,i,c){function l(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(s)return s(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return l(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var s="function"==typeof require&&require,e=0;e"none"!==e).join("");if(n.type="bg-img",i.includes("image-set(")&&(n.type="bg-img-set"),!i||""===i)return null;const c=[...i.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log("matches : "+c),n.bg_set=c.map(e=>e[1]&&e[2]?e[1].trim()+" "+e[2].trim():""),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),u=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img"),n=0;ne.src===o.src)||i!==document||u.push({src:o.src,label:"above-the-fold"})}}console.log(u);var s=JSON.stringify(u);window.performance_images_json=s,console.log(s);const a=new FormData;a.append("action","rocket_lcp"),a.append("rocket_lcp_nonce",rocket_lcp_data.nonce),a.append("url",rocket_lcp_data.url),a.append("is_mobile",rocket_lcp_data.is_mobile),a.append("images",s),a.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(o,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(o,500),console.timeEnd("extract")})},{}]},{},[1]); +!function o(r,i,c){function s(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e"none"!==e).join("");if(n.type="bg-img",i.includes("image-set(")&&(n.type="bg-img-set"),!i||""===i)return null;const c=[...i.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log("matches : "+JSON.stringify(c)),n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),console.log("element_info.bg_set : "+JSON.stringify(n.bg_set)),n.bg_set.every(e=>""===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),console.log("element_info.bg_set 2 : "+JSON.stringify(n.bg_set)),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),g=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img"),n=0;ne.src===o.src)||i!==document||g.push({src:o.src,label:"above-the-fold"})}}console.log(g);var l=JSON.stringify(g);window.performance_images_json=l,console.log(l);const a=new FormData;a.append("action","rocket_lcp"),a.append("rocket_lcp_nonce",rocket_lcp_data.nonce),a.append("url",rocket_lcp_data.url),a.append("is_mobile",rocket_lcp_data.is_mobile),a.append("images",l),a.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(o,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(o,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_layered_bg.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_layered_bg.php new file mode 100644 index 0000000000..f1cd6c2f33 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_layered_bg.php @@ -0,0 +1,34 @@ + + + + + + + lcp_layered_bg + + + + +
+

(bg-layared-css-background-images)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_layered_bg.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_layered_bg.php new file mode 100644 index 0000000000..b876cb99bf --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_layered_bg.php @@ -0,0 +1,34 @@ + + + + + + + lcp_layered_bg + + + + +
+

(bg-layared-css-background-images)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php index 29470e6741..ccb5633da9 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php @@ -84,5 +84,24 @@ ], 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_bg_responsive_webkit_template.php'), ], + 'shouldPreloadLcpLayeredBackground' => [ + 'config' => [ + 'html' => file_get_contents(__DIR__ . '/HTML/input_lcp_layered_bg.php'), + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => json_encode( (object) [ + 'type' => 'bg-img', + 'bg_set' => [ + ['src' => "https://fastly.picsum.photos/id/976/200/300.jpg?hmac=s1Uz9fgJv32r8elfaIYn7pLpQXps7X9oYNwC5XirhO8"], + ['src' => "https://rocketlabsqa.ovh/wp-content/rocket-test-data/images/fixtheissue.jpg"] + ] + ]), + 'viewport' => json_encode ( [] ), + ], + ], + 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_layered_bg.php'), + + ] ], ]; From 9a5dbc158e1d11de81d18474ad1f09afd63c7669 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 16 Apr 2024 04:11:02 +0200 Subject: [PATCH 076/167] Closes #6532: Preload the single bg img Preload single background images --- .../Subscriber/HTML/input_lcp_single_bg.php | 33 +++++++++++++++++++ .../Subscriber/HTML/output_lcp_single_bg.php | 33 +++++++++++++++++++ .../AboveTheFold/Frontend/Subscriber/lcp.php | 17 ++++++++++ 3 files changed, 83 insertions(+) create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_single_bg.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_single_bg.php diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_single_bg.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_single_bg.php new file mode 100644 index 0000000000..921b30d496 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_single_bg.php @@ -0,0 +1,33 @@ + + + + + + + lcp_single_bg + + + + +
+

(img-single-css-background-image)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_single_bg.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_single_bg.php new file mode 100644 index 0000000000..c79a2a6615 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_single_bg.php @@ -0,0 +1,33 @@ + + + + + + + lcp_single_bg + + + + +
+

(img-single-css-background-image)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi gravida diam in tristique feugiat. In in metus faucibus, condimentum turpis ac, congue mauris. Integer ac varius erat, nec imperdiet odio. Maecenas sit amet dapibus risus. Pellentesque scelerisque cursus lacus a tristique. Maecenas bibendum, erat vitae interdum hendrerit, nibh diam convallis risus, nec sollicitudin est neque eu nunc. Aenean condimentum viverra est a congue. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec viverra erat mauris, scelerisque interdum nisl hendrerit eu.

+
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php index ccb5633da9..32bfc8817b 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php @@ -101,6 +101,23 @@ ], ], 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_layered_bg.php'), + ], + 'shouldPreloadLcpSingleBackground' => [ + 'config' => [ + 'html' => file_get_contents(__DIR__ . '/HTML/input_lcp_single_bg.php'), + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => json_encode( (object) [ + 'type' => 'bg-img', + 'bg_set' => [ + ['src' => "http://example.org/wp-content/rocket-test-data/images/lcp/testavif.avif"], + ] + ]), + 'viewport' => json_encode ( [] ), + ], + ], + 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_single_bg.php'), ] ], From 7cb4fcd96e2dd4dd8a2276aa513e827265e9fbc6 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 16 Apr 2024 05:19:59 +0200 Subject: [PATCH 077/167] Closes #6531: Preload responsive images Preload responsive images --- assets/js/lcp-beacon.js | 8 ++++- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- .../Media/AboveTheFold/AJAX/Controller.php | 29 ++++++++++++++----- .../Subscriber/HTML/input_lcp_responsive.php | 25 ++++++++++++++++ .../Subscriber/HTML/output_lcp_responsive.php | 25 ++++++++++++++++ .../AboveTheFold/Frontend/Subscriber/lcp.php | 20 +++++++++++-- 7 files changed, 99 insertions(+), 12 deletions(-) create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_responsive.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_responsive.php diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index 25ffc9028b..abded5a53d 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -63,7 +63,13 @@ function getElementInfo(element) { const css_bg_url_rgx = /url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/ig; - if (nodeName === "img") { + if (nodeName === "img" && element.srcset) { + element_info.type = "img-srcset"; + element_info.src = element.src; + element_info.srcset = element.srcset; // capture srcset + element_info.sizes = element.sizes; // capture sizes + element_info.current_src = element.currentSrc; + } else if (nodeName === "img") { element_info.type = "img"; element_info.src = element.src; element_info.current_src = element.currentSrc; diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 53d003bfc6..fcb5ef724a 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(r,i,c){function s(t,e){if(!i[t]){if(!r[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e\"none\"!==e).join(\"\");if(n.type=\"bg-img\",i.includes(\"image-set(\")&&(n.type=\"bg-img-set\"),!i||\"\"===i)return null;const c=[...i.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log(\"matches : \"+JSON.stringify(c)),n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),console.log(\"element_info.bg_set : \"+JSON.stringify(n.bg_set)),n.bg_set.every(e=>\"\"===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),console.log(\"element_info.bg_set 2 : \"+JSON.stringify(n.bg_set)),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),g=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img\"),n=0;ne.src===o.src)||i!==document||g.push({src:o.src,label:\"above-the-fold\"})}}console.log(g);var l=JSON.stringify(g);window.performance_images_json=l,console.log(l);const a=new FormData;a.append(\"action\",\"rocket_lcp\"),a.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),a.append(\"url\",rocket_lcp_data.url),a.append(\"is_mobile\",rocket_lcp_data.is_mobile),a.append(\"images\",l),a.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(r,i,c){function s(t,e){if(!i[t]){if(!r[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e\"none\"!==e).join(\"\");if(n.type=\"bg-img\",i.includes(\"image-set(\")&&(n.type=\"bg-img-set\"),!i||\"\"===i)return null;const c=[...i.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log(\"matches : \"+JSON.stringify(c)),n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),console.log(\"element_info.bg_set : \"+JSON.stringify(n.bg_set)),n.bg_set.every(e=>\"\"===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),console.log(\"element_info.bg_set 2 : \"+JSON.stringify(n.bg_set)),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),g=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img\"),n=0;ne.src===o.src)||i!==document||g.push({src:o.src,label:\"above-the-fold\"})}}console.log(g);var l=JSON.stringify(g);window.performance_images_json=l,console.log(l);const a=new FormData;a.append(\"action\",\"rocket_lcp\"),a.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),a.append(\"url\",rocket_lcp_data.url),a.append(\"is_mobile\",rocket_lcp_data.is_mobile),a.append(\"images\",l),a.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index f71920bb4a..a88da9d60c 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function o(r,i,c){function s(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e"none"!==e).join("");if(n.type="bg-img",i.includes("image-set(")&&(n.type="bg-img-set"),!i||""===i)return null;const c=[...i.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log("matches : "+JSON.stringify(c)),n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),console.log("element_info.bg_set : "+JSON.stringify(n.bg_set)),n.bg_set.every(e=>""===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),console.log("element_info.bg_set 2 : "+JSON.stringify(n.bg_set)),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),g=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img"),n=0;ne.src===o.src)||i!==document||g.push({src:o.src,label:"above-the-fold"})}}console.log(g);var l=JSON.stringify(g);window.performance_images_json=l,console.log(l);const a=new FormData;a.append("action","rocket_lcp"),a.append("rocket_lcp_nonce",rocket_lcp_data.nonce),a.append("url",rocket_lcp_data.url),a.append("is_mobile",rocket_lcp_data.is_mobile),a.append("images",l),a.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(o,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(o,500),console.timeEnd("extract")})},{}]},{},[1]); +!function o(r,i,c){function s(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e"none"!==e).join("");if(n.type="bg-img",i.includes("image-set(")&&(n.type="bg-img-set"),!i||""===i)return null;const c=[...i.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log("matches : "+JSON.stringify(c)),n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),console.log("element_info.bg_set : "+JSON.stringify(n.bg_set)),n.bg_set.every(e=>""===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),console.log("element_info.bg_set 2 : "+JSON.stringify(n.bg_set)),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),g=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img"),n=0;ne.src===o.src)||i!==document||g.push({src:o.src,label:"above-the-fold"})}}console.log(g);var l=JSON.stringify(g);window.performance_images_json=l,console.log(l);const a=new FormData;a.append("action","rocket_lcp"),a.append("rocket_lcp_nonce",rocket_lcp_data.nonce),a.append("url",rocket_lcp_data.url),a.append("is_mobile",rocket_lcp_data.is_mobile),a.append("images",l),a.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(o,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(o,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index 3f2a73a81c..e0c7dceb4f 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -99,14 +99,29 @@ public function add_lcp_data() { * @return object|null Returns an object with the 'type' property and the first key that exists in the image object. If none of the keys exist in the image object, it returns null. */ private function createObject($image, $keys) { - foreach ($keys as $key) { - if (isset($image->$key)) { - return (object) [ - 'type' => $image->type, - $key => $image->$key, - ]; + $object = new \stdClass(); + $object->type = $image->type; + + if ($image->type === 'img-srcset') { + // If the type is 'img-srcset', add all the required parameters to the object. + $object->src = $image->src; + $object->srcset = $image->srcset; + $object->sizes = $image->sizes; + } else { + // For other types, add the first non-empty key to the object. + foreach ($keys as $key) { + if (isset($image->$key) && !empty($image->$key)) { + $object->$key = $image->$key; + break; + } } } - return null; + + // If none of the keys exist in the image object, return null. + if (count((array)$object) <= 1) { + return null; + } + + return $object; } } diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_responsive.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_responsive.php new file mode 100644 index 0000000000..322a17f9cc --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_responsive.php @@ -0,0 +1,25 @@ + + + + + + + lcp_responsive_bg + + + +
+ A rad wolf +
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_responsive.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_responsive.php new file mode 100644 index 0000000000..abb86dcb2a --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_responsive.php @@ -0,0 +1,25 @@ + + + + + + + lcp_responsive_bg + + + +
+ A rad wolf +
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php index 32bfc8817b..19d5e6ef55 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php @@ -118,7 +118,23 @@ ], ], 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_single_bg.php'), - - ] + ], + 'shouldPreloadLcpResponsiveImage' => [ + 'config' => [ + 'html' => file_get_contents(__DIR__ . '/HTML/input_lcp_responsive.php'), + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => json_encode( (object) [ + 'type' => 'img-srcset', + 'src' => 'wolf.jpg', + "srcset" => "wolf_400px.jpg 400w, wolf_800px.jpg 800w, wolf_1600px.jpg 1600w", + "sizes" => "50vw", + ]), + 'viewport' => json_encode ( [] ), + ], + ], + 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_responsive.php'), + ], ], ]; From 9707faf7bce343f91e64667b35a89f270c657dc4 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 16 Apr 2024 05:43:39 +0200 Subject: [PATCH 078/167] Closes #6530: Preload pictures tags Preload pictures tags --- assets/js/lcp-beacon.js | 9 ++++++ .../Media/AboveTheFold/AJAX/Controller.php | 3 ++ .../AboveTheFold/Frontend/Controller.php | 21 ++++++++++---- .../Subscriber/HTML/input_lcp_picture.php | 29 +++++++++++++++++++ .../Subscriber/HTML/output_lcp_picture.php | 29 +++++++++++++++++++ .../AboveTheFold/Frontend/Subscriber/lcp.php | 25 ++++++++++++++++ 6 files changed, 110 insertions(+), 6 deletions(-) create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_picture.php create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_picture.php diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index abded5a53d..6270616e88 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -77,6 +77,15 @@ function getElementInfo(element) { element_info.type = "img"; element_info.src = element.poster; element_info.current_src = element.poster; + } else if (nodeName === "picture") { + element_info.type = "picture"; + element_info.src = element.querySelector('img').src; + element_info.sources = Array.from(element.querySelectorAll('source')).map(source => { + return { + srcset: source.srcset, + media: source.media + }; + }); } else { const computed_style = window.getComputedStyle(element, null); const bg_props = [ diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index e0c7dceb4f..869c024d62 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -107,6 +107,9 @@ private function createObject($image, $keys) { $object->src = $image->src; $object->srcset = $image->srcset; $object->sizes = $image->sizes; + } elseif ($image->type === 'picture') { + $object->src = $image->src; + $object->sources = $image->sources; } else { // For other types, add the first non-empty key to the object. foreach ($keys as $key) { diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index f7390cc681..5563f92586 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -271,14 +271,23 @@ private function generate_lcp_link_tag_with_sources( $lcp ): array { } break; case 'picture': - if ( ! empty( $lcp->sources ) ) { - foreach ( $lcp->sources as $source ) { - $sources[] = $source->srcset; - $tag .= $start_tag . 'href="' . $source->srcset . '" media="' . $source->media . '"' . $end_tag; + $prev_max_width = null; + foreach ( $lcp->sources as $source ) { + $media = $source->media; + if ( $prev_max_width !== null ) { + $media = '(min-width: ' . ($prev_max_width + 0.1) . 'px) and ' . $media; + } + $sources[] = $source->srcset; + $tag .= $start_tag . 'href="' . $source->srcset . '" media="' . $media . '"' . $end_tag; + if ( preg_match( '/\(max-width: (\d+(\.\d+)?)px\)/', $source->media, $matches ) ) { + $prev_max_width = floatval( $matches[1] ); } } - $sources[] = $lcp->src; - $tag .= $start_tag . 'href="' . $lcp->src . '"' . $end_tag; + if ( $prev_max_width !== null ) { + $media = '(min-width: ' . ($prev_max_width + 0.1) . 'px)'; + $sources[] = $lcp->src; + $tag .= $start_tag . 'href="' . $lcp->src . '" media="' . $media . '"' . $end_tag; + } break; } diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_picture.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_picture.php new file mode 100644 index 0000000000..8a4df9fbfe --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_lcp_picture.php @@ -0,0 +1,29 @@ + + + + + + + lcp_responsive_bg + + + +
+ + + + + +
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_picture.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_picture.php new file mode 100644 index 0000000000..847fd3a842 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_lcp_picture.php @@ -0,0 +1,29 @@ + + + + + + + lcp_responsive_bg + + + +
+ + + + + +
+ + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php index 19d5e6ef55..21e7d0dd91 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php @@ -137,4 +137,29 @@ 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_responsive.php'), ], ], + 'shouldPreloadPictureTag' => [ + 'config' => [ + 'html' => file_get_contents(__DIR__ . '/HTML/input_lcp_picture.php'), + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => json_encode( (object) [ + 'type' => 'picture', + 'src' => 'large_cat.jpg', + 'sources' => [ + [ + 'srcset' => 'small_cat.jpg', + 'media' => '(max-width: 400px)' + ], + [ + 'srcset' => 'medium_cat.jpg', + 'media' => '(max-width: 800px)' + ] + ] + ]), + 'viewport' => json_encode ( [] ), + ], + ], + 'expected' => file_get_contents(__DIR__ . '/HTML/output_lcp_picture.php'), + ], ]; From bd07079c1377feaf6f186ffe37be325428c36c7d Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 16 Apr 2024 05:47:23 +0200 Subject: [PATCH 079/167] Apply linter --- .../Media/AboveTheFold/AJAX/Controller.php | 38 +++++++++---------- .../AboveTheFold/Frontend/Controller.php | 8 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index 869c024d62..c7fcd643c2 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -51,15 +51,15 @@ public function add_lcp_data() { $lcp = 'not found'; $viewport = []; - $keys = ['bg_set', 'src']; // Add more keys here in the order of their priority - - foreach ($images as $image) { - if ('lcp' === $image->label && 'not found' === $lcp) { - $lcp = $this->createObject($image, $keys); - } elseif ('above-the-fold' === $image->label) { - $viewportImage = $this->createObject($image, $keys); - if ($viewportImage !== null) { - $viewport[] = $viewportImage; + $keys = [ 'bg_set', 'src' ]; + + foreach ( $images as $image ) { + if ( 'lcp' === $image->label && 'not found' === $lcp ) { + $lcp = $this->create_object( $image, $keys ); + } elseif ( 'above-the-fold' === $image->label ) { + $viewport_image = $this->create_object( $image, $keys ); + if ( null !== $viewport_image ) { + $viewport[] = $viewport_image; } } } @@ -98,22 +98,22 @@ public function add_lcp_data() { * * @return object|null Returns an object with the 'type' property and the first key that exists in the image object. If none of the keys exist in the image object, it returns null. */ - private function createObject($image, $keys) { - $object = new \stdClass(); + private function create_object( $image, $keys ) { + $object = new \stdClass(); $object->type = $image->type; - if ($image->type === 'img-srcset') { + if ( 'img-srcset' === $image->type ) { // If the type is 'img-srcset', add all the required parameters to the object. - $object->src = $image->src; + $object->src = $image->src; $object->srcset = $image->srcset; - $object->sizes = $image->sizes; - } elseif ($image->type === 'picture') { - $object->src = $image->src; + $object->sizes = $image->sizes; + } elseif ( 'picture' === $image->type ) { + $object->src = $image->src; $object->sources = $image->sources; } else { // For other types, add the first non-empty key to the object. - foreach ($keys as $key) { - if (isset($image->$key) && !empty($image->$key)) { + foreach ( $keys as $key ) { + if ( isset( $image->$key ) && ! empty( $image->$key ) ) { $object->$key = $image->$key; break; } @@ -121,7 +121,7 @@ private function createObject($image, $keys) { } // If none of the keys exist in the image object, return null. - if (count((array)$object) <= 1) { + if ( count( (array) $object ) <= 1 ) { return null; } diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 5563f92586..1b616db8d1 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -274,8 +274,8 @@ private function generate_lcp_link_tag_with_sources( $lcp ): array { $prev_max_width = null; foreach ( $lcp->sources as $source ) { $media = $source->media; - if ( $prev_max_width !== null ) { - $media = '(min-width: ' . ($prev_max_width + 0.1) . 'px) and ' . $media; + if ( null !== $prev_max_width ) { + $media = '(min-width: ' . ( $prev_max_width + 0.1 ) . 'px) and ' . $media; } $sources[] = $source->srcset; $tag .= $start_tag . 'href="' . $source->srcset . '" media="' . $media . '"' . $end_tag; @@ -283,8 +283,8 @@ private function generate_lcp_link_tag_with_sources( $lcp ): array { $prev_max_width = floatval( $matches[1] ); } } - if ( $prev_max_width !== null ) { - $media = '(min-width: ' . ($prev_max_width + 0.1) . 'px)'; + if ( null !== $prev_max_width ) { + $media = '(min-width: ' . ( $prev_max_width + 0.1 ) . 'px)'; $sources[] = $lcp->src; $tag .= $start_tag . 'href="' . $lcp->src . '" media="' . $media . '"' . $end_tag; } From 52c5d80a9818a6ff72d59a96a8a6f08d9273288d Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 16 Apr 2024 07:33:08 +0200 Subject: [PATCH 080/167] clean code --- assets/js/lcp-beacon.js | 4 +--- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index 6270616e88..ba06f1228c 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -104,8 +104,7 @@ function getElementInfo(element) { } const matches = [...full_bg_prop.matchAll(css_bg_url_rgx)]; - console.log('matches : '+ JSON.stringify(matches)); - element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim() + (m[2] ? " " + m[2].trim() : "")} : {}); console.log('element_info.bg_set : '+ JSON.stringify(element_info.bg_set)); + element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim() + (m[2] ? " " + m[2].trim() : "")} : {}); // Check if bg_set array is populated with empty objects if (element_info.bg_set.every(item => item.src === "")) { // If bg_set array is populated with empty objects, populate it with the URLs from the matches array @@ -170,7 +169,6 @@ async function main() { console.log(performance_images); var performance_images_json = JSON.stringify(performance_images); window.performance_images_json = performance_images_json; - console.log(performance_images_json); const data = new FormData(); diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index fcb5ef724a..96bd0e3732 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(r,i,c){function s(t,e){if(!i[t]){if(!r[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e\"none\"!==e).join(\"\");if(n.type=\"bg-img\",i.includes(\"image-set(\")&&(n.type=\"bg-img-set\"),!i||\"\"===i)return null;const c=[...i.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log(\"matches : \"+JSON.stringify(c)),n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),console.log(\"element_info.bg_set : \"+JSON.stringify(n.bg_set)),n.bg_set.every(e=>\"\"===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),console.log(\"element_info.bg_set 2 : \"+JSON.stringify(n.bg_set)),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),g=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img\"),n=0;ne.src===o.src)||i!==document||g.push({src:o.src,label:\"above-the-fold\"})}}console.log(g);var l=JSON.stringify(g);window.performance_images_json=l,console.log(l);const a=new FormData;a.append(\"action\",\"rocket_lcp\"),a.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),a.append(\"url\",rocket_lcp_data.url),a.append(\"is_mobile\",rocket_lcp_data.is_mobile),a.append(\"images\",l),a.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return s(o[t][1][e]||e)},r,r.exports,n,o,c,i)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const n=window.getComputedStyle(e,null),o=[n.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],c=o.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",c.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!c||\"\"===c)return null;const i=[...c.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:r,elementInfo:n}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:u(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),d=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img\"),r=0;re.src===n.src)||c!==document||d.push({src:n.src,label:\"above-the-fold\"})}}console.log(d);var l=JSON.stringify(d);window.performance_images_json=l;const a=new FormData;a.append(\"action\",\"rocket_lcp\"),a.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),a.append(\"url\",rocket_lcp_data.url),a.append(\"is_mobile\",rocket_lcp_data.is_mobile),a.append(\"images\",l),a.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index a88da9d60c..cb8640077b 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function o(r,i,c){function s(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,c)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e"none"!==e).join("");if(n.type="bg-img",i.includes("image-set(")&&(n.type="bg-img-set"),!i||""===i)return null;const c=[...i.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];console.log("matches : "+JSON.stringify(c)),n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),console.log("element_info.bg_set : "+JSON.stringify(n.bg_set)),n.bg_set.every(e=>""===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),console.log("element_info.bg_set 2 : "+JSON.stringify(n.bg_set)),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:o}),i.length=Math.min(r,i.length);break}i.length({element:e.element,elementInfo:d(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),g=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img"),n=0;ne.src===o.src)||i!==document||g.push({src:o.src,label:"above-the-fold"})}}console.log(g);var l=JSON.stringify(g);window.performance_images_json=l,console.log(l);const a=new FormData;a.append("action","rocket_lcp"),a.append("rocket_lcp_nonce",rocket_lcp_data.nonce),a.append("url",rocket_lcp_data.url),a.append("is_mobile",rocket_lcp_data.is_mobile),a.append("images",l),a.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(o,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(o,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return s(o[t][1][e]||e)},r,r.exports,n,o,c,i)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const n=window.getComputedStyle(e,null),o=[n.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],c=o.filter(e=>"none"!==e).join("");if(r.type="bg-img",c.includes("image-set(")&&(r.type="bg-img-set"),!c||""===c)return null;const i=[...c.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:r,elementInfo:n}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:u(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),d=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img"),r=0;re.src===n.src)||c!==document||d.push({src:n.src,label:"above-the-fold"})}}console.log(d);var l=JSON.stringify(d);window.performance_images_json=l;const a=new FormData;a.append("action","rocket_lcp"),a.append("rocket_lcp_nonce",rocket_lcp_data.nonce),a.append("url",rocket_lcp_data.url),a.append("is_mobile",rocket_lcp_data.is_mobile),a.append("images",l),a.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From a06c5cf674bcf8f2f00ce6b32dca5d63c2918ac0 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 16 Apr 2024 08:29:57 +0200 Subject: [PATCH 081/167] Fix unit tests --- .../Media/AboveTheFold/AJAX/Controller/addLcpData.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php index c6b34efb89..7526e6b88c 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php @@ -29,10 +29,12 @@ 'images' => json_encode( [ (object) [ + 'type' => 'img', 'label' => 'lcp', 'src' => 'http://example.org/lcp.jpg', ], (object) [ + 'type' => 'img', 'label' => 'above-the-fold', 'src' => 'http://example.org/above-the-fold.jpg', ], @@ -71,10 +73,12 @@ [ (object) [ 'label' => 'lcp', + 'type' => 'img', 'src' => 'http://example.org/lcp.jpg', ], (object) [ 'label' => 'above-the-fold', + 'type' => 'img', 'src' => 'http://example.org/above-the-fold.jpg', ], ] @@ -129,10 +133,12 @@ [ (object) [ 'label' => 'lcp', + 'type' => 'img', 'src' => 'http://example.org/lcp.jpg', ], (object) [ 'label' => 'above-the-fold', + 'type' => 'img', 'src' => 'http://example.org/above-the-fold.jpg', ], ] From 4131eb25b38e1b47c5281660d7e4b2eb5d59fda1 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 16 Apr 2024 08:39:44 +0200 Subject: [PATCH 082/167] Fix integrations tests --- .../Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php index 34c2fba3cf..4ee0ca1e19 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php @@ -29,10 +29,12 @@ [ (object) [ 'label' => 'lcp', + 'type' => 'img', 'src' => 'http://example.org/lcp.jpg', ], (object) [ 'label' => 'above-the-fold', + 'type' => 'img', 'src' => 'http://example.org/above-the-fold.jpg', ], ] @@ -69,10 +71,12 @@ [ (object) [ 'label' => 'lcp', + 'type' => 'img', 'src' => 'http://example.org/lcp.jpg', ], (object) [ 'label' => 'above-the-fold', + 'type' => 'img', 'src' => 'http://example.org/above-the-fold.jpg', ], ] From dcf4bd4a50d646636de3b2e23eef523e7f5cc74b Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Tue, 16 Apr 2024 13:09:20 +0200 Subject: [PATCH 083/167] Comply feedback --- .../Media/AboveTheFold/AJAX/Controller.php | 34 +++++---- .../AboveTheFold/Frontend/Controller.php | 72 ++++++++++++++----- 2 files changed, 74 insertions(+), 32 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index c7fcd643c2..beabd7fbc5 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -102,22 +102,26 @@ private function create_object( $image, $keys ) { $object = new \stdClass(); $object->type = $image->type; - if ( 'img-srcset' === $image->type ) { - // If the type is 'img-srcset', add all the required parameters to the object. - $object->src = $image->src; - $object->srcset = $image->srcset; - $object->sizes = $image->sizes; - } elseif ( 'picture' === $image->type ) { - $object->src = $image->src; - $object->sources = $image->sources; - } else { - // For other types, add the first non-empty key to the object. - foreach ( $keys as $key ) { - if ( isset( $image->$key ) && ! empty( $image->$key ) ) { - $object->$key = $image->$key; - break; + switch ( $image->type ) { + case 'img-srcset': + // If the type is 'img-srcset', add all the required parameters to the object. + $object->src = $image->src; + $object->srcset = $image->srcset; + $object->sizes = $image->sizes; + break; + case 'picture': + $object->src = $image->src; + $object->sources = $image->sources; + break; + default: + // For other types, add the first non-empty key to the object. + foreach ( $keys as $key ) { + if ( isset( $image->$key ) && ! empty( $image->$key ) ) { + $object->$key = $image->$key; + break; + } } - } + break; } // If none of the keys exist in the image object, return null. diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 1b616db8d1..7d4c378875 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -271,23 +271,9 @@ private function generate_lcp_link_tag_with_sources( $lcp ): array { } break; case 'picture': - $prev_max_width = null; - foreach ( $lcp->sources as $source ) { - $media = $source->media; - if ( null !== $prev_max_width ) { - $media = '(min-width: ' . ( $prev_max_width + 0.1 ) . 'px) and ' . $media; - } - $sources[] = $source->srcset; - $tag .= $start_tag . 'href="' . $source->srcset . '" media="' . $media . '"' . $end_tag; - if ( preg_match( '/\(max-width: (\d+(\.\d+)?)px\)/', $source->media, $matches ) ) { - $prev_max_width = floatval( $matches[1] ); - } - } - if ( null !== $prev_max_width ) { - $media = '(min-width: ' . ( $prev_max_width + 0.1 ) . 'px)'; - $sources[] = $lcp->src; - $tag .= $start_tag . 'href="' . $lcp->src . '" media="' . $media . '"' . $end_tag; - } + $result = $this->generate_source_tags( $lcp, $start_tag, $end_tag ); + $sources = $result['sources']; + $tag .= $result['tag']; break; } @@ -381,4 +367,56 @@ public function inject_beacon( $html, $url, $is_mobile ): string { // Append the script tag just before the closing body tag. return str_replace( '', $inline_script . $script_tag . '', $html ); } + + /** + * Generates the source tags for the given LCP object. + * + * This method is used to generate the source tags for the given LCP object. It iterates over the sources of the LCP object, + * and for each source, it generates a media query and adds the source to the sources array. It also constructs a tag string + * with the source and media query. If a previous max-width is found, it is used to update the media query. The method also + * handles the case where a max-width is found in the source's media attribute. + * + * @param object $lcp The LCP object containing the sources. + * @param string $start_tag The starting tag for each source. + * @param string $end_tag The ending tag for each source. + * + * @return array An associative array containing the sources array and the tag string. + */ + private function generate_source_tags( $lcp, $start_tag, $end_tag ) { + // Initialize the previous max-width to null. + $prev_max_width = null; + // Initialize the sources array and the tag string. + $sources = []; + $tag = ''; + + // Iterate over the sources in the LCP object. + foreach ( $lcp->sources as $source ) { + // Get the media attribute of the source. + $media = $source->media; + // If a previous max-width is found, update the media query. + if ( null !== $prev_max_width ) { + $media = '(min-width: ' . ( $prev_max_width + 0.1 ) . 'px) and ' . $media; + } + // Add the source to the sources array. + $sources[] = $source->srcset; + // Append the source and media query to the tag string. + $tag .= $start_tag . 'href="' . $source->srcset . '" media="' . $media . '"' . $end_tag; + // If a max-width is found in the source's media attribute, update the previous max-width. + if ( preg_match( '/\(max-width: (\d+(\.\d+)?)px\)/', $source->media, $matches ) ) { + $prev_max_width = floatval( $matches[1] ); + } + } + // If a previous max-width is found, update the media query and add the LCP source to the sources array and the tag string. + if ( null !== $prev_max_width ) { + $media = '(min-width: ' . ( $prev_max_width + 0.1 ) . 'px)'; + $sources[] = $lcp->src; + $tag .= $start_tag . 'href="' . $lcp->src . '" media="' . $media . '"' . $end_tag; + } + + // Return an associative array containing the sources array and the tag string. + return [ + 'sources' => $sources, + 'tag' => $tag, + ]; + } } From 538fbb13e773d876044354d1f29b67db1eea753e Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Wed, 17 Apr 2024 03:25:30 +0200 Subject: [PATCH 084/167] Update lcp-beacon --- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 7b6a7e001a..bb8c3a77ef 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(i,c,r){function a(t,e){if(!c[t]){if(!i[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=c[t]={exports:{}},i[t][0].call(n.exports,function(e){return a(i[t][1][e]||e)},n,n.exports,o,i,c,r)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,imageURL:o}),c.length=Math.min(i,c.length);break}c.length({element:e.element,imageURL:e.imageURL}))}let g=[];async function o(){const e=await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:new URLSearchParams({action:\"rocket_check_lcp\",url:rocket_lcp_data.url,rocket_lcp_nonce:rocket_lcp_data.nonce})});if(!0!==(await e.json()).success){var t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;if(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var o=document.querySelectorAll(\"img\"),i=0;ie.src===c.src)||a!==document||g.push({src:c.src,label:\"above-the-fold\"})}}console.log(g);n=JSON.stringify(g);window.performance_images_json=n,console.log(n);const u=new FormData;u.append(\"action\",\"rocket_lcp\"),u.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),u.append(\"url\",rocket_lcp_data.url),u.append(\"is_mobile\",rocket_lcp_data.is_mobile),u.append(\"images\",n),u.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:u}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(i,c,a){function r(t,e){if(!c[t]){if(!i[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=c[t]={exports:{}},i[t][0].call(n.exports,function(e){return r(i[t][1][e]||e)},n,n.exports,o,i,c,a)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,imageURL:o}),c.length=Math.min(i,c.length);break}c.length({element:e.element,imageURL:e.imageURL}))}let p=[];async function o(){let e=new FormData;e.append(\"action\",\"rocket_check_lcp\"),e.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),e.append(\"url\",rocket_lcp_data.url),e.append(\"is_mobile\",rocket_lcp_data.is_mobile);await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:e});if(!0!==lcp_data.success){var t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;if(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var o=document.querySelectorAll(\"img\"),i=0;ie.src===c.src)||a!==document||p.push({src:c.src,label:\"above-the-fold\"})}}console.log(p);n=JSON.stringify(p);window.performance_images_json=n,console.log(n);const u=new FormData;u.append(\"action\",\"rocket_lcp\"),u.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),u.append(\"url\",rocket_lcp_data.url),u.append(\"is_mobile\",rocket_lcp_data.is_mobile),u.append(\"images\",n),u.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:u}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index a1fa186166..d68e87db3d 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function o(i,c,r){function a(t,e){if(!c[t]){if(!i[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=c[t]={exports:{}},i[t][0].call(n.exports,function(e){return a(i[t][1][e]||e)},n,n.exports,o,i,c,r)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,imageURL:o}),c.length=Math.min(i,c.length);break}c.length({element:e.element,imageURL:e.imageURL}))}let g=[];async function o(){const e=await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:new URLSearchParams({action:"rocket_check_lcp",url:rocket_lcp_data.url,rocket_lcp_nonce:rocket_lcp_data.nonce})});if(!0!==(await e.json()).success){var t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;if(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");for(var o=document.querySelectorAll("img"),i=0;ie.src===c.src)||a!==document||g.push({src:c.src,label:"above-the-fold"})}}console.log(g);n=JSON.stringify(g);window.performance_images_json=n,console.log(n);const u=new FormData;u.append("action","rocket_lcp"),u.append("rocket_lcp_nonce",rocket_lcp_data.nonce),u.append("url",rocket_lcp_data.url),u.append("is_mobile",rocket_lcp_data.is_mobile),u.append("images",n),u.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:u}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(o,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(o,500),console.timeEnd("extract")})},{}]},{},[1]); +!function o(i,c,a){function r(t,e){if(!c[t]){if(!i[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=c[t]={exports:{}},i[t][0].call(n.exports,function(e){return r(i[t][1][e]||e)},n,n.exports,o,i,c,a)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,imageURL:o}),c.length=Math.min(i,c.length);break}c.length({element:e.element,imageURL:e.imageURL}))}let p=[];async function o(){let e=new FormData;e.append("action","rocket_check_lcp"),e.append("rocket_lcp_nonce",rocket_lcp_data.nonce),e.append("url",rocket_lcp_data.url),e.append("is_mobile",rocket_lcp_data.is_mobile);await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:e});if(!0!==lcp_data.success){var t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;if(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");for(var o=document.querySelectorAll("img"),i=0;ie.src===c.src)||a!==document||p.push({src:c.src,label:"above-the-fold"})}}console.log(p);n=JSON.stringify(p);window.performance_images_json=n,console.log(n);const u=new FormData;u.append("action","rocket_lcp"),u.append("rocket_lcp_nonce",rocket_lcp_data.nonce),u.append("url",rocket_lcp_data.url),u.append("is_mobile",rocket_lcp_data.is_mobile),u.append("images",n),u.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:u}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(o,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(o,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From c6a7c1e660329b4e69914aa9bc443d9c52e3e37d Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Wed, 17 Apr 2024 03:26:05 +0200 Subject: [PATCH 085/167] Update lcp-beacon --- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 96bd0e3732..d0e710b2fd 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return s(o[t][1][e]||e)},r,r.exports,n,o,c,i)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const n=window.getComputedStyle(e,null),o=[n.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],c=o.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",c.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!c||\"\"===c)return null;const i=[...c.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:r,elementInfo:n}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:u(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),d=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img\"),r=0;re.src===n.src)||c!==document||d.push({src:n.src,label:\"above-the-fold\"})}}console.log(d);var l=JSON.stringify(d);window.performance_images_json=l;const a=new FormData;a.append(\"action\",\"rocket_lcp\"),a.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),a.append(\"url\",rocket_lcp_data.url),a.append(\"is_mobile\",rocket_lcp_data.is_mobile),a.append(\"images\",l),a.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function r(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=c[t]={exports:{}},o[t][0].call(n.exports,function(e){return s(o[t][1][e]||e)},n,n.exports,r,o,c,i)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const r=window.getComputedStyle(e,null),o=[r.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],c=o.filter(e=>\"none\"!==e).join(\"\");if(n.type=\"bg-img\",c.includes(\"image-set(\")&&(n.type=\"bg-img-set\"),!c||\"\"===c)return null;const i=[...c.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];n.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),n.bg_set.every(e=>\"\"===e.src)&&(n.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,elementInfo:r}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:u(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),m=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img\"),n=0;ne.src===r.src)||o!==document||m.push({src:r.src,label:\"above-the-fold\"})}}console.log(m);var s=JSON.stringify(m);window.performance_images_json=s;const l=new FormData;l.append(\"action\",\"rocket_lcp\"),l.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),l.append(\"url\",rocket_lcp_data.url),l.append(\"is_mobile\",rocket_lcp_data.is_mobile),l.append(\"images\",s),l.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:l}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(r,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(r,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index cb8640077b..2ba6c7a37c 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return s(o[t][1][e]||e)},r,r.exports,n,o,c,i)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const n=window.getComputedStyle(e,null),o=[n.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],c=o.filter(e=>"none"!==e).join("");if(r.type="bg-img",c.includes("image-set(")&&(r.type="bg-img-set"),!c||""===c)return null;const i=[...c.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:r,elementInfo:n}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:u(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),d=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img"),r=0;re.src===n.src)||c!==document||d.push({src:n.src,label:"above-the-fold"})}}console.log(d);var l=JSON.stringify(d);window.performance_images_json=l;const a=new FormData;a.append("action","rocket_lcp"),a.append("rocket_lcp_nonce",rocket_lcp_data.nonce),a.append("url",rocket_lcp_data.url),a.append("is_mobile",rocket_lcp_data.is_mobile),a.append("images",l),a.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:a}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); +!function r(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=c[t]={exports:{}},o[t][0].call(n.exports,function(e){return s(o[t][1][e]||e)},n,n.exports,r,o,c,i)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const r=window.getComputedStyle(e,null),o=[r.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],c=o.filter(e=>"none"!==e).join("");if(n.type="bg-img",c.includes("image-set(")&&(n.type="bg-img-set"),!c||""===c)return null;const i=[...c.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];n.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),n.bg_set.every(e=>""===e.src)&&(n.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,elementInfo:r}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:u(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),m=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img"),n=0;ne.src===r.src)||o!==document||m.push({src:r.src,label:"above-the-fold"})}}console.log(m);var s=JSON.stringify(m);window.performance_images_json=s;const l=new FormData;l.append("action","rocket_lcp"),l.append("rocket_lcp_nonce",rocket_lcp_data.nonce),l.append("url",rocket_lcp_data.url),l.append("is_mobile",rocket_lcp_data.is_mobile),l.append("images",s),l.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:l}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(r,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(r,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From 3c7281a4dc26be9059703d40e57517ecb75b7083 Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Wed, 17 Apr 2024 11:48:07 +0200 Subject: [PATCH 086/167] fix conflicts with activation --- inc/Engine/Activation/Activation.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/inc/Engine/Activation/Activation.php b/inc/Engine/Activation/Activation.php index 6ecda8bf6c..eee3cdd299 100644 --- a/inc/Engine/Activation/Activation.php +++ b/inc/Engine/Activation/Activation.php @@ -6,6 +6,9 @@ use WP_Rocket\Dependencies\League\Container\Container; use WP_Rocket\ServiceProvider\Options as OptionsServiceProvider; use WP_Rocket\Engine\Preload\Activation\ServiceProvider as PreloadActivationServiceProvider; +use WP_Rocket\Engine\License\ServiceProvider as LicenseServiceProvider; +use WP_Rocket\Logger\ServiceProvider as LoggerServiceProvider; +use WP_Rocket\Engine\Media\AboveTheFold\Activation\ServiceProvider as AboveTheFoldActivationServiceProvider; use WP_Rocket\ThirdParty\Hostings\HostResolver; use WP_Rocket\ThirdParty\Hostings\ServiceProvider as HostingsServiceProvider; @@ -44,10 +47,10 @@ public static function activate_plugin() { $container->addServiceProvider( new PreloadActivationServiceProvider() ); $container->addServiceProvider( new ServiceProvider() ); $container->addServiceProvider( new HostingsServiceProvider() ); - $container->addServiceProvider( new \WP_Rocket\Engine\License\ServiceProvider() ); - $container->addServiceProvider( new \WP_Rocket\Logger\ServiceProvider() ); + $container->addServiceProvider( new LicenseServiceProvider() ); + $container->addServiceProvider( new LoggerServiceProvider() ); $container->get( 'logger' ); - $container->addServiceProvider( new \WP_Rocket\Engine\Media\AboveTheFold\Activation\ServiceProvider ); + $container->addServiceProvider( new AboveTheFoldActivationServiceProvider() ); $host_type = HostResolver::get_host_service(); From 132a9f0d69483020ba41f290a624d10168ac014a Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Wed, 17 Apr 2024 11:55:27 +0200 Subject: [PATCH 087/167] fix atf serviceprovider to match the new container --- .../AboveTheFold/Activation/ServiceProvider.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/Activation/ServiceProvider.php b/inc/Engine/Media/AboveTheFold/Activation/ServiceProvider.php index 80114472a7..b1f9a4d20e 100644 --- a/inc/Engine/Media/AboveTheFold/Activation/ServiceProvider.php +++ b/inc/Engine/Media/AboveTheFold/Activation/ServiceProvider.php @@ -28,12 +28,23 @@ class ServiceProvider extends AbstractServiceProvider { 'atf_activation', ]; + /** + * 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() { + public function register(): void { $this->getContainer()->add( 'atf_context', Context::class ); $this->getContainer()->add( 'warmup_apiclient', APIClient::class ) From 5d51e472147b4f6d92893e9325d54f2c5bcf526f Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:56:19 +0100 Subject: [PATCH 088/167] Fix/update default fetched links to 10 and parse unappended url to is home (#6563) --- .../Media/AboveTheFold/WarmUp/APIClient.php | 4 +- .../Media/AboveTheFold/WarmUp/Controller.php | 11 +++- .../WarmUp/Controller/fetchLinks.php | 50 ++++++++++++++++--- 3 files changed, 56 insertions(+), 9 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/APIClient.php b/inc/Engine/Media/AboveTheFold/WarmUp/APIClient.php index 251e657f6b..f6112a9944 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/APIClient.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/APIClient.php @@ -15,6 +15,8 @@ class APIClient extends BaseAPIClient { * @return array */ public function add_to_atf_queue( string $url ): array { + $is_home = Utils::is_home( $url ); + $url = add_query_arg( [ 'wpr_imagedimensions' => 1, @@ -24,7 +26,7 @@ public function add_to_atf_queue( string $url ): array { $config = [ 'optimization_list' => '', - 'is_home' => Utils::is_home( $url ), + 'is_home' => $is_home, ]; return $this->add_to_queue( $url, $config ); diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 3cf75fb066..7f463e3177 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -6,6 +6,7 @@ use WP_Rocket\Engine\Common\Context\ContextInterface; use WP_Rocket\Admin\Options_Data; use WP_Rocket\Engine\License\API\User; +use WP_Rocket\Engine\Common\Utils; class Controller { @@ -125,12 +126,16 @@ function ( $link ) { function ( $link ) use ( $home_url ) { $link_host = wp_parse_url( $link ); $site_host = wp_parse_url( $home_url ); - /** * Check for valid link. * Check that no external link. + * Check that it's not home. */ - return wp_http_validate_url( $link ) && $link_host['host'] === $site_host['host']; + $is_valid_url = wp_http_validate_url( $link ); + $is_same_host = isset( $link_host['host'] ) ? $link_host['host'] === $site_host['host'] : false; + $is_not_home = ! Utils::is_home( $link ); + + return $is_valid_url && $is_same_host && $is_not_home; } ); @@ -144,6 +149,8 @@ function ( $link ) use ( $home_url ) { */ $link_number = apply_filters( 'rocket_atf_warmup_links_number', 10 ); $links = array_slice( $links, 0, $link_number ); + // Add home url to the list of links. + $links[] = home_url(); return $links; } diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php index 5886e69681..0a2211646e 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php @@ -1,11 +1,12 @@ '; $html_no_valid_links = 'Goto TopClick Bait'; -$html_valid_links_among_valid_links = 'Goto TopClick BaitHello WorldAnother DayRich Dad Poor Dad'; +$html_valid_links_among_invalid_links = 'Goto TopClick BaitHello WorldAnother DayRich Dad Poor Dad'; $html_external_links = 'Hello WorldAnother DayRich Dad Poor Dad'; $html_valid_links_among_external_links = 'Hello WorldAnother DayRich Dad Poor DadHello WorldAnother DayRich Dad Poor Dad'; $html_links_without_duplicate = 'Hello WorldAnother DayRich Dad Poor DadHello WorldAnother DayRich Dad Poor DadBuy (He came to set the captives free) - Rebecca Brown'; $html_links_with_relative_url = 'Hello WorldAnother DayRich Dad Poor DadBuy (He came to set the captives free) - Rebecca Brown'; +$html_with_ten_links_and_home = 'Hello World 2Hello World 3Hello World 4Hello World 5Hello World 6Hello World 7Hello World 8Hello World 9Rich Dad Poor DadBuy (He came to set the captives free) - Rebecca BrownHome'; return [ 'shouldReturnEmptyWhenLicenseExpired' => [ @@ -55,7 +56,7 @@ ], 'expected' => [], ], - 'shouldReturnEmptyWithNoValidLinks' => [ + 'shouldReturnOnlyHomeWithNoValidLinks' => [ 'config' => [ 'license_expired' => false, 'headers' => [ @@ -70,7 +71,9 @@ ], ], ], - 'expected' => [], + 'expected' => [ + 'https://example.org', + ], ], 'shouldReturnValidLinksAmongInvalidLinks' => [ 'config' => [ @@ -81,7 +84,7 @@ ], 'found_link' => true, 'response' => [ - 'body' => $html_valid_links_among_valid_links, + 'body' => $html_valid_links_among_invalid_links, 'response' => [ 'code' => 200, ], @@ -91,9 +94,10 @@ 'https://example.org/hello-world', 'https://example.org/another-day', 'https://example.org/rich-dad-poor-dad', + 'https://example.org', ], ], - 'shouldReturnEmptyWithExternalLinks' => [ + 'shouldReturnOnlyHomeWithExternalLinks' => [ 'config' => [ 'license_expired' => false, 'headers' => [ @@ -108,7 +112,9 @@ ], ], ], - 'expected' => [], + 'expected' => [ + 'https://example.org', + ], ], 'shouldReturnValidLinksAmongExternalLinks' => [ 'config' => [ @@ -129,6 +135,7 @@ 'https://example.org/hello-world', 'https://example.org/another-day', 'https://example.org/rich-dad-poor-dad', + 'https://example.org', ], ], 'shouldReturnLinksWithoutDuplicate' => [ @@ -151,6 +158,7 @@ 'https://example.org/another-day', 'https://example.org/rich-dad-poor-dad', 'https://example.org/rebecca-brown-he-came-to-set-the-captives-free', + 'https://example.org', ], ], 'shouldReturnLinksWithRelativeUrl' => [ @@ -173,6 +181,36 @@ 'https://example.org/another-day', 'https://example.org/rich-dad-poor-dad', 'https://example.org/rebecca-brown-he-came-to-set-the-captives-free', + 'https://example.org', + ], + ], + 'shouldReturnTenLinksPlusHome' => [ + 'config' => [ + 'license_expired' => false, + 'headers' => [ + 'user-agent' => 'WP Rocket/Pre-fetch Home Links', + 'timeout' => 60, + ], + 'found_link' => true, + 'response' => [ + 'body' => $html_with_ten_links_and_home, + 'response' => [ + 'code' => 200, + ], + ], + ], + 'expected' => [ + 'https://example.org/hello-world-2', + 'https://example.org/hello-world-3', + 'https://example.org/hello-world-4', + 'https://example.org/hello-world-5', + 'https://example.org/hello-world-6', + 'https://example.org/hello-world-7', + 'https://example.org/hello-world-8', + 'https://example.org/hello-world-9', + 'https://example.org/rich-dad-poor-dad', + 'https://example.org/rebecca-brown-he-came-to-set-the-captives-free', + 'https://example.org', ], ], ]; From cbf5840b61d36e6e19f32d458110e211bf537983 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 18 Apr 2024 13:02:41 +0200 Subject: [PATCH 089/167] Update lcp-beacon for atf --- assets/js/lcp-beacon.js | 59 +++++++++++++++++++++++++-------- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 47 insertions(+), 16 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index ba06f1228c..ee01cc6076 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -1,7 +1,34 @@ +function isDuplicateImage(image, performance_images) { + const elementInfo = getElementInfo(image); + + if (elementInfo === null) { + return false; + } + + if (elementInfo.type === "img" || elementInfo.type === "img-srcset" || elementInfo.type === "video") { + return performance_images.some((item) => { + return item.src === elementInfo.src; + }); + } else if (elementInfo.type === "bg-img" || elementInfo.type === "bg-img-set") { + return performance_images.some((item) => { + return item.src === elementInfo.src; + }); + } else if (elementInfo.type === "picture") { + return performance_images.some((item) => { + return item.src === elementInfo.src; + }); + } + + return false; +} + function isIntersecting(rect) { + // Check if the image is fully within the viewport return ( - rect.top <= (window.innerHeight || document.documentElement.clientHeight) && - rect.left <= (window.innerWidth || document.documentElement.clientWidth) + rect.top >= 0 && + rect.left >= 0 && + rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && + rect.right <= (window.innerWidth || document.documentElement.clientWidth) ); } @@ -136,7 +163,9 @@ async function main() { console.log("No LCP candidate found."); } - var above_the_fold_images = document.querySelectorAll("img"); + var above_the_fold_images = document.querySelectorAll( + "img, video, picture, p, main, div" + ); for (var i = 0; i < above_the_fold_images.length; i++) { var image = above_the_fold_images[i]; @@ -153,14 +182,16 @@ async function main() { } parent = parent.parentNode; } - const isDuplicate = performance_images.some( - (item) => item.src === image.src - ); + // const isDuplicate = performance_images.some( + // (item) => item.src === image.src + // ); + const isDuplicate = isDuplicateImage(image, performance_images); // If it's not a duplicate, push the new element if (!isDuplicate && parent === document) { + const elementInfo = getElementInfo(image); performance_images.push({ - src: image.src, + ...elementInfo, label: "above-the-fold", }); } @@ -184,13 +215,13 @@ async function main() { credentials: 'same-origin', body: data }) - .then((response) => response.json()) - .then((data) => { - console.log(data); - }) - .catch((error) => { - console.error(error); - }); + .then((response) => response.json()) + .then((data) => { + console.log(data); + }) + .catch((error) => { + console.error(error); + }); } if (document.readyState !== 'loading') { diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index d0e710b2fd..f4bd68aa5b 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function r(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=c[t]={exports:{}},o[t][0].call(n.exports,function(e){return s(o[t][1][e]||e)},n,n.exports,r,o,c,i)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const r=window.getComputedStyle(e,null),o=[r.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],c=o.filter(e=>\"none\"!==e).join(\"\");if(n.type=\"bg-img\",c.includes(\"image-set(\")&&(n.type=\"bg-img-set\"),!c||\"\"===c)return null;const i=[...c.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];n.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),n.bg_set.every(e=>\"\"===e.src)&&(n.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,elementInfo:r}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:u(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),m=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img\"),n=0;ne.src===r.src)||o!==document||m.push({src:r.src,label:\"above-the-fold\"})}}console.log(m);var s=JSON.stringify(m);window.performance_images_json=s;const l=new FormData;l.append(\"action\",\"rocket_lcp\"),l.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),l.append(\"url\",rocket_lcp_data.url),l.append(\"is_mobile\",rocket_lcp_data.is_mobile),l.append(\"images\",s),l.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:l}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(r,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(r,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function r(o,i,c){function s(t,e){if(!i[t]){if(!o[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=i[t]={exports:{}},o[t][0].call(n.exports,function(e){return s(o[t][1][e]||e)},n,n.exports,r,o,i,c)}return i[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const r=window.getComputedStyle(e,null),o=[r.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],i=o.filter(e=>\"none\"!==e).join(\"\");if(n.type=\"bg-img\",i.includes(\"image-set(\")&&(n.type=\"bg-img-set\"),!i||\"\"===i)return null;const c=[...i.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),n.bg_set.every(e=>\"\"===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:r}),i.length=Math.min(o,i.length);break}i.length({element:e.element,elementInfo:m(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),u=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img, video, picture, p, main, div\"),n=0;ne.src===n.src):\"bg-img\"===n.type||\"bg-img-set\"===n.type?t.some(e=>e.src===n.src):\"picture\"===n.type&&t.some(e=>e.src===n.src))})(r,u)||o!==document||(r=m(r),u.push({...r,label:\"above-the-fold\"}))}}console.log(u);var s=JSON.stringify(u);window.performance_images_json=s;const l=new FormData;l.append(\"action\",\"rocket_lcp\"),l.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),l.append(\"url\",rocket_lcp_data.url),l.append(\"is_mobile\",rocket_lcp_data.is_mobile),l.append(\"images\",s),l.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:l}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(r,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(r,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index 2ba6c7a37c..cb498d6815 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function r(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=c[t]={exports:{}},o[t][0].call(n.exports,function(e){return s(o[t][1][e]||e)},n,n.exports,r,o,c,i)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const r=window.getComputedStyle(e,null),o=[r.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],c=o.filter(e=>"none"!==e).join("");if(n.type="bg-img",c.includes("image-set(")&&(n.type="bg-img-set"),!c||""===c)return null;const i=[...c.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];n.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),n.bg_set.every(e=>""===e.src)&&(n.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,elementInfo:r}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:u(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),m=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img"),n=0;ne.src===r.src)||o!==document||m.push({src:r.src,label:"above-the-fold"})}}console.log(m);var s=JSON.stringify(m);window.performance_images_json=s;const l=new FormData;l.append("action","rocket_lcp"),l.append("rocket_lcp_nonce",rocket_lcp_data.nonce),l.append("url",rocket_lcp_data.url),l.append("is_mobile",rocket_lcp_data.is_mobile),l.append("images",s),l.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:l}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(r,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(r,500),console.timeEnd("extract")})},{}]},{},[1]); +!function r(o,i,c){function s(t,e){if(!i[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},o[t][0].call(n.exports,function(e){return s(o[t][1][e]||e)},n,n.exports,r,o,i,c)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const r=window.getComputedStyle(e,null),o=[r.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],i=o.filter(e=>"none"!==e).join("");if(n.type="bg-img",i.includes("image-set(")&&(n.type="bg-img-set"),!i||""===i)return null;const c=[...i.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),n.bg_set.every(e=>""===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:r}),i.length=Math.min(o,i.length);break}i.length({element:e.element,elementInfo:m(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),u=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img, video, picture, p, main, div"),n=0;ne.src===n.src):"bg-img"===n.type||"bg-img-set"===n.type?t.some(e=>e.src===n.src):"picture"===n.type&&t.some(e=>e.src===n.src))})(r,u)||o!==document||(r=m(r),u.push({...r,label:"above-the-fold"}))}}console.log(u);var s=JSON.stringify(u);window.performance_images_json=s;const l=new FormData;l.append("action","rocket_lcp"),l.append("rocket_lcp_nonce",rocket_lcp_data.nonce),l.append("url",rocket_lcp_data.url),l.append("is_mobile",rocket_lcp_data.is_mobile),l.append("images",s),l.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:l}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(r,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(r,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From 0a85128435a8ae95527fda648111120e4a9ae6cc Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:24:30 +0100 Subject: [PATCH 090/167] Closes #6553: Frontend optimization applied for the wrong element in some cases (#6554) --- .../AboveTheFold/Frontend/Controller.php | 2 +- .../Subscriber/HTML/input_w_bg_image_lcp.html | 17 ++++ .../Subscriber/HTML/input_w_img_lcp.html | 10 +++ .../HTML/input_w_picture_img_lcp.html | 12 +++ .../HTML/output_w_bg_image_lcp.html | 17 ++++ .../Subscriber/HTML/output_w_img_lcp.html | 10 +++ .../HTML/output_w_picture_img_lcp.html | 12 +++ .../AboveTheFold/Frontend/Subscriber/lcp.php | 80 ++++++++++++++++++- 8 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_bg_image_lcp.html create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_img_lcp.html create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_picture_img_lcp.html create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_bg_image_lcp.html create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_img_lcp.html create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_picture_img_lcp.html diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index f7390cc681..c99b49bbf9 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -146,7 +146,7 @@ private function set_fetchpriority( $lcp, string $html ): string { $url = preg_quote( $lcp->src, '/' ); $html = preg_replace_callback( - '#]*?\s+src=["\']' . $url . '["\'][^>]*?|[^>]*?)>#', + '#]*?\s+)?src=["\']' . $url . '["\'](?:\s+[^>]*?)?>#', function ( $matches ) { // Check if the fetchpriority attribute already exists. if ( preg_match( '/fetchpriority\s*=\s*[\'"]([^\'"]+)[\'"]/i', $matches[0] ) ) { diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_bg_image_lcp.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_bg_image_lcp.html new file mode 100644 index 0000000000..4f3f51e61f --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_bg_image_lcp.html @@ -0,0 +1,17 @@ + + + Test + + + +
+ image2 + image3 + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_img_lcp.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_img_lcp.html new file mode 100644 index 0000000000..f776a50625 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_img_lcp.html @@ -0,0 +1,10 @@ + + + Test + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_picture_img_lcp.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_picture_img_lcp.html new file mode 100644 index 0000000000..a52a68e59c --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/input_w_picture_img_lcp.html @@ -0,0 +1,12 @@ + + + Test + + + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_bg_image_lcp.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_bg_image_lcp.html new file mode 100644 index 0000000000..2194716718 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_bg_image_lcp.html @@ -0,0 +1,17 @@ + + + Test + + + +
+ image2 + image3 + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_img_lcp.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_img_lcp.html new file mode 100644 index 0000000000..571d05d1a4 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_img_lcp.html @@ -0,0 +1,10 @@ + + + Test + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_picture_img_lcp.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_picture_img_lcp.html new file mode 100644 index 0000000000..5ed03dd1b2 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_picture_img_lcp.html @@ -0,0 +1,12 @@ + + + Test + + + + + + + + + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php index 76a0aef574..88e4352171 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php @@ -4,6 +4,12 @@ $html_output = file_get_contents(__DIR__ . '/HTML/output.html'); $html_output_with_preload = file_get_contents(__DIR__ . '/HTML/output_w_preload.html'); $html_output_with_beacon = file_get_contents(__DIR__ . '/HTML/output_w_beacon.html'); +$html_input_with_bg_image_lcp = file_get_contents(__DIR__ . '/HTML/input_w_bg_image_lcp.html'); +$html_output_with_bg_image_lcp = file_get_contents(__DIR__ . '/HTML/output_w_bg_image_lcp.html'); +$html_input_with_picture_img_lcp = file_get_contents(__DIR__ . '/HTML/input_w_picture_img_lcp.html'); +$html_output_with_picture_img_lcp = file_get_contents(__DIR__ . '/HTML/output_w_picture_img_lcp.html'); +$html_input_with_img_lcp = file_get_contents(__DIR__ . '/HTML/input_w_img_lcp.html'); +$html_output_with_img_lcp = file_get_contents(__DIR__ . '/HTML/output_w_img_lcp.html'); return [ 'test_data' => [ @@ -27,7 +33,7 @@ 'viewport' => json_encode( [ 0 => (object) [ 'type' => 'img', - 'src' => 'http://example.org/wp-content/uploads/image.jpg', + 'src' => 'http://example.org/wp-content/uploads/image2.jpg', ], ] ), ], @@ -49,4 +55,76 @@ 'expected' => $html_output, ], ], + 'shouldNotApplyFetchPriorityToTheWrongElement' => [ + 'config' => [ + 'html' => $html_input_with_bg_image_lcp, + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => json_encode( (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image.jpg', + ] ), + 'viewport' => json_encode( [ + 0 => (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image2.jpg', + ], + 1 => (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image3.jpg', + ], + ] ), + ], + ], + 'expected' => $html_output_with_bg_image_lcp, + ], + 'shouldApplyFetchPriorityToTheImgTagWithPictureElement' => [ + 'config' => [ + 'html' => $html_input_with_picture_img_lcp, + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => json_encode( (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image.jpg', + ] ), + 'viewport' => json_encode( [ + 0 => (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image2.jpg', + ], + 1 => (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image3.jpg', + ], + ] ), + ], + ], + 'expected' => $html_output_with_picture_img_lcp, + ], + 'shouldApplyFetchPriorityToTheImgElement' => [ + 'config' => [ + 'html' => $html_input_with_img_lcp, + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => json_encode( (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image.jpg', + ] ), + 'viewport' => json_encode( [ + 0 => (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image2.jpg', + ], + 1 => (object) [ + 'type' => 'img', + 'src' => 'http://example.org/wp-content/uploads/image3.jpg', + ], + ] ), + ], + ], + 'expected' => $html_output_with_img_lcp, + ], ]; From 9cf1b8e7342ed90ae74539242c93c66c5d4ecb7c Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Fri, 19 Apr 2024 08:29:11 +0100 Subject: [PATCH 091/167] Update notice messages --- inc/Engine/Saas/Admin/Notices.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/Engine/Saas/Admin/Notices.php b/inc/Engine/Saas/Admin/Notices.php index 20ce4dfbe4..aae51142d7 100644 --- a/inc/Engine/Saas/Admin/Notices.php +++ b/inc/Engine/Saas/Admin/Notices.php @@ -101,7 +101,7 @@ public function display_processing_notice() { $message = sprintf( // translators: %1$s = plugin name, %2$s = number of seconds. - __( '%1$s: Please wait %2$s seconds. The Remove Unused CSS service is processing your pages.', 'rocket' ), + __( '%1$s: Please wait %2$s seconds. The Remove Unused CSS service is processing your pages, the plugin is optimizing LCP and the images above the fold..', 'rocket' ), 'WP Rocket', '' . $remaining . '' ); @@ -144,7 +144,8 @@ public function display_success_notice() { $message = sprintf( // translators: %1$s = plugin name, %2$s = number of URLs, %3$s = number of seconds. - __( '%1$s: The Used CSS of your homepage has been processed. WP Rocket will continue to generate Used CSS for up to %2$s URLs per %3$s second(s).', 'rocket' ), + __( '%1$s: The LCP element has been optimized, and the images above the fold were excluded from lazyload. The Used CSS of your homepage has been processed. + WP Rocket will continue to generate Used CSS for up to %2$s URLs per %3$s second(s).', 'rocket' ), 'WP Rocket', apply_filters( 'rocket_rucss_pending_jobs_cron_rows_count', 100 ), apply_filters( 'rocket_rucss_pending_jobs_cron_interval', MINUTE_IN_SECONDS ) From ed582a82155a6929683f544b25c45b63713ac457 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Fri, 19 Apr 2024 09:54:45 +0200 Subject: [PATCH 092/167] Change conditions to bail out --- assets/js/lcp-beacon.js | 5 +++-- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index 8edd6f2384..2b3159ca2e 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -94,8 +94,9 @@ async function main() { // Check screen size const screenWidth = window.innerWidth || document.documentElement.clientWidth; const screenHeight = window.innerHeight || document.documentElement.clientHeight; - if ( - ( ( screenWidth < rocket_lcp_data.width_threshold || screenHeight < rocket_lcp_data.height_threshold ) ) ) { + if ( ( rocket_lcp_data.is_mobile && ( screenWidth > rocket_lcp_data.width_threshold || screenHeight > rocket_lcp_data.height_threshold ) ) || + ( ! rocket_lcp_data.is_mobile && ( screenWidth < rocket_lcp_data.width_threshold || screenHeight < rocket_lcp_data.height_threshold ) ) ) + { console.log('Bailing out because screen size is not acceptable'); return; } diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index bb8c3a77ef..7c91235742 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(i,c,a){function r(t,e){if(!c[t]){if(!i[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=c[t]={exports:{}},i[t][0].call(n.exports,function(e){return r(i[t][1][e]||e)},n,n.exports,o,i,c,a)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,imageURL:o}),c.length=Math.min(i,c.length);break}c.length({element:e.element,imageURL:e.imageURL}))}let p=[];async function o(){let e=new FormData;e.append(\"action\",\"rocket_check_lcp\"),e.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),e.append(\"url\",rocket_lcp_data.url),e.append(\"is_mobile\",rocket_lcp_data.is_mobile);await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:e});if(!0!==lcp_data.success){var t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;if(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var o=document.querySelectorAll(\"img\"),i=0;ie.src===c.src)||a!==document||p.push({src:c.src,label:\"above-the-fold\"})}}console.log(p);n=JSON.stringify(p);window.performance_images_json=n,console.log(n);const u=new FormData;u.append(\"action\",\"rocket_lcp\"),u.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),u.append(\"url\",rocket_lcp_data.url),u.append(\"is_mobile\",rocket_lcp_data.is_mobile),u.append(\"images\",n),u.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:u}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function o(i,c,a){function r(t,e){if(!c[t]){if(!i[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=c[t]={exports:{}},i[t][0].call(n.exports,function(e){return r(i[t][1][e]||e)},n,n.exports,o,i,c,a)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,imageURL:o}),c.length=Math.min(i,c.length);break}c.length({element:e.element,imageURL:e.imageURL}))}let p=[];async function o(){let e=new FormData;e.append(\"action\",\"rocket_check_lcp\"),e.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),e.append(\"url\",rocket_lcp_data.url),e.append(\"is_mobile\",rocket_lcp_data.is_mobile);await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:e});if(!0!==lcp_data.success){var t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;if(rocket_lcp_data.is_mobile&&(t>rocket_lcp_data.width_threshold||n>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var o=document.querySelectorAll(\"img\"),i=0;ie.src===c.src)||a!==document||p.push({src:c.src,label:\"above-the-fold\"})}}console.log(p);n=JSON.stringify(p);window.performance_images_json=n,console.log(n);const s=new FormData;s.append(\"action\",\"rocket_lcp\"),s.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),s.append(\"url\",rocket_lcp_data.url),s.append(\"is_mobile\",rocket_lcp_data.is_mobile),s.append(\"images\",n),s.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(o,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index d68e87db3d..58dd81b7c9 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function o(i,c,a){function r(t,e){if(!c[t]){if(!i[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=c[t]={exports:{}},i[t][0].call(n.exports,function(e){return r(i[t][1][e]||e)},n,n.exports,o,i,c,a)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,imageURL:o}),c.length=Math.min(i,c.length);break}c.length({element:e.element,imageURL:e.imageURL}))}let p=[];async function o(){let e=new FormData;e.append("action","rocket_check_lcp"),e.append("rocket_lcp_nonce",rocket_lcp_data.nonce),e.append("url",rocket_lcp_data.url),e.append("is_mobile",rocket_lcp_data.is_mobile);await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:e});if(!0!==lcp_data.success){var t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;if(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");for(var o=document.querySelectorAll("img"),i=0;ie.src===c.src)||a!==document||p.push({src:c.src,label:"above-the-fold"})}}console.log(p);n=JSON.stringify(p);window.performance_images_json=n,console.log(n);const u=new FormData;u.append("action","rocket_lcp"),u.append("rocket_lcp_nonce",rocket_lcp_data.nonce),u.append("url",rocket_lcp_data.url),u.append("is_mobile",rocket_lcp_data.is_mobile),u.append("images",n),u.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:u}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(o,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(o,500),console.timeEnd("extract")})},{}]},{},[1]); +!function o(i,c,a){function r(t,e){if(!c[t]){if(!i[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=c[t]={exports:{}},i[t][0].call(n.exports,function(e){return r(i[t][1][e]||e)},n,n.exports,o,i,c,a)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{var e=t.getBoundingClientRect();if(0c[e].area){c.splice(e,0,{element:t,area:n,imageURL:o}),c.length=Math.min(i,c.length);break}c.length({element:e.element,imageURL:e.imageURL}))}let p=[];async function o(){let e=new FormData;e.append("action","rocket_check_lcp"),e.append("rocket_lcp_nonce",rocket_lcp_data.nonce),e.append("url",rocket_lcp_data.url),e.append("is_mobile",rocket_lcp_data.is_mobile);await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:e});if(!0!==lcp_data.success){var t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;if(rocket_lcp_data.is_mobile&&(t>rocket_lcp_data.width_threshold||n>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");for(var o=document.querySelectorAll("img"),i=0;ie.src===c.src)||a!==document||p.push({src:c.src,label:"above-the-fold"})}}console.log(p);n=JSON.stringify(p);window.performance_images_json=n,console.log(n);const s=new FormData;s.append("action","rocket_lcp"),s.append("rocket_lcp_nonce",rocket_lcp_data.nonce),s.append("url",rocket_lcp_data.url),s.append("is_mobile",rocket_lcp_data.is_mobile),s.append("images",n),s.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(o,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(o,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From fb9a475e11b565e5a9e123de32c58ea78545e026 Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Fri, 19 Apr 2024 09:27:13 +0100 Subject: [PATCH 093/167] Closes #6536: ATF image in root not excluded from root with specific markup (#6556) --- inc/Engine/Media/AboveTheFold/Frontend/Controller.php | 2 +- .../AboveTheFold/Frontend/Controller/addExclusions.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index c99b49bbf9..a113963ab2 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -217,7 +217,7 @@ private function get_path_for_exclusion( array $exclusions ): array { $exclusions = array_map( function ( $exclusion ) { $exclusion = wp_parse_url( $exclusion ); - return $exclusion['path']; + return ltrim( $exclusion['path'], '/' ); }, $exclusions ); diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php index 990f0959c1..fc609905eb 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php @@ -55,12 +55,12 @@ 'row' => (object) [ 'lcp' => json_encode( (object) [ 'type' => 'img', - 'src' => 'bar', + 'src' => 'https://example.com/bar.jpg', ] ), 'viewport' => json_encode( [ 0 => (object) [ 'type' => 'img', - 'src' => 'foobar', + 'src' => 'https://example.com/foobar.jpg', ], ] ), ], @@ -73,8 +73,8 @@ ], 'expected' => [ 'foo', - 'bar', - 'foobar', + 'bar.jpg', + 'foobar.jpg', ], ], ]; From bea40379b5ba1e30062d42778405219a02b1b62c Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Fri, 19 Apr 2024 09:33:34 +0100 Subject: [PATCH 094/167] :feat: Change occurence of old transient key, update tests and fixed notice not displaying error :bug: --- assets/js/wpr-admin.js | 4 ++-- assets/js/wpr-admin.js.min.map | 2 +- assets/js/wpr-admin.min.js | 2 +- inc/Engine/Optimization/RUCSS/Admin/Subscriber.php | 4 ++-- inc/Engine/WPRocketUninstall.php | 2 +- .../RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php | 4 ++-- .../RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php | 4 ++-- .../Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/assets/js/wpr-admin.js b/assets/js/wpr-admin.js index 5e753d5fd9..8e2e3ab879 100644 --- a/assets/js/wpr-admin.js +++ b/assets/js/wpr-admin.js @@ -297,8 +297,8 @@ function initializeClock(id, endtime) { function rucssTimer(id, endtime) { const timer = document.getElementById(id); - const notice = document.getElementById('rocket-notice-rucss-processing'); - const success = document.getElementById('rocket-notice-rucss-success'); + const notice = document.getElementById('rocket-notice-saas-processing'); + const success = document.getElementById('rocket-notice-saas-success'); if (timer === null) { return; diff --git a/assets/js/wpr-admin.js.min.map b/assets/js/wpr-admin.js.min.map index 3cd3dcc913..4201db3c5b 100644 --- a/assets/js/wpr-admin.js.min.map +++ b/assets/js/wpr-admin.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["wpr-admin.js"],"sourcesContent":["!function s(n,r,a){function o(e,t){if(!r[e]){if(!n[e]){var i=\"function\"==typeof require&&require;if(!t&&i)return i(e,!0);if(l)return l(e,!0);throw(i=new Error(\"Cannot find module '\"+e+\"'\")).code=\"MODULE_NOT_FOUND\",i}i=r[e]={exports:{}},n[e][0].call(i.exports,function(t){return o(n[e][1][t]||t)},i,i.exports,s,n,r,a)}return r[e].exports}for(var l=\"function\"==typeof require&&require,t=0;t{i.append(\"\"+t+\": \"),i.append(e[t].message),i.append(\"
\")}):i.append('
'+e.message+\"
\")}})})})},{}],2:[function(t,e,i){\"use strict\";t(\"../lib/greensock/TweenLite.min.js\"),t(\"../lib/greensock/TimelineLite.min.js\"),t(\"../lib/greensock/easing/EasePack.min.js\"),t(\"../lib/greensock/plugins/CSSPlugin.min.js\"),t(\"../lib/greensock/plugins/ScrollToPlugin.min.js\"),t(\"../global/pageManager.js\"),t(\"../global/main.js\"),t(\"../global/fields.js\"),t(\"../global/beacon.js\"),t(\"../global/ajax.js\"),t(\"../global/rocketcdn.js\"),t(\"../global/countdown.js\")},{\"../global/ajax.js\":1,\"../global/beacon.js\":3,\"../global/countdown.js\":4,\"../global/fields.js\":5,\"../global/main.js\":6,\"../global/pageManager.js\":7,\"../global/rocketcdn.js\":8,\"../lib/greensock/TimelineLite.min.js\":9,\"../lib/greensock/TweenLite.min.js\":10,\"../lib/greensock/easing/EasePack.min.js\":11,\"../lib/greensock/plugins/CSSPlugin.min.js\":12,\"../lib/greensock/plugins/ScrollToPlugin.min.js\":13}],3:[function(t,e,i){\"use strict\";var s=jQuery;s(document).ready(function(){\"Beacon\"in window&&s(\".wpr-infoAction--help\").on(\"click\",function(t){var e=s(this).data(\"beacon-id\");return 0!==(e=(e=e).split(\",\")).length&&(1{o(t).attr(\"checked\",i?null:\"checked\")});else{const r=o(e).closest(\".wpr-list\").find(\".wpr-main-checkbox\");var n=o.map(s,t=>{if(void 0!==o(t).attr(\"checked\"))return t});r.attr(\"checked\",n.length===s.length?\"checked\":null)}}),0{let i=o(e).parents(\".wpr-list\");var s=i.find(\".wpr-list-body input[type=checkbox]:not(:checked)\").length;o(e).attr(\"checked\",s<=0?\"checked\":null)})})},{}],6:[function(t,e,i){\"use strict\";var c=jQuery;c(document).ready(function(){var t=c(\".wpr-notice\");c(\"#wpr-congratulations-notice\").on(\"click\",function(){return(new TimelineLite).to(t,1,{autoAlpha:0,x:40,ease:Power4.easeOut}).to(t,.6,{height:0,marginTop:0,ease:Power4.easeOut},\"=-.4\").set(t,{display:\"none\"}),!1}),c(\".rocket-analytics-data-container\").hide(),c(\".rocket-preview-analytics-data\").on(\"click\",function(t){t.preventDefault(),c(this).parent().next(\".rocket-analytics-data-container\").toggle()}),c(\".wpr-toggle-button\").each(function(){var t=c(this),e=t.closest(\".wpr-fieldsContainer-fieldset\").find(\".wpr-radio :checkbox\"),i=c('[href=\"'+t.attr(\"href\")+'\"].wpr-menuItem');e.on(\"change\",function(){e.is(\":checked\")?(i.css(\"display\",\"block\"),t.css(\"display\",\"inline-block\")):(i.css(\"display\",\"none\"),t.css(\"display\",\"none\"))}).trigger(\"change\")});var e=c(\".wpr-Popin-Analytics\"),i=c(\".wpr-Popin-overlay\"),s=c(\".wpr-Popin-Analytics-close\"),n=c(\".wpr-Popin-Analytics .wpr-button\");function r(){(new TimelineLite).fromTo(e,.6,{autoAlpha:1,marginTop:0},{autoAlpha:0,marginTop:-24,ease:Power4.easeOut}).fromTo(i,.6,{autoAlpha:1},{autoAlpha:0,ease:Power4.easeOut},\"=-.5\").set(e,{display:\"none\"}).set(i,{display:\"none\"})}c(\".wpr-js-popin\").on(\"click\",function(t){return t.preventDefault(),(new TimelineLite).set(e,{display:\"block\"}).set(i,{display:\"block\"}).fromTo(i,.6,{autoAlpha:0},{autoAlpha:1,ease:Power4.easeOut}).fromTo(e,.6,{autoAlpha:0,marginTop:-24},{autoAlpha:1,marginTop:0,ease:Power4.easeOut},\"=-.5\"),!1}),s.on(\"click\",function(t){return t.preventDefault(),r(),!1}),n.on(\"click\",function(t){return t.preventDefault(),r(),c(\"#analytics_enabled\").prop(\"checked\",!0),c(\"#analytics_enabled\").trigger(\"change\"),!1}),c(\"#analytics_enabled\").on(\"change\",function(){c(\".wpr-rocket-analytics-cta\").toggleClass(\"wpr-isHidden\")});var a=c(\".wpr-Popin-Upgrade\"),n=c(\".wpr-Popin-Upgrade-close\");c(\".wpr-popin-upgrade-toggle\").on(\"click\",function(t){return t.preventDefault(),(new TimelineLite).set(a,{display:\"block\"}).set(i,{display:\"block\"}).fromTo(i,.6,{autoAlpha:0},{autoAlpha:1,ease:Power4.easeOut}).fromTo(a,.6,{autoAlpha:0,marginTop:-24},{autoAlpha:1,marginTop:0,ease:Power4.easeOut},\"=-.5\"),!1}),n.on(\"click\",function(){return(new TimelineLite).fromTo(a,.6,{autoAlpha:1,marginTop:0},{autoAlpha:0,marginTop:-24,ease:Power4.easeOut}).fromTo(i,.6,{autoAlpha:1},{autoAlpha:0,ease:Power4.easeOut},\"=-.5\").set(a,{display:\"none\"}).set(i,{display:\"none\"}),!1});var o=c(\".wpr-Sidebar\");c(\".wpr-js-tips\").on(\"change\",function(){c(this).is(\":checked\")?(o.css(\"display\",\"block\"),localStorage.setItem(\"wpr-show-sidebar\",\"on\")):(o.css(\"display\",\"none\"),localStorage.setItem(\"wpr-show-sidebar\",\"off\"))}),document.getElementById(\"LKgOcCRpwmAj\")?c(\".wpr-adblock\").css(\"display\",\"none\"):c(\".wpr-adblock\").css(\"display\",\"block\");var l=c(\".wpr-adblock\");c(\".wpr-adblock-close\").on(\"click\",function(){return(new TimelineLite).to(l,1,{autoAlpha:0,x:40,ease:Power4.easeOut}).to(l,.4,{height:0,marginTop:0,ease:Power4.easeOut},\"=-.4\").set(l,{display:\"none\"}),!1})})},{}],7:[function(t,e,i){\"use strict\";function s(t){var e,i=this;this.$body=document.querySelector(\".wpr-body\"),this.$menuItems=document.querySelectorAll(\".wpr-menuItem\"),this.$submitButton=document.querySelector(\".wpr-Content > form > #wpr-options-submit\"),this.$pages=document.querySelectorAll(\".wpr-Page\"),this.$sidebar=document.querySelector(\".wpr-Sidebar\"),this.$content=document.querySelector(\".wpr-Content\"),this.$tips=document.querySelector(\".wpr-Content-tips\"),this.$links=document.querySelectorAll(\".wpr-body a\"),this.$menuItem=null,this.$page=null,this.pageId=null,this.bodyTop=0,this.buttonText=this.$submitButton.value,i.getBodyTop(),window.onhashchange=function(){i.detectID()},window.location.hash?(this.bodyTop=0,this.detectID()):(e=localStorage.getItem(\"wpr-hash\"),this.bodyTop=0,e?(window.location.hash=e,this.detectID()):(this.$menuItems[0].classList.add(\"isActive\"),localStorage.setItem(\"wpr-hash\",\"dashboard\"),window.location.hash=\"#dashboard\"));for(var s=0;s{a.querySelectorAll(\".wpr-rocketcdn-open\").forEach(t=>{t.addEventListener(\"click\",t=>{t.preventDefault()})}),function(){var t=\"\";t+=\"action=rocketcdn_process_status\";const e=r(t+=\"&nonce=\"+rocket_ajax_data.nonce);e.onreadystatechange=()=>{e.readyState===XMLHttpRequest.DONE&&200===e.status&&!0===JSON.parse(e.responseText).success&&MicroModal.show(\"wpr-rocketcdn-modal\")}}(),MicroModal.init({disableScroll:!0})}),s.addEventListener(\"load\",()=>{let t=a.querySelector(\"#wpr-rocketcdn-open-cta\"),e=a.querySelector(\"#wpr-rocketcdn-close-cta\"),i=a.querySelector(\"#wpr-rocketcdn-cta-small\"),s=a.querySelector(\"#wpr-rocketcdn-cta\");function n(t){var e=\"\";return e+=\"action=toggle_rocketcdn_cta\",e+=\"&status=\"+t,e+=\"&nonce=\"+rocket_ajax_data.nonce}null!==t&&null!==i&&null!==s&&t.addEventListener(\"click\",t=>{t.preventDefault(),i.classList.add(\"wpr-isHidden\"),s.classList.remove(\"wpr-isHidden\"),r(n(\"big\"))}),null!==e&&null!==i&&null!==s&&e.addEventListener(\"click\",t=>{t.preventDefault(),i.classList.remove(\"wpr-isHidden\"),s.classList.add(\"wpr-isHidden\"),r(n(\"small\"))})}),s.onmessage=t=>{var e,i,s=rocket_ajax_data.origin_url;t.origin===s&&((e=t.data).hasOwnProperty(\"cdnFrameHeight\")&&(a.getElementById(\"rocketcdn-iframe\").style.height=\"\".concat(e.cdnFrameHeight,\"px\")),(i=t.data).hasOwnProperty(\"cdnFrameClose\")&&(MicroModal.close(\"wpr-rocketcdn-modal\"),i.hasOwnProperty(\"cdn_page_message\")&&-1!==[\"iframe-payment-success\",\"iframe-unsubscribe-success\"].indexOf(i.cdn_page_message)&&a.location.reload()),function(t,e){let i=a.querySelector(\"#rocketcdn-iframe\").contentWindow;if(t.hasOwnProperty(\"rocketcdn_token\")){var s=\"\";s+=\"action=save_rocketcdn_token\",s+=\"&value=\"+t.rocketcdn_token;const n=r(s+=\"&nonce=\"+rocket_ajax_data.nonce);n.onreadystatechange=()=>{var t;n.readyState===XMLHttpRequest.DONE&&200===n.status&&(t=JSON.parse(n.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}else{s={process:\"subscribe\",message:\"token_not_received\"};i.postMessage({success:!1,data:s,rocketcdn:!0},e)}}(t.data,s),(e=t.data).hasOwnProperty(\"rocketcdn_process\")&&(i=\"\",i+=\"action=rocketcdn_process_set\",i+=\"&status=\"+e.rocketcdn_process,r(i+=\"&nonce=\"+rocket_ajax_data.nonce)),function(t,e){let i=a.querySelector(\"#rocketcdn-iframe\").contentWindow;if(t.hasOwnProperty(\"rocketcdn_url\")){var s=\"\";s+=\"action=rocketcdn_enable\",s+=\"&cdn_url=\"+t.rocketcdn_url;const n=r(s+=\"&nonce=\"+rocket_ajax_data.nonce);n.onreadystatechange=()=>{var t;n.readyState===XMLHttpRequest.DONE&&200===n.status&&(t=JSON.parse(n.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}}(t.data,s),function(t,e){let i=a.querySelector(\"#rocketcdn-iframe\").contentWindow;if(t.hasOwnProperty(\"rocketcdn_disable\")){t=\"\";t+=\"action=rocketcdn_disable\";const s=r(t+=\"&nonce=\"+rocket_ajax_data.nonce);s.onreadystatechange=()=>{var t;s.readyState===XMLHttpRequest.DONE&&200===s.status&&(t=JSON.parse(s.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}}(t.data,s),(s=t.data).hasOwnProperty(\"rocketcdn_validate_token\")&&s.hasOwnProperty(\"rocketcdn_validate_cname\")&&(t=\"\",t+=\"action=rocketcdn_validate_token_cname\",t+=\"&cdn_url=\"+s.rocketcdn_validate_cname,t+=\"&cdn_token=\"+s.rocketcdn_validate_token,r(t+=\"&nonce=\"+rocket_ajax_data.nonce)))}},{}],9:[function(t,e,i){\"use strict\";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine(\"TimelineLite\",[\"core.Animation\",\"core.SimpleTimeline\",\"TweenLite\"],function(h,u,p){function d(t){u.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var e,i,s=this.vars;for(i in s)e=s[i],g(e)&&-1!==e.join(\"\").indexOf(\"{self}\")&&(s[i]=this._swapSelfInParams(e));g(s.tweens)&&this.add(s.tweens,0,s.align,s.stagger)}function _(t){var e,i={};for(e in t)i[e]=t[e];return i}function n(t,e,i,s){t._timeline.pause(t._startTime),e&&e.apply(s||t._timeline,i||v)}var f=1e-10,m=p._internals.isSelector,g=p._internals.isArray,v=[],a=window._gsDefine.globals,w=v.slice,t=d.prototype=new u;return d.version=\"1.12.1\",t.constructor=d,t.kill()._gc=!1,t.to=function(t,e,i,s){var n=i.repeat&&a.TweenMax||p;return e?this.add(new n(t,e,i),s):this.set(t,i,s)},t.from=function(t,e,i,s){return this.add((i.repeat&&a.TweenMax||p).from(t,e,i),s)},t.fromTo=function(t,e,i,s,n){var r=s.repeat&&a.TweenMax||p;return e?this.add(r.fromTo(t,e,i,s),n):this.set(t,s,n)},t.staggerTo=function(t,e,i,s,n,r,a,o){var l,c=new d({onComplete:r,onCompleteParams:a,onCompleteScope:o,smoothChildTiming:this.smoothChildTiming});for(\"string\"==typeof t&&(t=p.selector(t)||t),m(t)&&(t=w.call(t,0)),s=s||0,l=0;t.length>l;l++)i.startAt&&(i.startAt=_(i.startAt)),c.to(t[l],e,_(i),l*s);return this.add(c,n)},t.staggerFrom=function(t,e,i,s,n,r,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,n,r,a,o)},t.staggerFromTo=function(t,e,i,s,n,r,a,o,l){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,n,r,a,o,l)},t.call=function(t,e,i,s){return this.add(p.delayedCall(0,t,e,i),s)},t.set=function(t,e,i){return i=this._parseTimeOrLabel(i,0,!0),null==e.immediateRender&&(e.immediateRender=i===this._time&&!this._paused),this.add(new p(t,0,e),i)},d.exportRoot=function(t,e){null==(t=t||{}).smoothChildTiming&&(t.smoothChildTiming=!0);var i,s,n=new d(t),t=n._timeline;for(null==e&&(e=!0),t._remove(n,!0),n._startTime=0,n._rawPrevTime=n._time=n._totalTime=t._time,i=t._first;i;)s=i._next,e&&i instanceof p&&i.target===i.vars.onComplete||n.add(i,i._startTime-i._delay),i=s;return t.add(n,0),n},t.add=function(t,e,i,s){var n,r,a,o,l,c;if(\"number\"!=typeof e&&(e=this._parseTimeOrLabel(e,0,!0,t)),!(t instanceof h)){if(t instanceof Array||t&&t.push&&g(t)){for(i=i||\"normal\",s=s||0,n=e,r=t.length,a=0;at._startTime;l._timeline;)c&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return this},t.remove=function(t){if(t instanceof h)return this._remove(t,!1);if(t instanceof Array||t&&t.push&&g(t)){for(var e=t.length;-1<--e;)this.remove(t[e]);return this}return\"string\"==typeof t?this.removeLabel(t):this.kill(null,t)},t._remove=function(t,e){u.prototype._remove.call(this,t,e);e=this._last;return e?this._time>e._startTime+e._totalDuration/e._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},t.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},t.insert=t.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},t.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},t.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},t.addPause=function(t,e,i,s){return this.call(n,[\"{self}\",e,i,s],this,t)},t.removeLabel=function(t){return delete this._labels[t],this},t.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},t._parseTimeOrLabel=function(t,e,i,s){var n;if(s instanceof h&&s.timeline===this)this.remove(s);else if(s&&(s instanceof Array||s.push&&g(s)))for(n=s.length;-1<--n;)s[n]instanceof h&&s[n].timeline===this&&this.remove(s[n]);if(\"string\"==typeof e)return this._parseTimeOrLabel(e,i&&\"number\"==typeof t&&null==this._labels[e]?t-this.duration():0,i);if(e=e||0,\"string\"!=typeof t||!isNaN(t)&&null==this._labels[t])null==t&&(t=this.duration());else{if(-1===(n=t.indexOf(\"=\")))return null==this._labels[t]?i?this._labels[t]=this.duration()+e:e:this._labels[t]+e;e=parseInt(t.charAt(n-1)+\"1\",10)*Number(t.substr(n+1)),t=1f&&(a=\"onReverseComplete\"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:f,t=l+1e-4):t<1e-7?(((this._totalTime=this._time=0)!==c||0===this._duration&&this._rawPrevTime!==f&&(0=c)for(s=this._first;s&&(r=s._next,!this._paused||p);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r;else for(s=this._last;s&&(r=s._prev,!this._paused||p);)(s._active||c>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r;this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||v)),a&&(this._gc||h!==this._startTime&&u===this._timeScale||!(0===this._time||l>=this.totalDuration())||(n&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[a]&&this.vars[a].apply(this.vars[a+\"Scope\"]||this,this.vars[a+\"Params\"]||v)))}},t._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof d&&t._hasPausedChild())return!0;t=t._next}return!1},t.getChildren=function(t,e,i,s){s=s||-9999999999;for(var n=[],r=this._first,a=0;r;)s>r._startTime||(r instanceof p?!1!==e&&(n[a++]=r):(!1!==i&&(n[a++]=r),!1!==t&&(a=(n=n.concat(r.getChildren(!0,e,i))).length))),r=r._next;return n},t.getTweensOf=function(t,e){var i,s,n=this._gc,r=[],a=0;for(n&&this._enabled(!0,!0),s=(i=p.getTweensOf(t)).length;-1<--s;)(i[s].timeline===this||e&&this._contains(i[s]))&&(r[a++]=i[s]);return n&&this._enabled(!1,!0),r},t._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},t.shiftChildren=function(t,e,i){i=i||0;for(var s,n=this._first,r=this._labels;n;)n._startTime>=i&&(n._startTime+=t),n=n._next;if(e)for(s in r)r[s]>=i&&(r[s]+=t);return this._uncache(!0)},t._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,n=!1;-1<--s;)i[s]._kill(t,e)&&(n=!0);return n},t.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;-1<--i;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},t.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return this},t._enabled=function(t,e){if(t===this._gc)for(var i=this._first;i;)i._enabled(t,!0),i=i._next;return u.prototype._enabled.call(this,t,e)},t.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},t.totalDuration=function(t){if(arguments.length)return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this;if(this._dirty){for(var e,i,s=0,n=this._last,r=999999999999;n;)e=n._prev,n._dirty&&n.totalDuration(),n._startTime>r&&this._sortChildren&&!n._paused?this.add(n,n._startTime-n._delay):r=n._startTime,n._startTime<0&&!n._paused&&(s-=n._startTime,this._timeline.smoothChildTiming&&(this._startTime+=n._startTime/this._timeScale),this.shiftChildren(-n._startTime,!1,-9999999999),r=0),s<(i=n._startTime+n._totalDuration/n._timeScale)&&(s=i),n=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration},t.usesFrames=function(){for(var t=this._timeline;t._timeline;)t=t._timeline;return t===h._rootFramesTimeline},t.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},d},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],10:[function(t,Q,e){\"use strict\";!function(p){var e,i,d=p.GreenSockGlobals||p;if(!d.TweenLite){var _,f=function(t){for(var e=t.split(\".\"),i=d,s=0;e.length>s;s++)i[e[s]]=i=i[e[s]]||{};return i},u=f(\"com.greensock\"),m=1e-10,o=[].slice,g=function(){},h=(e=Object.prototype.toString,i=e.call([]),function(t){return null!=t&&(t instanceof Array||\"object\"==typeof t&&!!t.push&&e.call(t)===i)}),v={},w=function(o,l,c,h){this.sc=v[o]?v[o].sc:[],(v[o]=this).gsClass=null,this.func=c;var u=[];this.check=function(t){for(var e,i,s,n,r=l.length,a=r;-1<--r;)(e=v[l[r]]||new w(l[r],[])).gsClass?(u[r]=e.gsClass,a--):t&&e.sc.push(this);if(0===a&&c)for(s=(i=(\"com.greensock.\"+o).split(\".\")).pop(),n=f(i.join(\".\"))[s]=this.gsClass=c.apply(c,u),h&&(d[s]=n,\"function\"==typeof define&&define.amd?define((p.GreenSockAMDPath?p.GreenSockAMDPath+\"/\":\"\")+o.split(\".\").join(\"/\"),[],function(){return n}):void 0!==Q&&Q.exports&&(Q.exports=n)),r=0;this.sc.length>r;r++)this.sc[r].check()},this.check(!0)},s=p._gsDefine=function(t,e,i,s){return new w(t,e,i,s)},y=u._class=function(t,e,i){return e=e||function(){},s(t,[],function(){return e},i),e};s.globals=d;var t,n=[0,0,1,1],x=[],b=y(\"easing.Ease\",function(t,e,i,s){this._func=t,this._type=i||0,this._power=s||0,this._params=e?n.concat(e):n},!0),T=b.map={},r=b.register=function(t,e,i,s){for(var n,r,a,o,l=e.split(\",\"),c=l.length,h=(i||\"easeIn,easeOut,easeInOut\").split(\",\");-1<--c;)for(r=l[c],n=s?y(\"easing.\"+r,null,!0):u.easing[r]||{},a=h.length;-1<--a;)o=h[a],T[r+\".\"+o]=T[o+r]=n[o]=t.getRatio?t:t[o]||new t};for((t=b.prototype)._calcEnd=!1,t.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,s=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?s*=s:2===i?s*=s*s:3===i?s*=s*s*s:4===i&&(s*=s*s*s*s),1===e?1-s:2===e?s:t<.5?s/2:1-s/2},l=(a=[\"Linear\",\"Quad\",\"Cubic\",\"Quart\",\"Quint,Strong\"]).length;-1<--l;)t=a[l]+\",Power\"+l,r(new b(null,null,1,l),t,\"easeOut\",!0),r(new b(null,null,2,l),t,\"easeIn\"+(0===l?\",easeNone\":\"\")),r(new b(null,null,3,l),t,\"easeInOut\");T.linear=u.easing.Linear.easeIn,T.swing=u.easing.Quad.easeInOut;var k=y(\"events.EventDispatcher\",function(t){this._listeners={},this._eventTarget=t||this});(t=k.prototype).addEventListener=function(t,e,i,s,n){n=n||0;var r,a,o=this._listeners[t],l=0;for(null==o&&(this._listeners[t]=o=[]),a=o.length;-1<--a;)(r=o[a]).c===e&&r.s===i?o.splice(a,1):0===l&&n>r.pr&&(l=a+1);o.splice(l,0,{c:e,s:i,up:s,pr:n}),this!==A||_||A.wake()},t.removeEventListener=function(t,e){var i,s=this._listeners[t];if(s)for(i=s.length;-1<--i;)if(s[i].c===e)return void s.splice(i,1)},t.dispatchEvent=function(t){var e,i,s,n=this._listeners[t];if(n)for(e=n.length,i=this._eventTarget;-1<--e;)(s=n[e]).up?s.c.call(s.s||i,{type:t,target:i}):s.c.call(s.s||i)};for(var a,P=p.requestAnimationFrame,S=p.cancelAnimationFrame,O=Date.now||function(){return(new Date).getTime()},C=O(),l=(a=[\"ms\",\"moz\",\"webkit\",\"o\"]).length;-1<--l&&!P;)P=p[a[l]+\"RequestAnimationFrame\"],S=p[a[l]+\"CancelAnimationFrame\"]||p[a[l]+\"CancelRequestAnimationFrame\"];y(\"Ticker\",function(t,e){var s,n,r,a,o,l=this,c=O(),i=!1!==e&&P,h=500,u=33,p=function(t){var e,i=O()-C;h=i&&i+this.totalDuration()/this._timeScale>t},t._enabled=function(t,e){return _||A.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},t._kill=function(){return this._enabled(!1,!1)},t.kill=function(t,e){return this._kill(t,e),this},t._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},t._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();-1<--e;)\"{self}\"===t[e]&&(i[e]=this);return i},t.eventCallback=function(t,e,i,s){if(\"on\"===(t||\"\").substr(0,2)){var n=this.vars;if(1===arguments.length)return n[t];null==e?delete n[t]:(n[t]=e,n[t+\"Params\"]=h(i)&&-1!==i.join(\"\").indexOf(\"{self}\")?this._swapSelfInParams(i):i,n[t+\"Scope\"]=s),\"onUpdate\"===t&&(this._onUpdate=e)}return this},t.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},t.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&0this._duration?this._duration:t,e)):this._time},t.totalTime=function(t,e,i){if(_||A.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var s=this._totalDuration,n=this._timeline;if(ss;)i=i._prev;return i?(t._next=i._next,i._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=i,this._timeline&&this._uncache(!0),this},t._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t.timeline=null,t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),this._timeline&&this._uncache(!0)),this},t.render=function(t,e,i){var s,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;n;)s=n._next,(n._active||t>=n._startTime&&!n._paused)&&(n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale,e,i):n.render((t-n._startTime)*n._timeScale,e,i)),n=s},t.rawTime=function(){return _||A.wake(),this._totalTime};var I=y(\"TweenLite\",function(t,e,i){if(c.call(this,e,i),this.render=I.prototype.render,null==t)throw\"Cannot tween a null target.\";this.target=t=\"string\"==typeof t&&I.selector(t)||t;var s,n,r,i=t.jquery||t.length&&t!==p&&t[0]&&(t[0]===p||t[0].nodeType&&t[0].style&&!t.nodeType),a=this.vars.overwrite;if(this._overwrite=a=null==a?F[I.defaultOverwrite]:\"number\"==typeof a?a>>0:F[a],(i||t instanceof Array||t.push&&h(t))&&\"number\"!=typeof t[0])for(this._targets=r=o.call(t,0),this._propLookup=[],this._siblings=[],s=0;r.length>s;s++)(n=r[s])?\"string\"!=typeof n?n.length&&n!==p&&n[0]&&(n[0]===p||n[0].nodeType&&n[0].style&&!n.nodeType)?(r.splice(s--,1),this._targets=r=r.concat(o.call(n,0))):(this._siblings[s]=H(n,this,!1),1===a&&1=a._startTime&&a._startTime+a.totalDuration()/a._timeScale>c&&((p||!a._initted)&&c-a._startTime<=2e-10||(h[u++]=a)));for(d=u;-1<--d;)a=h[d],2===s&&a._kill(i,t)&&(r=!0),(2!==s||!a._firstPT&&a._initted)&&a._enabled(!1,!1)&&(r=!0);return r},W=function(t,e,i){for(var s=t._timeline,n=s._timeScale,r=t._startTime;s._timeline;){if(r+=s._startTime,n*=s._timeScale,s._paused)return-100;s=s._timeline}return e<(r/=n)?r-e:i&&r===e||!t._initted&&r-e<2*m?m:(r+=t.totalDuration()/t._timeScale/n)>e+m?0:r-e-m};t._init=function(){var t,e,i,s,n,r=this.vars,a=this._overwrittenProps,o=this._duration,l=!!r.immediateRender,c=r.ease;if(r.startAt){for(s in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),n={},r.startAt)n[s]=r.startAt[s];if(n.overwrite=!1,n.immediateRender=!0,n.lazy=l&&!1!==r.lazy,n.startAt=n.delay=null,this._startAt=I.to(this.target,0,n),l)if(0o.pr;)s=s._next;(o._prev=s?s._prev:r)?o._prev._next=o:n=o,(o._next=s)?s._prev=o:r=o,o=a}o=e._firstPT=n}for(;o;)o.pg&&\"function\"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},V.activate=function(t){for(var e=t.length;-1<--e;)t[e].API===V.API&&(E[(new t[e])._propName]=t[e]);return!0},s.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw\"illegal plugin definition.\";var e,i=t.propName,s=t.priority||0,n=t.overwriteProps,r={init:\"_onInitTween\",set:\"setRatio\",kill:\"_kill\",round:\"_roundProps\",initAll:\"_onInitAllProps\"},a=y(\"plugins.\"+i.charAt(0).toUpperCase()+i.substr(1)+\"Plugin\",function(){V.call(this,i,s),this._overwriteProps=n||[]},!0===t.global),o=a.prototype=new V(i);for(e in(o.constructor=a).API=t.API,r)\"function\"==typeof t[e]&&(o[r[e]]=t[e]);return a.version=t.version,V.activate([a]),a},a=p._gsQueue){for(l=0;a.length>l;l++)a[l]();for(t in v)v[t].func||p.console.log(\"GSAP encountered missing dependency: com.greensock.\"+t)}_=!1}}(window)},{}],11:[function(t,e,i){\"use strict\";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine(\"easing.Back\",[\"easing.Ease\"],function(m){function t(t,e){var i=c(\"easing.\"+t,function(){},!0);return(t=i.prototype=new m).constructor=i,t.getRatio=e,i}function e(t,e,i,s){return s=c(\"easing.\"+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0),h(s,t),s}function g(t,e,i){this.t=t,this.v=e,i&&(((this.next=i).prev=this).c=i.v-e,this.gap=i.t-t)}function i(t,e){var i=c(\"easing.\"+t,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0);return(t=i.prototype=new m).constructor=i,t.getRatio=e,t.config=function(t){return new i(t)},i}var s,n,r=window.GreenSockGlobals||window,a=r.com.greensock,o=2*Math.PI,l=Math.PI/2,c=a._class,h=m.register||function(){},u=e(\"Back\",i(\"BackOut\",function(t){return--t*t*((this._p1+1)*t+this._p1)+1}),i(\"BackIn\",function(t){return t*t*((this._p1+1)*t-this._p1)}),i(\"BackInOut\",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),p=c(\"easing.SlowMo\",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:1t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},p.ease=new p(.7,.7),a.config=p.config=function(t,e,i){return new p(t,e,i)},(a=(s=c(\"easing.SteppedEase\",function(t){this._p1=1/(t=t||1),this._p2=t+1},!0)).prototype=new m).constructor=s,a.getRatio=function(t){return t<0?t=0:1<=t&&(t=.999999999),(this._p2*t>>0)*this._p1},a.config=s.config=function(t){return new s(t)},(a=(n=c(\"easing.RoughEase\",function(t){for(var e,i,s,n,r,a,o=(t=t||{}).taper||\"none\",l=[],c=0,h=0|(t.points||20),u=h,p=!1!==t.randomize,d=!0===t.clamp,_=t.template instanceof m?t.template:null,f=\"number\"==typeof t.strength?.4*t.strength:.4;-1<--u;)e=p?Math.random():1/h*u,i=_?_.getRatio(e):e,s=\"none\"===o?f:\"out\"===o?(n=1-e)*n*f:\"in\"===o?e*e*f:.5*(n=e<.5?2*e:2*(1-e))*n*f,p?i+=Math.random()*s-.5*s:u%2?i+=.5*s:i-=.5*s,d&&(1e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return(this._prev=e).v+(t-e.t)/e.gap*e.c},a.config=function(t){return new n(t)},n.ease=new n,e(\"Bounce\",t(\"BounceOut\",function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),t(\"BounceIn\",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),t(\"BounceInOut\",function(t){var e=t<.5;return t=(t=e?1-2*t:2*t-1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),e(\"Circ\",t(\"CircOut\",function(t){return Math.sqrt(1- --t*t)}),t(\"CircIn\",function(t){return-(Math.sqrt(1-t*t)-1)}),t(\"CircInOut\",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),e(\"Elastic\",(a=function(t,e,i){var s=c(\"easing.\"+t,function(t,e){this._p1=t||1,this._p2=e||i,this._p3=this._p2/o*(Math.asin(1/this._p1)||0)},!0),t=s.prototype=new m;return t.constructor=s,t.getRatio=e,t.config=function(t,e){return new s(t,e)},s})(\"ElasticOut\",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*o/this._p2)+1},.3),a(\"ElasticIn\",function(t){return-(this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*o/this._p2))},.3),a(\"ElasticInOut\",function(t){return(t*=2)<1?-.5*this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*o/this._p2):.5*this._p1*Math.pow(2,-10*--t)*Math.sin((t-this._p3)*o/this._p2)+1},.45)),e(\"Expo\",t(\"ExpoOut\",function(t){return 1-Math.pow(2,-10*t)}),t(\"ExpoIn\",function(t){return Math.pow(2,10*(t-1))-.001}),t(\"ExpoInOut\",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),e(\"Sine\",t(\"SineOut\",function(t){return Math.sin(t*l)}),t(\"SineIn\",function(t){return 1-Math.cos(t*l)}),t(\"SineInOut\",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),c(\"easing.EaseLookup\",{find:function(t){return m.map[t]}},!0),h(r.SlowMo,\"SlowMo\",\"ease,\"),h(n,\"RoughEase\",\"ease,\"),h(s,\"SteppedEase\",\"ease,\"),u},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],12:[function(t,e,i){\"use strict\";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine(\"plugins.CSSPlugin\",[\"plugins.TweenPlugin\",\"TweenLite\"],function(r,p){function N(){r.call(this,\"css\"),this._overwriteProps.length=0,this.setRatio=N.prototype.setRatio}var d,x,b,u,_={},t=N.prototype=new r(\"css\");(t.constructor=N).version=\"1.12.1\",N.API=2,N.defaultTransformPerspective=0,N.defaultSkewType=\"compensated\",N.suffixMap={top:t=\"px\",right:t,bottom:t,left:t,width:t,height:t,fontSize:t,padding:t,margin:t,perspective:t,lineHeight:\"\"};function n(t,e){return e.toUpperCase()}function a(t){return L.test(\"string\"==typeof t?t:(t.currentStyle||t.style).filter||\"\")?parseFloat(RegExp.$1)/100:1}function f(t){window.console&&console.log(t)}function T(t,e){var i,s,n=(e=e||Z).style;if(void 0!==n[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=[\"O\",\"Moz\",\"ms\",\"Ms\",\"Webkit\"],s=5;-1<--s&&void 0===n[i[s]+t];);return 0<=s?(tt=\"-\"+(et=3===s?\"ms\":i[s]).toLowerCase()+\"-\",et+t):null}function m(t,e){var i,s={};if(e=e||it(t,null))if(i=e.length)for(;-1<--i;)s[e[i].replace(Y,n)]=e.getPropertyValue(e[i]);else for(i in e)s[i]=e[i];else if(e=t.currentStyle||t.style)for(i in e)\"string\"==typeof i&&void 0===s[i]&&(s[i.replace(Y,n)]=e[i]);return J||(s.opacity=a(t)),t=Pt(t,e,!1),s.rotation=t.rotation,s.skewX=t.skewX,s.scaleX=t.scaleX,s.scaleY=t.scaleY,s.x=t.x,s.y=t.y,Tt&&(s.z=t.z,s.rotationX=t.rotationX,s.rotationY=t.rotationY,s.scaleZ=t.scaleZ),s.filters&&delete s.filters,s}function g(t,e,i,s,n){var r,a,o,l={},c=t.style;for(a in i)\"cssText\"!==a&&\"length\"!==a&&isNaN(a)&&(e[a]!==(r=i[a])||n&&n[a])&&-1===a.indexOf(\"Origin\")&&(\"number\"==typeof r||\"string\"==typeof r)&&(l[a]=\"auto\"!==r||\"left\"!==a&&\"top\"!==a?\"\"!==r&&\"auto\"!==r&&\"none\"!==r||\"string\"!=typeof e[a]||\"\"===e[a].replace(D,\"\")?r:0:rt(t,a),void 0!==c[a]&&(o=new pt(c,a,c[a],o)));if(s)for(a in s)\"className\"!==a&&(l[a]=s[a]);return{difs:l,firstMPT:o}}function v(t,e){var i=(t=null==t||\"\"===t||\"auto\"===t||\"auto auto\"===t?\"0 0\":t).split(\" \"),s=-1!==t.indexOf(\"left\")?\"0%\":-1!==t.indexOf(\"right\")?\"100%\":i[0];return null==(t=-1!==t.indexOf(\"top\")?\"0%\":-1!==t.indexOf(\"bottom\")?\"100%\":i[1])?t=\"0\":\"center\"===t&&(t=\"50%\"),(\"center\"===s||isNaN(parseFloat(s))&&-1===(s+\"\").indexOf(\"=\"))&&(s=\"50%\"),e&&(e.oxp=-1!==s.indexOf(\"%\"),e.oyp=-1!==t.indexOf(\"%\"),e.oxr=\"=\"===s.charAt(1),e.oyr=\"=\"===t.charAt(1),e.ox=parseFloat(s.replace(D,\"\")),e.oy=parseFloat(t.replace(D,\"\"))),s+\" \"+t+(2>16,255&t>>8,255&t]:(\",\"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),lt[t]||(\"#\"===t.charAt(0)?(4===t.length&&(t=\"#\"+(e=t.charAt(1))+e+(i=t.charAt(2))+i+(r=t.charAt(3))+r),[(t=parseInt(t.substr(1),16))>>16,255&t>>8,255&t]):(\"hsl\"===t.substr(0,3)?(t=t.match(A),s=Number(t[0])%360/360,n=Number(t[1])/100,e=2*(r=Number(t[2])/100)-(i=r<=.5?r*(1+n):r+n-r*n),3a\",!!(i=i.getElementsByTagName(\"a\")[0])&&/^0.55/.test(i.style.opacity)),tt=\"\",et=\"\",it=Q.defaultView?Q.defaultView.getComputedStyle:function(){},st=N.getStyle=function(t,e,i,s,n){var r;return J||\"opacity\"!==e?(!s&&t.style[e]?r=t.style[e]:(i=i||it(t))?r=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(z,\"-$1\").toLowerCase()):t.currentStyle&&(r=t.currentStyle[e]),null==n||r&&\"none\"!==r&&\"auto\"!==r&&\"auto auto\"!==r?r:n):a(t)},nt=s.convertToPixels=function(t,e,i,s,n){if(\"px\"===s||!s)return i;if(\"auto\"===s||!i)return 0;var r,a,o,l=$.test(e),c=t,h=Z.style,u=i<0;if(u&&(i=-i),\"%\"===s&&-1!==e.indexOf(\"border\"))r=i/100*(l?t.clientWidth:t.clientHeight);else{if(h.cssText=\"border:0 solid red;position:\"+st(t,\"position\")+\";line-height:0;\",\"%\"!==s&&c.appendChild)h[l?\"borderLeftWidth\":\"borderTopWidth\"]=i+s;else{if(a=(c=t.parentNode||Q.body)._gsCache,o=p.ticker.frame,a&&l&&a.time===o)return a.width*i/100;h[l?\"width\":\"height\"]=i+s}c.appendChild(Z),r=parseFloat(Z[l?\"offsetWidth\":\"offsetHeight\"]),c.removeChild(Z),l&&\"%\"===s&&!1!==N.cacheWidths&&((a=c._gsCache=c._gsCache||{}).time=o,a.width=r/i*100),0!==r||n||(r=nt(t,e,i,s,!0))}return u?-r:r},rt=s.calculateOffset=function(t,e,i){if(\"absolute\"!==st(t,\"position\",i))return 0;var s=\"left\"===e?\"Left\":\"Top\",i=st(t,\"margin\"+s,i);return t[\"offset\"+s]-(nt(t,e,parseFloat(i),i.replace(j,\"\"))||0)},at={width:[\"Left\",\"Right\"],height:[\"Top\",\"Bottom\"]},ot=[\"marginLeft\",\"marginRight\",\"marginTop\",\"marginBottom\"],lt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ct=\"(?:\\\\b(?:(?:rgb|rgba|hsl|hsla)\\\\(.+?\\\\))|\\\\B#.+?\\\\b\";for(t in lt)ct+=\"|\"+t+\"\\\\b\";function ht(t,e,r,a){if(null==t)return function(t){return t};var o,l=e?(t.match(ct)||[\"\"])[0]:\"\",c=t.split(l).join(\"\").match(I)||[],h=t.substr(0,t.indexOf(c[0])),u=\")\"===t.charAt(t.length-1)?\")\":\"\",p=-1!==t.indexOf(\" \")?\" \":\",\",d=c.length,_=0s;s++)n[s]=o(n[s]);return n.join(\",\")}if(e=(t.match(ct)||[l])[0],s=(i=t.split(e).join(\"\").match(I)||[]).length,d>s--)for(;d>++s;)i[s]=r?i[0|(s-1)/2]:c[s];return h+i.join(p)+p+e+u+(-1!==t.indexOf(\"inset\")?\" inset\":\"\")}:function(t){var e,i,s;if(\"number\"==typeof t)t+=_;else if(a&&H.test(t)){for(i=t.replace(H,\"|\").split(\"|\"),s=0;i.length>s;s++)i[s]=o(i[s]);return i.join(\",\")}if(s=(e=t.match(I)||[]).length,d>s--)for(;d>++s;)e[s]=r?e[0|(s-1)/2]:c[s];return h+e.join(p)+u}:function(t){return t}}function ut(c){return c=c.split(\",\"),function(t,e,i,s,n,r,a){var o,l=(e+\"\").split(\" \");for(a={},o=0;o<4;o++)a[c[o]]=l[o]=l[o]||l[(o-1)/2>>0];return s.parse(t,a,n,r)}}var ct=RegExp(ct+\")\",\"gi\"),pt=(s._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,s,n,r=this.data,a=r.proxy,o=r.firstMPT;o;)e=a[o.v],o.r?e=Math.round(e):e<1e-6&&-1e-6s;s++)n+=i[\"xn\"+s]+i[\"xs\"+(s+1)];i.e=n}}else i.e=i.s+i.xs0;o=o._next}},function(t,e,i,s,n){this.t=t,this.p=e,this.v=i,this.r=n,s&&((s._prev=this)._next=s)}),dt=(s._parseToProxy=function(t,e,i,s,n,r){var a,o,l,c,h=s,u={},p={},d=i._transform,_=V;for(i._transform=null,V=e,s=n=i.parse(t,e,s,n),V=_,r&&(i._transform=d,h&&(h._prev=null,h._prev&&(h._prev._next=null)));s&&s!==h;){if(s.type<=1&&(p[o=s.p]=s.s+s.c,u[o]=s.s,r||(c=new pt(s,\"s\",o,c,s.r),s.c=0),1===s.type))for(a=s.l;0<--a;)p[o=s.p+\"_\"+(l=\"xn\"+a)]=s.data[l],u[o]=s[l],r||(c=new pt(s,l,o,c,s.rxp[l]));s=s._next}return{proxy:u,end:p,firstMPT:c,pt:n}},s.CSSPropTween=function(t,e,i,s,n,r,a,o,l,c,h){this.t=t,this.p=e,this.s=i,this.c=s,this.n=a||e,t instanceof dt||u.push(this.n),this.r=o,this.type=r||0,l&&(this.pr=l,d=!0),this.b=void 0===c?i:c,this.e=void 0===h?i+s:h,n&&((this._next=n)._prev=this)}),_t=N.parseComplex=function(t,e,i,s,n,r,a,o,l,c){a=new dt(t,e,0,0,a,c?2:1,null,!1,o,i=i||r||\"\",s),s+=\"\";var h,u,p,d,_,f,m,g,v,w,y,x=i.split(\", \").join(\",\").split(\" \"),b=s.split(\", \").join(\",\").split(\" \"),T=x.length,k=!1!==O;for(-1===s.indexOf(\",\")&&-1===i.indexOf(\",\")||(x=x.join(\" \").replace(H,\", \").split(\" \"),b=b.join(\" \").replace(H,\", \").split(\" \"),T=x.length),T!==b.length&&(T=(x=(r||\"\").split(\" \")).length),a.plugin=l,a.setRatio=c,h=0;hu;u++)w=f[u],v=d.indexOf(w,p),a.appendXtra(d.substr(p,v-p),Number(w),P(m[u],w),\"\",k&&\"px\"===d.substr(v+w.length,2),0===u),p=v+w.length;a[\"xs\"+a.l]+=d.substr(p)}else a[\"xs\"+a.l]+=a.l?\" \"+d:d;if(-1!==s.indexOf(\"=\")&&a.data){for(y=a.xs0+a.data.s,h=1;a.l>h;h++)y+=a[\"xs\"+h]+a.data[\"xn\"+h];a.e=y+a[\"xs\"+h]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},ft=9;for((t=dt.prototype).l=t.pr=0;0<--ft;)t[\"xn\"+ft]=0,t[\"xs\"+ft]=\"\";t.xs0=\"\",t._next=t._prev=t.xfirst=t.data=t.plugin=t.setRatio=t.rxp=null,t.appendXtra=function(t,e,i,s,n,r){var a=this,o=a.l;return a[\"xs\"+o]+=r&&o?\" \"+t:t||\"\",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a[\"xs\"+a.l]=s||\"\",0s;s++)e.prefix=0===s&&e.prefix,e.defaultValue=i[s]||r,new mt(n[s],e)};(t=mt.prototype).parseComplex=function(t,e,i,s,n,r){var a,o,l,c,h,u=this.keyword;if(this.multi&&(H.test(i)||H.test(e)?(o=e.replace(H,\"|\").split(\"|\"),l=i.replace(H,\"|\").split(\"|\")):u&&(o=[e],l=[i])),l){for(c=(l.length>o.length?l:o).length,a=0;aI[r]&&I[r]>-j&&(I[r]=0);return i&&(t._gsTransform=I),I},St=s.set3DTransformRatio=function(t){var e,i,s,n,r,a,o,l,c,h,u,p,d,_,f,m,g,v,w,y,x,b,T=this.data,k=this.t.style,P=T.rotation*U,S=T.scaleX,O=T.scaleY,C=T.scaleZ,A=T.perspective;if(1!==t&&0!==t||\"auto\"!==T.force3D||T.rotationY||T.rotationX||1!==C||A||T.z){if(M&&(S<1e-4&&-1e-4y;y++)this.p.indexOf(\"border\")&&(f[y]=T(f[y])),-1!==(o=a=st(t,f[y],b,!1,\"0px\")).indexOf(\" \")&&(o=(a=o.split(\" \"))[0],a=a[1]),l=r=w[y],d=parseFloat(o),_=o.substr((d+\"\").length),(h=\"\"===(h=(u=\"=\"===l.charAt(1))?(c=parseInt(l.charAt(0)+\"1\",10),l=l.substr(2),c*=parseFloat(l),l.substr((c+\"\").length-(c<0?1:0))||\"\"):(c=parseFloat(l),l.substr((c+\"\").length)))?x[i]||_:h)!==_&&(p=nt(t,\"borderLeft\",d,_),d=nt(t,\"borderTop\",d,_),a=\"%\"===h?(o=p/g*100+\"%\",d/v*100+\"%\"):\"em\"===h?(o=p/(_=nt(t,\"borderLeft\",1,\"em\"))+\"em\",d/_+\"em\"):(o=p+\"px\",d+\"px\"),u&&(l=parseFloat(o)+c+h,r=parseFloat(a)+c+h)),n=_t(m,f[y],o+\" \"+a,l+\" \"+r,!1,\"0px\",n);return n},prefix:!0,formatter:ht(\"0px 0px 0px 0px\",!1,!0)}),gt(\"backgroundPosition\",{defaultValue:\"0 0\",parser:function(t,e,i,s,n,r){var a,o,l,c,h,u,p=\"background-position\",d=b||it(t,null),_=this.format((d?C?d.getPropertyValue(p+\"-x\")+\" \"+d.getPropertyValue(p+\"-y\"):d.getPropertyValue(p):t.currentStyle.backgroundPositionX+\" \"+t.currentStyle.backgroundPositionY)||\"0 0\"),e=this.format(e);if(-1!==_.indexOf(\"%\")!=(-1!==e.indexOf(\"%\"))&&((u=st(t,\"backgroundImage\").replace(F,\"\"))&&\"none\"!==u)){for(a=_.split(\" \"),o=e.split(\" \"),G.setAttribute(\"src\",u),l=2;-1<--l;)(c=-1!==(_=a[l]).indexOf(\"%\"))!=(-1!==o[l].indexOf(\"%\"))&&(h=0===l?t.offsetWidth-G.width:t.offsetHeight-G.height,a[l]=c?parseFloat(_)/100*h+\"px\":parseFloat(_)/h*100+\"%\");_=a.join(\" \")}return this.parseComplex(t.style,_,e,n,r)},formatter:v}),gt(\"backgroundSize\",{defaultValue:\"0 0\",formatter:v}),gt(\"perspective\",{defaultValue:\"0px\",prefix:!0}),gt(\"perspectiveOrigin\",{defaultValue:\"50% 50%\",prefix:!0}),gt(\"transformStyle\",{prefix:!0}),gt(\"backfaceVisibility\",{prefix:!0}),gt(\"userSelect\",{prefix:!0}),gt(\"margin\",{parser:ut(\"marginTop,marginRight,marginBottom,marginLeft\")}),gt(\"padding\",{parser:ut(\"paddingTop,paddingRight,paddingBottom,paddingLeft\")}),gt(\"clip\",{defaultValue:\"rect(0px,0px,0px,0px)\",parser:function(t,e,i,s,n,r){var a,o;return e=C<9?(a=t.currentStyle,o=C<8?\" \":\",\",a=\"rect(\"+a.clipTop+o+a.clipRight+o+a.clipBottom+o+a.clipLeft+\")\",this.format(e).split(\",\").join(o)):(a=this.format(st(t,this.p,b,!1,this.dflt)),this.format(e)),this.parseComplex(t.style,a,e,n,r)}}),gt(\"textShadow\",{defaultValue:\"0px 0px 0px #999\",color:!0,multi:!0}),gt(\"autoRound,strictUnits\",{parser:function(t,e,i,s,n){return n}}),gt(\"border\",{defaultValue:\"0px solid #000\",parser:function(t,e,i,s,n,r){return this.parseComplex(t.style,this.format(st(t,\"borderTopWidth\",b,!1,\"0px\")+\" \"+st(t,\"borderTopStyle\",b,!1,\"solid\")+\" \"+st(t,\"borderTopColor\",b,!1,\"#000\")),this.format(e),n,r)},color:!0,formatter:function(t){var e=t.split(\" \");return e[0]+\" \"+(e[1]||\"solid\")+\" \"+(t.match(ct)||[\"#000\"])[0]}}),gt(\"borderWidth\",{parser:ut(\"borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth\")}),gt(\"float,cssFloat,styleFloat\",{parser:function(t,e,i,s,n){var r=t.style,t=\"cssFloat\"in r?\"cssFloat\":\"styleFloat\";return new dt(r,t,0,0,n,-1,i,!1,0,r[t],e)}});function Ct(t){var e,i=this.t,s=i.filter||st(this.data,\"filter\"),t=0|this.s+this.c*t;(e=100==t?-1===s.indexOf(\"atrix(\")&&-1===s.indexOf(\"radient(\")&&-1===s.indexOf(\"oader(\")?(i.removeAttribute(\"filter\"),!st(this.data,\"filter\")):(i.filter=s.replace(l,\"\"),!0):e)||(this.xn1&&(i.filter=s=s||\"alpha(opacity=\"+t+\")\"),-1===s.indexOf(\"pacity\")?0==t&&this.xn1||(i.filter=s+\" alpha(opacity=\"+t+\")\"):i.filter=s.replace(L,\"opacity=\"+t))}gt(\"opacity,alpha,autoAlpha\",{defaultValue:\"1\",parser:function(t,e,i,s,n,r){var a=parseFloat(st(t,\"opacity\",b,!1,\"1\")),o=t.style,l=\"autoAlpha\"===i;return\"string\"==typeof e&&\"=\"===e.charAt(1)&&(e=(\"-\"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+a),l&&1===a&&\"hidden\"===st(t,\"visibility\",b)&&0!==e&&(a=0),J?n=new dt(o,\"opacity\",a,e-a,n):((n=new dt(o,\"opacity\",100*a,100*(e-a),n)).xn1=l?1:0,o.zoom=1,n.type=2,n.b=\"alpha(opacity=\"+n.s+\")\",n.e=\"alpha(opacity=\"+(n.s+n.c)+\")\",n.data=t,n.plugin=r,n.setRatio=Ct),l&&((n=new dt(o,\"visibility\",0,0,n,-1,null,!1,0,0!==a?\"inherit\":\"hidden\",0===e?\"hidden\":\"inherit\")).xs0=\"inherit\",s._overwriteProps.push(n.n),s._overwriteProps.push(i)),n}});function At(t,e){e&&(t.removeProperty?(\"ms\"===e.substr(0,2)&&(e=\"M\"+e.substr(1)),t.removeProperty(e.replace(z,\"-$1\").toLowerCase())):t.removeAttribute(e))}function Mt(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute(\"class\",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:At(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute(\"class\")!==this.e&&this.t.setAttribute(\"class\",this.e)}gt(\"className\",{parser:function(t,e,i,s,n,r,a){var o,l,c,h=t.getAttribute(\"class\")||\"\",u=t.style.cssText;if((n=s._classNamePT=new dt(t,i,0,0,n,2)).setRatio=Mt,n.pr=-11,d=!0,n.b=h,o=m(t,b),i=t._gsClassPT){for(l={},c=i.data;c;)l[c.p]=1,c=c._next;i.setRatio(1)}return(t._gsClassPT=n).e=\"=\"!==e.charAt(1)?e:h.replace(RegExp(\"\\\\s*\\\\b\"+e.substr(2)+\"\\\\b\"),\"\")+(\"+\"===e.charAt(0)?\" \"+e.substr(2):\"\"),s._tween._duration&&(t.setAttribute(\"class\",n.e),a=g(t,o,m(t),a,l),t.setAttribute(\"class\",h),n.data=a.firstMPT,t.style.cssText=u,n=n.xfirst=s.parse(t,a.difs,n,r)),n}});function Rt(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&\"isFromStart\"!==this.data.data){var e,i,s,n,r=this.t.style,a=_.transform.parse;if(\"all\"===this.e)n=!(r.cssText=\"\");else for(s=(e=this.e.split(\",\")).length;-1<--s;)i=e[s],_[i]&&(_[i].parse===a?n=!0:i=\"transformOrigin\"===i?bt:_[i].p),At(r,i);n&&(At(r,yt),this.t._gsTransform&&delete this.t._gsTransform)}}for(gt(\"clearProps\",{parser:function(t,e,i,s,n){return(n=new dt(t,i,0,0,n,2)).setRatio=Rt,n.e=e,n.pr=-10,n.data=s._tween,d=!0,n}}),t=\"bezier,throwProps,physicsProps,physics2D\".split(\",\"),ft=t.length;ft--;)!function(t){var l;_[t]||(l=t.charAt(0).toUpperCase()+t.substr(1)+\"Plugin\",gt(t,{parser:function(t,e,i,s,n,r,a){var o=(window.GreenSockGlobals||window).com.greensock.plugins[l];return o?(o._cssRegister(),_[i].parse(t,e,i,s,n,r,a)):(f(\"Error: \"+l+\" js file not loaded.\"),n)}}))}(t[ft]);(t=N.prototype)._firstPT=null,t._onInitTween=function(t,e,i){if(!t.nodeType)return!1;this._target=t,this._tween=i,this._vars=e,O=e.autoRound,d=!1,x=e.suffixMap||N.suffixMap,b=it(t,\"\"),u=this._overwriteProps;var s,n,r,a,o,l,i=t.style;if(c&&\"\"===i.zIndex&&(\"auto\"!==(l=st(t,\"zIndex\",b))&&\"\"!==l||this._addLazySet(i,\"zIndex\",0)),\"string\"==typeof e&&(r=i.cssText,l=m(t,b),i.cssText=r+\";\"+e,l=g(t,l,m(t)).difs,!J&&X.test(e)&&(l.opacity=parseFloat(RegExp.$1)),e=l,i.cssText=r),this._firstPT=s=this.parse(t,e,null),this._transformType){for(l=3===this._transformType,yt?h&&(c=!0,\"\"===i.zIndex&&(\"auto\"!==(e=st(t,\"zIndex\",b))&&\"\"!==e||this._addLazySet(i,\"zIndex\",0)),k&&this._addLazySet(i,\"WebkitBackfaceVisibility\",this._vars.WebkitBackfaceVisibility||(l?\"visible\":\"hidden\"))):i.zoom=1,n=s;n&&n._next;)n=n._next;i=new dt(t,\"transform\",0,0,null,2),this._linkCSSP(i,null,n),i.setRatio=l&&Tt?St:yt?Ot:vt,i.data=this._transform||Pt(t,b,!0),u.pop()}if(d){for(;s;){for(o=s._next,n=r;n&&n.pr>s.pr;)n=n._next;(s._prev=n?n._prev:a)?s._prev._next=s:r=s,(s._next=n)?n._prev=s:a=s,s=o}this._firstPT=r}return!0},t.parse=function(t,e,i,s){var n,r,a,o,l,c,h,u,p=t.style;for(n in e)l=e[n],u=_[n],u?i=u.parse(t,l,n,this,i,s,e):(o=st(t,n,b)+\"\",h=\"string\"==typeof l,\"color\"===n||\"fill\"===n||\"stroke\"===n||-1!==n.indexOf(\"Color\")||h&&E.test(l)?(h||(l=S(l),l=(3s;s++)i+=n[\"xn\"+s]+n[\"xs\"+(s+1)];n.t[n.p]=i}else-1===n.type?n.t[n.p]=n.xs0:n.setRatio&&n.setRatio(t);else n.t[n.p]=e+n.xs0;n=n._next}else for(;n;)2!==n.type?n.t[n.p]=n.b:n.setRatio(t),n=n._next;else for(;n;)2!==n.type?n.t[n.p]=n.e:n.setRatio(t),n=n._next},t._enableTransforms=function(t){this._transformType=t||3===this._transformType?3:2,this._transform=this._transform||Pt(this._target,b,!0)};function It(){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)}t._addLazySet=function(t,e,i){e=this._firstPT=new dt(t,e,0,0,this._firstPT,2);e.e=i,e.setRatio=It,e.data=this},t._linkCSSP=function(t,e,i,s){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,s=!0),i?i._next=t:s||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},t._kill=function(t){var e,i,s,n=t;if(t.autoAlpha||t.alpha){for(i in n={},t)n[i]=t[i];n.opacity=1,n.autoAlpha&&(n.visibility=1)}return t.className&&(e=this._classNamePT)&&((s=e.xfirst)&&s._prev?this._linkCSSP(s._prev,e._next,s._prev._prev):s===this._firstPT&&(this._firstPT=e._next),e._next&&this._linkCSSP(e._next,e._next._next,s._prev),this._classNamePT=null),r.prototype._kill.call(this,n)};function Dt(t,e,i){var s,n,r,a;if(t.slice)for(n=t.length;-1<--n;)Dt(t[n],e,i);else for(n=(s=t.childNodes).length;-1<--n;)a=(r=s[n]).type,r.style&&(e.push(m(r)),i&&i.push(r)),1!==a&&9!==a&&11!==a||!r.childNodes.length||Dt(r,e,i)}return N.cascadeTo=function(t,e,i){var s,n,r,a=p.to(t,e,i),o=[a],l=[],c=[],h=[],u=p._internals.reservedProps;for(t=a._targets||a.target,Dt(t,l,h),a.render(e,!0),Dt(t,c),a.render(0,!0),a._enabled(!0),s=h.length;-1<--s;)if((n=g(h[s],l[s],c[s])).firstMPT){for(r in n=n.difs,i)u[r]&&(n[r]=i[r]);o.push(p.to(h[s],e,n))}return o},r.activate([N]),N},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],13:[function(t,e,i){\"use strict\";(window._gsQueue||(window._gsQueue=[])).push(function(){function n(t,e){var i=\"x\"===e?\"Width\":\"Height\",s=\"scroll\"+i,n=\"client\"+i,e=document.body;return t===a||t===r||t===e?Math.max(r[s],e[s])-(a[\"inner\"+i]||Math.max(r[n],e[n])):t[s]-t[\"offset\"+i]}var r=document.documentElement,a=window,t=window._gsDefine.plugin({propName:\"scrollTo\",API:2,version:\"1.7.3\",init:function(t,e,i){return this._wdw=t===a,this._target=t,this._tween=i,this._autoKill=!1!==(e=\"object\"!=typeof e?{y:e}:e).autoKill,this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=e.x?(this._addTween(this,\"x\",this.x,\"max\"===e.x?n(t,\"x\"):e.x,\"scrollTo_x\",!0),this._overwriteProps.push(\"scrollTo_x\")):this.skipX=!0,null!=e.y?(this._addTween(this,\"y\",this.y,\"max\"===e.y?n(t,\"y\"):e.y,\"scrollTo_y\",!0),this._overwriteProps.push(\"scrollTo_y\")):this.skipY=!0,!0},set:function(t){this._super.setRatio.call(this,t);var e=this._wdw||!this.skipX?this.getX():this.xPrev,i=this._wdw||!this.skipY?this.getY():this.yPrev,s=i-this.yPrev,t=e-this.xPrev;this._autoKill&&(!this.skipX&&(7e&&(this.skipX=!0),!this.skipY&&(7i&&(this.skipY=!0),this.skipX&&this.skipY&&this._tween.kill()),this._wdw?a.scrollTo(this.skipX?e:this.x,this.skipY?i:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),e=t.prototype;t.max=n,e.getX=function(){return this._wdw?null!=a.pageXOffset?a.pageXOffset:(null!=r.scrollLeft?r:document.body).scrollLeft:this._target.scrollLeft},e.getY=function(){return this._wdw?null!=a.pageYOffset?a.pageYOffset:(null!=r.scrollTop?r:document.body).scrollTop:this._target.scrollTop},e._kill=function(t){return t.scrollTo_x&&(this.skipX=!0),t.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,t)}}),window._gsDefine&&window._gsQueue.pop()()},{}]},{},[2]);"],"file":"wpr-admin.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["wpr-admin.js"],"sourcesContent":["!function s(n,r,a){function o(e,t){if(!r[e]){if(!n[e]){var i=\"function\"==typeof require&&require;if(!t&&i)return i(e,!0);if(l)return l(e,!0);throw(i=new Error(\"Cannot find module '\"+e+\"'\")).code=\"MODULE_NOT_FOUND\",i}i=r[e]={exports:{}},n[e][0].call(i.exports,function(t){return o(n[e][1][t]||t)},i,i.exports,s,n,r,a)}return r[e].exports}for(var l=\"function\"==typeof require&&require,t=0;t{i.append(\"\"+t+\": \"),i.append(e[t].message),i.append(\"
\")}):i.append('
'+e.message+\"
\")}})})})},{}],2:[function(t,e,i){\"use strict\";t(\"../lib/greensock/TweenLite.min.js\"),t(\"../lib/greensock/TimelineLite.min.js\"),t(\"../lib/greensock/easing/EasePack.min.js\"),t(\"../lib/greensock/plugins/CSSPlugin.min.js\"),t(\"../lib/greensock/plugins/ScrollToPlugin.min.js\"),t(\"../global/pageManager.js\"),t(\"../global/main.js\"),t(\"../global/fields.js\"),t(\"../global/beacon.js\"),t(\"../global/ajax.js\"),t(\"../global/rocketcdn.js\"),t(\"../global/countdown.js\")},{\"../global/ajax.js\":1,\"../global/beacon.js\":3,\"../global/countdown.js\":4,\"../global/fields.js\":5,\"../global/main.js\":6,\"../global/pageManager.js\":7,\"../global/rocketcdn.js\":8,\"../lib/greensock/TimelineLite.min.js\":9,\"../lib/greensock/TweenLite.min.js\":10,\"../lib/greensock/easing/EasePack.min.js\":11,\"../lib/greensock/plugins/CSSPlugin.min.js\":12,\"../lib/greensock/plugins/ScrollToPlugin.min.js\":13}],3:[function(t,e,i){\"use strict\";var s=jQuery;s(document).ready(function(){\"Beacon\"in window&&s(\".wpr-infoAction--help\").on(\"click\",function(t){var e=s(this).data(\"beacon-id\");return 0!==(e=(e=e).split(\",\")).length&&(1{o(t).attr(\"checked\",i?null:\"checked\")});else{const r=o(e).closest(\".wpr-list\").find(\".wpr-main-checkbox\");var n=o.map(s,t=>{if(void 0!==o(t).attr(\"checked\"))return t});r.attr(\"checked\",n.length===s.length?\"checked\":null)}}),0{let i=o(e).parents(\".wpr-list\");var s=i.find(\".wpr-list-body input[type=checkbox]:not(:checked)\").length;o(e).attr(\"checked\",s<=0?\"checked\":null)})})},{}],6:[function(t,e,i){\"use strict\";var c=jQuery;c(document).ready(function(){var t=c(\".wpr-notice\");c(\"#wpr-congratulations-notice\").on(\"click\",function(){return(new TimelineLite).to(t,1,{autoAlpha:0,x:40,ease:Power4.easeOut}).to(t,.6,{height:0,marginTop:0,ease:Power4.easeOut},\"=-.4\").set(t,{display:\"none\"}),!1}),c(\".rocket-analytics-data-container\").hide(),c(\".rocket-preview-analytics-data\").on(\"click\",function(t){t.preventDefault(),c(this).parent().next(\".rocket-analytics-data-container\").toggle()}),c(\".wpr-toggle-button\").each(function(){var t=c(this),e=t.closest(\".wpr-fieldsContainer-fieldset\").find(\".wpr-radio :checkbox\"),i=c('[href=\"'+t.attr(\"href\")+'\"].wpr-menuItem');e.on(\"change\",function(){e.is(\":checked\")?(i.css(\"display\",\"block\"),t.css(\"display\",\"inline-block\")):(i.css(\"display\",\"none\"),t.css(\"display\",\"none\"))}).trigger(\"change\")});var e=c(\".wpr-Popin-Analytics\"),i=c(\".wpr-Popin-overlay\"),s=c(\".wpr-Popin-Analytics-close\"),n=c(\".wpr-Popin-Analytics .wpr-button\");function r(){(new TimelineLite).fromTo(e,.6,{autoAlpha:1,marginTop:0},{autoAlpha:0,marginTop:-24,ease:Power4.easeOut}).fromTo(i,.6,{autoAlpha:1},{autoAlpha:0,ease:Power4.easeOut},\"=-.5\").set(e,{display:\"none\"}).set(i,{display:\"none\"})}c(\".wpr-js-popin\").on(\"click\",function(t){return t.preventDefault(),(new TimelineLite).set(e,{display:\"block\"}).set(i,{display:\"block\"}).fromTo(i,.6,{autoAlpha:0},{autoAlpha:1,ease:Power4.easeOut}).fromTo(e,.6,{autoAlpha:0,marginTop:-24},{autoAlpha:1,marginTop:0,ease:Power4.easeOut},\"=-.5\"),!1}),s.on(\"click\",function(t){return t.preventDefault(),r(),!1}),n.on(\"click\",function(t){return t.preventDefault(),r(),c(\"#analytics_enabled\").prop(\"checked\",!0),c(\"#analytics_enabled\").trigger(\"change\"),!1}),c(\"#analytics_enabled\").on(\"change\",function(){c(\".wpr-rocket-analytics-cta\").toggleClass(\"wpr-isHidden\")});var a=c(\".wpr-Popin-Upgrade\"),n=c(\".wpr-Popin-Upgrade-close\");c(\".wpr-popin-upgrade-toggle\").on(\"click\",function(t){return t.preventDefault(),(new TimelineLite).set(a,{display:\"block\"}).set(i,{display:\"block\"}).fromTo(i,.6,{autoAlpha:0},{autoAlpha:1,ease:Power4.easeOut}).fromTo(a,.6,{autoAlpha:0,marginTop:-24},{autoAlpha:1,marginTop:0,ease:Power4.easeOut},\"=-.5\"),!1}),n.on(\"click\",function(){return(new TimelineLite).fromTo(a,.6,{autoAlpha:1,marginTop:0},{autoAlpha:0,marginTop:-24,ease:Power4.easeOut}).fromTo(i,.6,{autoAlpha:1},{autoAlpha:0,ease:Power4.easeOut},\"=-.5\").set(a,{display:\"none\"}).set(i,{display:\"none\"}),!1});var o=c(\".wpr-Sidebar\");c(\".wpr-js-tips\").on(\"change\",function(){c(this).is(\":checked\")?(o.css(\"display\",\"block\"),localStorage.setItem(\"wpr-show-sidebar\",\"on\")):(o.css(\"display\",\"none\"),localStorage.setItem(\"wpr-show-sidebar\",\"off\"))}),document.getElementById(\"LKgOcCRpwmAj\")?c(\".wpr-adblock\").css(\"display\",\"none\"):c(\".wpr-adblock\").css(\"display\",\"block\");var l=c(\".wpr-adblock\");c(\".wpr-adblock-close\").on(\"click\",function(){return(new TimelineLite).to(l,1,{autoAlpha:0,x:40,ease:Power4.easeOut}).to(l,.4,{height:0,marginTop:0,ease:Power4.easeOut},\"=-.4\").set(l,{display:\"none\"}),!1})})},{}],7:[function(t,e,i){\"use strict\";function s(t){var e,i=this;this.$body=document.querySelector(\".wpr-body\"),this.$menuItems=document.querySelectorAll(\".wpr-menuItem\"),this.$submitButton=document.querySelector(\".wpr-Content > form > #wpr-options-submit\"),this.$pages=document.querySelectorAll(\".wpr-Page\"),this.$sidebar=document.querySelector(\".wpr-Sidebar\"),this.$content=document.querySelector(\".wpr-Content\"),this.$tips=document.querySelector(\".wpr-Content-tips\"),this.$links=document.querySelectorAll(\".wpr-body a\"),this.$menuItem=null,this.$page=null,this.pageId=null,this.bodyTop=0,this.buttonText=this.$submitButton.value,i.getBodyTop(),window.onhashchange=function(){i.detectID()},window.location.hash?(this.bodyTop=0,this.detectID()):(e=localStorage.getItem(\"wpr-hash\"),this.bodyTop=0,e?(window.location.hash=e,this.detectID()):(this.$menuItems[0].classList.add(\"isActive\"),localStorage.setItem(\"wpr-hash\",\"dashboard\"),window.location.hash=\"#dashboard\"));for(var s=0;s{a.querySelectorAll(\".wpr-rocketcdn-open\").forEach(t=>{t.addEventListener(\"click\",t=>{t.preventDefault()})}),function(){var t=\"\";t+=\"action=rocketcdn_process_status\";const e=r(t+=\"&nonce=\"+rocket_ajax_data.nonce);e.onreadystatechange=()=>{e.readyState===XMLHttpRequest.DONE&&200===e.status&&!0===JSON.parse(e.responseText).success&&MicroModal.show(\"wpr-rocketcdn-modal\")}}(),MicroModal.init({disableScroll:!0})}),s.addEventListener(\"load\",()=>{let t=a.querySelector(\"#wpr-rocketcdn-open-cta\"),e=a.querySelector(\"#wpr-rocketcdn-close-cta\"),i=a.querySelector(\"#wpr-rocketcdn-cta-small\"),s=a.querySelector(\"#wpr-rocketcdn-cta\");function n(t){var e=\"\";return e+=\"action=toggle_rocketcdn_cta\",e+=\"&status=\"+t,e+=\"&nonce=\"+rocket_ajax_data.nonce}null!==t&&null!==i&&null!==s&&t.addEventListener(\"click\",t=>{t.preventDefault(),i.classList.add(\"wpr-isHidden\"),s.classList.remove(\"wpr-isHidden\"),r(n(\"big\"))}),null!==e&&null!==i&&null!==s&&e.addEventListener(\"click\",t=>{t.preventDefault(),i.classList.remove(\"wpr-isHidden\"),s.classList.add(\"wpr-isHidden\"),r(n(\"small\"))})}),s.onmessage=t=>{var e,i,s=rocket_ajax_data.origin_url;t.origin===s&&((e=t.data).hasOwnProperty(\"cdnFrameHeight\")&&(a.getElementById(\"rocketcdn-iframe\").style.height=\"\".concat(e.cdnFrameHeight,\"px\")),(i=t.data).hasOwnProperty(\"cdnFrameClose\")&&(MicroModal.close(\"wpr-rocketcdn-modal\"),i.hasOwnProperty(\"cdn_page_message\")&&-1!==[\"iframe-payment-success\",\"iframe-unsubscribe-success\"].indexOf(i.cdn_page_message)&&a.location.reload()),function(t,e){let i=a.querySelector(\"#rocketcdn-iframe\").contentWindow;if(t.hasOwnProperty(\"rocketcdn_token\")){var s=\"\";s+=\"action=save_rocketcdn_token\",s+=\"&value=\"+t.rocketcdn_token;const n=r(s+=\"&nonce=\"+rocket_ajax_data.nonce);n.onreadystatechange=()=>{var t;n.readyState===XMLHttpRequest.DONE&&200===n.status&&(t=JSON.parse(n.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}else{s={process:\"subscribe\",message:\"token_not_received\"};i.postMessage({success:!1,data:s,rocketcdn:!0},e)}}(t.data,s),(e=t.data).hasOwnProperty(\"rocketcdn_process\")&&(i=\"\",i+=\"action=rocketcdn_process_set\",i+=\"&status=\"+e.rocketcdn_process,r(i+=\"&nonce=\"+rocket_ajax_data.nonce)),function(t,e){let i=a.querySelector(\"#rocketcdn-iframe\").contentWindow;if(t.hasOwnProperty(\"rocketcdn_url\")){var s=\"\";s+=\"action=rocketcdn_enable\",s+=\"&cdn_url=\"+t.rocketcdn_url;const n=r(s+=\"&nonce=\"+rocket_ajax_data.nonce);n.onreadystatechange=()=>{var t;n.readyState===XMLHttpRequest.DONE&&200===n.status&&(t=JSON.parse(n.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}}(t.data,s),function(t,e){let i=a.querySelector(\"#rocketcdn-iframe\").contentWindow;if(t.hasOwnProperty(\"rocketcdn_disable\")){t=\"\";t+=\"action=rocketcdn_disable\";const s=r(t+=\"&nonce=\"+rocket_ajax_data.nonce);s.onreadystatechange=()=>{var t;s.readyState===XMLHttpRequest.DONE&&200===s.status&&(t=JSON.parse(s.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}}(t.data,s),(s=t.data).hasOwnProperty(\"rocketcdn_validate_token\")&&s.hasOwnProperty(\"rocketcdn_validate_cname\")&&(t=\"\",t+=\"action=rocketcdn_validate_token_cname\",t+=\"&cdn_url=\"+s.rocketcdn_validate_cname,t+=\"&cdn_token=\"+s.rocketcdn_validate_token,r(t+=\"&nonce=\"+rocket_ajax_data.nonce)))}},{}],9:[function(t,e,i){\"use strict\";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine(\"TimelineLite\",[\"core.Animation\",\"core.SimpleTimeline\",\"TweenLite\"],function(h,u,p){function d(t){u.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var e,i,s=this.vars;for(i in s)e=s[i],g(e)&&-1!==e.join(\"\").indexOf(\"{self}\")&&(s[i]=this._swapSelfInParams(e));g(s.tweens)&&this.add(s.tweens,0,s.align,s.stagger)}function _(t){var e,i={};for(e in t)i[e]=t[e];return i}function n(t,e,i,s){t._timeline.pause(t._startTime),e&&e.apply(s||t._timeline,i||v)}var f=1e-10,m=p._internals.isSelector,g=p._internals.isArray,v=[],a=window._gsDefine.globals,w=v.slice,t=d.prototype=new u;return d.version=\"1.12.1\",t.constructor=d,t.kill()._gc=!1,t.to=function(t,e,i,s){var n=i.repeat&&a.TweenMax||p;return e?this.add(new n(t,e,i),s):this.set(t,i,s)},t.from=function(t,e,i,s){return this.add((i.repeat&&a.TweenMax||p).from(t,e,i),s)},t.fromTo=function(t,e,i,s,n){var r=s.repeat&&a.TweenMax||p;return e?this.add(r.fromTo(t,e,i,s),n):this.set(t,s,n)},t.staggerTo=function(t,e,i,s,n,r,a,o){var l,c=new d({onComplete:r,onCompleteParams:a,onCompleteScope:o,smoothChildTiming:this.smoothChildTiming});for(\"string\"==typeof t&&(t=p.selector(t)||t),m(t)&&(t=w.call(t,0)),s=s||0,l=0;t.length>l;l++)i.startAt&&(i.startAt=_(i.startAt)),c.to(t[l],e,_(i),l*s);return this.add(c,n)},t.staggerFrom=function(t,e,i,s,n,r,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,n,r,a,o)},t.staggerFromTo=function(t,e,i,s,n,r,a,o,l){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,n,r,a,o,l)},t.call=function(t,e,i,s){return this.add(p.delayedCall(0,t,e,i),s)},t.set=function(t,e,i){return i=this._parseTimeOrLabel(i,0,!0),null==e.immediateRender&&(e.immediateRender=i===this._time&&!this._paused),this.add(new p(t,0,e),i)},d.exportRoot=function(t,e){null==(t=t||{}).smoothChildTiming&&(t.smoothChildTiming=!0);var i,s,n=new d(t),t=n._timeline;for(null==e&&(e=!0),t._remove(n,!0),n._startTime=0,n._rawPrevTime=n._time=n._totalTime=t._time,i=t._first;i;)s=i._next,e&&i instanceof p&&i.target===i.vars.onComplete||n.add(i,i._startTime-i._delay),i=s;return t.add(n,0),n},t.add=function(t,e,i,s){var n,r,a,o,l,c;if(\"number\"!=typeof e&&(e=this._parseTimeOrLabel(e,0,!0,t)),!(t instanceof h)){if(t instanceof Array||t&&t.push&&g(t)){for(i=i||\"normal\",s=s||0,n=e,r=t.length,a=0;at._startTime;l._timeline;)c&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return this},t.remove=function(t){if(t instanceof h)return this._remove(t,!1);if(t instanceof Array||t&&t.push&&g(t)){for(var e=t.length;-1<--e;)this.remove(t[e]);return this}return\"string\"==typeof t?this.removeLabel(t):this.kill(null,t)},t._remove=function(t,e){u.prototype._remove.call(this,t,e);e=this._last;return e?this._time>e._startTime+e._totalDuration/e._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},t.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},t.insert=t.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},t.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},t.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},t.addPause=function(t,e,i,s){return this.call(n,[\"{self}\",e,i,s],this,t)},t.removeLabel=function(t){return delete this._labels[t],this},t.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},t._parseTimeOrLabel=function(t,e,i,s){var n;if(s instanceof h&&s.timeline===this)this.remove(s);else if(s&&(s instanceof Array||s.push&&g(s)))for(n=s.length;-1<--n;)s[n]instanceof h&&s[n].timeline===this&&this.remove(s[n]);if(\"string\"==typeof e)return this._parseTimeOrLabel(e,i&&\"number\"==typeof t&&null==this._labels[e]?t-this.duration():0,i);if(e=e||0,\"string\"!=typeof t||!isNaN(t)&&null==this._labels[t])null==t&&(t=this.duration());else{if(-1===(n=t.indexOf(\"=\")))return null==this._labels[t]?i?this._labels[t]=this.duration()+e:e:this._labels[t]+e;e=parseInt(t.charAt(n-1)+\"1\",10)*Number(t.substr(n+1)),t=1f&&(a=\"onReverseComplete\"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:f,t=l+1e-4):t<1e-7?(((this._totalTime=this._time=0)!==c||0===this._duration&&this._rawPrevTime!==f&&(0=c)for(s=this._first;s&&(r=s._next,!this._paused||p);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r;else for(s=this._last;s&&(r=s._prev,!this._paused||p);)(s._active||c>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r;this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||v)),a&&(this._gc||h!==this._startTime&&u===this._timeScale||!(0===this._time||l>=this.totalDuration())||(n&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[a]&&this.vars[a].apply(this.vars[a+\"Scope\"]||this,this.vars[a+\"Params\"]||v)))}},t._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof d&&t._hasPausedChild())return!0;t=t._next}return!1},t.getChildren=function(t,e,i,s){s=s||-9999999999;for(var n=[],r=this._first,a=0;r;)s>r._startTime||(r instanceof p?!1!==e&&(n[a++]=r):(!1!==i&&(n[a++]=r),!1!==t&&(a=(n=n.concat(r.getChildren(!0,e,i))).length))),r=r._next;return n},t.getTweensOf=function(t,e){var i,s,n=this._gc,r=[],a=0;for(n&&this._enabled(!0,!0),s=(i=p.getTweensOf(t)).length;-1<--s;)(i[s].timeline===this||e&&this._contains(i[s]))&&(r[a++]=i[s]);return n&&this._enabled(!1,!0),r},t._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},t.shiftChildren=function(t,e,i){i=i||0;for(var s,n=this._first,r=this._labels;n;)n._startTime>=i&&(n._startTime+=t),n=n._next;if(e)for(s in r)r[s]>=i&&(r[s]+=t);return this._uncache(!0)},t._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,n=!1;-1<--s;)i[s]._kill(t,e)&&(n=!0);return n},t.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;-1<--i;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},t.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return this},t._enabled=function(t,e){if(t===this._gc)for(var i=this._first;i;)i._enabled(t,!0),i=i._next;return u.prototype._enabled.call(this,t,e)},t.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},t.totalDuration=function(t){if(arguments.length)return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this;if(this._dirty){for(var e,i,s=0,n=this._last,r=999999999999;n;)e=n._prev,n._dirty&&n.totalDuration(),n._startTime>r&&this._sortChildren&&!n._paused?this.add(n,n._startTime-n._delay):r=n._startTime,n._startTime<0&&!n._paused&&(s-=n._startTime,this._timeline.smoothChildTiming&&(this._startTime+=n._startTime/this._timeScale),this.shiftChildren(-n._startTime,!1,-9999999999),r=0),s<(i=n._startTime+n._totalDuration/n._timeScale)&&(s=i),n=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration},t.usesFrames=function(){for(var t=this._timeline;t._timeline;)t=t._timeline;return t===h._rootFramesTimeline},t.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},d},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],10:[function(t,Q,e){\"use strict\";!function(p){var e,i,d=p.GreenSockGlobals||p;if(!d.TweenLite){var _,f=function(t){for(var e=t.split(\".\"),i=d,s=0;e.length>s;s++)i[e[s]]=i=i[e[s]]||{};return i},u=f(\"com.greensock\"),m=1e-10,o=[].slice,g=function(){},h=(e=Object.prototype.toString,i=e.call([]),function(t){return null!=t&&(t instanceof Array||\"object\"==typeof t&&!!t.push&&e.call(t)===i)}),v={},w=function(o,l,c,h){this.sc=v[o]?v[o].sc:[],(v[o]=this).gsClass=null,this.func=c;var u=[];this.check=function(t){for(var e,i,s,n,r=l.length,a=r;-1<--r;)(e=v[l[r]]||new w(l[r],[])).gsClass?(u[r]=e.gsClass,a--):t&&e.sc.push(this);if(0===a&&c)for(s=(i=(\"com.greensock.\"+o).split(\".\")).pop(),n=f(i.join(\".\"))[s]=this.gsClass=c.apply(c,u),h&&(d[s]=n,\"function\"==typeof define&&define.amd?define((p.GreenSockAMDPath?p.GreenSockAMDPath+\"/\":\"\")+o.split(\".\").join(\"/\"),[],function(){return n}):void 0!==Q&&Q.exports&&(Q.exports=n)),r=0;this.sc.length>r;r++)this.sc[r].check()},this.check(!0)},s=p._gsDefine=function(t,e,i,s){return new w(t,e,i,s)},y=u._class=function(t,e,i){return e=e||function(){},s(t,[],function(){return e},i),e};s.globals=d;var t,n=[0,0,1,1],x=[],b=y(\"easing.Ease\",function(t,e,i,s){this._func=t,this._type=i||0,this._power=s||0,this._params=e?n.concat(e):n},!0),T=b.map={},r=b.register=function(t,e,i,s){for(var n,r,a,o,l=e.split(\",\"),c=l.length,h=(i||\"easeIn,easeOut,easeInOut\").split(\",\");-1<--c;)for(r=l[c],n=s?y(\"easing.\"+r,null,!0):u.easing[r]||{},a=h.length;-1<--a;)o=h[a],T[r+\".\"+o]=T[o+r]=n[o]=t.getRatio?t:t[o]||new t};for((t=b.prototype)._calcEnd=!1,t.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,s=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?s*=s:2===i?s*=s*s:3===i?s*=s*s*s:4===i&&(s*=s*s*s*s),1===e?1-s:2===e?s:t<.5?s/2:1-s/2},l=(a=[\"Linear\",\"Quad\",\"Cubic\",\"Quart\",\"Quint,Strong\"]).length;-1<--l;)t=a[l]+\",Power\"+l,r(new b(null,null,1,l),t,\"easeOut\",!0),r(new b(null,null,2,l),t,\"easeIn\"+(0===l?\",easeNone\":\"\")),r(new b(null,null,3,l),t,\"easeInOut\");T.linear=u.easing.Linear.easeIn,T.swing=u.easing.Quad.easeInOut;var k=y(\"events.EventDispatcher\",function(t){this._listeners={},this._eventTarget=t||this});(t=k.prototype).addEventListener=function(t,e,i,s,n){n=n||0;var r,a,o=this._listeners[t],l=0;for(null==o&&(this._listeners[t]=o=[]),a=o.length;-1<--a;)(r=o[a]).c===e&&r.s===i?o.splice(a,1):0===l&&n>r.pr&&(l=a+1);o.splice(l,0,{c:e,s:i,up:s,pr:n}),this!==A||_||A.wake()},t.removeEventListener=function(t,e){var i,s=this._listeners[t];if(s)for(i=s.length;-1<--i;)if(s[i].c===e)return void s.splice(i,1)},t.dispatchEvent=function(t){var e,i,s,n=this._listeners[t];if(n)for(e=n.length,i=this._eventTarget;-1<--e;)(s=n[e]).up?s.c.call(s.s||i,{type:t,target:i}):s.c.call(s.s||i)};for(var a,P=p.requestAnimationFrame,S=p.cancelAnimationFrame,O=Date.now||function(){return(new Date).getTime()},C=O(),l=(a=[\"ms\",\"moz\",\"webkit\",\"o\"]).length;-1<--l&&!P;)P=p[a[l]+\"RequestAnimationFrame\"],S=p[a[l]+\"CancelAnimationFrame\"]||p[a[l]+\"CancelRequestAnimationFrame\"];y(\"Ticker\",function(t,e){var s,n,r,a,o,l=this,c=O(),i=!1!==e&&P,h=500,u=33,p=function(t){var e,i=O()-C;h=i&&i+this.totalDuration()/this._timeScale>t},t._enabled=function(t,e){return _||A.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},t._kill=function(){return this._enabled(!1,!1)},t.kill=function(t,e){return this._kill(t,e),this},t._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},t._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();-1<--e;)\"{self}\"===t[e]&&(i[e]=this);return i},t.eventCallback=function(t,e,i,s){if(\"on\"===(t||\"\").substr(0,2)){var n=this.vars;if(1===arguments.length)return n[t];null==e?delete n[t]:(n[t]=e,n[t+\"Params\"]=h(i)&&-1!==i.join(\"\").indexOf(\"{self}\")?this._swapSelfInParams(i):i,n[t+\"Scope\"]=s),\"onUpdate\"===t&&(this._onUpdate=e)}return this},t.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},t.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&0this._duration?this._duration:t,e)):this._time},t.totalTime=function(t,e,i){if(_||A.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var s=this._totalDuration,n=this._timeline;if(ss;)i=i._prev;return i?(t._next=i._next,i._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=i,this._timeline&&this._uncache(!0),this},t._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t.timeline=null,t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),this._timeline&&this._uncache(!0)),this},t.render=function(t,e,i){var s,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;n;)s=n._next,(n._active||t>=n._startTime&&!n._paused)&&(n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale,e,i):n.render((t-n._startTime)*n._timeScale,e,i)),n=s},t.rawTime=function(){return _||A.wake(),this._totalTime};var I=y(\"TweenLite\",function(t,e,i){if(c.call(this,e,i),this.render=I.prototype.render,null==t)throw\"Cannot tween a null target.\";this.target=t=\"string\"==typeof t&&I.selector(t)||t;var s,n,r,i=t.jquery||t.length&&t!==p&&t[0]&&(t[0]===p||t[0].nodeType&&t[0].style&&!t.nodeType),a=this.vars.overwrite;if(this._overwrite=a=null==a?F[I.defaultOverwrite]:\"number\"==typeof a?a>>0:F[a],(i||t instanceof Array||t.push&&h(t))&&\"number\"!=typeof t[0])for(this._targets=r=o.call(t,0),this._propLookup=[],this._siblings=[],s=0;r.length>s;s++)(n=r[s])?\"string\"!=typeof n?n.length&&n!==p&&n[0]&&(n[0]===p||n[0].nodeType&&n[0].style&&!n.nodeType)?(r.splice(s--,1),this._targets=r=r.concat(o.call(n,0))):(this._siblings[s]=H(n,this,!1),1===a&&1=a._startTime&&a._startTime+a.totalDuration()/a._timeScale>c&&((p||!a._initted)&&c-a._startTime<=2e-10||(h[u++]=a)));for(d=u;-1<--d;)a=h[d],2===s&&a._kill(i,t)&&(r=!0),(2!==s||!a._firstPT&&a._initted)&&a._enabled(!1,!1)&&(r=!0);return r},W=function(t,e,i){for(var s=t._timeline,n=s._timeScale,r=t._startTime;s._timeline;){if(r+=s._startTime,n*=s._timeScale,s._paused)return-100;s=s._timeline}return e<(r/=n)?r-e:i&&r===e||!t._initted&&r-e<2*m?m:(r+=t.totalDuration()/t._timeScale/n)>e+m?0:r-e-m};t._init=function(){var t,e,i,s,n,r=this.vars,a=this._overwrittenProps,o=this._duration,l=!!r.immediateRender,c=r.ease;if(r.startAt){for(s in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),n={},r.startAt)n[s]=r.startAt[s];if(n.overwrite=!1,n.immediateRender=!0,n.lazy=l&&!1!==r.lazy,n.startAt=n.delay=null,this._startAt=I.to(this.target,0,n),l)if(0o.pr;)s=s._next;(o._prev=s?s._prev:r)?o._prev._next=o:n=o,(o._next=s)?s._prev=o:r=o,o=a}o=e._firstPT=n}for(;o;)o.pg&&\"function\"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},V.activate=function(t){for(var e=t.length;-1<--e;)t[e].API===V.API&&(E[(new t[e])._propName]=t[e]);return!0},s.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw\"illegal plugin definition.\";var e,i=t.propName,s=t.priority||0,n=t.overwriteProps,r={init:\"_onInitTween\",set:\"setRatio\",kill:\"_kill\",round:\"_roundProps\",initAll:\"_onInitAllProps\"},a=y(\"plugins.\"+i.charAt(0).toUpperCase()+i.substr(1)+\"Plugin\",function(){V.call(this,i,s),this._overwriteProps=n||[]},!0===t.global),o=a.prototype=new V(i);for(e in(o.constructor=a).API=t.API,r)\"function\"==typeof t[e]&&(o[r[e]]=t[e]);return a.version=t.version,V.activate([a]),a},a=p._gsQueue){for(l=0;a.length>l;l++)a[l]();for(t in v)v[t].func||p.console.log(\"GSAP encountered missing dependency: com.greensock.\"+t)}_=!1}}(window)},{}],11:[function(t,e,i){\"use strict\";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine(\"easing.Back\",[\"easing.Ease\"],function(m){function t(t,e){var i=c(\"easing.\"+t,function(){},!0);return(t=i.prototype=new m).constructor=i,t.getRatio=e,i}function e(t,e,i,s){return s=c(\"easing.\"+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0),h(s,t),s}function g(t,e,i){this.t=t,this.v=e,i&&(((this.next=i).prev=this).c=i.v-e,this.gap=i.t-t)}function i(t,e){var i=c(\"easing.\"+t,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0);return(t=i.prototype=new m).constructor=i,t.getRatio=e,t.config=function(t){return new i(t)},i}var s,n,r=window.GreenSockGlobals||window,a=r.com.greensock,o=2*Math.PI,l=Math.PI/2,c=a._class,h=m.register||function(){},u=e(\"Back\",i(\"BackOut\",function(t){return--t*t*((this._p1+1)*t+this._p1)+1}),i(\"BackIn\",function(t){return t*t*((this._p1+1)*t-this._p1)}),i(\"BackInOut\",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),p=c(\"easing.SlowMo\",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:1t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},p.ease=new p(.7,.7),a.config=p.config=function(t,e,i){return new p(t,e,i)},(a=(s=c(\"easing.SteppedEase\",function(t){this._p1=1/(t=t||1),this._p2=t+1},!0)).prototype=new m).constructor=s,a.getRatio=function(t){return t<0?t=0:1<=t&&(t=.999999999),(this._p2*t>>0)*this._p1},a.config=s.config=function(t){return new s(t)},(a=(n=c(\"easing.RoughEase\",function(t){for(var e,i,s,n,r,a,o=(t=t||{}).taper||\"none\",l=[],c=0,h=0|(t.points||20),u=h,p=!1!==t.randomize,d=!0===t.clamp,_=t.template instanceof m?t.template:null,f=\"number\"==typeof t.strength?.4*t.strength:.4;-1<--u;)e=p?Math.random():1/h*u,i=_?_.getRatio(e):e,s=\"none\"===o?f:\"out\"===o?(n=1-e)*n*f:\"in\"===o?e*e*f:.5*(n=e<.5?2*e:2*(1-e))*n*f,p?i+=Math.random()*s-.5*s:u%2?i+=.5*s:i-=.5*s,d&&(1e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return(this._prev=e).v+(t-e.t)/e.gap*e.c},a.config=function(t){return new n(t)},n.ease=new n,e(\"Bounce\",t(\"BounceOut\",function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),t(\"BounceIn\",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),t(\"BounceInOut\",function(t){var e=t<.5;return t=(t=e?1-2*t:2*t-1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),e(\"Circ\",t(\"CircOut\",function(t){return Math.sqrt(1- --t*t)}),t(\"CircIn\",function(t){return-(Math.sqrt(1-t*t)-1)}),t(\"CircInOut\",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),e(\"Elastic\",(a=function(t,e,i){var s=c(\"easing.\"+t,function(t,e){this._p1=t||1,this._p2=e||i,this._p3=this._p2/o*(Math.asin(1/this._p1)||0)},!0),t=s.prototype=new m;return t.constructor=s,t.getRatio=e,t.config=function(t,e){return new s(t,e)},s})(\"ElasticOut\",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*o/this._p2)+1},.3),a(\"ElasticIn\",function(t){return-(this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*o/this._p2))},.3),a(\"ElasticInOut\",function(t){return(t*=2)<1?-.5*this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*o/this._p2):.5*this._p1*Math.pow(2,-10*--t)*Math.sin((t-this._p3)*o/this._p2)+1},.45)),e(\"Expo\",t(\"ExpoOut\",function(t){return 1-Math.pow(2,-10*t)}),t(\"ExpoIn\",function(t){return Math.pow(2,10*(t-1))-.001}),t(\"ExpoInOut\",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),e(\"Sine\",t(\"SineOut\",function(t){return Math.sin(t*l)}),t(\"SineIn\",function(t){return 1-Math.cos(t*l)}),t(\"SineInOut\",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),c(\"easing.EaseLookup\",{find:function(t){return m.map[t]}},!0),h(r.SlowMo,\"SlowMo\",\"ease,\"),h(n,\"RoughEase\",\"ease,\"),h(s,\"SteppedEase\",\"ease,\"),u},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],12:[function(t,e,i){\"use strict\";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine(\"plugins.CSSPlugin\",[\"plugins.TweenPlugin\",\"TweenLite\"],function(r,p){function N(){r.call(this,\"css\"),this._overwriteProps.length=0,this.setRatio=N.prototype.setRatio}var d,x,b,u,_={},t=N.prototype=new r(\"css\");(t.constructor=N).version=\"1.12.1\",N.API=2,N.defaultTransformPerspective=0,N.defaultSkewType=\"compensated\",N.suffixMap={top:t=\"px\",right:t,bottom:t,left:t,width:t,height:t,fontSize:t,padding:t,margin:t,perspective:t,lineHeight:\"\"};function n(t,e){return e.toUpperCase()}function a(t){return L.test(\"string\"==typeof t?t:(t.currentStyle||t.style).filter||\"\")?parseFloat(RegExp.$1)/100:1}function f(t){window.console&&console.log(t)}function T(t,e){var i,s,n=(e=e||Z).style;if(void 0!==n[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=[\"O\",\"Moz\",\"ms\",\"Ms\",\"Webkit\"],s=5;-1<--s&&void 0===n[i[s]+t];);return 0<=s?(tt=\"-\"+(et=3===s?\"ms\":i[s]).toLowerCase()+\"-\",et+t):null}function m(t,e){var i,s={};if(e=e||it(t,null))if(i=e.length)for(;-1<--i;)s[e[i].replace(Y,n)]=e.getPropertyValue(e[i]);else for(i in e)s[i]=e[i];else if(e=t.currentStyle||t.style)for(i in e)\"string\"==typeof i&&void 0===s[i]&&(s[i.replace(Y,n)]=e[i]);return J||(s.opacity=a(t)),t=Pt(t,e,!1),s.rotation=t.rotation,s.skewX=t.skewX,s.scaleX=t.scaleX,s.scaleY=t.scaleY,s.x=t.x,s.y=t.y,Tt&&(s.z=t.z,s.rotationX=t.rotationX,s.rotationY=t.rotationY,s.scaleZ=t.scaleZ),s.filters&&delete s.filters,s}function g(t,e,i,s,n){var r,a,o,l={},c=t.style;for(a in i)\"cssText\"!==a&&\"length\"!==a&&isNaN(a)&&(e[a]!==(r=i[a])||n&&n[a])&&-1===a.indexOf(\"Origin\")&&(\"number\"==typeof r||\"string\"==typeof r)&&(l[a]=\"auto\"!==r||\"left\"!==a&&\"top\"!==a?\"\"!==r&&\"auto\"!==r&&\"none\"!==r||\"string\"!=typeof e[a]||\"\"===e[a].replace(D,\"\")?r:0:rt(t,a),void 0!==c[a]&&(o=new pt(c,a,c[a],o)));if(s)for(a in s)\"className\"!==a&&(l[a]=s[a]);return{difs:l,firstMPT:o}}function v(t,e){var i=(t=null==t||\"\"===t||\"auto\"===t||\"auto auto\"===t?\"0 0\":t).split(\" \"),s=-1!==t.indexOf(\"left\")?\"0%\":-1!==t.indexOf(\"right\")?\"100%\":i[0];return null==(t=-1!==t.indexOf(\"top\")?\"0%\":-1!==t.indexOf(\"bottom\")?\"100%\":i[1])?t=\"0\":\"center\"===t&&(t=\"50%\"),(\"center\"===s||isNaN(parseFloat(s))&&-1===(s+\"\").indexOf(\"=\"))&&(s=\"50%\"),e&&(e.oxp=-1!==s.indexOf(\"%\"),e.oyp=-1!==t.indexOf(\"%\"),e.oxr=\"=\"===s.charAt(1),e.oyr=\"=\"===t.charAt(1),e.ox=parseFloat(s.replace(D,\"\")),e.oy=parseFloat(t.replace(D,\"\"))),s+\" \"+t+(2>16,255&t>>8,255&t]:(\",\"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),lt[t]||(\"#\"===t.charAt(0)?(4===t.length&&(t=\"#\"+(e=t.charAt(1))+e+(i=t.charAt(2))+i+(r=t.charAt(3))+r),[(t=parseInt(t.substr(1),16))>>16,255&t>>8,255&t]):(\"hsl\"===t.substr(0,3)?(t=t.match(A),s=Number(t[0])%360/360,n=Number(t[1])/100,e=2*(r=Number(t[2])/100)-(i=r<=.5?r*(1+n):r+n-r*n),3a\",!!(i=i.getElementsByTagName(\"a\")[0])&&/^0.55/.test(i.style.opacity)),tt=\"\",et=\"\",it=Q.defaultView?Q.defaultView.getComputedStyle:function(){},st=N.getStyle=function(t,e,i,s,n){var r;return J||\"opacity\"!==e?(!s&&t.style[e]?r=t.style[e]:(i=i||it(t))?r=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(z,\"-$1\").toLowerCase()):t.currentStyle&&(r=t.currentStyle[e]),null==n||r&&\"none\"!==r&&\"auto\"!==r&&\"auto auto\"!==r?r:n):a(t)},nt=s.convertToPixels=function(t,e,i,s,n){if(\"px\"===s||!s)return i;if(\"auto\"===s||!i)return 0;var r,a,o,l=$.test(e),c=t,h=Z.style,u=i<0;if(u&&(i=-i),\"%\"===s&&-1!==e.indexOf(\"border\"))r=i/100*(l?t.clientWidth:t.clientHeight);else{if(h.cssText=\"border:0 solid red;position:\"+st(t,\"position\")+\";line-height:0;\",\"%\"!==s&&c.appendChild)h[l?\"borderLeftWidth\":\"borderTopWidth\"]=i+s;else{if(a=(c=t.parentNode||Q.body)._gsCache,o=p.ticker.frame,a&&l&&a.time===o)return a.width*i/100;h[l?\"width\":\"height\"]=i+s}c.appendChild(Z),r=parseFloat(Z[l?\"offsetWidth\":\"offsetHeight\"]),c.removeChild(Z),l&&\"%\"===s&&!1!==N.cacheWidths&&((a=c._gsCache=c._gsCache||{}).time=o,a.width=r/i*100),0!==r||n||(r=nt(t,e,i,s,!0))}return u?-r:r},rt=s.calculateOffset=function(t,e,i){if(\"absolute\"!==st(t,\"position\",i))return 0;var s=\"left\"===e?\"Left\":\"Top\",i=st(t,\"margin\"+s,i);return t[\"offset\"+s]-(nt(t,e,parseFloat(i),i.replace(j,\"\"))||0)},at={width:[\"Left\",\"Right\"],height:[\"Top\",\"Bottom\"]},ot=[\"marginLeft\",\"marginRight\",\"marginTop\",\"marginBottom\"],lt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ct=\"(?:\\\\b(?:(?:rgb|rgba|hsl|hsla)\\\\(.+?\\\\))|\\\\B#.+?\\\\b\";for(t in lt)ct+=\"|\"+t+\"\\\\b\";function ht(t,e,r,a){if(null==t)return function(t){return t};var o,l=e?(t.match(ct)||[\"\"])[0]:\"\",c=t.split(l).join(\"\").match(I)||[],h=t.substr(0,t.indexOf(c[0])),u=\")\"===t.charAt(t.length-1)?\")\":\"\",p=-1!==t.indexOf(\" \")?\" \":\",\",d=c.length,_=0s;s++)n[s]=o(n[s]);return n.join(\",\")}if(e=(t.match(ct)||[l])[0],s=(i=t.split(e).join(\"\").match(I)||[]).length,d>s--)for(;d>++s;)i[s]=r?i[0|(s-1)/2]:c[s];return h+i.join(p)+p+e+u+(-1!==t.indexOf(\"inset\")?\" inset\":\"\")}:function(t){var e,i,s;if(\"number\"==typeof t)t+=_;else if(a&&H.test(t)){for(i=t.replace(H,\"|\").split(\"|\"),s=0;i.length>s;s++)i[s]=o(i[s]);return i.join(\",\")}if(s=(e=t.match(I)||[]).length,d>s--)for(;d>++s;)e[s]=r?e[0|(s-1)/2]:c[s];return h+e.join(p)+u}:function(t){return t}}function ut(c){return c=c.split(\",\"),function(t,e,i,s,n,r,a){var o,l=(e+\"\").split(\" \");for(a={},o=0;o<4;o++)a[c[o]]=l[o]=l[o]||l[(o-1)/2>>0];return s.parse(t,a,n,r)}}var ct=RegExp(ct+\")\",\"gi\"),pt=(s._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,s,n,r=this.data,a=r.proxy,o=r.firstMPT;o;)e=a[o.v],o.r?e=Math.round(e):e<1e-6&&-1e-6s;s++)n+=i[\"xn\"+s]+i[\"xs\"+(s+1)];i.e=n}}else i.e=i.s+i.xs0;o=o._next}},function(t,e,i,s,n){this.t=t,this.p=e,this.v=i,this.r=n,s&&((s._prev=this)._next=s)}),dt=(s._parseToProxy=function(t,e,i,s,n,r){var a,o,l,c,h=s,u={},p={},d=i._transform,_=V;for(i._transform=null,V=e,s=n=i.parse(t,e,s,n),V=_,r&&(i._transform=d,h&&(h._prev=null,h._prev&&(h._prev._next=null)));s&&s!==h;){if(s.type<=1&&(p[o=s.p]=s.s+s.c,u[o]=s.s,r||(c=new pt(s,\"s\",o,c,s.r),s.c=0),1===s.type))for(a=s.l;0<--a;)p[o=s.p+\"_\"+(l=\"xn\"+a)]=s.data[l],u[o]=s[l],r||(c=new pt(s,l,o,c,s.rxp[l]));s=s._next}return{proxy:u,end:p,firstMPT:c,pt:n}},s.CSSPropTween=function(t,e,i,s,n,r,a,o,l,c,h){this.t=t,this.p=e,this.s=i,this.c=s,this.n=a||e,t instanceof dt||u.push(this.n),this.r=o,this.type=r||0,l&&(this.pr=l,d=!0),this.b=void 0===c?i:c,this.e=void 0===h?i+s:h,n&&((this._next=n)._prev=this)}),_t=N.parseComplex=function(t,e,i,s,n,r,a,o,l,c){a=new dt(t,e,0,0,a,c?2:1,null,!1,o,i=i||r||\"\",s),s+=\"\";var h,u,p,d,_,f,m,g,v,w,y,x=i.split(\", \").join(\",\").split(\" \"),b=s.split(\", \").join(\",\").split(\" \"),T=x.length,k=!1!==O;for(-1===s.indexOf(\",\")&&-1===i.indexOf(\",\")||(x=x.join(\" \").replace(H,\", \").split(\" \"),b=b.join(\" \").replace(H,\", \").split(\" \"),T=x.length),T!==b.length&&(T=(x=(r||\"\").split(\" \")).length),a.plugin=l,a.setRatio=c,h=0;hu;u++)w=f[u],v=d.indexOf(w,p),a.appendXtra(d.substr(p,v-p),Number(w),P(m[u],w),\"\",k&&\"px\"===d.substr(v+w.length,2),0===u),p=v+w.length;a[\"xs\"+a.l]+=d.substr(p)}else a[\"xs\"+a.l]+=a.l?\" \"+d:d;if(-1!==s.indexOf(\"=\")&&a.data){for(y=a.xs0+a.data.s,h=1;a.l>h;h++)y+=a[\"xs\"+h]+a.data[\"xn\"+h];a.e=y+a[\"xs\"+h]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},ft=9;for((t=dt.prototype).l=t.pr=0;0<--ft;)t[\"xn\"+ft]=0,t[\"xs\"+ft]=\"\";t.xs0=\"\",t._next=t._prev=t.xfirst=t.data=t.plugin=t.setRatio=t.rxp=null,t.appendXtra=function(t,e,i,s,n,r){var a=this,o=a.l;return a[\"xs\"+o]+=r&&o?\" \"+t:t||\"\",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a[\"xs\"+a.l]=s||\"\",0s;s++)e.prefix=0===s&&e.prefix,e.defaultValue=i[s]||r,new mt(n[s],e)};(t=mt.prototype).parseComplex=function(t,e,i,s,n,r){var a,o,l,c,h,u=this.keyword;if(this.multi&&(H.test(i)||H.test(e)?(o=e.replace(H,\"|\").split(\"|\"),l=i.replace(H,\"|\").split(\"|\")):u&&(o=[e],l=[i])),l){for(c=(l.length>o.length?l:o).length,a=0;aI[r]&&I[r]>-j&&(I[r]=0);return i&&(t._gsTransform=I),I},St=s.set3DTransformRatio=function(t){var e,i,s,n,r,a,o,l,c,h,u,p,d,_,f,m,g,v,w,y,x,b,T=this.data,k=this.t.style,P=T.rotation*U,S=T.scaleX,O=T.scaleY,C=T.scaleZ,A=T.perspective;if(1!==t&&0!==t||\"auto\"!==T.force3D||T.rotationY||T.rotationX||1!==C||A||T.z){if(M&&(S<1e-4&&-1e-4y;y++)this.p.indexOf(\"border\")&&(f[y]=T(f[y])),-1!==(o=a=st(t,f[y],b,!1,\"0px\")).indexOf(\" \")&&(o=(a=o.split(\" \"))[0],a=a[1]),l=r=w[y],d=parseFloat(o),_=o.substr((d+\"\").length),(h=\"\"===(h=(u=\"=\"===l.charAt(1))?(c=parseInt(l.charAt(0)+\"1\",10),l=l.substr(2),c*=parseFloat(l),l.substr((c+\"\").length-(c<0?1:0))||\"\"):(c=parseFloat(l),l.substr((c+\"\").length)))?x[i]||_:h)!==_&&(p=nt(t,\"borderLeft\",d,_),d=nt(t,\"borderTop\",d,_),a=\"%\"===h?(o=p/g*100+\"%\",d/v*100+\"%\"):\"em\"===h?(o=p/(_=nt(t,\"borderLeft\",1,\"em\"))+\"em\",d/_+\"em\"):(o=p+\"px\",d+\"px\"),u&&(l=parseFloat(o)+c+h,r=parseFloat(a)+c+h)),n=_t(m,f[y],o+\" \"+a,l+\" \"+r,!1,\"0px\",n);return n},prefix:!0,formatter:ht(\"0px 0px 0px 0px\",!1,!0)}),gt(\"backgroundPosition\",{defaultValue:\"0 0\",parser:function(t,e,i,s,n,r){var a,o,l,c,h,u,p=\"background-position\",d=b||it(t,null),_=this.format((d?C?d.getPropertyValue(p+\"-x\")+\" \"+d.getPropertyValue(p+\"-y\"):d.getPropertyValue(p):t.currentStyle.backgroundPositionX+\" \"+t.currentStyle.backgroundPositionY)||\"0 0\"),e=this.format(e);if(-1!==_.indexOf(\"%\")!=(-1!==e.indexOf(\"%\"))&&((u=st(t,\"backgroundImage\").replace(F,\"\"))&&\"none\"!==u)){for(a=_.split(\" \"),o=e.split(\" \"),G.setAttribute(\"src\",u),l=2;-1<--l;)(c=-1!==(_=a[l]).indexOf(\"%\"))!=(-1!==o[l].indexOf(\"%\"))&&(h=0===l?t.offsetWidth-G.width:t.offsetHeight-G.height,a[l]=c?parseFloat(_)/100*h+\"px\":parseFloat(_)/h*100+\"%\");_=a.join(\" \")}return this.parseComplex(t.style,_,e,n,r)},formatter:v}),gt(\"backgroundSize\",{defaultValue:\"0 0\",formatter:v}),gt(\"perspective\",{defaultValue:\"0px\",prefix:!0}),gt(\"perspectiveOrigin\",{defaultValue:\"50% 50%\",prefix:!0}),gt(\"transformStyle\",{prefix:!0}),gt(\"backfaceVisibility\",{prefix:!0}),gt(\"userSelect\",{prefix:!0}),gt(\"margin\",{parser:ut(\"marginTop,marginRight,marginBottom,marginLeft\")}),gt(\"padding\",{parser:ut(\"paddingTop,paddingRight,paddingBottom,paddingLeft\")}),gt(\"clip\",{defaultValue:\"rect(0px,0px,0px,0px)\",parser:function(t,e,i,s,n,r){var a,o;return e=C<9?(a=t.currentStyle,o=C<8?\" \":\",\",a=\"rect(\"+a.clipTop+o+a.clipRight+o+a.clipBottom+o+a.clipLeft+\")\",this.format(e).split(\",\").join(o)):(a=this.format(st(t,this.p,b,!1,this.dflt)),this.format(e)),this.parseComplex(t.style,a,e,n,r)}}),gt(\"textShadow\",{defaultValue:\"0px 0px 0px #999\",color:!0,multi:!0}),gt(\"autoRound,strictUnits\",{parser:function(t,e,i,s,n){return n}}),gt(\"border\",{defaultValue:\"0px solid #000\",parser:function(t,e,i,s,n,r){return this.parseComplex(t.style,this.format(st(t,\"borderTopWidth\",b,!1,\"0px\")+\" \"+st(t,\"borderTopStyle\",b,!1,\"solid\")+\" \"+st(t,\"borderTopColor\",b,!1,\"#000\")),this.format(e),n,r)},color:!0,formatter:function(t){var e=t.split(\" \");return e[0]+\" \"+(e[1]||\"solid\")+\" \"+(t.match(ct)||[\"#000\"])[0]}}),gt(\"borderWidth\",{parser:ut(\"borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth\")}),gt(\"float,cssFloat,styleFloat\",{parser:function(t,e,i,s,n){var r=t.style,t=\"cssFloat\"in r?\"cssFloat\":\"styleFloat\";return new dt(r,t,0,0,n,-1,i,!1,0,r[t],e)}});function Ct(t){var e,i=this.t,s=i.filter||st(this.data,\"filter\"),t=0|this.s+this.c*t;(e=100==t?-1===s.indexOf(\"atrix(\")&&-1===s.indexOf(\"radient(\")&&-1===s.indexOf(\"oader(\")?(i.removeAttribute(\"filter\"),!st(this.data,\"filter\")):(i.filter=s.replace(l,\"\"),!0):e)||(this.xn1&&(i.filter=s=s||\"alpha(opacity=\"+t+\")\"),-1===s.indexOf(\"pacity\")?0==t&&this.xn1||(i.filter=s+\" alpha(opacity=\"+t+\")\"):i.filter=s.replace(L,\"opacity=\"+t))}gt(\"opacity,alpha,autoAlpha\",{defaultValue:\"1\",parser:function(t,e,i,s,n,r){var a=parseFloat(st(t,\"opacity\",b,!1,\"1\")),o=t.style,l=\"autoAlpha\"===i;return\"string\"==typeof e&&\"=\"===e.charAt(1)&&(e=(\"-\"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+a),l&&1===a&&\"hidden\"===st(t,\"visibility\",b)&&0!==e&&(a=0),J?n=new dt(o,\"opacity\",a,e-a,n):((n=new dt(o,\"opacity\",100*a,100*(e-a),n)).xn1=l?1:0,o.zoom=1,n.type=2,n.b=\"alpha(opacity=\"+n.s+\")\",n.e=\"alpha(opacity=\"+(n.s+n.c)+\")\",n.data=t,n.plugin=r,n.setRatio=Ct),l&&((n=new dt(o,\"visibility\",0,0,n,-1,null,!1,0,0!==a?\"inherit\":\"hidden\",0===e?\"hidden\":\"inherit\")).xs0=\"inherit\",s._overwriteProps.push(n.n),s._overwriteProps.push(i)),n}});function At(t,e){e&&(t.removeProperty?(\"ms\"===e.substr(0,2)&&(e=\"M\"+e.substr(1)),t.removeProperty(e.replace(z,\"-$1\").toLowerCase())):t.removeAttribute(e))}function Mt(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute(\"class\",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:At(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute(\"class\")!==this.e&&this.t.setAttribute(\"class\",this.e)}gt(\"className\",{parser:function(t,e,i,s,n,r,a){var o,l,c,h=t.getAttribute(\"class\")||\"\",u=t.style.cssText;if((n=s._classNamePT=new dt(t,i,0,0,n,2)).setRatio=Mt,n.pr=-11,d=!0,n.b=h,o=m(t,b),i=t._gsClassPT){for(l={},c=i.data;c;)l[c.p]=1,c=c._next;i.setRatio(1)}return(t._gsClassPT=n).e=\"=\"!==e.charAt(1)?e:h.replace(RegExp(\"\\\\s*\\\\b\"+e.substr(2)+\"\\\\b\"),\"\")+(\"+\"===e.charAt(0)?\" \"+e.substr(2):\"\"),s._tween._duration&&(t.setAttribute(\"class\",n.e),a=g(t,o,m(t),a,l),t.setAttribute(\"class\",h),n.data=a.firstMPT,t.style.cssText=u,n=n.xfirst=s.parse(t,a.difs,n,r)),n}});function Rt(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&\"isFromStart\"!==this.data.data){var e,i,s,n,r=this.t.style,a=_.transform.parse;if(\"all\"===this.e)n=!(r.cssText=\"\");else for(s=(e=this.e.split(\",\")).length;-1<--s;)i=e[s],_[i]&&(_[i].parse===a?n=!0:i=\"transformOrigin\"===i?bt:_[i].p),At(r,i);n&&(At(r,yt),this.t._gsTransform&&delete this.t._gsTransform)}}for(gt(\"clearProps\",{parser:function(t,e,i,s,n){return(n=new dt(t,i,0,0,n,2)).setRatio=Rt,n.e=e,n.pr=-10,n.data=s._tween,d=!0,n}}),t=\"bezier,throwProps,physicsProps,physics2D\".split(\",\"),ft=t.length;ft--;)!function(t){var l;_[t]||(l=t.charAt(0).toUpperCase()+t.substr(1)+\"Plugin\",gt(t,{parser:function(t,e,i,s,n,r,a){var o=(window.GreenSockGlobals||window).com.greensock.plugins[l];return o?(o._cssRegister(),_[i].parse(t,e,i,s,n,r,a)):(f(\"Error: \"+l+\" js file not loaded.\"),n)}}))}(t[ft]);(t=N.prototype)._firstPT=null,t._onInitTween=function(t,e,i){if(!t.nodeType)return!1;this._target=t,this._tween=i,this._vars=e,O=e.autoRound,d=!1,x=e.suffixMap||N.suffixMap,b=it(t,\"\"),u=this._overwriteProps;var s,n,r,a,o,l,i=t.style;if(c&&\"\"===i.zIndex&&(\"auto\"!==(l=st(t,\"zIndex\",b))&&\"\"!==l||this._addLazySet(i,\"zIndex\",0)),\"string\"==typeof e&&(r=i.cssText,l=m(t,b),i.cssText=r+\";\"+e,l=g(t,l,m(t)).difs,!J&&X.test(e)&&(l.opacity=parseFloat(RegExp.$1)),e=l,i.cssText=r),this._firstPT=s=this.parse(t,e,null),this._transformType){for(l=3===this._transformType,yt?h&&(c=!0,\"\"===i.zIndex&&(\"auto\"!==(e=st(t,\"zIndex\",b))&&\"\"!==e||this._addLazySet(i,\"zIndex\",0)),k&&this._addLazySet(i,\"WebkitBackfaceVisibility\",this._vars.WebkitBackfaceVisibility||(l?\"visible\":\"hidden\"))):i.zoom=1,n=s;n&&n._next;)n=n._next;i=new dt(t,\"transform\",0,0,null,2),this._linkCSSP(i,null,n),i.setRatio=l&&Tt?St:yt?Ot:vt,i.data=this._transform||Pt(t,b,!0),u.pop()}if(d){for(;s;){for(o=s._next,n=r;n&&n.pr>s.pr;)n=n._next;(s._prev=n?n._prev:a)?s._prev._next=s:r=s,(s._next=n)?n._prev=s:a=s,s=o}this._firstPT=r}return!0},t.parse=function(t,e,i,s){var n,r,a,o,l,c,h,u,p=t.style;for(n in e)l=e[n],u=_[n],u?i=u.parse(t,l,n,this,i,s,e):(o=st(t,n,b)+\"\",h=\"string\"==typeof l,\"color\"===n||\"fill\"===n||\"stroke\"===n||-1!==n.indexOf(\"Color\")||h&&E.test(l)?(h||(l=S(l),l=(3s;s++)i+=n[\"xn\"+s]+n[\"xs\"+(s+1)];n.t[n.p]=i}else-1===n.type?n.t[n.p]=n.xs0:n.setRatio&&n.setRatio(t);else n.t[n.p]=e+n.xs0;n=n._next}else for(;n;)2!==n.type?n.t[n.p]=n.b:n.setRatio(t),n=n._next;else for(;n;)2!==n.type?n.t[n.p]=n.e:n.setRatio(t),n=n._next},t._enableTransforms=function(t){this._transformType=t||3===this._transformType?3:2,this._transform=this._transform||Pt(this._target,b,!0)};function It(){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)}t._addLazySet=function(t,e,i){e=this._firstPT=new dt(t,e,0,0,this._firstPT,2);e.e=i,e.setRatio=It,e.data=this},t._linkCSSP=function(t,e,i,s){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,s=!0),i?i._next=t:s||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},t._kill=function(t){var e,i,s,n=t;if(t.autoAlpha||t.alpha){for(i in n={},t)n[i]=t[i];n.opacity=1,n.autoAlpha&&(n.visibility=1)}return t.className&&(e=this._classNamePT)&&((s=e.xfirst)&&s._prev?this._linkCSSP(s._prev,e._next,s._prev._prev):s===this._firstPT&&(this._firstPT=e._next),e._next&&this._linkCSSP(e._next,e._next._next,s._prev),this._classNamePT=null),r.prototype._kill.call(this,n)};function Dt(t,e,i){var s,n,r,a;if(t.slice)for(n=t.length;-1<--n;)Dt(t[n],e,i);else for(n=(s=t.childNodes).length;-1<--n;)a=(r=s[n]).type,r.style&&(e.push(m(r)),i&&i.push(r)),1!==a&&9!==a&&11!==a||!r.childNodes.length||Dt(r,e,i)}return N.cascadeTo=function(t,e,i){var s,n,r,a=p.to(t,e,i),o=[a],l=[],c=[],h=[],u=p._internals.reservedProps;for(t=a._targets||a.target,Dt(t,l,h),a.render(e,!0),Dt(t,c),a.render(0,!0),a._enabled(!0),s=h.length;-1<--s;)if((n=g(h[s],l[s],c[s])).firstMPT){for(r in n=n.difs,i)u[r]&&(n[r]=i[r]);o.push(p.to(h[s],e,n))}return o},r.activate([N]),N},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],13:[function(t,e,i){\"use strict\";(window._gsQueue||(window._gsQueue=[])).push(function(){function n(t,e){var i=\"x\"===e?\"Width\":\"Height\",s=\"scroll\"+i,n=\"client\"+i,e=document.body;return t===a||t===r||t===e?Math.max(r[s],e[s])-(a[\"inner\"+i]||Math.max(r[n],e[n])):t[s]-t[\"offset\"+i]}var r=document.documentElement,a=window,t=window._gsDefine.plugin({propName:\"scrollTo\",API:2,version:\"1.7.3\",init:function(t,e,i){return this._wdw=t===a,this._target=t,this._tween=i,this._autoKill=!1!==(e=\"object\"!=typeof e?{y:e}:e).autoKill,this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=e.x?(this._addTween(this,\"x\",this.x,\"max\"===e.x?n(t,\"x\"):e.x,\"scrollTo_x\",!0),this._overwriteProps.push(\"scrollTo_x\")):this.skipX=!0,null!=e.y?(this._addTween(this,\"y\",this.y,\"max\"===e.y?n(t,\"y\"):e.y,\"scrollTo_y\",!0),this._overwriteProps.push(\"scrollTo_y\")):this.skipY=!0,!0},set:function(t){this._super.setRatio.call(this,t);var e=this._wdw||!this.skipX?this.getX():this.xPrev,i=this._wdw||!this.skipY?this.getY():this.yPrev,s=i-this.yPrev,t=e-this.xPrev;this._autoKill&&(!this.skipX&&(7e&&(this.skipX=!0),!this.skipY&&(7i&&(this.skipY=!0),this.skipX&&this.skipY&&this._tween.kill()),this._wdw?a.scrollTo(this.skipX?e:this.x,this.skipY?i:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),e=t.prototype;t.max=n,e.getX=function(){return this._wdw?null!=a.pageXOffset?a.pageXOffset:(null!=r.scrollLeft?r:document.body).scrollLeft:this._target.scrollLeft},e.getY=function(){return this._wdw?null!=a.pageYOffset?a.pageYOffset:(null!=r.scrollTop?r:document.body).scrollTop:this._target.scrollTop},e._kill=function(t){return t.scrollTo_x&&(this.skipX=!0),t.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,t)}}),window._gsDefine&&window._gsQueue.pop()()},{}]},{},[2]);"],"file":"wpr-admin.js"} \ No newline at end of file diff --git a/assets/js/wpr-admin.min.js b/assets/js/wpr-admin.min.js index 348a08f4a9..3d0eb8c74c 100644 --- a/assets/js/wpr-admin.min.js +++ b/assets/js/wpr-admin.min.js @@ -1,2 +1,2 @@ -!function s(n,r,a){function o(e,t){if(!r[e]){if(!n[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(l)return l(e,!0);throw(i=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",i}i=r[e]={exports:{}},n[e][0].call(i.exports,function(t){return o(n[e][1][t]||t)},i,i.exports,s,n,r,a)}return r[e].exports}for(var l="function"==typeof require&&require,t=0;t{i.append(""+t+": "),i.append(e[t].message),i.append("
")}):i.append('
'+e.message+"
")}})})})},{}],2:[function(t,e,i){"use strict";t("../lib/greensock/TweenLite.min.js"),t("../lib/greensock/TimelineLite.min.js"),t("../lib/greensock/easing/EasePack.min.js"),t("../lib/greensock/plugins/CSSPlugin.min.js"),t("../lib/greensock/plugins/ScrollToPlugin.min.js"),t("../global/pageManager.js"),t("../global/main.js"),t("../global/fields.js"),t("../global/beacon.js"),t("../global/ajax.js"),t("../global/rocketcdn.js"),t("../global/countdown.js")},{"../global/ajax.js":1,"../global/beacon.js":3,"../global/countdown.js":4,"../global/fields.js":5,"../global/main.js":6,"../global/pageManager.js":7,"../global/rocketcdn.js":8,"../lib/greensock/TimelineLite.min.js":9,"../lib/greensock/TweenLite.min.js":10,"../lib/greensock/easing/EasePack.min.js":11,"../lib/greensock/plugins/CSSPlugin.min.js":12,"../lib/greensock/plugins/ScrollToPlugin.min.js":13}],3:[function(t,e,i){"use strict";var s=jQuery;s(document).ready(function(){"Beacon"in window&&s(".wpr-infoAction--help").on("click",function(t){var e=s(this).data("beacon-id");return 0!==(e=(e=e).split(",")).length&&(1{o(t).attr("checked",i?null:"checked")});else{const r=o(e).closest(".wpr-list").find(".wpr-main-checkbox");var n=o.map(s,t=>{if(void 0!==o(t).attr("checked"))return t});r.attr("checked",n.length===s.length?"checked":null)}}),0{let i=o(e).parents(".wpr-list");var s=i.find(".wpr-list-body input[type=checkbox]:not(:checked)").length;o(e).attr("checked",s<=0?"checked":null)})})},{}],6:[function(t,e,i){"use strict";var c=jQuery;c(document).ready(function(){var t=c(".wpr-notice");c("#wpr-congratulations-notice").on("click",function(){return(new TimelineLite).to(t,1,{autoAlpha:0,x:40,ease:Power4.easeOut}).to(t,.6,{height:0,marginTop:0,ease:Power4.easeOut},"=-.4").set(t,{display:"none"}),!1}),c(".rocket-analytics-data-container").hide(),c(".rocket-preview-analytics-data").on("click",function(t){t.preventDefault(),c(this).parent().next(".rocket-analytics-data-container").toggle()}),c(".wpr-toggle-button").each(function(){var t=c(this),e=t.closest(".wpr-fieldsContainer-fieldset").find(".wpr-radio :checkbox"),i=c('[href="'+t.attr("href")+'"].wpr-menuItem');e.on("change",function(){e.is(":checked")?(i.css("display","block"),t.css("display","inline-block")):(i.css("display","none"),t.css("display","none"))}).trigger("change")});var e=c(".wpr-Popin-Analytics"),i=c(".wpr-Popin-overlay"),s=c(".wpr-Popin-Analytics-close"),n=c(".wpr-Popin-Analytics .wpr-button");function r(){(new TimelineLite).fromTo(e,.6,{autoAlpha:1,marginTop:0},{autoAlpha:0,marginTop:-24,ease:Power4.easeOut}).fromTo(i,.6,{autoAlpha:1},{autoAlpha:0,ease:Power4.easeOut},"=-.5").set(e,{display:"none"}).set(i,{display:"none"})}c(".wpr-js-popin").on("click",function(t){return t.preventDefault(),(new TimelineLite).set(e,{display:"block"}).set(i,{display:"block"}).fromTo(i,.6,{autoAlpha:0},{autoAlpha:1,ease:Power4.easeOut}).fromTo(e,.6,{autoAlpha:0,marginTop:-24},{autoAlpha:1,marginTop:0,ease:Power4.easeOut},"=-.5"),!1}),s.on("click",function(t){return t.preventDefault(),r(),!1}),n.on("click",function(t){return t.preventDefault(),r(),c("#analytics_enabled").prop("checked",!0),c("#analytics_enabled").trigger("change"),!1}),c("#analytics_enabled").on("change",function(){c(".wpr-rocket-analytics-cta").toggleClass("wpr-isHidden")});var a=c(".wpr-Popin-Upgrade"),n=c(".wpr-Popin-Upgrade-close");c(".wpr-popin-upgrade-toggle").on("click",function(t){return t.preventDefault(),(new TimelineLite).set(a,{display:"block"}).set(i,{display:"block"}).fromTo(i,.6,{autoAlpha:0},{autoAlpha:1,ease:Power4.easeOut}).fromTo(a,.6,{autoAlpha:0,marginTop:-24},{autoAlpha:1,marginTop:0,ease:Power4.easeOut},"=-.5"),!1}),n.on("click",function(){return(new TimelineLite).fromTo(a,.6,{autoAlpha:1,marginTop:0},{autoAlpha:0,marginTop:-24,ease:Power4.easeOut}).fromTo(i,.6,{autoAlpha:1},{autoAlpha:0,ease:Power4.easeOut},"=-.5").set(a,{display:"none"}).set(i,{display:"none"}),!1});var o=c(".wpr-Sidebar");c(".wpr-js-tips").on("change",function(){c(this).is(":checked")?(o.css("display","block"),localStorage.setItem("wpr-show-sidebar","on")):(o.css("display","none"),localStorage.setItem("wpr-show-sidebar","off"))}),document.getElementById("LKgOcCRpwmAj")?c(".wpr-adblock").css("display","none"):c(".wpr-adblock").css("display","block");var l=c(".wpr-adblock");c(".wpr-adblock-close").on("click",function(){return(new TimelineLite).to(l,1,{autoAlpha:0,x:40,ease:Power4.easeOut}).to(l,.4,{height:0,marginTop:0,ease:Power4.easeOut},"=-.4").set(l,{display:"none"}),!1})})},{}],7:[function(t,e,i){"use strict";function s(t){var e,i=this;this.$body=document.querySelector(".wpr-body"),this.$menuItems=document.querySelectorAll(".wpr-menuItem"),this.$submitButton=document.querySelector(".wpr-Content > form > #wpr-options-submit"),this.$pages=document.querySelectorAll(".wpr-Page"),this.$sidebar=document.querySelector(".wpr-Sidebar"),this.$content=document.querySelector(".wpr-Content"),this.$tips=document.querySelector(".wpr-Content-tips"),this.$links=document.querySelectorAll(".wpr-body a"),this.$menuItem=null,this.$page=null,this.pageId=null,this.bodyTop=0,this.buttonText=this.$submitButton.value,i.getBodyTop(),window.onhashchange=function(){i.detectID()},window.location.hash?(this.bodyTop=0,this.detectID()):(e=localStorage.getItem("wpr-hash"),this.bodyTop=0,e?(window.location.hash=e,this.detectID()):(this.$menuItems[0].classList.add("isActive"),localStorage.setItem("wpr-hash","dashboard"),window.location.hash="#dashboard"));for(var s=0;s{a.querySelectorAll(".wpr-rocketcdn-open").forEach(t=>{t.addEventListener("click",t=>{t.preventDefault()})}),function(){var t="";t+="action=rocketcdn_process_status";const e=r(t+="&nonce="+rocket_ajax_data.nonce);e.onreadystatechange=()=>{e.readyState===XMLHttpRequest.DONE&&200===e.status&&!0===JSON.parse(e.responseText).success&&MicroModal.show("wpr-rocketcdn-modal")}}(),MicroModal.init({disableScroll:!0})}),s.addEventListener("load",()=>{let t=a.querySelector("#wpr-rocketcdn-open-cta"),e=a.querySelector("#wpr-rocketcdn-close-cta"),i=a.querySelector("#wpr-rocketcdn-cta-small"),s=a.querySelector("#wpr-rocketcdn-cta");function n(t){var e="";return e+="action=toggle_rocketcdn_cta",e+="&status="+t,e+="&nonce="+rocket_ajax_data.nonce}null!==t&&null!==i&&null!==s&&t.addEventListener("click",t=>{t.preventDefault(),i.classList.add("wpr-isHidden"),s.classList.remove("wpr-isHidden"),r(n("big"))}),null!==e&&null!==i&&null!==s&&e.addEventListener("click",t=>{t.preventDefault(),i.classList.remove("wpr-isHidden"),s.classList.add("wpr-isHidden"),r(n("small"))})}),s.onmessage=t=>{var e,i,s=rocket_ajax_data.origin_url;t.origin===s&&((e=t.data).hasOwnProperty("cdnFrameHeight")&&(a.getElementById("rocketcdn-iframe").style.height="".concat(e.cdnFrameHeight,"px")),(i=t.data).hasOwnProperty("cdnFrameClose")&&(MicroModal.close("wpr-rocketcdn-modal"),i.hasOwnProperty("cdn_page_message")&&-1!==["iframe-payment-success","iframe-unsubscribe-success"].indexOf(i.cdn_page_message)&&a.location.reload()),function(t,e){let i=a.querySelector("#rocketcdn-iframe").contentWindow;if(t.hasOwnProperty("rocketcdn_token")){var s="";s+="action=save_rocketcdn_token",s+="&value="+t.rocketcdn_token;const n=r(s+="&nonce="+rocket_ajax_data.nonce);n.onreadystatechange=()=>{var t;n.readyState===XMLHttpRequest.DONE&&200===n.status&&(t=JSON.parse(n.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}else{s={process:"subscribe",message:"token_not_received"};i.postMessage({success:!1,data:s,rocketcdn:!0},e)}}(t.data,s),(e=t.data).hasOwnProperty("rocketcdn_process")&&(i="",i+="action=rocketcdn_process_set",i+="&status="+e.rocketcdn_process,r(i+="&nonce="+rocket_ajax_data.nonce)),function(t,e){let i=a.querySelector("#rocketcdn-iframe").contentWindow;if(t.hasOwnProperty("rocketcdn_url")){var s="";s+="action=rocketcdn_enable",s+="&cdn_url="+t.rocketcdn_url;const n=r(s+="&nonce="+rocket_ajax_data.nonce);n.onreadystatechange=()=>{var t;n.readyState===XMLHttpRequest.DONE&&200===n.status&&(t=JSON.parse(n.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}}(t.data,s),function(t,e){let i=a.querySelector("#rocketcdn-iframe").contentWindow;if(t.hasOwnProperty("rocketcdn_disable")){t="";t+="action=rocketcdn_disable";const s=r(t+="&nonce="+rocket_ajax_data.nonce);s.onreadystatechange=()=>{var t;s.readyState===XMLHttpRequest.DONE&&200===s.status&&(t=JSON.parse(s.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}}(t.data,s),(s=t.data).hasOwnProperty("rocketcdn_validate_token")&&s.hasOwnProperty("rocketcdn_validate_cname")&&(t="",t+="action=rocketcdn_validate_token_cname",t+="&cdn_url="+s.rocketcdn_validate_cname,t+="&cdn_token="+s.rocketcdn_validate_token,r(t+="&nonce="+rocket_ajax_data.nonce)))}},{}],9:[function(t,e,i){"use strict";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(h,u,p){function d(t){u.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var e,i,s=this.vars;for(i in s)e=s[i],g(e)&&-1!==e.join("").indexOf("{self}")&&(s[i]=this._swapSelfInParams(e));g(s.tweens)&&this.add(s.tweens,0,s.align,s.stagger)}function _(t){var e,i={};for(e in t)i[e]=t[e];return i}function n(t,e,i,s){t._timeline.pause(t._startTime),e&&e.apply(s||t._timeline,i||v)}var f=1e-10,m=p._internals.isSelector,g=p._internals.isArray,v=[],a=window._gsDefine.globals,w=v.slice,t=d.prototype=new u;return d.version="1.12.1",t.constructor=d,t.kill()._gc=!1,t.to=function(t,e,i,s){var n=i.repeat&&a.TweenMax||p;return e?this.add(new n(t,e,i),s):this.set(t,i,s)},t.from=function(t,e,i,s){return this.add((i.repeat&&a.TweenMax||p).from(t,e,i),s)},t.fromTo=function(t,e,i,s,n){var r=s.repeat&&a.TweenMax||p;return e?this.add(r.fromTo(t,e,i,s),n):this.set(t,s,n)},t.staggerTo=function(t,e,i,s,n,r,a,o){var l,c=new d({onComplete:r,onCompleteParams:a,onCompleteScope:o,smoothChildTiming:this.smoothChildTiming});for("string"==typeof t&&(t=p.selector(t)||t),m(t)&&(t=w.call(t,0)),s=s||0,l=0;t.length>l;l++)i.startAt&&(i.startAt=_(i.startAt)),c.to(t[l],e,_(i),l*s);return this.add(c,n)},t.staggerFrom=function(t,e,i,s,n,r,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,n,r,a,o)},t.staggerFromTo=function(t,e,i,s,n,r,a,o,l){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,n,r,a,o,l)},t.call=function(t,e,i,s){return this.add(p.delayedCall(0,t,e,i),s)},t.set=function(t,e,i){return i=this._parseTimeOrLabel(i,0,!0),null==e.immediateRender&&(e.immediateRender=i===this._time&&!this._paused),this.add(new p(t,0,e),i)},d.exportRoot=function(t,e){null==(t=t||{}).smoothChildTiming&&(t.smoothChildTiming=!0);var i,s,n=new d(t),t=n._timeline;for(null==e&&(e=!0),t._remove(n,!0),n._startTime=0,n._rawPrevTime=n._time=n._totalTime=t._time,i=t._first;i;)s=i._next,e&&i instanceof p&&i.target===i.vars.onComplete||n.add(i,i._startTime-i._delay),i=s;return t.add(n,0),n},t.add=function(t,e,i,s){var n,r,a,o,l,c;if("number"!=typeof e&&(e=this._parseTimeOrLabel(e,0,!0,t)),!(t instanceof h)){if(t instanceof Array||t&&t.push&&g(t)){for(i=i||"normal",s=s||0,n=e,r=t.length,a=0;at._startTime;l._timeline;)c&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return this},t.remove=function(t){if(t instanceof h)return this._remove(t,!1);if(t instanceof Array||t&&t.push&&g(t)){for(var e=t.length;-1<--e;)this.remove(t[e]);return this}return"string"==typeof t?this.removeLabel(t):this.kill(null,t)},t._remove=function(t,e){u.prototype._remove.call(this,t,e);e=this._last;return e?this._time>e._startTime+e._totalDuration/e._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},t.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},t.insert=t.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},t.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},t.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},t.addPause=function(t,e,i,s){return this.call(n,["{self}",e,i,s],this,t)},t.removeLabel=function(t){return delete this._labels[t],this},t.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},t._parseTimeOrLabel=function(t,e,i,s){var n;if(s instanceof h&&s.timeline===this)this.remove(s);else if(s&&(s instanceof Array||s.push&&g(s)))for(n=s.length;-1<--n;)s[n]instanceof h&&s[n].timeline===this&&this.remove(s[n]);if("string"==typeof e)return this._parseTimeOrLabel(e,i&&"number"==typeof t&&null==this._labels[e]?t-this.duration():0,i);if(e=e||0,"string"!=typeof t||!isNaN(t)&&null==this._labels[t])null==t&&(t=this.duration());else{if(-1===(n=t.indexOf("=")))return null==this._labels[t]?i?this._labels[t]=this.duration()+e:e:this._labels[t]+e;e=parseInt(t.charAt(n-1)+"1",10)*Number(t.substr(n+1)),t=1f&&(a="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:f,t=l+1e-4):t<1e-7?(((this._totalTime=this._time=0)!==c||0===this._duration&&this._rawPrevTime!==f&&(0=c)for(s=this._first;s&&(r=s._next,!this._paused||p);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r;else for(s=this._last;s&&(r=s._prev,!this._paused||p);)(s._active||c>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r;this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||v)),a&&(this._gc||h!==this._startTime&&u===this._timeScale||!(0===this._time||l>=this.totalDuration())||(n&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[a]&&this.vars[a].apply(this.vars[a+"Scope"]||this,this.vars[a+"Params"]||v)))}},t._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof d&&t._hasPausedChild())return!0;t=t._next}return!1},t.getChildren=function(t,e,i,s){s=s||-9999999999;for(var n=[],r=this._first,a=0;r;)s>r._startTime||(r instanceof p?!1!==e&&(n[a++]=r):(!1!==i&&(n[a++]=r),!1!==t&&(a=(n=n.concat(r.getChildren(!0,e,i))).length))),r=r._next;return n},t.getTweensOf=function(t,e){var i,s,n=this._gc,r=[],a=0;for(n&&this._enabled(!0,!0),s=(i=p.getTweensOf(t)).length;-1<--s;)(i[s].timeline===this||e&&this._contains(i[s]))&&(r[a++]=i[s]);return n&&this._enabled(!1,!0),r},t._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},t.shiftChildren=function(t,e,i){i=i||0;for(var s,n=this._first,r=this._labels;n;)n._startTime>=i&&(n._startTime+=t),n=n._next;if(e)for(s in r)r[s]>=i&&(r[s]+=t);return this._uncache(!0)},t._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,n=!1;-1<--s;)i[s]._kill(t,e)&&(n=!0);return n},t.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;-1<--i;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},t.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return this},t._enabled=function(t,e){if(t===this._gc)for(var i=this._first;i;)i._enabled(t,!0),i=i._next;return u.prototype._enabled.call(this,t,e)},t.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},t.totalDuration=function(t){if(arguments.length)return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this;if(this._dirty){for(var e,i,s=0,n=this._last,r=999999999999;n;)e=n._prev,n._dirty&&n.totalDuration(),n._startTime>r&&this._sortChildren&&!n._paused?this.add(n,n._startTime-n._delay):r=n._startTime,n._startTime<0&&!n._paused&&(s-=n._startTime,this._timeline.smoothChildTiming&&(this._startTime+=n._startTime/this._timeScale),this.shiftChildren(-n._startTime,!1,-9999999999),r=0),s<(i=n._startTime+n._totalDuration/n._timeScale)&&(s=i),n=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration},t.usesFrames=function(){for(var t=this._timeline;t._timeline;)t=t._timeline;return t===h._rootFramesTimeline},t.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},d},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],10:[function(t,Q,e){"use strict";!function(p){var e,i,d=p.GreenSockGlobals||p;if(!d.TweenLite){var _,f=function(t){for(var e=t.split("."),i=d,s=0;e.length>s;s++)i[e[s]]=i=i[e[s]]||{};return i},u=f("com.greensock"),m=1e-10,o=[].slice,g=function(){},h=(e=Object.prototype.toString,i=e.call([]),function(t){return null!=t&&(t instanceof Array||"object"==typeof t&&!!t.push&&e.call(t)===i)}),v={},w=function(o,l,c,h){this.sc=v[o]?v[o].sc:[],(v[o]=this).gsClass=null,this.func=c;var u=[];this.check=function(t){for(var e,i,s,n,r=l.length,a=r;-1<--r;)(e=v[l[r]]||new w(l[r],[])).gsClass?(u[r]=e.gsClass,a--):t&&e.sc.push(this);if(0===a&&c)for(s=(i=("com.greensock."+o).split(".")).pop(),n=f(i.join("."))[s]=this.gsClass=c.apply(c,u),h&&(d[s]=n,"function"==typeof define&&define.amd?define((p.GreenSockAMDPath?p.GreenSockAMDPath+"/":"")+o.split(".").join("/"),[],function(){return n}):void 0!==Q&&Q.exports&&(Q.exports=n)),r=0;this.sc.length>r;r++)this.sc[r].check()},this.check(!0)},s=p._gsDefine=function(t,e,i,s){return new w(t,e,i,s)},y=u._class=function(t,e,i){return e=e||function(){},s(t,[],function(){return e},i),e};s.globals=d;var t,n=[0,0,1,1],x=[],b=y("easing.Ease",function(t,e,i,s){this._func=t,this._type=i||0,this._power=s||0,this._params=e?n.concat(e):n},!0),T=b.map={},r=b.register=function(t,e,i,s){for(var n,r,a,o,l=e.split(","),c=l.length,h=(i||"easeIn,easeOut,easeInOut").split(",");-1<--c;)for(r=l[c],n=s?y("easing."+r,null,!0):u.easing[r]||{},a=h.length;-1<--a;)o=h[a],T[r+"."+o]=T[o+r]=n[o]=t.getRatio?t:t[o]||new t};for((t=b.prototype)._calcEnd=!1,t.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,s=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?s*=s:2===i?s*=s*s:3===i?s*=s*s*s:4===i&&(s*=s*s*s*s),1===e?1-s:2===e?s:t<.5?s/2:1-s/2},l=(a=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;-1<--l;)t=a[l]+",Power"+l,r(new b(null,null,1,l),t,"easeOut",!0),r(new b(null,null,2,l),t,"easeIn"+(0===l?",easeNone":"")),r(new b(null,null,3,l),t,"easeInOut");T.linear=u.easing.Linear.easeIn,T.swing=u.easing.Quad.easeInOut;var k=y("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(t=k.prototype).addEventListener=function(t,e,i,s,n){n=n||0;var r,a,o=this._listeners[t],l=0;for(null==o&&(this._listeners[t]=o=[]),a=o.length;-1<--a;)(r=o[a]).c===e&&r.s===i?o.splice(a,1):0===l&&n>r.pr&&(l=a+1);o.splice(l,0,{c:e,s:i,up:s,pr:n}),this!==A||_||A.wake()},t.removeEventListener=function(t,e){var i,s=this._listeners[t];if(s)for(i=s.length;-1<--i;)if(s[i].c===e)return void s.splice(i,1)},t.dispatchEvent=function(t){var e,i,s,n=this._listeners[t];if(n)for(e=n.length,i=this._eventTarget;-1<--e;)(s=n[e]).up?s.c.call(s.s||i,{type:t,target:i}):s.c.call(s.s||i)};for(var a,P=p.requestAnimationFrame,S=p.cancelAnimationFrame,O=Date.now||function(){return(new Date).getTime()},C=O(),l=(a=["ms","moz","webkit","o"]).length;-1<--l&&!P;)P=p[a[l]+"RequestAnimationFrame"],S=p[a[l]+"CancelAnimationFrame"]||p[a[l]+"CancelRequestAnimationFrame"];y("Ticker",function(t,e){var s,n,r,a,o,l=this,c=O(),i=!1!==e&&P,h=500,u=33,p=function(t){var e,i=O()-C;h=i&&i+this.totalDuration()/this._timeScale>t},t._enabled=function(t,e){return _||A.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},t._kill=function(){return this._enabled(!1,!1)},t.kill=function(t,e){return this._kill(t,e),this},t._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},t._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();-1<--e;)"{self}"===t[e]&&(i[e]=this);return i},t.eventCallback=function(t,e,i,s){if("on"===(t||"").substr(0,2)){var n=this.vars;if(1===arguments.length)return n[t];null==e?delete n[t]:(n[t]=e,n[t+"Params"]=h(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,n[t+"Scope"]=s),"onUpdate"===t&&(this._onUpdate=e)}return this},t.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},t.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&0this._duration?this._duration:t,e)):this._time},t.totalTime=function(t,e,i){if(_||A.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var s=this._totalDuration,n=this._timeline;if(ss;)i=i._prev;return i?(t._next=i._next,i._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=i,this._timeline&&this._uncache(!0),this},t._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t.timeline=null,t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),this._timeline&&this._uncache(!0)),this},t.render=function(t,e,i){var s,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;n;)s=n._next,(n._active||t>=n._startTime&&!n._paused)&&(n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale,e,i):n.render((t-n._startTime)*n._timeScale,e,i)),n=s},t.rawTime=function(){return _||A.wake(),this._totalTime};var I=y("TweenLite",function(t,e,i){if(c.call(this,e,i),this.render=I.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"==typeof t&&I.selector(t)||t;var s,n,r,i=t.jquery||t.length&&t!==p&&t[0]&&(t[0]===p||t[0].nodeType&&t[0].style&&!t.nodeType),a=this.vars.overwrite;if(this._overwrite=a=null==a?F[I.defaultOverwrite]:"number"==typeof a?a>>0:F[a],(i||t instanceof Array||t.push&&h(t))&&"number"!=typeof t[0])for(this._targets=r=o.call(t,0),this._propLookup=[],this._siblings=[],s=0;r.length>s;s++)(n=r[s])?"string"!=typeof n?n.length&&n!==p&&n[0]&&(n[0]===p||n[0].nodeType&&n[0].style&&!n.nodeType)?(r.splice(s--,1),this._targets=r=r.concat(o.call(n,0))):(this._siblings[s]=H(n,this,!1),1===a&&1=a._startTime&&a._startTime+a.totalDuration()/a._timeScale>c&&((p||!a._initted)&&c-a._startTime<=2e-10||(h[u++]=a)));for(d=u;-1<--d;)a=h[d],2===s&&a._kill(i,t)&&(r=!0),(2!==s||!a._firstPT&&a._initted)&&a._enabled(!1,!1)&&(r=!0);return r},W=function(t,e,i){for(var s=t._timeline,n=s._timeScale,r=t._startTime;s._timeline;){if(r+=s._startTime,n*=s._timeScale,s._paused)return-100;s=s._timeline}return e<(r/=n)?r-e:i&&r===e||!t._initted&&r-e<2*m?m:(r+=t.totalDuration()/t._timeScale/n)>e+m?0:r-e-m};t._init=function(){var t,e,i,s,n,r=this.vars,a=this._overwrittenProps,o=this._duration,l=!!r.immediateRender,c=r.ease;if(r.startAt){for(s in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),n={},r.startAt)n[s]=r.startAt[s];if(n.overwrite=!1,n.immediateRender=!0,n.lazy=l&&!1!==r.lazy,n.startAt=n.delay=null,this._startAt=I.to(this.target,0,n),l)if(0o.pr;)s=s._next;(o._prev=s?s._prev:r)?o._prev._next=o:n=o,(o._next=s)?s._prev=o:r=o,o=a}o=e._firstPT=n}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},V.activate=function(t){for(var e=t.length;-1<--e;)t[e].API===V.API&&(E[(new t[e])._propName]=t[e]);return!0},s.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,s=t.priority||0,n=t.overwriteProps,r={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},a=y("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){V.call(this,i,s),this._overwriteProps=n||[]},!0===t.global),o=a.prototype=new V(i);for(e in(o.constructor=a).API=t.API,r)"function"==typeof t[e]&&(o[r[e]]=t[e]);return a.version=t.version,V.activate([a]),a},a=p._gsQueue){for(l=0;a.length>l;l++)a[l]();for(t in v)v[t].func||p.console.log("GSAP encountered missing dependency: com.greensock."+t)}_=!1}}(window)},{}],11:[function(t,e,i){"use strict";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine("easing.Back",["easing.Ease"],function(m){function t(t,e){var i=c("easing."+t,function(){},!0);return(t=i.prototype=new m).constructor=i,t.getRatio=e,i}function e(t,e,i,s){return s=c("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0),h(s,t),s}function g(t,e,i){this.t=t,this.v=e,i&&(((this.next=i).prev=this).c=i.v-e,this.gap=i.t-t)}function i(t,e){var i=c("easing."+t,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0);return(t=i.prototype=new m).constructor=i,t.getRatio=e,t.config=function(t){return new i(t)},i}var s,n,r=window.GreenSockGlobals||window,a=r.com.greensock,o=2*Math.PI,l=Math.PI/2,c=a._class,h=m.register||function(){},u=e("Back",i("BackOut",function(t){return--t*t*((this._p1+1)*t+this._p1)+1}),i("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),i("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),p=c("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:1t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},p.ease=new p(.7,.7),a.config=p.config=function(t,e,i){return new p(t,e,i)},(a=(s=c("easing.SteppedEase",function(t){this._p1=1/(t=t||1),this._p2=t+1},!0)).prototype=new m).constructor=s,a.getRatio=function(t){return t<0?t=0:1<=t&&(t=.999999999),(this._p2*t>>0)*this._p1},a.config=s.config=function(t){return new s(t)},(a=(n=c("easing.RoughEase",function(t){for(var e,i,s,n,r,a,o=(t=t||{}).taper||"none",l=[],c=0,h=0|(t.points||20),u=h,p=!1!==t.randomize,d=!0===t.clamp,_=t.template instanceof m?t.template:null,f="number"==typeof t.strength?.4*t.strength:.4;-1<--u;)e=p?Math.random():1/h*u,i=_?_.getRatio(e):e,s="none"===o?f:"out"===o?(n=1-e)*n*f:"in"===o?e*e*f:.5*(n=e<.5?2*e:2*(1-e))*n*f,p?i+=Math.random()*s-.5*s:u%2?i+=.5*s:i-=.5*s,d&&(1e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return(this._prev=e).v+(t-e.t)/e.gap*e.c},a.config=function(t){return new n(t)},n.ease=new n,e("Bounce",t("BounceOut",function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),t("BounceIn",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),t("BounceInOut",function(t){var e=t<.5;return t=(t=e?1-2*t:2*t-1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),e("Circ",t("CircOut",function(t){return Math.sqrt(1- --t*t)}),t("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),t("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),e("Elastic",(a=function(t,e,i){var s=c("easing."+t,function(t,e){this._p1=t||1,this._p2=e||i,this._p3=this._p2/o*(Math.asin(1/this._p1)||0)},!0),t=s.prototype=new m;return t.constructor=s,t.getRatio=e,t.config=function(t,e){return new s(t,e)},s})("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*o/this._p2)+1},.3),a("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*o/this._p2))},.3),a("ElasticInOut",function(t){return(t*=2)<1?-.5*this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*o/this._p2):.5*this._p1*Math.pow(2,-10*--t)*Math.sin((t-this._p3)*o/this._p2)+1},.45)),e("Expo",t("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),t("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),t("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),e("Sine",t("SineOut",function(t){return Math.sin(t*l)}),t("SineIn",function(t){return 1-Math.cos(t*l)}),t("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),c("easing.EaseLookup",{find:function(t){return m.map[t]}},!0),h(r.SlowMo,"SlowMo","ease,"),h(n,"RoughEase","ease,"),h(s,"SteppedEase","ease,"),u},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],12:[function(t,e,i){"use strict";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(r,p){function N(){r.call(this,"css"),this._overwriteProps.length=0,this.setRatio=N.prototype.setRatio}var d,x,b,u,_={},t=N.prototype=new r("css");(t.constructor=N).version="1.12.1",N.API=2,N.defaultTransformPerspective=0,N.defaultSkewType="compensated",N.suffixMap={top:t="px",right:t,bottom:t,left:t,width:t,height:t,fontSize:t,padding:t,margin:t,perspective:t,lineHeight:""};function n(t,e){return e.toUpperCase()}function a(t){return L.test("string"==typeof t?t:(t.currentStyle||t.style).filter||"")?parseFloat(RegExp.$1)/100:1}function f(t){window.console&&console.log(t)}function T(t,e){var i,s,n=(e=e||Z).style;if(void 0!==n[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],s=5;-1<--s&&void 0===n[i[s]+t];);return 0<=s?(tt="-"+(et=3===s?"ms":i[s]).toLowerCase()+"-",et+t):null}function m(t,e){var i,s={};if(e=e||it(t,null))if(i=e.length)for(;-1<--i;)s[e[i].replace(Y,n)]=e.getPropertyValue(e[i]);else for(i in e)s[i]=e[i];else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===s[i]&&(s[i.replace(Y,n)]=e[i]);return J||(s.opacity=a(t)),t=Pt(t,e,!1),s.rotation=t.rotation,s.skewX=t.skewX,s.scaleX=t.scaleX,s.scaleY=t.scaleY,s.x=t.x,s.y=t.y,Tt&&(s.z=t.z,s.rotationX=t.rotationX,s.rotationY=t.rotationY,s.scaleZ=t.scaleZ),s.filters&&delete s.filters,s}function g(t,e,i,s,n){var r,a,o,l={},c=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(r=i[a])||n&&n[a])&&-1===a.indexOf("Origin")&&("number"==typeof r||"string"==typeof r)&&(l[a]="auto"!==r||"left"!==a&&"top"!==a?""!==r&&"auto"!==r&&"none"!==r||"string"!=typeof e[a]||""===e[a].replace(D,"")?r:0:rt(t,a),void 0!==c[a]&&(o=new pt(c,a,c[a],o)));if(s)for(a in s)"className"!==a&&(l[a]=s[a]);return{difs:l,firstMPT:o}}function v(t,e){var i=(t=null==t||""===t||"auto"===t||"auto auto"===t?"0 0":t).split(" "),s=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":i[0];return null==(t=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":i[1])?t="0":"center"===t&&(t="50%"),("center"===s||isNaN(parseFloat(s))&&-1===(s+"").indexOf("="))&&(s="50%"),e&&(e.oxp=-1!==s.indexOf("%"),e.oyp=-1!==t.indexOf("%"),e.oxr="="===s.charAt(1),e.oyr="="===t.charAt(1),e.ox=parseFloat(s.replace(D,"")),e.oy=parseFloat(t.replace(D,""))),s+" "+t+(2>16,255&t>>8,255&t]:(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),lt[t]||("#"===t.charAt(0)?(4===t.length&&(t="#"+(e=t.charAt(1))+e+(i=t.charAt(2))+i+(r=t.charAt(3))+r),[(t=parseInt(t.substr(1),16))>>16,255&t>>8,255&t]):("hsl"===t.substr(0,3)?(t=t.match(A),s=Number(t[0])%360/360,n=Number(t[1])/100,e=2*(r=Number(t[2])/100)-(i=r<=.5?r*(1+n):r+n-r*n),3a",!!(i=i.getElementsByTagName("a")[0])&&/^0.55/.test(i.style.opacity)),tt="",et="",it=Q.defaultView?Q.defaultView.getComputedStyle:function(){},st=N.getStyle=function(t,e,i,s,n){var r;return J||"opacity"!==e?(!s&&t.style[e]?r=t.style[e]:(i=i||it(t))?r=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(z,"-$1").toLowerCase()):t.currentStyle&&(r=t.currentStyle[e]),null==n||r&&"none"!==r&&"auto"!==r&&"auto auto"!==r?r:n):a(t)},nt=s.convertToPixels=function(t,e,i,s,n){if("px"===s||!s)return i;if("auto"===s||!i)return 0;var r,a,o,l=$.test(e),c=t,h=Z.style,u=i<0;if(u&&(i=-i),"%"===s&&-1!==e.indexOf("border"))r=i/100*(l?t.clientWidth:t.clientHeight);else{if(h.cssText="border:0 solid red;position:"+st(t,"position")+";line-height:0;","%"!==s&&c.appendChild)h[l?"borderLeftWidth":"borderTopWidth"]=i+s;else{if(a=(c=t.parentNode||Q.body)._gsCache,o=p.ticker.frame,a&&l&&a.time===o)return a.width*i/100;h[l?"width":"height"]=i+s}c.appendChild(Z),r=parseFloat(Z[l?"offsetWidth":"offsetHeight"]),c.removeChild(Z),l&&"%"===s&&!1!==N.cacheWidths&&((a=c._gsCache=c._gsCache||{}).time=o,a.width=r/i*100),0!==r||n||(r=nt(t,e,i,s,!0))}return u?-r:r},rt=s.calculateOffset=function(t,e,i){if("absolute"!==st(t,"position",i))return 0;var s="left"===e?"Left":"Top",i=st(t,"margin"+s,i);return t["offset"+s]-(nt(t,e,parseFloat(i),i.replace(j,""))||0)},at={width:["Left","Right"],height:["Top","Bottom"]},ot=["marginLeft","marginRight","marginTop","marginBottom"],lt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ct="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b";for(t in lt)ct+="|"+t+"\\b";function ht(t,e,r,a){if(null==t)return function(t){return t};var o,l=e?(t.match(ct)||[""])[0]:"",c=t.split(l).join("").match(I)||[],h=t.substr(0,t.indexOf(c[0])),u=")"===t.charAt(t.length-1)?")":"",p=-1!==t.indexOf(" ")?" ":",",d=c.length,_=0s;s++)n[s]=o(n[s]);return n.join(",")}if(e=(t.match(ct)||[l])[0],s=(i=t.split(e).join("").match(I)||[]).length,d>s--)for(;d>++s;)i[s]=r?i[0|(s-1)/2]:c[s];return h+i.join(p)+p+e+u+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,i,s;if("number"==typeof t)t+=_;else if(a&&H.test(t)){for(i=t.replace(H,"|").split("|"),s=0;i.length>s;s++)i[s]=o(i[s]);return i.join(",")}if(s=(e=t.match(I)||[]).length,d>s--)for(;d>++s;)e[s]=r?e[0|(s-1)/2]:c[s];return h+e.join(p)+u}:function(t){return t}}function ut(c){return c=c.split(","),function(t,e,i,s,n,r,a){var o,l=(e+"").split(" ");for(a={},o=0;o<4;o++)a[c[o]]=l[o]=l[o]||l[(o-1)/2>>0];return s.parse(t,a,n,r)}}var ct=RegExp(ct+")","gi"),pt=(s._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,s,n,r=this.data,a=r.proxy,o=r.firstMPT;o;)e=a[o.v],o.r?e=Math.round(e):e<1e-6&&-1e-6s;s++)n+=i["xn"+s]+i["xs"+(s+1)];i.e=n}}else i.e=i.s+i.xs0;o=o._next}},function(t,e,i,s,n){this.t=t,this.p=e,this.v=i,this.r=n,s&&((s._prev=this)._next=s)}),dt=(s._parseToProxy=function(t,e,i,s,n,r){var a,o,l,c,h=s,u={},p={},d=i._transform,_=V;for(i._transform=null,V=e,s=n=i.parse(t,e,s,n),V=_,r&&(i._transform=d,h&&(h._prev=null,h._prev&&(h._prev._next=null)));s&&s!==h;){if(s.type<=1&&(p[o=s.p]=s.s+s.c,u[o]=s.s,r||(c=new pt(s,"s",o,c,s.r),s.c=0),1===s.type))for(a=s.l;0<--a;)p[o=s.p+"_"+(l="xn"+a)]=s.data[l],u[o]=s[l],r||(c=new pt(s,l,o,c,s.rxp[l]));s=s._next}return{proxy:u,end:p,firstMPT:c,pt:n}},s.CSSPropTween=function(t,e,i,s,n,r,a,o,l,c,h){this.t=t,this.p=e,this.s=i,this.c=s,this.n=a||e,t instanceof dt||u.push(this.n),this.r=o,this.type=r||0,l&&(this.pr=l,d=!0),this.b=void 0===c?i:c,this.e=void 0===h?i+s:h,n&&((this._next=n)._prev=this)}),_t=N.parseComplex=function(t,e,i,s,n,r,a,o,l,c){a=new dt(t,e,0,0,a,c?2:1,null,!1,o,i=i||r||"",s),s+="";var h,u,p,d,_,f,m,g,v,w,y,x=i.split(", ").join(",").split(" "),b=s.split(", ").join(",").split(" "),T=x.length,k=!1!==O;for(-1===s.indexOf(",")&&-1===i.indexOf(",")||(x=x.join(" ").replace(H,", ").split(" "),b=b.join(" ").replace(H,", ").split(" "),T=x.length),T!==b.length&&(T=(x=(r||"").split(" ")).length),a.plugin=l,a.setRatio=c,h=0;hu;u++)w=f[u],v=d.indexOf(w,p),a.appendXtra(d.substr(p,v-p),Number(w),P(m[u],w),"",k&&"px"===d.substr(v+w.length,2),0===u),p=v+w.length;a["xs"+a.l]+=d.substr(p)}else a["xs"+a.l]+=a.l?" "+d:d;if(-1!==s.indexOf("=")&&a.data){for(y=a.xs0+a.data.s,h=1;a.l>h;h++)y+=a["xs"+h]+a.data["xn"+h];a.e=y+a["xs"+h]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},ft=9;for((t=dt.prototype).l=t.pr=0;0<--ft;)t["xn"+ft]=0,t["xs"+ft]="";t.xs0="",t._next=t._prev=t.xfirst=t.data=t.plugin=t.setRatio=t.rxp=null,t.appendXtra=function(t,e,i,s,n,r){var a=this,o=a.l;return a["xs"+o]+=r&&o?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=s||"",0s;s++)e.prefix=0===s&&e.prefix,e.defaultValue=i[s]||r,new mt(n[s],e)};(t=mt.prototype).parseComplex=function(t,e,i,s,n,r){var a,o,l,c,h,u=this.keyword;if(this.multi&&(H.test(i)||H.test(e)?(o=e.replace(H,"|").split("|"),l=i.replace(H,"|").split("|")):u&&(o=[e],l=[i])),l){for(c=(l.length>o.length?l:o).length,a=0;aI[r]&&I[r]>-j&&(I[r]=0);return i&&(t._gsTransform=I),I},St=s.set3DTransformRatio=function(t){var e,i,s,n,r,a,o,l,c,h,u,p,d,_,f,m,g,v,w,y,x,b,T=this.data,k=this.t.style,P=T.rotation*U,S=T.scaleX,O=T.scaleY,C=T.scaleZ,A=T.perspective;if(1!==t&&0!==t||"auto"!==T.force3D||T.rotationY||T.rotationX||1!==C||A||T.z){if(M&&(S<1e-4&&-1e-4y;y++)this.p.indexOf("border")&&(f[y]=T(f[y])),-1!==(o=a=st(t,f[y],b,!1,"0px")).indexOf(" ")&&(o=(a=o.split(" "))[0],a=a[1]),l=r=w[y],d=parseFloat(o),_=o.substr((d+"").length),(h=""===(h=(u="="===l.charAt(1))?(c=parseInt(l.charAt(0)+"1",10),l=l.substr(2),c*=parseFloat(l),l.substr((c+"").length-(c<0?1:0))||""):(c=parseFloat(l),l.substr((c+"").length)))?x[i]||_:h)!==_&&(p=nt(t,"borderLeft",d,_),d=nt(t,"borderTop",d,_),a="%"===h?(o=p/g*100+"%",d/v*100+"%"):"em"===h?(o=p/(_=nt(t,"borderLeft",1,"em"))+"em",d/_+"em"):(o=p+"px",d+"px"),u&&(l=parseFloat(o)+c+h,r=parseFloat(a)+c+h)),n=_t(m,f[y],o+" "+a,l+" "+r,!1,"0px",n);return n},prefix:!0,formatter:ht("0px 0px 0px 0px",!1,!0)}),gt("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,s,n,r){var a,o,l,c,h,u,p="background-position",d=b||it(t,null),_=this.format((d?C?d.getPropertyValue(p+"-x")+" "+d.getPropertyValue(p+"-y"):d.getPropertyValue(p):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),e=this.format(e);if(-1!==_.indexOf("%")!=(-1!==e.indexOf("%"))&&((u=st(t,"backgroundImage").replace(F,""))&&"none"!==u)){for(a=_.split(" "),o=e.split(" "),G.setAttribute("src",u),l=2;-1<--l;)(c=-1!==(_=a[l]).indexOf("%"))!=(-1!==o[l].indexOf("%"))&&(h=0===l?t.offsetWidth-G.width:t.offsetHeight-G.height,a[l]=c?parseFloat(_)/100*h+"px":parseFloat(_)/h*100+"%");_=a.join(" ")}return this.parseComplex(t.style,_,e,n,r)},formatter:v}),gt("backgroundSize",{defaultValue:"0 0",formatter:v}),gt("perspective",{defaultValue:"0px",prefix:!0}),gt("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),gt("transformStyle",{prefix:!0}),gt("backfaceVisibility",{prefix:!0}),gt("userSelect",{prefix:!0}),gt("margin",{parser:ut("marginTop,marginRight,marginBottom,marginLeft")}),gt("padding",{parser:ut("paddingTop,paddingRight,paddingBottom,paddingLeft")}),gt("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,s,n,r){var a,o;return e=C<9?(a=t.currentStyle,o=C<8?" ":",",a="rect("+a.clipTop+o+a.clipRight+o+a.clipBottom+o+a.clipLeft+")",this.format(e).split(",").join(o)):(a=this.format(st(t,this.p,b,!1,this.dflt)),this.format(e)),this.parseComplex(t.style,a,e,n,r)}}),gt("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),gt("autoRound,strictUnits",{parser:function(t,e,i,s,n){return n}}),gt("border",{defaultValue:"0px solid #000",parser:function(t,e,i,s,n,r){return this.parseComplex(t.style,this.format(st(t,"borderTopWidth",b,!1,"0px")+" "+st(t,"borderTopStyle",b,!1,"solid")+" "+st(t,"borderTopColor",b,!1,"#000")),this.format(e),n,r)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(ct)||["#000"])[0]}}),gt("borderWidth",{parser:ut("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),gt("float,cssFloat,styleFloat",{parser:function(t,e,i,s,n){var r=t.style,t="cssFloat"in r?"cssFloat":"styleFloat";return new dt(r,t,0,0,n,-1,i,!1,0,r[t],e)}});function Ct(t){var e,i=this.t,s=i.filter||st(this.data,"filter"),t=0|this.s+this.c*t;(e=100==t?-1===s.indexOf("atrix(")&&-1===s.indexOf("radient(")&&-1===s.indexOf("oader(")?(i.removeAttribute("filter"),!st(this.data,"filter")):(i.filter=s.replace(l,""),!0):e)||(this.xn1&&(i.filter=s=s||"alpha(opacity="+t+")"),-1===s.indexOf("pacity")?0==t&&this.xn1||(i.filter=s+" alpha(opacity="+t+")"):i.filter=s.replace(L,"opacity="+t))}gt("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,s,n,r){var a=parseFloat(st(t,"opacity",b,!1,"1")),o=t.style,l="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+a),l&&1===a&&"hidden"===st(t,"visibility",b)&&0!==e&&(a=0),J?n=new dt(o,"opacity",a,e-a,n):((n=new dt(o,"opacity",100*a,100*(e-a),n)).xn1=l?1:0,o.zoom=1,n.type=2,n.b="alpha(opacity="+n.s+")",n.e="alpha(opacity="+(n.s+n.c)+")",n.data=t,n.plugin=r,n.setRatio=Ct),l&&((n=new dt(o,"visibility",0,0,n,-1,null,!1,0,0!==a?"inherit":"hidden",0===e?"hidden":"inherit")).xs0="inherit",s._overwriteProps.push(n.n),s._overwriteProps.push(i)),n}});function At(t,e){e&&(t.removeProperty?("ms"===e.substr(0,2)&&(e="M"+e.substr(1)),t.removeProperty(e.replace(z,"-$1").toLowerCase())):t.removeAttribute(e))}function Mt(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:At(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)}gt("className",{parser:function(t,e,i,s,n,r,a){var o,l,c,h=t.getAttribute("class")||"",u=t.style.cssText;if((n=s._classNamePT=new dt(t,i,0,0,n,2)).setRatio=Mt,n.pr=-11,d=!0,n.b=h,o=m(t,b),i=t._gsClassPT){for(l={},c=i.data;c;)l[c.p]=1,c=c._next;i.setRatio(1)}return(t._gsClassPT=n).e="="!==e.charAt(1)?e:h.replace(RegExp("\\s*\\b"+e.substr(2)+"\\b"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),s._tween._duration&&(t.setAttribute("class",n.e),a=g(t,o,m(t),a,l),t.setAttribute("class",h),n.data=a.firstMPT,t.style.cssText=u,n=n.xfirst=s.parse(t,a.difs,n,r)),n}});function Rt(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,s,n,r=this.t.style,a=_.transform.parse;if("all"===this.e)n=!(r.cssText="");else for(s=(e=this.e.split(",")).length;-1<--s;)i=e[s],_[i]&&(_[i].parse===a?n=!0:i="transformOrigin"===i?bt:_[i].p),At(r,i);n&&(At(r,yt),this.t._gsTransform&&delete this.t._gsTransform)}}for(gt("clearProps",{parser:function(t,e,i,s,n){return(n=new dt(t,i,0,0,n,2)).setRatio=Rt,n.e=e,n.pr=-10,n.data=s._tween,d=!0,n}}),t="bezier,throwProps,physicsProps,physics2D".split(","),ft=t.length;ft--;)!function(t){var l;_[t]||(l=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin",gt(t,{parser:function(t,e,i,s,n,r,a){var o=(window.GreenSockGlobals||window).com.greensock.plugins[l];return o?(o._cssRegister(),_[i].parse(t,e,i,s,n,r,a)):(f("Error: "+l+" js file not loaded."),n)}}))}(t[ft]);(t=N.prototype)._firstPT=null,t._onInitTween=function(t,e,i){if(!t.nodeType)return!1;this._target=t,this._tween=i,this._vars=e,O=e.autoRound,d=!1,x=e.suffixMap||N.suffixMap,b=it(t,""),u=this._overwriteProps;var s,n,r,a,o,l,i=t.style;if(c&&""===i.zIndex&&("auto"!==(l=st(t,"zIndex",b))&&""!==l||this._addLazySet(i,"zIndex",0)),"string"==typeof e&&(r=i.cssText,l=m(t,b),i.cssText=r+";"+e,l=g(t,l,m(t)).difs,!J&&X.test(e)&&(l.opacity=parseFloat(RegExp.$1)),e=l,i.cssText=r),this._firstPT=s=this.parse(t,e,null),this._transformType){for(l=3===this._transformType,yt?h&&(c=!0,""===i.zIndex&&("auto"!==(e=st(t,"zIndex",b))&&""!==e||this._addLazySet(i,"zIndex",0)),k&&this._addLazySet(i,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(l?"visible":"hidden"))):i.zoom=1,n=s;n&&n._next;)n=n._next;i=new dt(t,"transform",0,0,null,2),this._linkCSSP(i,null,n),i.setRatio=l&&Tt?St:yt?Ot:vt,i.data=this._transform||Pt(t,b,!0),u.pop()}if(d){for(;s;){for(o=s._next,n=r;n&&n.pr>s.pr;)n=n._next;(s._prev=n?n._prev:a)?s._prev._next=s:r=s,(s._next=n)?n._prev=s:a=s,s=o}this._firstPT=r}return!0},t.parse=function(t,e,i,s){var n,r,a,o,l,c,h,u,p=t.style;for(n in e)l=e[n],u=_[n],u?i=u.parse(t,l,n,this,i,s,e):(o=st(t,n,b)+"",h="string"==typeof l,"color"===n||"fill"===n||"stroke"===n||-1!==n.indexOf("Color")||h&&E.test(l)?(h||(l=S(l),l=(3s;s++)i+=n["xn"+s]+n["xs"+(s+1)];n.t[n.p]=i}else-1===n.type?n.t[n.p]=n.xs0:n.setRatio&&n.setRatio(t);else n.t[n.p]=e+n.xs0;n=n._next}else for(;n;)2!==n.type?n.t[n.p]=n.b:n.setRatio(t),n=n._next;else for(;n;)2!==n.type?n.t[n.p]=n.e:n.setRatio(t),n=n._next},t._enableTransforms=function(t){this._transformType=t||3===this._transformType?3:2,this._transform=this._transform||Pt(this._target,b,!0)};function It(){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)}t._addLazySet=function(t,e,i){e=this._firstPT=new dt(t,e,0,0,this._firstPT,2);e.e=i,e.setRatio=It,e.data=this},t._linkCSSP=function(t,e,i,s){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,s=!0),i?i._next=t:s||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},t._kill=function(t){var e,i,s,n=t;if(t.autoAlpha||t.alpha){for(i in n={},t)n[i]=t[i];n.opacity=1,n.autoAlpha&&(n.visibility=1)}return t.className&&(e=this._classNamePT)&&((s=e.xfirst)&&s._prev?this._linkCSSP(s._prev,e._next,s._prev._prev):s===this._firstPT&&(this._firstPT=e._next),e._next&&this._linkCSSP(e._next,e._next._next,s._prev),this._classNamePT=null),r.prototype._kill.call(this,n)};function Dt(t,e,i){var s,n,r,a;if(t.slice)for(n=t.length;-1<--n;)Dt(t[n],e,i);else for(n=(s=t.childNodes).length;-1<--n;)a=(r=s[n]).type,r.style&&(e.push(m(r)),i&&i.push(r)),1!==a&&9!==a&&11!==a||!r.childNodes.length||Dt(r,e,i)}return N.cascadeTo=function(t,e,i){var s,n,r,a=p.to(t,e,i),o=[a],l=[],c=[],h=[],u=p._internals.reservedProps;for(t=a._targets||a.target,Dt(t,l,h),a.render(e,!0),Dt(t,c),a.render(0,!0),a._enabled(!0),s=h.length;-1<--s;)if((n=g(h[s],l[s],c[s])).firstMPT){for(r in n=n.difs,i)u[r]&&(n[r]=i[r]);o.push(p.to(h[s],e,n))}return o},r.activate([N]),N},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],13:[function(t,e,i){"use strict";(window._gsQueue||(window._gsQueue=[])).push(function(){function n(t,e){var i="x"===e?"Width":"Height",s="scroll"+i,n="client"+i,e=document.body;return t===a||t===r||t===e?Math.max(r[s],e[s])-(a["inner"+i]||Math.max(r[n],e[n])):t[s]-t["offset"+i]}var r=document.documentElement,a=window,t=window._gsDefine.plugin({propName:"scrollTo",API:2,version:"1.7.3",init:function(t,e,i){return this._wdw=t===a,this._target=t,this._tween=i,this._autoKill=!1!==(e="object"!=typeof e?{y:e}:e).autoKill,this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=e.x?(this._addTween(this,"x",this.x,"max"===e.x?n(t,"x"):e.x,"scrollTo_x",!0),this._overwriteProps.push("scrollTo_x")):this.skipX=!0,null!=e.y?(this._addTween(this,"y",this.y,"max"===e.y?n(t,"y"):e.y,"scrollTo_y",!0),this._overwriteProps.push("scrollTo_y")):this.skipY=!0,!0},set:function(t){this._super.setRatio.call(this,t);var e=this._wdw||!this.skipX?this.getX():this.xPrev,i=this._wdw||!this.skipY?this.getY():this.yPrev,s=i-this.yPrev,t=e-this.xPrev;this._autoKill&&(!this.skipX&&(7e&&(this.skipX=!0),!this.skipY&&(7i&&(this.skipY=!0),this.skipX&&this.skipY&&this._tween.kill()),this._wdw?a.scrollTo(this.skipX?e:this.x,this.skipY?i:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),e=t.prototype;t.max=n,e.getX=function(){return this._wdw?null!=a.pageXOffset?a.pageXOffset:(null!=r.scrollLeft?r:document.body).scrollLeft:this._target.scrollLeft},e.getY=function(){return this._wdw?null!=a.pageYOffset?a.pageYOffset:(null!=r.scrollTop?r:document.body).scrollTop:this._target.scrollTop},e._kill=function(t){return t.scrollTo_x&&(this.skipX=!0),t.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,t)}}),window._gsDefine&&window._gsQueue.pop()()},{}]},{},[2]); +!function s(n,r,a){function o(e,t){if(!r[e]){if(!n[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(l)return l(e,!0);throw(i=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",i}i=r[e]={exports:{}},n[e][0].call(i.exports,function(t){return o(n[e][1][t]||t)},i,i.exports,s,n,r,a)}return r[e].exports}for(var l="function"==typeof require&&require,t=0;t{i.append(""+t+": "),i.append(e[t].message),i.append("
")}):i.append('
'+e.message+"
")}})})})},{}],2:[function(t,e,i){"use strict";t("../lib/greensock/TweenLite.min.js"),t("../lib/greensock/TimelineLite.min.js"),t("../lib/greensock/easing/EasePack.min.js"),t("../lib/greensock/plugins/CSSPlugin.min.js"),t("../lib/greensock/plugins/ScrollToPlugin.min.js"),t("../global/pageManager.js"),t("../global/main.js"),t("../global/fields.js"),t("../global/beacon.js"),t("../global/ajax.js"),t("../global/rocketcdn.js"),t("../global/countdown.js")},{"../global/ajax.js":1,"../global/beacon.js":3,"../global/countdown.js":4,"../global/fields.js":5,"../global/main.js":6,"../global/pageManager.js":7,"../global/rocketcdn.js":8,"../lib/greensock/TimelineLite.min.js":9,"../lib/greensock/TweenLite.min.js":10,"../lib/greensock/easing/EasePack.min.js":11,"../lib/greensock/plugins/CSSPlugin.min.js":12,"../lib/greensock/plugins/ScrollToPlugin.min.js":13}],3:[function(t,e,i){"use strict";var s=jQuery;s(document).ready(function(){"Beacon"in window&&s(".wpr-infoAction--help").on("click",function(t){var e=s(this).data("beacon-id");return 0!==(e=(e=e).split(",")).length&&(1{o(t).attr("checked",i?null:"checked")});else{const r=o(e).closest(".wpr-list").find(".wpr-main-checkbox");var n=o.map(s,t=>{if(void 0!==o(t).attr("checked"))return t});r.attr("checked",n.length===s.length?"checked":null)}}),0{let i=o(e).parents(".wpr-list");var s=i.find(".wpr-list-body input[type=checkbox]:not(:checked)").length;o(e).attr("checked",s<=0?"checked":null)})})},{}],6:[function(t,e,i){"use strict";var c=jQuery;c(document).ready(function(){var t=c(".wpr-notice");c("#wpr-congratulations-notice").on("click",function(){return(new TimelineLite).to(t,1,{autoAlpha:0,x:40,ease:Power4.easeOut}).to(t,.6,{height:0,marginTop:0,ease:Power4.easeOut},"=-.4").set(t,{display:"none"}),!1}),c(".rocket-analytics-data-container").hide(),c(".rocket-preview-analytics-data").on("click",function(t){t.preventDefault(),c(this).parent().next(".rocket-analytics-data-container").toggle()}),c(".wpr-toggle-button").each(function(){var t=c(this),e=t.closest(".wpr-fieldsContainer-fieldset").find(".wpr-radio :checkbox"),i=c('[href="'+t.attr("href")+'"].wpr-menuItem');e.on("change",function(){e.is(":checked")?(i.css("display","block"),t.css("display","inline-block")):(i.css("display","none"),t.css("display","none"))}).trigger("change")});var e=c(".wpr-Popin-Analytics"),i=c(".wpr-Popin-overlay"),s=c(".wpr-Popin-Analytics-close"),n=c(".wpr-Popin-Analytics .wpr-button");function r(){(new TimelineLite).fromTo(e,.6,{autoAlpha:1,marginTop:0},{autoAlpha:0,marginTop:-24,ease:Power4.easeOut}).fromTo(i,.6,{autoAlpha:1},{autoAlpha:0,ease:Power4.easeOut},"=-.5").set(e,{display:"none"}).set(i,{display:"none"})}c(".wpr-js-popin").on("click",function(t){return t.preventDefault(),(new TimelineLite).set(e,{display:"block"}).set(i,{display:"block"}).fromTo(i,.6,{autoAlpha:0},{autoAlpha:1,ease:Power4.easeOut}).fromTo(e,.6,{autoAlpha:0,marginTop:-24},{autoAlpha:1,marginTop:0,ease:Power4.easeOut},"=-.5"),!1}),s.on("click",function(t){return t.preventDefault(),r(),!1}),n.on("click",function(t){return t.preventDefault(),r(),c("#analytics_enabled").prop("checked",!0),c("#analytics_enabled").trigger("change"),!1}),c("#analytics_enabled").on("change",function(){c(".wpr-rocket-analytics-cta").toggleClass("wpr-isHidden")});var a=c(".wpr-Popin-Upgrade"),n=c(".wpr-Popin-Upgrade-close");c(".wpr-popin-upgrade-toggle").on("click",function(t){return t.preventDefault(),(new TimelineLite).set(a,{display:"block"}).set(i,{display:"block"}).fromTo(i,.6,{autoAlpha:0},{autoAlpha:1,ease:Power4.easeOut}).fromTo(a,.6,{autoAlpha:0,marginTop:-24},{autoAlpha:1,marginTop:0,ease:Power4.easeOut},"=-.5"),!1}),n.on("click",function(){return(new TimelineLite).fromTo(a,.6,{autoAlpha:1,marginTop:0},{autoAlpha:0,marginTop:-24,ease:Power4.easeOut}).fromTo(i,.6,{autoAlpha:1},{autoAlpha:0,ease:Power4.easeOut},"=-.5").set(a,{display:"none"}).set(i,{display:"none"}),!1});var o=c(".wpr-Sidebar");c(".wpr-js-tips").on("change",function(){c(this).is(":checked")?(o.css("display","block"),localStorage.setItem("wpr-show-sidebar","on")):(o.css("display","none"),localStorage.setItem("wpr-show-sidebar","off"))}),document.getElementById("LKgOcCRpwmAj")?c(".wpr-adblock").css("display","none"):c(".wpr-adblock").css("display","block");var l=c(".wpr-adblock");c(".wpr-adblock-close").on("click",function(){return(new TimelineLite).to(l,1,{autoAlpha:0,x:40,ease:Power4.easeOut}).to(l,.4,{height:0,marginTop:0,ease:Power4.easeOut},"=-.4").set(l,{display:"none"}),!1})})},{}],7:[function(t,e,i){"use strict";function s(t){var e,i=this;this.$body=document.querySelector(".wpr-body"),this.$menuItems=document.querySelectorAll(".wpr-menuItem"),this.$submitButton=document.querySelector(".wpr-Content > form > #wpr-options-submit"),this.$pages=document.querySelectorAll(".wpr-Page"),this.$sidebar=document.querySelector(".wpr-Sidebar"),this.$content=document.querySelector(".wpr-Content"),this.$tips=document.querySelector(".wpr-Content-tips"),this.$links=document.querySelectorAll(".wpr-body a"),this.$menuItem=null,this.$page=null,this.pageId=null,this.bodyTop=0,this.buttonText=this.$submitButton.value,i.getBodyTop(),window.onhashchange=function(){i.detectID()},window.location.hash?(this.bodyTop=0,this.detectID()):(e=localStorage.getItem("wpr-hash"),this.bodyTop=0,e?(window.location.hash=e,this.detectID()):(this.$menuItems[0].classList.add("isActive"),localStorage.setItem("wpr-hash","dashboard"),window.location.hash="#dashboard"));for(var s=0;s{a.querySelectorAll(".wpr-rocketcdn-open").forEach(t=>{t.addEventListener("click",t=>{t.preventDefault()})}),function(){var t="";t+="action=rocketcdn_process_status";const e=r(t+="&nonce="+rocket_ajax_data.nonce);e.onreadystatechange=()=>{e.readyState===XMLHttpRequest.DONE&&200===e.status&&!0===JSON.parse(e.responseText).success&&MicroModal.show("wpr-rocketcdn-modal")}}(),MicroModal.init({disableScroll:!0})}),s.addEventListener("load",()=>{let t=a.querySelector("#wpr-rocketcdn-open-cta"),e=a.querySelector("#wpr-rocketcdn-close-cta"),i=a.querySelector("#wpr-rocketcdn-cta-small"),s=a.querySelector("#wpr-rocketcdn-cta");function n(t){var e="";return e+="action=toggle_rocketcdn_cta",e+="&status="+t,e+="&nonce="+rocket_ajax_data.nonce}null!==t&&null!==i&&null!==s&&t.addEventListener("click",t=>{t.preventDefault(),i.classList.add("wpr-isHidden"),s.classList.remove("wpr-isHidden"),r(n("big"))}),null!==e&&null!==i&&null!==s&&e.addEventListener("click",t=>{t.preventDefault(),i.classList.remove("wpr-isHidden"),s.classList.add("wpr-isHidden"),r(n("small"))})}),s.onmessage=t=>{var e,i,s=rocket_ajax_data.origin_url;t.origin===s&&((e=t.data).hasOwnProperty("cdnFrameHeight")&&(a.getElementById("rocketcdn-iframe").style.height="".concat(e.cdnFrameHeight,"px")),(i=t.data).hasOwnProperty("cdnFrameClose")&&(MicroModal.close("wpr-rocketcdn-modal"),i.hasOwnProperty("cdn_page_message")&&-1!==["iframe-payment-success","iframe-unsubscribe-success"].indexOf(i.cdn_page_message)&&a.location.reload()),function(t,e){let i=a.querySelector("#rocketcdn-iframe").contentWindow;if(t.hasOwnProperty("rocketcdn_token")){var s="";s+="action=save_rocketcdn_token",s+="&value="+t.rocketcdn_token;const n=r(s+="&nonce="+rocket_ajax_data.nonce);n.onreadystatechange=()=>{var t;n.readyState===XMLHttpRequest.DONE&&200===n.status&&(t=JSON.parse(n.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}else{s={process:"subscribe",message:"token_not_received"};i.postMessage({success:!1,data:s,rocketcdn:!0},e)}}(t.data,s),(e=t.data).hasOwnProperty("rocketcdn_process")&&(i="",i+="action=rocketcdn_process_set",i+="&status="+e.rocketcdn_process,r(i+="&nonce="+rocket_ajax_data.nonce)),function(t,e){let i=a.querySelector("#rocketcdn-iframe").contentWindow;if(t.hasOwnProperty("rocketcdn_url")){var s="";s+="action=rocketcdn_enable",s+="&cdn_url="+t.rocketcdn_url;const n=r(s+="&nonce="+rocket_ajax_data.nonce);n.onreadystatechange=()=>{var t;n.readyState===XMLHttpRequest.DONE&&200===n.status&&(t=JSON.parse(n.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}}(t.data,s),function(t,e){let i=a.querySelector("#rocketcdn-iframe").contentWindow;if(t.hasOwnProperty("rocketcdn_disable")){t="";t+="action=rocketcdn_disable";const s=r(t+="&nonce="+rocket_ajax_data.nonce);s.onreadystatechange=()=>{var t;s.readyState===XMLHttpRequest.DONE&&200===s.status&&(t=JSON.parse(s.responseText),i.postMessage({success:t.success,data:t.data,rocketcdn:!0},e))}}}(t.data,s),(s=t.data).hasOwnProperty("rocketcdn_validate_token")&&s.hasOwnProperty("rocketcdn_validate_cname")&&(t="",t+="action=rocketcdn_validate_token_cname",t+="&cdn_url="+s.rocketcdn_validate_cname,t+="&cdn_token="+s.rocketcdn_validate_token,r(t+="&nonce="+rocket_ajax_data.nonce)))}},{}],9:[function(t,e,i){"use strict";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(h,u,p){function d(t){u.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var e,i,s=this.vars;for(i in s)e=s[i],g(e)&&-1!==e.join("").indexOf("{self}")&&(s[i]=this._swapSelfInParams(e));g(s.tweens)&&this.add(s.tweens,0,s.align,s.stagger)}function _(t){var e,i={};for(e in t)i[e]=t[e];return i}function n(t,e,i,s){t._timeline.pause(t._startTime),e&&e.apply(s||t._timeline,i||v)}var f=1e-10,m=p._internals.isSelector,g=p._internals.isArray,v=[],a=window._gsDefine.globals,w=v.slice,t=d.prototype=new u;return d.version="1.12.1",t.constructor=d,t.kill()._gc=!1,t.to=function(t,e,i,s){var n=i.repeat&&a.TweenMax||p;return e?this.add(new n(t,e,i),s):this.set(t,i,s)},t.from=function(t,e,i,s){return this.add((i.repeat&&a.TweenMax||p).from(t,e,i),s)},t.fromTo=function(t,e,i,s,n){var r=s.repeat&&a.TweenMax||p;return e?this.add(r.fromTo(t,e,i,s),n):this.set(t,s,n)},t.staggerTo=function(t,e,i,s,n,r,a,o){var l,c=new d({onComplete:r,onCompleteParams:a,onCompleteScope:o,smoothChildTiming:this.smoothChildTiming});for("string"==typeof t&&(t=p.selector(t)||t),m(t)&&(t=w.call(t,0)),s=s||0,l=0;t.length>l;l++)i.startAt&&(i.startAt=_(i.startAt)),c.to(t[l],e,_(i),l*s);return this.add(c,n)},t.staggerFrom=function(t,e,i,s,n,r,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,n,r,a,o)},t.staggerFromTo=function(t,e,i,s,n,r,a,o,l){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,n,r,a,o,l)},t.call=function(t,e,i,s){return this.add(p.delayedCall(0,t,e,i),s)},t.set=function(t,e,i){return i=this._parseTimeOrLabel(i,0,!0),null==e.immediateRender&&(e.immediateRender=i===this._time&&!this._paused),this.add(new p(t,0,e),i)},d.exportRoot=function(t,e){null==(t=t||{}).smoothChildTiming&&(t.smoothChildTiming=!0);var i,s,n=new d(t),t=n._timeline;for(null==e&&(e=!0),t._remove(n,!0),n._startTime=0,n._rawPrevTime=n._time=n._totalTime=t._time,i=t._first;i;)s=i._next,e&&i instanceof p&&i.target===i.vars.onComplete||n.add(i,i._startTime-i._delay),i=s;return t.add(n,0),n},t.add=function(t,e,i,s){var n,r,a,o,l,c;if("number"!=typeof e&&(e=this._parseTimeOrLabel(e,0,!0,t)),!(t instanceof h)){if(t instanceof Array||t&&t.push&&g(t)){for(i=i||"normal",s=s||0,n=e,r=t.length,a=0;at._startTime;l._timeline;)c&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return this},t.remove=function(t){if(t instanceof h)return this._remove(t,!1);if(t instanceof Array||t&&t.push&&g(t)){for(var e=t.length;-1<--e;)this.remove(t[e]);return this}return"string"==typeof t?this.removeLabel(t):this.kill(null,t)},t._remove=function(t,e){u.prototype._remove.call(this,t,e);e=this._last;return e?this._time>e._startTime+e._totalDuration/e._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},t.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},t.insert=t.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},t.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},t.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},t.addPause=function(t,e,i,s){return this.call(n,["{self}",e,i,s],this,t)},t.removeLabel=function(t){return delete this._labels[t],this},t.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},t._parseTimeOrLabel=function(t,e,i,s){var n;if(s instanceof h&&s.timeline===this)this.remove(s);else if(s&&(s instanceof Array||s.push&&g(s)))for(n=s.length;-1<--n;)s[n]instanceof h&&s[n].timeline===this&&this.remove(s[n]);if("string"==typeof e)return this._parseTimeOrLabel(e,i&&"number"==typeof t&&null==this._labels[e]?t-this.duration():0,i);if(e=e||0,"string"!=typeof t||!isNaN(t)&&null==this._labels[t])null==t&&(t=this.duration());else{if(-1===(n=t.indexOf("=")))return null==this._labels[t]?i?this._labels[t]=this.duration()+e:e:this._labels[t]+e;e=parseInt(t.charAt(n-1)+"1",10)*Number(t.substr(n+1)),t=1f&&(a="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:f,t=l+1e-4):t<1e-7?(((this._totalTime=this._time=0)!==c||0===this._duration&&this._rawPrevTime!==f&&(0=c)for(s=this._first;s&&(r=s._next,!this._paused||p);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r;else for(s=this._last;s&&(r=s._prev,!this._paused||p);)(s._active||c>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r;this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||v)),a&&(this._gc||h!==this._startTime&&u===this._timeScale||!(0===this._time||l>=this.totalDuration())||(n&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[a]&&this.vars[a].apply(this.vars[a+"Scope"]||this,this.vars[a+"Params"]||v)))}},t._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof d&&t._hasPausedChild())return!0;t=t._next}return!1},t.getChildren=function(t,e,i,s){s=s||-9999999999;for(var n=[],r=this._first,a=0;r;)s>r._startTime||(r instanceof p?!1!==e&&(n[a++]=r):(!1!==i&&(n[a++]=r),!1!==t&&(a=(n=n.concat(r.getChildren(!0,e,i))).length))),r=r._next;return n},t.getTweensOf=function(t,e){var i,s,n=this._gc,r=[],a=0;for(n&&this._enabled(!0,!0),s=(i=p.getTweensOf(t)).length;-1<--s;)(i[s].timeline===this||e&&this._contains(i[s]))&&(r[a++]=i[s]);return n&&this._enabled(!1,!0),r},t._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},t.shiftChildren=function(t,e,i){i=i||0;for(var s,n=this._first,r=this._labels;n;)n._startTime>=i&&(n._startTime+=t),n=n._next;if(e)for(s in r)r[s]>=i&&(r[s]+=t);return this._uncache(!0)},t._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,n=!1;-1<--s;)i[s]._kill(t,e)&&(n=!0);return n},t.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;-1<--i;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},t.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return this},t._enabled=function(t,e){if(t===this._gc)for(var i=this._first;i;)i._enabled(t,!0),i=i._next;return u.prototype._enabled.call(this,t,e)},t.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},t.totalDuration=function(t){if(arguments.length)return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this;if(this._dirty){for(var e,i,s=0,n=this._last,r=999999999999;n;)e=n._prev,n._dirty&&n.totalDuration(),n._startTime>r&&this._sortChildren&&!n._paused?this.add(n,n._startTime-n._delay):r=n._startTime,n._startTime<0&&!n._paused&&(s-=n._startTime,this._timeline.smoothChildTiming&&(this._startTime+=n._startTime/this._timeScale),this.shiftChildren(-n._startTime,!1,-9999999999),r=0),s<(i=n._startTime+n._totalDuration/n._timeScale)&&(s=i),n=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration},t.usesFrames=function(){for(var t=this._timeline;t._timeline;)t=t._timeline;return t===h._rootFramesTimeline},t.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},d},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],10:[function(t,Q,e){"use strict";!function(p){var e,i,d=p.GreenSockGlobals||p;if(!d.TweenLite){var _,f=function(t){for(var e=t.split("."),i=d,s=0;e.length>s;s++)i[e[s]]=i=i[e[s]]||{};return i},u=f("com.greensock"),m=1e-10,o=[].slice,g=function(){},h=(e=Object.prototype.toString,i=e.call([]),function(t){return null!=t&&(t instanceof Array||"object"==typeof t&&!!t.push&&e.call(t)===i)}),v={},w=function(o,l,c,h){this.sc=v[o]?v[o].sc:[],(v[o]=this).gsClass=null,this.func=c;var u=[];this.check=function(t){for(var e,i,s,n,r=l.length,a=r;-1<--r;)(e=v[l[r]]||new w(l[r],[])).gsClass?(u[r]=e.gsClass,a--):t&&e.sc.push(this);if(0===a&&c)for(s=(i=("com.greensock."+o).split(".")).pop(),n=f(i.join("."))[s]=this.gsClass=c.apply(c,u),h&&(d[s]=n,"function"==typeof define&&define.amd?define((p.GreenSockAMDPath?p.GreenSockAMDPath+"/":"")+o.split(".").join("/"),[],function(){return n}):void 0!==Q&&Q.exports&&(Q.exports=n)),r=0;this.sc.length>r;r++)this.sc[r].check()},this.check(!0)},s=p._gsDefine=function(t,e,i,s){return new w(t,e,i,s)},y=u._class=function(t,e,i){return e=e||function(){},s(t,[],function(){return e},i),e};s.globals=d;var t,n=[0,0,1,1],x=[],b=y("easing.Ease",function(t,e,i,s){this._func=t,this._type=i||0,this._power=s||0,this._params=e?n.concat(e):n},!0),T=b.map={},r=b.register=function(t,e,i,s){for(var n,r,a,o,l=e.split(","),c=l.length,h=(i||"easeIn,easeOut,easeInOut").split(",");-1<--c;)for(r=l[c],n=s?y("easing."+r,null,!0):u.easing[r]||{},a=h.length;-1<--a;)o=h[a],T[r+"."+o]=T[o+r]=n[o]=t.getRatio?t:t[o]||new t};for((t=b.prototype)._calcEnd=!1,t.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,s=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?s*=s:2===i?s*=s*s:3===i?s*=s*s*s:4===i&&(s*=s*s*s*s),1===e?1-s:2===e?s:t<.5?s/2:1-s/2},l=(a=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;-1<--l;)t=a[l]+",Power"+l,r(new b(null,null,1,l),t,"easeOut",!0),r(new b(null,null,2,l),t,"easeIn"+(0===l?",easeNone":"")),r(new b(null,null,3,l),t,"easeInOut");T.linear=u.easing.Linear.easeIn,T.swing=u.easing.Quad.easeInOut;var k=y("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(t=k.prototype).addEventListener=function(t,e,i,s,n){n=n||0;var r,a,o=this._listeners[t],l=0;for(null==o&&(this._listeners[t]=o=[]),a=o.length;-1<--a;)(r=o[a]).c===e&&r.s===i?o.splice(a,1):0===l&&n>r.pr&&(l=a+1);o.splice(l,0,{c:e,s:i,up:s,pr:n}),this!==A||_||A.wake()},t.removeEventListener=function(t,e){var i,s=this._listeners[t];if(s)for(i=s.length;-1<--i;)if(s[i].c===e)return void s.splice(i,1)},t.dispatchEvent=function(t){var e,i,s,n=this._listeners[t];if(n)for(e=n.length,i=this._eventTarget;-1<--e;)(s=n[e]).up?s.c.call(s.s||i,{type:t,target:i}):s.c.call(s.s||i)};for(var a,P=p.requestAnimationFrame,S=p.cancelAnimationFrame,O=Date.now||function(){return(new Date).getTime()},C=O(),l=(a=["ms","moz","webkit","o"]).length;-1<--l&&!P;)P=p[a[l]+"RequestAnimationFrame"],S=p[a[l]+"CancelAnimationFrame"]||p[a[l]+"CancelRequestAnimationFrame"];y("Ticker",function(t,e){var s,n,r,a,o,l=this,c=O(),i=!1!==e&&P,h=500,u=33,p=function(t){var e,i=O()-C;h=i&&i+this.totalDuration()/this._timeScale>t},t._enabled=function(t,e){return _||A.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},t._kill=function(){return this._enabled(!1,!1)},t.kill=function(t,e){return this._kill(t,e),this},t._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},t._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();-1<--e;)"{self}"===t[e]&&(i[e]=this);return i},t.eventCallback=function(t,e,i,s){if("on"===(t||"").substr(0,2)){var n=this.vars;if(1===arguments.length)return n[t];null==e?delete n[t]:(n[t]=e,n[t+"Params"]=h(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,n[t+"Scope"]=s),"onUpdate"===t&&(this._onUpdate=e)}return this},t.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},t.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&0this._duration?this._duration:t,e)):this._time},t.totalTime=function(t,e,i){if(_||A.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var s=this._totalDuration,n=this._timeline;if(ss;)i=i._prev;return i?(t._next=i._next,i._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=i,this._timeline&&this._uncache(!0),this},t._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t.timeline=null,t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),this._timeline&&this._uncache(!0)),this},t.render=function(t,e,i){var s,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;n;)s=n._next,(n._active||t>=n._startTime&&!n._paused)&&(n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale,e,i):n.render((t-n._startTime)*n._timeScale,e,i)),n=s},t.rawTime=function(){return _||A.wake(),this._totalTime};var I=y("TweenLite",function(t,e,i){if(c.call(this,e,i),this.render=I.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"==typeof t&&I.selector(t)||t;var s,n,r,i=t.jquery||t.length&&t!==p&&t[0]&&(t[0]===p||t[0].nodeType&&t[0].style&&!t.nodeType),a=this.vars.overwrite;if(this._overwrite=a=null==a?F[I.defaultOverwrite]:"number"==typeof a?a>>0:F[a],(i||t instanceof Array||t.push&&h(t))&&"number"!=typeof t[0])for(this._targets=r=o.call(t,0),this._propLookup=[],this._siblings=[],s=0;r.length>s;s++)(n=r[s])?"string"!=typeof n?n.length&&n!==p&&n[0]&&(n[0]===p||n[0].nodeType&&n[0].style&&!n.nodeType)?(r.splice(s--,1),this._targets=r=r.concat(o.call(n,0))):(this._siblings[s]=H(n,this,!1),1===a&&1=a._startTime&&a._startTime+a.totalDuration()/a._timeScale>c&&((p||!a._initted)&&c-a._startTime<=2e-10||(h[u++]=a)));for(d=u;-1<--d;)a=h[d],2===s&&a._kill(i,t)&&(r=!0),(2!==s||!a._firstPT&&a._initted)&&a._enabled(!1,!1)&&(r=!0);return r},W=function(t,e,i){for(var s=t._timeline,n=s._timeScale,r=t._startTime;s._timeline;){if(r+=s._startTime,n*=s._timeScale,s._paused)return-100;s=s._timeline}return e<(r/=n)?r-e:i&&r===e||!t._initted&&r-e<2*m?m:(r+=t.totalDuration()/t._timeScale/n)>e+m?0:r-e-m};t._init=function(){var t,e,i,s,n,r=this.vars,a=this._overwrittenProps,o=this._duration,l=!!r.immediateRender,c=r.ease;if(r.startAt){for(s in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),n={},r.startAt)n[s]=r.startAt[s];if(n.overwrite=!1,n.immediateRender=!0,n.lazy=l&&!1!==r.lazy,n.startAt=n.delay=null,this._startAt=I.to(this.target,0,n),l)if(0o.pr;)s=s._next;(o._prev=s?s._prev:r)?o._prev._next=o:n=o,(o._next=s)?s._prev=o:r=o,o=a}o=e._firstPT=n}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},V.activate=function(t){for(var e=t.length;-1<--e;)t[e].API===V.API&&(E[(new t[e])._propName]=t[e]);return!0},s.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,s=t.priority||0,n=t.overwriteProps,r={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},a=y("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){V.call(this,i,s),this._overwriteProps=n||[]},!0===t.global),o=a.prototype=new V(i);for(e in(o.constructor=a).API=t.API,r)"function"==typeof t[e]&&(o[r[e]]=t[e]);return a.version=t.version,V.activate([a]),a},a=p._gsQueue){for(l=0;a.length>l;l++)a[l]();for(t in v)v[t].func||p.console.log("GSAP encountered missing dependency: com.greensock."+t)}_=!1}}(window)},{}],11:[function(t,e,i){"use strict";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine("easing.Back",["easing.Ease"],function(m){function t(t,e){var i=c("easing."+t,function(){},!0);return(t=i.prototype=new m).constructor=i,t.getRatio=e,i}function e(t,e,i,s){return s=c("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0),h(s,t),s}function g(t,e,i){this.t=t,this.v=e,i&&(((this.next=i).prev=this).c=i.v-e,this.gap=i.t-t)}function i(t,e){var i=c("easing."+t,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0);return(t=i.prototype=new m).constructor=i,t.getRatio=e,t.config=function(t){return new i(t)},i}var s,n,r=window.GreenSockGlobals||window,a=r.com.greensock,o=2*Math.PI,l=Math.PI/2,c=a._class,h=m.register||function(){},u=e("Back",i("BackOut",function(t){return--t*t*((this._p1+1)*t+this._p1)+1}),i("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),i("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),p=c("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:1t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},p.ease=new p(.7,.7),a.config=p.config=function(t,e,i){return new p(t,e,i)},(a=(s=c("easing.SteppedEase",function(t){this._p1=1/(t=t||1),this._p2=t+1},!0)).prototype=new m).constructor=s,a.getRatio=function(t){return t<0?t=0:1<=t&&(t=.999999999),(this._p2*t>>0)*this._p1},a.config=s.config=function(t){return new s(t)},(a=(n=c("easing.RoughEase",function(t){for(var e,i,s,n,r,a,o=(t=t||{}).taper||"none",l=[],c=0,h=0|(t.points||20),u=h,p=!1!==t.randomize,d=!0===t.clamp,_=t.template instanceof m?t.template:null,f="number"==typeof t.strength?.4*t.strength:.4;-1<--u;)e=p?Math.random():1/h*u,i=_?_.getRatio(e):e,s="none"===o?f:"out"===o?(n=1-e)*n*f:"in"===o?e*e*f:.5*(n=e<.5?2*e:2*(1-e))*n*f,p?i+=Math.random()*s-.5*s:u%2?i+=.5*s:i-=.5*s,d&&(1e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return(this._prev=e).v+(t-e.t)/e.gap*e.c},a.config=function(t){return new n(t)},n.ease=new n,e("Bounce",t("BounceOut",function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),t("BounceIn",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),t("BounceInOut",function(t){var e=t<.5;return t=(t=e?1-2*t:2*t-1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),e("Circ",t("CircOut",function(t){return Math.sqrt(1- --t*t)}),t("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),t("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),e("Elastic",(a=function(t,e,i){var s=c("easing."+t,function(t,e){this._p1=t||1,this._p2=e||i,this._p3=this._p2/o*(Math.asin(1/this._p1)||0)},!0),t=s.prototype=new m;return t.constructor=s,t.getRatio=e,t.config=function(t,e){return new s(t,e)},s})("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*o/this._p2)+1},.3),a("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*o/this._p2))},.3),a("ElasticInOut",function(t){return(t*=2)<1?-.5*this._p1*Math.pow(2,10*--t)*Math.sin((t-this._p3)*o/this._p2):.5*this._p1*Math.pow(2,-10*--t)*Math.sin((t-this._p3)*o/this._p2)+1},.45)),e("Expo",t("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),t("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),t("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),e("Sine",t("SineOut",function(t){return Math.sin(t*l)}),t("SineIn",function(t){return 1-Math.cos(t*l)}),t("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),c("easing.EaseLookup",{find:function(t){return m.map[t]}},!0),h(r.SlowMo,"SlowMo","ease,"),h(n,"RoughEase","ease,"),h(s,"SteppedEase","ease,"),u},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],12:[function(t,e,i){"use strict";(window._gsQueue||(window._gsQueue=[])).push(function(){window._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(r,p){function N(){r.call(this,"css"),this._overwriteProps.length=0,this.setRatio=N.prototype.setRatio}var d,x,b,u,_={},t=N.prototype=new r("css");(t.constructor=N).version="1.12.1",N.API=2,N.defaultTransformPerspective=0,N.defaultSkewType="compensated",N.suffixMap={top:t="px",right:t,bottom:t,left:t,width:t,height:t,fontSize:t,padding:t,margin:t,perspective:t,lineHeight:""};function n(t,e){return e.toUpperCase()}function a(t){return L.test("string"==typeof t?t:(t.currentStyle||t.style).filter||"")?parseFloat(RegExp.$1)/100:1}function f(t){window.console&&console.log(t)}function T(t,e){var i,s,n=(e=e||Z).style;if(void 0!==n[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],s=5;-1<--s&&void 0===n[i[s]+t];);return 0<=s?(tt="-"+(et=3===s?"ms":i[s]).toLowerCase()+"-",et+t):null}function m(t,e){var i,s={};if(e=e||it(t,null))if(i=e.length)for(;-1<--i;)s[e[i].replace(Y,n)]=e.getPropertyValue(e[i]);else for(i in e)s[i]=e[i];else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===s[i]&&(s[i.replace(Y,n)]=e[i]);return J||(s.opacity=a(t)),t=Pt(t,e,!1),s.rotation=t.rotation,s.skewX=t.skewX,s.scaleX=t.scaleX,s.scaleY=t.scaleY,s.x=t.x,s.y=t.y,Tt&&(s.z=t.z,s.rotationX=t.rotationX,s.rotationY=t.rotationY,s.scaleZ=t.scaleZ),s.filters&&delete s.filters,s}function g(t,e,i,s,n){var r,a,o,l={},c=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(r=i[a])||n&&n[a])&&-1===a.indexOf("Origin")&&("number"==typeof r||"string"==typeof r)&&(l[a]="auto"!==r||"left"!==a&&"top"!==a?""!==r&&"auto"!==r&&"none"!==r||"string"!=typeof e[a]||""===e[a].replace(D,"")?r:0:rt(t,a),void 0!==c[a]&&(o=new pt(c,a,c[a],o)));if(s)for(a in s)"className"!==a&&(l[a]=s[a]);return{difs:l,firstMPT:o}}function v(t,e){var i=(t=null==t||""===t||"auto"===t||"auto auto"===t?"0 0":t).split(" "),s=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":i[0];return null==(t=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":i[1])?t="0":"center"===t&&(t="50%"),("center"===s||isNaN(parseFloat(s))&&-1===(s+"").indexOf("="))&&(s="50%"),e&&(e.oxp=-1!==s.indexOf("%"),e.oyp=-1!==t.indexOf("%"),e.oxr="="===s.charAt(1),e.oyr="="===t.charAt(1),e.ox=parseFloat(s.replace(D,"")),e.oy=parseFloat(t.replace(D,""))),s+" "+t+(2>16,255&t>>8,255&t]:(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),lt[t]||("#"===t.charAt(0)?(4===t.length&&(t="#"+(e=t.charAt(1))+e+(i=t.charAt(2))+i+(r=t.charAt(3))+r),[(t=parseInt(t.substr(1),16))>>16,255&t>>8,255&t]):("hsl"===t.substr(0,3)?(t=t.match(A),s=Number(t[0])%360/360,n=Number(t[1])/100,e=2*(r=Number(t[2])/100)-(i=r<=.5?r*(1+n):r+n-r*n),3a",!!(i=i.getElementsByTagName("a")[0])&&/^0.55/.test(i.style.opacity)),tt="",et="",it=Q.defaultView?Q.defaultView.getComputedStyle:function(){},st=N.getStyle=function(t,e,i,s,n){var r;return J||"opacity"!==e?(!s&&t.style[e]?r=t.style[e]:(i=i||it(t))?r=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(z,"-$1").toLowerCase()):t.currentStyle&&(r=t.currentStyle[e]),null==n||r&&"none"!==r&&"auto"!==r&&"auto auto"!==r?r:n):a(t)},nt=s.convertToPixels=function(t,e,i,s,n){if("px"===s||!s)return i;if("auto"===s||!i)return 0;var r,a,o,l=$.test(e),c=t,h=Z.style,u=i<0;if(u&&(i=-i),"%"===s&&-1!==e.indexOf("border"))r=i/100*(l?t.clientWidth:t.clientHeight);else{if(h.cssText="border:0 solid red;position:"+st(t,"position")+";line-height:0;","%"!==s&&c.appendChild)h[l?"borderLeftWidth":"borderTopWidth"]=i+s;else{if(a=(c=t.parentNode||Q.body)._gsCache,o=p.ticker.frame,a&&l&&a.time===o)return a.width*i/100;h[l?"width":"height"]=i+s}c.appendChild(Z),r=parseFloat(Z[l?"offsetWidth":"offsetHeight"]),c.removeChild(Z),l&&"%"===s&&!1!==N.cacheWidths&&((a=c._gsCache=c._gsCache||{}).time=o,a.width=r/i*100),0!==r||n||(r=nt(t,e,i,s,!0))}return u?-r:r},rt=s.calculateOffset=function(t,e,i){if("absolute"!==st(t,"position",i))return 0;var s="left"===e?"Left":"Top",i=st(t,"margin"+s,i);return t["offset"+s]-(nt(t,e,parseFloat(i),i.replace(j,""))||0)},at={width:["Left","Right"],height:["Top","Bottom"]},ot=["marginLeft","marginRight","marginTop","marginBottom"],lt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ct="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b";for(t in lt)ct+="|"+t+"\\b";function ht(t,e,r,a){if(null==t)return function(t){return t};var o,l=e?(t.match(ct)||[""])[0]:"",c=t.split(l).join("").match(I)||[],h=t.substr(0,t.indexOf(c[0])),u=")"===t.charAt(t.length-1)?")":"",p=-1!==t.indexOf(" ")?" ":",",d=c.length,_=0s;s++)n[s]=o(n[s]);return n.join(",")}if(e=(t.match(ct)||[l])[0],s=(i=t.split(e).join("").match(I)||[]).length,d>s--)for(;d>++s;)i[s]=r?i[0|(s-1)/2]:c[s];return h+i.join(p)+p+e+u+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,i,s;if("number"==typeof t)t+=_;else if(a&&H.test(t)){for(i=t.replace(H,"|").split("|"),s=0;i.length>s;s++)i[s]=o(i[s]);return i.join(",")}if(s=(e=t.match(I)||[]).length,d>s--)for(;d>++s;)e[s]=r?e[0|(s-1)/2]:c[s];return h+e.join(p)+u}:function(t){return t}}function ut(c){return c=c.split(","),function(t,e,i,s,n,r,a){var o,l=(e+"").split(" ");for(a={},o=0;o<4;o++)a[c[o]]=l[o]=l[o]||l[(o-1)/2>>0];return s.parse(t,a,n,r)}}var ct=RegExp(ct+")","gi"),pt=(s._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,s,n,r=this.data,a=r.proxy,o=r.firstMPT;o;)e=a[o.v],o.r?e=Math.round(e):e<1e-6&&-1e-6s;s++)n+=i["xn"+s]+i["xs"+(s+1)];i.e=n}}else i.e=i.s+i.xs0;o=o._next}},function(t,e,i,s,n){this.t=t,this.p=e,this.v=i,this.r=n,s&&((s._prev=this)._next=s)}),dt=(s._parseToProxy=function(t,e,i,s,n,r){var a,o,l,c,h=s,u={},p={},d=i._transform,_=V;for(i._transform=null,V=e,s=n=i.parse(t,e,s,n),V=_,r&&(i._transform=d,h&&(h._prev=null,h._prev&&(h._prev._next=null)));s&&s!==h;){if(s.type<=1&&(p[o=s.p]=s.s+s.c,u[o]=s.s,r||(c=new pt(s,"s",o,c,s.r),s.c=0),1===s.type))for(a=s.l;0<--a;)p[o=s.p+"_"+(l="xn"+a)]=s.data[l],u[o]=s[l],r||(c=new pt(s,l,o,c,s.rxp[l]));s=s._next}return{proxy:u,end:p,firstMPT:c,pt:n}},s.CSSPropTween=function(t,e,i,s,n,r,a,o,l,c,h){this.t=t,this.p=e,this.s=i,this.c=s,this.n=a||e,t instanceof dt||u.push(this.n),this.r=o,this.type=r||0,l&&(this.pr=l,d=!0),this.b=void 0===c?i:c,this.e=void 0===h?i+s:h,n&&((this._next=n)._prev=this)}),_t=N.parseComplex=function(t,e,i,s,n,r,a,o,l,c){a=new dt(t,e,0,0,a,c?2:1,null,!1,o,i=i||r||"",s),s+="";var h,u,p,d,_,f,m,g,v,w,y,x=i.split(", ").join(",").split(" "),b=s.split(", ").join(",").split(" "),T=x.length,k=!1!==O;for(-1===s.indexOf(",")&&-1===i.indexOf(",")||(x=x.join(" ").replace(H,", ").split(" "),b=b.join(" ").replace(H,", ").split(" "),T=x.length),T!==b.length&&(T=(x=(r||"").split(" ")).length),a.plugin=l,a.setRatio=c,h=0;hu;u++)w=f[u],v=d.indexOf(w,p),a.appendXtra(d.substr(p,v-p),Number(w),P(m[u],w),"",k&&"px"===d.substr(v+w.length,2),0===u),p=v+w.length;a["xs"+a.l]+=d.substr(p)}else a["xs"+a.l]+=a.l?" "+d:d;if(-1!==s.indexOf("=")&&a.data){for(y=a.xs0+a.data.s,h=1;a.l>h;h++)y+=a["xs"+h]+a.data["xn"+h];a.e=y+a["xs"+h]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},ft=9;for((t=dt.prototype).l=t.pr=0;0<--ft;)t["xn"+ft]=0,t["xs"+ft]="";t.xs0="",t._next=t._prev=t.xfirst=t.data=t.plugin=t.setRatio=t.rxp=null,t.appendXtra=function(t,e,i,s,n,r){var a=this,o=a.l;return a["xs"+o]+=r&&o?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=s||"",0s;s++)e.prefix=0===s&&e.prefix,e.defaultValue=i[s]||r,new mt(n[s],e)};(t=mt.prototype).parseComplex=function(t,e,i,s,n,r){var a,o,l,c,h,u=this.keyword;if(this.multi&&(H.test(i)||H.test(e)?(o=e.replace(H,"|").split("|"),l=i.replace(H,"|").split("|")):u&&(o=[e],l=[i])),l){for(c=(l.length>o.length?l:o).length,a=0;aI[r]&&I[r]>-j&&(I[r]=0);return i&&(t._gsTransform=I),I},St=s.set3DTransformRatio=function(t){var e,i,s,n,r,a,o,l,c,h,u,p,d,_,f,m,g,v,w,y,x,b,T=this.data,k=this.t.style,P=T.rotation*U,S=T.scaleX,O=T.scaleY,C=T.scaleZ,A=T.perspective;if(1!==t&&0!==t||"auto"!==T.force3D||T.rotationY||T.rotationX||1!==C||A||T.z){if(M&&(S<1e-4&&-1e-4y;y++)this.p.indexOf("border")&&(f[y]=T(f[y])),-1!==(o=a=st(t,f[y],b,!1,"0px")).indexOf(" ")&&(o=(a=o.split(" "))[0],a=a[1]),l=r=w[y],d=parseFloat(o),_=o.substr((d+"").length),(h=""===(h=(u="="===l.charAt(1))?(c=parseInt(l.charAt(0)+"1",10),l=l.substr(2),c*=parseFloat(l),l.substr((c+"").length-(c<0?1:0))||""):(c=parseFloat(l),l.substr((c+"").length)))?x[i]||_:h)!==_&&(p=nt(t,"borderLeft",d,_),d=nt(t,"borderTop",d,_),a="%"===h?(o=p/g*100+"%",d/v*100+"%"):"em"===h?(o=p/(_=nt(t,"borderLeft",1,"em"))+"em",d/_+"em"):(o=p+"px",d+"px"),u&&(l=parseFloat(o)+c+h,r=parseFloat(a)+c+h)),n=_t(m,f[y],o+" "+a,l+" "+r,!1,"0px",n);return n},prefix:!0,formatter:ht("0px 0px 0px 0px",!1,!0)}),gt("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,s,n,r){var a,o,l,c,h,u,p="background-position",d=b||it(t,null),_=this.format((d?C?d.getPropertyValue(p+"-x")+" "+d.getPropertyValue(p+"-y"):d.getPropertyValue(p):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),e=this.format(e);if(-1!==_.indexOf("%")!=(-1!==e.indexOf("%"))&&((u=st(t,"backgroundImage").replace(F,""))&&"none"!==u)){for(a=_.split(" "),o=e.split(" "),G.setAttribute("src",u),l=2;-1<--l;)(c=-1!==(_=a[l]).indexOf("%"))!=(-1!==o[l].indexOf("%"))&&(h=0===l?t.offsetWidth-G.width:t.offsetHeight-G.height,a[l]=c?parseFloat(_)/100*h+"px":parseFloat(_)/h*100+"%");_=a.join(" ")}return this.parseComplex(t.style,_,e,n,r)},formatter:v}),gt("backgroundSize",{defaultValue:"0 0",formatter:v}),gt("perspective",{defaultValue:"0px",prefix:!0}),gt("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),gt("transformStyle",{prefix:!0}),gt("backfaceVisibility",{prefix:!0}),gt("userSelect",{prefix:!0}),gt("margin",{parser:ut("marginTop,marginRight,marginBottom,marginLeft")}),gt("padding",{parser:ut("paddingTop,paddingRight,paddingBottom,paddingLeft")}),gt("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,s,n,r){var a,o;return e=C<9?(a=t.currentStyle,o=C<8?" ":",",a="rect("+a.clipTop+o+a.clipRight+o+a.clipBottom+o+a.clipLeft+")",this.format(e).split(",").join(o)):(a=this.format(st(t,this.p,b,!1,this.dflt)),this.format(e)),this.parseComplex(t.style,a,e,n,r)}}),gt("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),gt("autoRound,strictUnits",{parser:function(t,e,i,s,n){return n}}),gt("border",{defaultValue:"0px solid #000",parser:function(t,e,i,s,n,r){return this.parseComplex(t.style,this.format(st(t,"borderTopWidth",b,!1,"0px")+" "+st(t,"borderTopStyle",b,!1,"solid")+" "+st(t,"borderTopColor",b,!1,"#000")),this.format(e),n,r)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(ct)||["#000"])[0]}}),gt("borderWidth",{parser:ut("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),gt("float,cssFloat,styleFloat",{parser:function(t,e,i,s,n){var r=t.style,t="cssFloat"in r?"cssFloat":"styleFloat";return new dt(r,t,0,0,n,-1,i,!1,0,r[t],e)}});function Ct(t){var e,i=this.t,s=i.filter||st(this.data,"filter"),t=0|this.s+this.c*t;(e=100==t?-1===s.indexOf("atrix(")&&-1===s.indexOf("radient(")&&-1===s.indexOf("oader(")?(i.removeAttribute("filter"),!st(this.data,"filter")):(i.filter=s.replace(l,""),!0):e)||(this.xn1&&(i.filter=s=s||"alpha(opacity="+t+")"),-1===s.indexOf("pacity")?0==t&&this.xn1||(i.filter=s+" alpha(opacity="+t+")"):i.filter=s.replace(L,"opacity="+t))}gt("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,s,n,r){var a=parseFloat(st(t,"opacity",b,!1,"1")),o=t.style,l="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+a),l&&1===a&&"hidden"===st(t,"visibility",b)&&0!==e&&(a=0),J?n=new dt(o,"opacity",a,e-a,n):((n=new dt(o,"opacity",100*a,100*(e-a),n)).xn1=l?1:0,o.zoom=1,n.type=2,n.b="alpha(opacity="+n.s+")",n.e="alpha(opacity="+(n.s+n.c)+")",n.data=t,n.plugin=r,n.setRatio=Ct),l&&((n=new dt(o,"visibility",0,0,n,-1,null,!1,0,0!==a?"inherit":"hidden",0===e?"hidden":"inherit")).xs0="inherit",s._overwriteProps.push(n.n),s._overwriteProps.push(i)),n}});function At(t,e){e&&(t.removeProperty?("ms"===e.substr(0,2)&&(e="M"+e.substr(1)),t.removeProperty(e.replace(z,"-$1").toLowerCase())):t.removeAttribute(e))}function Mt(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:At(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)}gt("className",{parser:function(t,e,i,s,n,r,a){var o,l,c,h=t.getAttribute("class")||"",u=t.style.cssText;if((n=s._classNamePT=new dt(t,i,0,0,n,2)).setRatio=Mt,n.pr=-11,d=!0,n.b=h,o=m(t,b),i=t._gsClassPT){for(l={},c=i.data;c;)l[c.p]=1,c=c._next;i.setRatio(1)}return(t._gsClassPT=n).e="="!==e.charAt(1)?e:h.replace(RegExp("\\s*\\b"+e.substr(2)+"\\b"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),s._tween._duration&&(t.setAttribute("class",n.e),a=g(t,o,m(t),a,l),t.setAttribute("class",h),n.data=a.firstMPT,t.style.cssText=u,n=n.xfirst=s.parse(t,a.difs,n,r)),n}});function Rt(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,s,n,r=this.t.style,a=_.transform.parse;if("all"===this.e)n=!(r.cssText="");else for(s=(e=this.e.split(",")).length;-1<--s;)i=e[s],_[i]&&(_[i].parse===a?n=!0:i="transformOrigin"===i?bt:_[i].p),At(r,i);n&&(At(r,yt),this.t._gsTransform&&delete this.t._gsTransform)}}for(gt("clearProps",{parser:function(t,e,i,s,n){return(n=new dt(t,i,0,0,n,2)).setRatio=Rt,n.e=e,n.pr=-10,n.data=s._tween,d=!0,n}}),t="bezier,throwProps,physicsProps,physics2D".split(","),ft=t.length;ft--;)!function(t){var l;_[t]||(l=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin",gt(t,{parser:function(t,e,i,s,n,r,a){var o=(window.GreenSockGlobals||window).com.greensock.plugins[l];return o?(o._cssRegister(),_[i].parse(t,e,i,s,n,r,a)):(f("Error: "+l+" js file not loaded."),n)}}))}(t[ft]);(t=N.prototype)._firstPT=null,t._onInitTween=function(t,e,i){if(!t.nodeType)return!1;this._target=t,this._tween=i,this._vars=e,O=e.autoRound,d=!1,x=e.suffixMap||N.suffixMap,b=it(t,""),u=this._overwriteProps;var s,n,r,a,o,l,i=t.style;if(c&&""===i.zIndex&&("auto"!==(l=st(t,"zIndex",b))&&""!==l||this._addLazySet(i,"zIndex",0)),"string"==typeof e&&(r=i.cssText,l=m(t,b),i.cssText=r+";"+e,l=g(t,l,m(t)).difs,!J&&X.test(e)&&(l.opacity=parseFloat(RegExp.$1)),e=l,i.cssText=r),this._firstPT=s=this.parse(t,e,null),this._transformType){for(l=3===this._transformType,yt?h&&(c=!0,""===i.zIndex&&("auto"!==(e=st(t,"zIndex",b))&&""!==e||this._addLazySet(i,"zIndex",0)),k&&this._addLazySet(i,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(l?"visible":"hidden"))):i.zoom=1,n=s;n&&n._next;)n=n._next;i=new dt(t,"transform",0,0,null,2),this._linkCSSP(i,null,n),i.setRatio=l&&Tt?St:yt?Ot:vt,i.data=this._transform||Pt(t,b,!0),u.pop()}if(d){for(;s;){for(o=s._next,n=r;n&&n.pr>s.pr;)n=n._next;(s._prev=n?n._prev:a)?s._prev._next=s:r=s,(s._next=n)?n._prev=s:a=s,s=o}this._firstPT=r}return!0},t.parse=function(t,e,i,s){var n,r,a,o,l,c,h,u,p=t.style;for(n in e)l=e[n],u=_[n],u?i=u.parse(t,l,n,this,i,s,e):(o=st(t,n,b)+"",h="string"==typeof l,"color"===n||"fill"===n||"stroke"===n||-1!==n.indexOf("Color")||h&&E.test(l)?(h||(l=S(l),l=(3s;s++)i+=n["xn"+s]+n["xs"+(s+1)];n.t[n.p]=i}else-1===n.type?n.t[n.p]=n.xs0:n.setRatio&&n.setRatio(t);else n.t[n.p]=e+n.xs0;n=n._next}else for(;n;)2!==n.type?n.t[n.p]=n.b:n.setRatio(t),n=n._next;else for(;n;)2!==n.type?n.t[n.p]=n.e:n.setRatio(t),n=n._next},t._enableTransforms=function(t){this._transformType=t||3===this._transformType?3:2,this._transform=this._transform||Pt(this._target,b,!0)};function It(){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)}t._addLazySet=function(t,e,i){e=this._firstPT=new dt(t,e,0,0,this._firstPT,2);e.e=i,e.setRatio=It,e.data=this},t._linkCSSP=function(t,e,i,s){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,s=!0),i?i._next=t:s||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},t._kill=function(t){var e,i,s,n=t;if(t.autoAlpha||t.alpha){for(i in n={},t)n[i]=t[i];n.opacity=1,n.autoAlpha&&(n.visibility=1)}return t.className&&(e=this._classNamePT)&&((s=e.xfirst)&&s._prev?this._linkCSSP(s._prev,e._next,s._prev._prev):s===this._firstPT&&(this._firstPT=e._next),e._next&&this._linkCSSP(e._next,e._next._next,s._prev),this._classNamePT=null),r.prototype._kill.call(this,n)};function Dt(t,e,i){var s,n,r,a;if(t.slice)for(n=t.length;-1<--n;)Dt(t[n],e,i);else for(n=(s=t.childNodes).length;-1<--n;)a=(r=s[n]).type,r.style&&(e.push(m(r)),i&&i.push(r)),1!==a&&9!==a&&11!==a||!r.childNodes.length||Dt(r,e,i)}return N.cascadeTo=function(t,e,i){var s,n,r,a=p.to(t,e,i),o=[a],l=[],c=[],h=[],u=p._internals.reservedProps;for(t=a._targets||a.target,Dt(t,l,h),a.render(e,!0),Dt(t,c),a.render(0,!0),a._enabled(!0),s=h.length;-1<--s;)if((n=g(h[s],l[s],c[s])).firstMPT){for(r in n=n.difs,i)u[r]&&(n[r]=i[r]);o.push(p.to(h[s],e,n))}return o},r.activate([N]),N},!0)}),window._gsDefine&&window._gsQueue.pop()()},{}],13:[function(t,e,i){"use strict";(window._gsQueue||(window._gsQueue=[])).push(function(){function n(t,e){var i="x"===e?"Width":"Height",s="scroll"+i,n="client"+i,e=document.body;return t===a||t===r||t===e?Math.max(r[s],e[s])-(a["inner"+i]||Math.max(r[n],e[n])):t[s]-t["offset"+i]}var r=document.documentElement,a=window,t=window._gsDefine.plugin({propName:"scrollTo",API:2,version:"1.7.3",init:function(t,e,i){return this._wdw=t===a,this._target=t,this._tween=i,this._autoKill=!1!==(e="object"!=typeof e?{y:e}:e).autoKill,this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=e.x?(this._addTween(this,"x",this.x,"max"===e.x?n(t,"x"):e.x,"scrollTo_x",!0),this._overwriteProps.push("scrollTo_x")):this.skipX=!0,null!=e.y?(this._addTween(this,"y",this.y,"max"===e.y?n(t,"y"):e.y,"scrollTo_y",!0),this._overwriteProps.push("scrollTo_y")):this.skipY=!0,!0},set:function(t){this._super.setRatio.call(this,t);var e=this._wdw||!this.skipX?this.getX():this.xPrev,i=this._wdw||!this.skipY?this.getY():this.yPrev,s=i-this.yPrev,t=e-this.xPrev;this._autoKill&&(!this.skipX&&(7e&&(this.skipX=!0),!this.skipY&&(7i&&(this.skipY=!0),this.skipX&&this.skipY&&this._tween.kill()),this._wdw?a.scrollTo(this.skipX?e:this.x,this.skipY?i:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),e=t.prototype;t.max=n,e.getX=function(){return this._wdw?null!=a.pageXOffset?a.pageXOffset:(null!=r.scrollLeft?r:document.body).scrollLeft:this._target.scrollLeft},e.getY=function(){return this._wdw?null!=a.pageYOffset?a.pageYOffset:(null!=r.scrollTop?r:document.body).scrollTop:this._target.scrollTop},e._kill=function(t){return t.scrollTo_x&&(this.skipX=!0),t.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,t)}}),window._gsDefine&&window._gsQueue.pop()()},{}]},{},[2]); //# sourceMappingURL=wpr-admin.js.map diff --git a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php index ec2bc6da1d..5881c65c11 100644 --- a/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php +++ b/inc/Engine/Optimization/RUCSS/Admin/Subscriber.php @@ -417,12 +417,12 @@ public function maybe_set_processing_transient( $old_value, $value ) { */ private function set_notice_transient() { set_transient( - 'rocket_rucss_processing', + 'rocket_saas_processing', time() + 90, 1.5 * MINUTE_IN_SECONDS ); - rocket_renew_box( 'rucss_success_notice' ); + rocket_renew_box( 'saas_success_notice' ); } /** diff --git a/inc/Engine/WPRocketUninstall.php b/inc/Engine/WPRocketUninstall.php index 5418043125..eec668fc7b 100644 --- a/inc/Engine/WPRocketUninstall.php +++ b/inc/Engine/WPRocketUninstall.php @@ -74,7 +74,7 @@ class WPRocketUninstall { 'wp_rocket_rucss_errors_count', 'wpr_dynamic_lists_incompatible_plugins', 'rocket_divi_notice', - 'rocket_rucss_processing', + 'rocket_saas_processing', 'rocket_mod_pagespeed_enabled', 'wp_rocket_pricing', 'wp_rocket_pricing_timeout', diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php index bafe333d9e..23d5f55cb6 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php @@ -58,14 +58,14 @@ public function testShouldDoExpected( $input ) { Functions\expect( 'set_transient' ) ->once() ->with( - 'rocket_rucss_processing', + 'rocket_saas_processing', Mockery::type( 'int' ), 90 ); Functions\expect( 'rocket_renew_box' ) ->once() - ->with( 'rucss_success_notice' ); + ->with( 'saas_success_notice' ); } else { $this->database ->shouldReceive( 'truncate_used_css_table' ) diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php index 267be24e96..ecceb06840 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php @@ -35,14 +35,14 @@ public function testShouldDoExpected( $input, $expected ) { Functions\expect( 'set_transient' ) ->once() ->with( - 'rocket_rucss_processing', + 'rocket_saas_processing', Mockery::type( 'int' ), 90 ); Functions\expect( 'rocket_renew_box' ) ->once() - ->with( 'rucss_success_notice' ); + ->with( 'saas_success_notice' ); } else { Functions\expect( 'set_transient' )->never(); Functions\expect( 'rocket_renew_box' )->never(); diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php index 0ade815351..741d23b180 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php @@ -64,8 +64,8 @@ protected function configureDeleteUsedCssRow($config) { } Actions\expectDone('rocket_after_clean_used_css'); - Functions\expect('set_transient')->with('rocket_rucss_processing', time() + 90, 1.5 * MINUTE_IN_SECONDS); + Functions\expect('set_transient')->with('rocket_saas_processing', time() + 90, 1.5 * MINUTE_IN_SECONDS); - Functions\expect('rocket_renew_box')->with('rucss_success_notice'); + Functions\expect('rocket_renew_box')->with('saas_success_notice'); } } From e523287935c08eca583ed04add8b447d541512dd Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Fri, 19 Apr 2024 09:40:28 +0100 Subject: [PATCH 095/167] fixed lint --- inc/Engine/Saas/Admin/Notices.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/Engine/Saas/Admin/Notices.php b/inc/Engine/Saas/Admin/Notices.php index aae51142d7..baf4c6e40f 100644 --- a/inc/Engine/Saas/Admin/Notices.php +++ b/inc/Engine/Saas/Admin/Notices.php @@ -144,8 +144,11 @@ public function display_success_notice() { $message = sprintf( // translators: %1$s = plugin name, %2$s = number of URLs, %3$s = number of seconds. - __( '%1$s: The LCP element has been optimized, and the images above the fold were excluded from lazyload. The Used CSS of your homepage has been processed. - WP Rocket will continue to generate Used CSS for up to %2$s URLs per %3$s second(s).', 'rocket' ), + __( + '%1$s: The LCP element has been optimized, and the images above the fold were excluded from lazyload. The Used CSS of your homepage has been processed. + WP Rocket will continue to generate Used CSS for up to %2$s URLs per %3$s second(s).', + 'rocket' + ), 'WP Rocket', apply_filters( 'rocket_rucss_pending_jobs_cron_rows_count', 100 ), apply_filters( 'rocket_rucss_pending_jobs_cron_interval', MINUTE_IN_SECONDS ) From e246da6c7d2e169e680e696767ce6a8f1398f731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Fri, 19 Apr 2024 16:13:25 -0400 Subject: [PATCH 096/167] Add unit test for add_clean_saas_menu_item() --- .../Admin/AdminBar/addCleanSaasMenuItem.php | 50 ++++++++++ .../Admin/AdminBar/addCleanSaasMenuItem.php | 92 +++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 tests/Fixtures/inc/Engine/Saas/Admin/AdminBar/addCleanSaasMenuItem.php create mode 100644 tests/Unit/inc/Engine/Saas/Admin/AdminBar/addCleanSaasMenuItem.php diff --git a/tests/Fixtures/inc/Engine/Saas/Admin/AdminBar/addCleanSaasMenuItem.php b/tests/Fixtures/inc/Engine/Saas/Admin/AdminBar/addCleanSaasMenuItem.php new file mode 100644 index 0000000000..ae980ac87e --- /dev/null +++ b/tests/Fixtures/inc/Engine/Saas/Admin/AdminBar/addCleanSaasMenuItem.php @@ -0,0 +1,50 @@ + [ + 'config' => [ + 'environment' => 'local', + 'is_admin' => false, + 'atf_context' => false, + 'remove_unused_css' => 0, + 'current_user_can' => true, + ], + 'expected' => null, + ], + 'testShouldReturnNullWhenNotAdmin' => [ + 'config' => [ + 'environment' => 'production', + 'is_admin' => false, + 'atf_context' => false, + 'remove_unused_css' => 0, + 'current_user_can' => true, + ], + 'expected' => null, + ], + 'testShouldAddItemWithDefaultTitle' => [ + 'config' => [ + 'environment' => 'production', + 'is_admin' => true, + 'atf_context' => true, + 'remove_unused_css' => 0, + 'current_user_can' => true, + ], + 'expected' => [ + 'id' => 'clean-saas', + 'title' => 'Clear Critical Images', + ], + ], + 'testShouldAddItemWithRUCSSTitle' => [ + 'config' => [ + 'environment' => 'production', + 'is_admin' => true, + 'atf_context' => true, + 'remove_unused_css' => 1, + 'current_user_can' => true, + ], + 'expected' => [ + 'id' => 'clean-saas', + 'title' => 'Clear Used CSS', + ], + ], +]; diff --git a/tests/Unit/inc/Engine/Saas/Admin/AdminBar/addCleanSaasMenuItem.php b/tests/Unit/inc/Engine/Saas/Admin/AdminBar/addCleanSaasMenuItem.php new file mode 100644 index 0000000000..12012ccf19 --- /dev/null +++ b/tests/Unit/inc/Engine/Saas/Admin/AdminBar/addCleanSaasMenuItem.php @@ -0,0 +1,92 @@ +options = Mockery::mock( Options_Data::class ); + $this->atf_context = Mockery::mock( ContextInterface::class ); + $this->rucss_url_context = Mockery::mock( ContextInterface::class ); + $this->admin_bar = new AdminBar( $this->options, $this->atf_context, $this->rucss_url_context, '' ); + $this->wp_admin_bar = new WP_Admin_Bar(); + + $this->stubTranslationFunctions(); + } + + /** + * @dataProvider configTestData + */ + public function testShouldDoExpected( $config, $expected ) { + Functions\when( 'wp_get_environment_type' ) + ->justReturn( $config['environment'] ); + Functions\when( 'is_admin' ) + ->justReturn( $config['is_admin'] ); + + $this->atf_context->shouldReceive( 'is_allowed' ) + ->andReturn( $config['atf_context'] ); + + $this->options->shouldReceive( 'get' ) + ->with( 'remove_unused_css', 0 ) + ->andReturn( $config['remove_unused_css'] ); + + Functions\when( 'current_user_can' ) + ->justReturn( $config['current_user_can'] ); + + Functions\when( 'wp_nonce_url' )->alias( + function ( $url ) { + return str_replace( '&', '&', "{$url}&_wpnonce=123456" ); + } + ); + + Functions\when( 'admin_url' )->alias( + function ( $path ) { + return "http://example.org/wp-admin/{$path}"; + } + ); + + $this->admin_bar->add_clean_saas_menu_item( $this->wp_admin_bar ); + + $node = $this->wp_admin_bar->get_node( 'clean-saas' ); + + if ( null === $expected ) { + $this->assertNull( $node ); + return; + } + + $this->assertSame( + $expected['id'], + $node->id + ); + + $this->assertSame( + $expected['title'], + $node->title + ); + } +} From b75d299c272f56d95adcfb78a130ff7cddbf08cc Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Mon, 22 Apr 2024 05:44:12 +0200 Subject: [PATCH 097/167] Add svg supports + fix isIntersecting --- assets/js/lcp-beacon.js | 91 ++++++++++++++++++--------------- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 53 insertions(+), 42 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index ee01cc6076..43f89876f0 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -23,23 +23,29 @@ function isDuplicateImage(image, performance_images) { } function isIntersecting(rect) { - // Check if the image is fully within the viewport + // Check if any part of the image is within the viewport return ( - rect.top >= 0 && - rect.left >= 0 && - rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && - rect.right <= (window.innerWidth || document.documentElement.clientWidth) + rect.bottom >= 0 && + rect.right >= 0 && + rect.top <= (window.innerHeight || document.documentElement.clientHeight) && + rect.left <= (window.innerWidth || document.documentElement.clientWidth) ); } -function LCPCandidates(count) { + function LCPCandidates(count) { const potentialCandidates = document.querySelectorAll( - "img, video, picture, p, main, div" + "img, video, picture, p, main, div, li, svg", ); + console.log('potentialCandidates', potentialCandidates); const topCandidates = []; potentialCandidates.forEach(( element ) => { + console.log('-------------------'); const rect = element.getBoundingClientRect(); + console.log('element', element); + console.log('rect.width', rect.width); + console.log('rect.height', rect.height); + console.log('isIntersecting( rect )', isIntersecting( rect )); if ( rect.width > 0 && rect.height > 0 && @@ -48,7 +54,10 @@ function LCPCandidates(count) { const visibleWidth = Math.min(rect.width, (window.innerWidth || document.documentElement.clientWidth) - rect.left); const visibleHeight = Math.min(rect.height, (window.innerHeight || document.documentElement.clientHeight) - rect.top); const area = visibleWidth * visibleHeight; + console.log('element', element); const elementInfo = getElementInfo(element); + + console.log('elementInfo', elementInfo); if (elementInfo !== null) { // Insert element into topCandidates in descending order of area for (let i = 0; i < topCandidates.length; i++) { @@ -87,6 +96,7 @@ function getElementInfo(element) { bg_set: [], current_src: "" }; + console.log('nodeName', nodeName); const css_bg_url_rgx = /url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/ig; @@ -100,10 +110,24 @@ function getElementInfo(element) { element_info.type = "img"; element_info.src = element.src; element_info.current_src = element.currentSrc; - } else if (nodeName === "video" && element.poster) { + } else if (nodeName === "video") { element_info.type = "img"; - element_info.src = element.poster; - element_info.current_src = element.poster; + if (element.poster) { + element_info.src = element.poster; + element_info.current_src = element.poster; + } else { + // Handle video without poster attribute + // For example, you might want to use the video's source URL + element_info.src = element.querySelector('source').src; + element_info.current_src = element.querySelector('source').src; + } + } else if (nodeName === "svg") { + const imageElement = element.querySelector('image'); + if (imageElement) { + element_info.type = "img"; + element_info.src = imageElement.getAttribute('href'); + element_info.current_src = imageElement.getAttribute('href'); + } } else if (nodeName === "picture") { element_info.type = "picture"; element_info.src = element.querySelector('img').src; @@ -152,6 +176,7 @@ function getElementInfo(element) { let performance_images = []; async function main() { + // Use LCPCandidates function to get the top 1 element in the viewport const filteredArray = LCPCandidates(1); if (filteredArray.length !== 0) { console.log("Estimated LCP element:", filteredArray); @@ -163,38 +188,24 @@ async function main() { console.log("No LCP candidate found."); } - var above_the_fold_images = document.querySelectorAll( - "img, video, picture, p, main, div" - ); + // Use LCPCandidates function to get all the elements in the viewport + const above_the_fold_images = LCPCandidates(Infinity); for (var i = 0; i < above_the_fold_images.length; i++) { - var image = above_the_fold_images[i]; - var rect = image.getBoundingClientRect(); - var intersecting = isIntersecting(rect); - if (intersecting) { - var parent = image.parentNode; - while (parent !== document) { - var displayStyle = window.getComputedStyle(parent).display; - var visibilityStyle = - window.getComputedStyle(parent).visibility; - if (displayStyle === "none" || visibilityStyle === "hidden") { - break; - } - parent = parent.parentNode; - } - // const isDuplicate = performance_images.some( - // (item) => item.src === image.src - // ); - const isDuplicate = isDuplicateImage(image, performance_images); - - // If it's not a duplicate, push the new element - if (!isDuplicate && parent === document) { - const elementInfo = getElementInfo(image); - performance_images.push({ - ...elementInfo, - label: "above-the-fold", - }); - } + var image = above_the_fold_images[i].element; + var elementInfo = above_the_fold_images[i].elementInfo; + + // const isDuplicate = performance_images.some( + // (item) => item.src === image.src + // ); + const isDuplicate = isDuplicateImage(image, performance_images); + + // If it's not a duplicate, push the new element + if (!isDuplicate) { + performance_images.push({ + ...elementInfo, + label: "above-the-fold", + }); } } console.log(performance_images); diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index f4bd68aa5b..1775f9ebe1 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function r(o,i,c){function s(t,e){if(!i[t]){if(!o[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=i[t]={exports:{}},o[t][0].call(n.exports,function(e){return s(o[t][1][e]||e)},n,n.exports,r,o,i,c)}return i[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const r=window.getComputedStyle(e,null),o=[r.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],i=o.filter(e=>\"none\"!==e).join(\"\");if(n.type=\"bg-img\",i.includes(\"image-set(\")&&(n.type=\"bg-img-set\"),!i||\"\"===i)return null;const c=[...i.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),n.bg_set.every(e=>\"\"===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:r}),i.length=Math.min(o,i.length);break}i.length({element:e.element,elementInfo:m(e.element)}))}(1);0!==e.length?(console.log(\"Estimated LCP element:\",e),u=e.map(e=>({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=document.querySelectorAll(\"img, video, picture, p, main, div\"),n=0;ne.src===n.src):\"bg-img\"===n.type||\"bg-img-set\"===n.type?t.some(e=>e.src===n.src):\"picture\"===n.type&&t.some(e=>e.src===n.src))})(r,u)||o!==document||(r=m(r),u.push({...r,label:\"above-the-fold\"}))}}console.log(u);var s=JSON.stringify(u);window.performance_images_json=s;const l=new FormData;l.append(\"action\",\"rocket_lcp\"),l.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),l.append(\"url\",rocket_lcp_data.url),l.append(\"is_mobile\",rocket_lcp_data.is_mobile),l.append(\"images\",s),l.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:l}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(r,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(r,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(o,c,s){function i(t,e){if(!c[t]){if(!o[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return i(o[t][1][e]||e)},r,r.exports,n,o,c,s)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{console.log(\"-------------------\");var e=t.getBoundingClientRect();if(console.log(\"element\",t),console.log(\"rect.width\",e.width),console.log(\"rect.height\",e.height),console.log(\"isIntersecting( rect )\",s(e)),0c[e].area){c.splice(e,0,{element:t,area:r,elementInfo:n}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:l(e.element)}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};console.log(\"nodeName\",t);if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t)r.type=\"img\",e.poster?(r.src=e.poster,r.current_src=e.poster):(r.src=e.querySelector(\"source\").src,r.current_src=e.querySelector(\"source\").src);else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\"),r.current_src=n.getAttribute(\"href\"))}else if(\"picture\"===t)r.type=\"picture\",r.src=e.querySelector(\"img\").src,r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset,media:e.media}));else{const o=window.getComputedStyle(e,null),c=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=c.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const i=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=i(1/0),r=0;re.src===r.src):\"bg-img\"===r.type||\"bg-img-set\"===r.type?t.some(e=>e.src===r.src):\"picture\"===r.type&&t.some(e=>e.src===r.src))})(n,a)||a.push({...o,label:\"above-the-fold\"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const s=new FormData;s.append(\"action\",\"rocket_lcp\"),s.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),s.append(\"url\",rocket_lcp_data.url),s.append(\"is_mobile\",rocket_lcp_data.is_mobile),s.append(\"images\",c),s.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index cb498d6815..2ef395c83b 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function r(o,i,c){function s(t,e){if(!i[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},o[t][0].call(n.exports,function(e){return s(o[t][1][e]||e)},n,n.exports,r,o,i,c)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e({srcset:e.srcset,media:e.media}));else{const r=window.getComputedStyle(e,null),o=[r.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],i=o.filter(e=>"none"!==e).join("");if(n.type="bg-img",i.includes("image-set(")&&(n.type="bg-img-set"),!i||""===i)return null;const c=[...i.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];n.bg_set=c.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),n.bg_set.every(e=>""===e.src)&&(n.bg_set=c.map(e=>e[1]?{src:e[1].trim()}:{})),0{var e=t.getBoundingClientRect();if(0i[e].area){i.splice(e,0,{element:t,area:n,elementInfo:r}),i.length=Math.min(o,i.length);break}i.length({element:e.element,elementInfo:m(e.element)}))}(1);0!==e.length?(console.log("Estimated LCP element:",e),u=e.map(e=>({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=document.querySelectorAll("img, video, picture, p, main, div"),n=0;ne.src===n.src):"bg-img"===n.type||"bg-img-set"===n.type?t.some(e=>e.src===n.src):"picture"===n.type&&t.some(e=>e.src===n.src))})(r,u)||o!==document||(r=m(r),u.push({...r,label:"above-the-fold"}))}}console.log(u);var s=JSON.stringify(u);window.performance_images_json=s;const l=new FormData;l.append("action","rocket_lcp"),l.append("rocket_lcp_nonce",rocket_lcp_data.nonce),l.append("url",rocket_lcp_data.url),l.append("is_mobile",rocket_lcp_data.is_mobile),l.append("images",s),l.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:l}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(r,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(r,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(o,c,s){function i(t,e){if(!c[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return i(o[t][1][e]||e)},r,r.exports,n,o,c,s)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{console.log("-------------------");var e=t.getBoundingClientRect();if(console.log("element",t),console.log("rect.width",e.width),console.log("rect.height",e.height),console.log("isIntersecting( rect )",s(e)),0c[e].area){c.splice(e,0,{element:t,area:r,elementInfo:n}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:l(e.element)}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};console.log("nodeName",t);if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t)r.type="img",e.poster?(r.src=e.poster,r.current_src=e.poster):(r.src=e.querySelector("source").src,r.current_src=e.querySelector("source").src);else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href"),r.current_src=n.getAttribute("href"))}else if("picture"===t)r.type="picture",r.src=e.querySelector("img").src,r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset,media:e.media}));else{const o=window.getComputedStyle(e,null),c=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=c.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const i=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=i(1/0),r=0;re.src===r.src):"bg-img"===r.type||"bg-img-set"===r.type?t.some(e=>e.src===r.src):"picture"===r.type&&t.some(e=>e.src===r.src))})(n,a)||a.push({...o,label:"above-the-fold"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const s=new FormData;s.append("action","rocket_lcp"),s.append("rocket_lcp_nonce",rocket_lcp_data.nonce),s.append("url",rocket_lcp_data.url),s.append("is_mobile",rocket_lcp_data.is_mobile),s.append("images",c),s.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From 36967aa1ac378d15357877c6049bb70281163d48 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Mon, 22 Apr 2024 11:02:11 +0100 Subject: [PATCH 098/167] :chore: Optimise LCP beacon script #6537 --- assets/js/lcp-beacon.js | 133 +++++++++++++------------------- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 55 insertions(+), 82 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index 43f89876f0..f8bb986802 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -5,21 +5,19 @@ function isDuplicateImage(image, performance_images) { return false; } - if (elementInfo.type === "img" || elementInfo.type === "img-srcset" || elementInfo.type === "video") { - return performance_images.some((item) => { - return item.src === elementInfo.src; - }); - } else if (elementInfo.type === "bg-img" || elementInfo.type === "bg-img-set") { - return performance_images.some((item) => { - return item.src === elementInfo.src; - }); - } else if (elementInfo.type === "picture") { - return performance_images.some((item) => { - return item.src === elementInfo.src; - }); - } + const isImageOrVideo = + elementInfo.type === "img" || + elementInfo.type === "img-srcset" || + elementInfo.type === "video"; + + const isBgImageOrPicture = + elementInfo.type === "bg-img" || + elementInfo.type === "bg-img-set" || + elementInfo.type === "picture"; - return false; + return ( + isImageOrVideo || isBgImageOrPicture + ) && performance_images.some(item => item.src === elementInfo.src); } function isIntersecting(rect) { @@ -32,57 +30,40 @@ function isIntersecting(rect) { ); } - function LCPCandidates(count) { - const potentialCandidates = document.querySelectorAll( +function LCPCandidates(count) { + const potentialCandidates = Array.from(document.querySelectorAll( "img, video, picture, p, main, div, li, svg", - ); - console.log('potentialCandidates', potentialCandidates); - const topCandidates = []; - - potentialCandidates.forEach(( element ) => { - console.log('-------------------'); - const rect = element.getBoundingClientRect(); - console.log('element', element); - console.log('rect.width', rect.width); - console.log('rect.height', rect.height); - console.log('isIntersecting( rect )', isIntersecting( rect )); - if ( - rect.width > 0 && - rect.height > 0 && - isIntersecting( rect ) - ) { - const visibleWidth = Math.min(rect.width, (window.innerWidth || document.documentElement.clientWidth) - rect.left); - const visibleHeight = Math.min(rect.height, (window.innerHeight || document.documentElement.clientHeight) - rect.top); - const area = visibleWidth * visibleHeight; - console.log('element', element); - const elementInfo = getElementInfo(element); - - console.log('elementInfo', elementInfo); - if (elementInfo !== null) { - // Insert element into topCandidates in descending order of area - for (let i = 0; i < topCandidates.length; i++) { - if (area > topCandidates[i].area) { - topCandidates.splice(i, 0, {element, area, elementInfo}); - topCandidates.length = Math.min( - count, - topCandidates.length - ); // Keep only specified number of elements - break; - } - } - // If topCandidates is not full, append - if (topCandidates.length < count) { - topCandidates.push({element, area, elementInfo}); - } - } - } - }); - - return topCandidates.map((candidate) => ({ + )); + + const topCandidates = potentialCandidates + .filter(element => { + const rect = element.getBoundingClientRect(); + return ( + rect.width > 0 && + rect.height > 0 && + isIntersecting(rect) + ); + }) + .map(element => ({ + element, + area: getArea(element), + elementInfo: getElementInfo(element), + })) + .sort((a, b) => b.area - a.area) + .slice(0, count); + + return topCandidates.map(candidate => ({ element: candidate.element, - elementInfo: getElementInfo(candidate.element), + elementInfo: candidate.elementInfo, })); +} +function getArea(element) { + const rect = element.getBoundingClientRect(); + const visibleWidth = Math.min(rect.width, (window.innerWidth || document.documentElement.clientWidth) - rect.left); + const visibleHeight = Math.min(rect.height, (window.innerHeight || document.documentElement.clientHeight) - rect.top); + + return visibleWidth * visibleHeight; } function getElementInfo(element) { @@ -96,7 +77,6 @@ function getElementInfo(element) { bg_set: [], current_src: "" }; - console.log('nodeName', nodeName); const css_bg_url_rgx = /url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/ig; @@ -112,31 +92,24 @@ function getElementInfo(element) { element_info.current_src = element.currentSrc; } else if (nodeName === "video") { element_info.type = "img"; - if (element.poster) { - element_info.src = element.poster; - element_info.current_src = element.poster; - } else { - // Handle video without poster attribute - // For example, you might want to use the video's source URL - element_info.src = element.querySelector('source').src; - element_info.current_src = element.querySelector('source').src; - } + const source = element.querySelector('source'); + element_info.src = element.poster || (source ? source.src : ''); + element_info.current_src = element_info.src; } else if (nodeName === "svg") { const imageElement = element.querySelector('image'); if (imageElement) { element_info.type = "img"; - element_info.src = imageElement.getAttribute('href'); - element_info.current_src = imageElement.getAttribute('href'); + element_info.src = imageElement.getAttribute('href') || ''; + element_info.current_src = element_info.src; } } else if (nodeName === "picture") { element_info.type = "picture"; - element_info.src = element.querySelector('img').src; - element_info.sources = Array.from(element.querySelectorAll('source')).map(source => { - return { - srcset: source.srcset, - media: source.media - }; - }); + const img = element.querySelector('img'); + element_info.src = img ? img.src : ""; + element_info.sources = Array.from(element.querySelectorAll('source')).map(source => ({ + srcset: source.srcset || '', + media: source.media || '' + })); } else { const computed_style = window.getComputedStyle(element, null); const bg_props = [ diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 1775f9ebe1..0a897d2b5b 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(o,c,s){function i(t,e){if(!c[t]){if(!o[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return i(o[t][1][e]||e)},r,r.exports,n,o,c,s)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{console.log(\"-------------------\");var e=t.getBoundingClientRect();if(console.log(\"element\",t),console.log(\"rect.width\",e.width),console.log(\"rect.height\",e.height),console.log(\"isIntersecting( rect )\",s(e)),0c[e].area){c.splice(e,0,{element:t,area:r,elementInfo:n}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:l(e.element)}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};console.log(\"nodeName\",t);if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t)r.type=\"img\",e.poster?(r.src=e.poster,r.current_src=e.poster):(r.src=e.querySelector(\"source\").src,r.current_src=e.querySelector(\"source\").src);else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\"),r.current_src=n.getAttribute(\"href\"))}else if(\"picture\"===t)r.type=\"picture\",r.src=e.querySelector(\"img\").src,r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset,media:e.media}));else{const o=window.getComputedStyle(e,null),c=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=c.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const i=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=i(1/0),r=0;re.src===r.src):\"bg-img\"===r.type||\"bg-img-set\"===r.type?t.some(e=>e.src===r.src):\"picture\"===r.type&&t.some(e=>e.src===r.src))})(n,a)||a.push({...o,label:\"above-the-fold\"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const s=new FormData;s.append(\"action\",\"rocket_lcp\"),s.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),s.append(\"url\",rocket_lcp_data.url),s.append(\"is_mobile\",rocket_lcp_data.is_mobile),s.append(\"images\",c),s.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return s(o[t][1][e]||e)},r,r.exports,n,o,c,i)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var e=e.getBoundingClientRect();return 0({element:e,area:function(e){var t=e.getBoundingClientRect(),e=Math.min(t.width,(window.innerWidth||document.documentElement.clientWidth)-t.left),t=Math.min(t.height,(window.innerHeight||document.documentElement.clientHeight)-t.top);return e*t}(e),elementInfo:l(e)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.element,elementInfo:e.elementInfo}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const o=e.querySelector(\"image\");o&&(r.type=\"img\",r.src=o.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const c=window.getComputedStyle(e,null),i=[c.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=s(1/0),r=0;re.src===r.src)})(n,a)||a.push({...o,label:\"above-the-fold\"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const i=new FormData;i.append(\"action\",\"rocket_lcp\"),i.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),i.append(\"url\",rocket_lcp_data.url),i.append(\"is_mobile\",rocket_lcp_data.is_mobile),i.append(\"images\",c),i.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:i}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index 2ef395c83b..850acca521 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(o,c,s){function i(t,e){if(!c[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return i(o[t][1][e]||e)},r,r.exports,n,o,c,s)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{console.log("-------------------");var e=t.getBoundingClientRect();if(console.log("element",t),console.log("rect.width",e.width),console.log("rect.height",e.height),console.log("isIntersecting( rect )",s(e)),0c[e].area){c.splice(e,0,{element:t,area:r,elementInfo:n}),c.length=Math.min(o,c.length);break}c.length({element:e.element,elementInfo:l(e.element)}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};console.log("nodeName",t);if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t)r.type="img",e.poster?(r.src=e.poster,r.current_src=e.poster):(r.src=e.querySelector("source").src,r.current_src=e.querySelector("source").src);else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href"),r.current_src=n.getAttribute("href"))}else if("picture"===t)r.type="picture",r.src=e.querySelector("img").src,r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset,media:e.media}));else{const o=window.getComputedStyle(e,null),c=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=c.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const i=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=i.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=i.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=i(1/0),r=0;re.src===r.src):"bg-img"===r.type||"bg-img-set"===r.type?t.some(e=>e.src===r.src):"picture"===r.type&&t.some(e=>e.src===r.src))})(n,a)||a.push({...o,label:"above-the-fold"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const s=new FormData;s.append("action","rocket_lcp"),s.append("rocket_lcp_nonce",rocket_lcp_data.nonce),s.append("url",rocket_lcp_data.url),s.append("is_mobile",rocket_lcp_data.is_mobile),s.append("images",c),s.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return s(o[t][1][e]||e)},r,r.exports,n,o,c,i)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{var e=e.getBoundingClientRect();return 0({element:e,area:function(e){var t=e.getBoundingClientRect(),e=Math.min(t.width,(window.innerWidth||document.documentElement.clientWidth)-t.left),t=Math.min(t.height,(window.innerHeight||document.documentElement.clientHeight)-t.top);return e*t}(e),elementInfo:l(e)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.element,elementInfo:e.elementInfo}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const o=e.querySelector("image");o&&(r.type="img",r.src=o.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const c=window.getComputedStyle(e,null),i=[c.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=s(1/0),r=0;re.src===r.src)})(n,a)||a.push({...o,label:"above-the-fold"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const i=new FormData;i.append("action","rocket_lcp"),i.append("rocket_lcp_nonce",rocket_lcp_data.nonce),i.append("url",rocket_lcp_data.url),i.append("is_mobile",rocket_lcp_data.is_mobile),i.append("images",c),i.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:i}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From 48e1129ceeb104b32914d7e4d15201c72daa2ce8 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Mon, 22 Apr 2024 12:12:34 +0100 Subject: [PATCH 099/167] :sparkles: add wpr filter for lcp/atf elements --- assets/js/lcp-beacon.js | 3 +- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- .../AboveTheFold/Frontend/Controller.php | 31 ++++++++++++++++++- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index f8bb986802..ef85dd4a65 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -32,7 +32,7 @@ function isIntersecting(rect) { function LCPCandidates(count) { const potentialCandidates = Array.from(document.querySelectorAll( - "img, video, picture, p, main, div, li, svg", + rocket_lcp_data.elements, )); const topCandidates = potentialCandidates @@ -186,7 +186,6 @@ async function main() { window.performance_images_json = performance_images_json; const data = new FormData(); - data.append('action', 'rocket_lcp'); data.append('rocket_lcp_nonce', rocket_lcp_data.nonce); data.append('url', rocket_lcp_data.url); diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 0a897d2b5b..224e267fae 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return s(o[t][1][e]||e)},r,r.exports,n,o,c,i)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var e=e.getBoundingClientRect();return 0({element:e,area:function(e){var t=e.getBoundingClientRect(),e=Math.min(t.width,(window.innerWidth||document.documentElement.clientWidth)-t.left),t=Math.min(t.height,(window.innerHeight||document.documentElement.clientHeight)-t.top);return e*t}(e),elementInfo:l(e)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.element,elementInfo:e.elementInfo}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const o=e.querySelector(\"image\");o&&(r.type=\"img\",r.src=o.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const c=window.getComputedStyle(e,null),i=[c.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=s(1/0),r=0;re.src===r.src)})(n,a)||a.push({...o,label:\"above-the-fold\"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const i=new FormData;i.append(\"action\",\"rocket_lcp\"),i.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),i.append(\"url\",rocket_lcp_data.url),i.append(\"is_mobile\",rocket_lcp_data.is_mobile),i.append(\"images\",c),i.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:i}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(o,c,s){function i(t,e){if(!c[t]){if(!o[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return i(o[t][1][e]||e)},r,r.exports,n,o,c,s)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var e=e.getBoundingClientRect();return 0({element:e,area:function(e){var t=e.getBoundingClientRect(),e=Math.min(t.width,(window.innerWidth||document.documentElement.clientWidth)-t.left),t=Math.min(t.height,(window.innerHeight||document.documentElement.clientHeight)-t.top);return e*t}(e),elementInfo:l(e)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.element,elementInfo:e.elementInfo}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const o=e.querySelector(\"image\");o&&(r.type=\"img\",r.src=o.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const c=window.getComputedStyle(e,null),s=[c.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],i=s.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",i.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!i||\"\"===i)return null;const l=[...i.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=i(1/0),r=0;re.src===r.src)})(n,a)||a.push({...o,label:\"above-the-fold\"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const s=new FormData;s.append(\"action\",\"rocket_lcp\"),s.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),s.append(\"url\",rocket_lcp_data.url),s.append(\"is_mobile\",rocket_lcp_data.is_mobile),s.append(\"images\",c),s.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index 850acca521..eea5f7b243 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(o,c,i){function s(t,e){if(!c[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return s(o[t][1][e]||e)},r,r.exports,n,o,c,i)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{var e=e.getBoundingClientRect();return 0({element:e,area:function(e){var t=e.getBoundingClientRect(),e=Math.min(t.width,(window.innerWidth||document.documentElement.clientWidth)-t.left),t=Math.min(t.height,(window.innerHeight||document.documentElement.clientHeight)-t.top);return e*t}(e),elementInfo:l(e)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.element,elementInfo:e.elementInfo}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const o=e.querySelector("image");o&&(r.type="img",r.src=o.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const c=window.getComputedStyle(e,null),i=[c.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=s(1/0),r=0;re.src===r.src)})(n,a)||a.push({...o,label:"above-the-fold"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const i=new FormData;i.append("action","rocket_lcp"),i.append("rocket_lcp_nonce",rocket_lcp_data.nonce),i.append("url",rocket_lcp_data.url),i.append("is_mobile",rocket_lcp_data.is_mobile),i.append("images",c),i.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:i}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(o,c,s){function i(t,e){if(!c[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return i(o[t][1][e]||e)},r,r.exports,n,o,c,s)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{var e=e.getBoundingClientRect();return 0({element:e,area:function(e){var t=e.getBoundingClientRect(),e=Math.min(t.width,(window.innerWidth||document.documentElement.clientWidth)-t.left),t=Math.min(t.height,(window.innerHeight||document.documentElement.clientHeight)-t.top);return e*t}(e),elementInfo:l(e)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.element,elementInfo:e.elementInfo}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const o=e.querySelector("image");o&&(r.type="img",r.src=o.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const c=window.getComputedStyle(e,null),s=[c.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],i=s.filter(e=>"none"!==e).join("");if(r.type="bg-img",i.includes("image-set(")&&(r.type="bg-img-set"),!i||""===i)return null;const l=[...i.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=i(1/0),r=0;re.src===r.src)})(n,a)||a.push({...o,label:"above-the-fold"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const s=new FormData;s.append("action","rocket_lcp"),s.append("rocket_lcp_nonce",rocket_lcp_data.nonce),s.append("url",rocket_lcp_data.url),s.append("is_mobile",rocket_lcp_data.is_mobile),s.append("images",c),s.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 7d4c378875..0811ae0bab 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -346,7 +346,7 @@ public function inject_beacon( $html, $url, $is_mobile ): string { $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; if ( ! $this->filesystem->exists( rocket_get_constant( 'WP_ROCKET_ASSETS_JS_PATH' ) . 'lcp-beacon' . $min . '.js' ) ) { - return $html; + //return $html; } $data = [ @@ -354,6 +354,7 @@ public function inject_beacon( $html, $url, $is_mobile ): string { 'nonce' => wp_create_nonce( 'rocket_lcp' ), 'url' => $url, 'is_mobile' => $is_mobile, + 'elements' => $this->lcp_atf_elements() ]; $inline_script = ''; @@ -419,4 +420,32 @@ private function generate_source_tags( $lcp, $start_tag, $end_tag ) { 'tag' => $tag, ]; } + + /** + * Pre-define the lcp/atf element + * + * @return string + */ + public function lcp_atf_elements(): string { + $elements = [ + 'img', 'video', 'picture', 'p', 'main', 'div', 'li', 'svg' + ]; + + $default_elements = $elements; + + /** + * Filters the array of elements + * + * @since 3.16 + * + * @param array $formats Array of elements + */ + $elements = apply_filters( 'rocket_above_the_fold_elements', $elements ); + + if ( ! is_array( $elements ) ) { + $elements = $default_elements; + } + + return implode( ', ', $elements ); + } } From a5600ca72e5b22959ede6049b1903c275094d94b Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Mon, 22 Apr 2024 12:55:22 +0100 Subject: [PATCH 100/167] Modified existing tests --- .../CDN/Subscriber/HTML/siteURL/rewrite.php | 2 +- .../HTML/siteURLWithPath/rewrite.php | 4 +-- .../Subscriber/HTML/output_w_beacon.html | 2 +- .../Minify/CSS/Subscriber/process.php | 12 ++++---- .../Minify/JS/Subscriber/process.php | 28 +++++++++---------- .../Hostings/WPEngine/Int/addFootprint.php | 6 ++-- ...disableImageDimensionsHeightPercentage.php | 4 +-- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php index ae56c50d2a..23f2d50141 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php @@ -1033,7 +1033,7 @@ class="logoSite show-for-large" - + diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php index 3fa6bfe13c..3fbab82448 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php @@ -718,8 +718,8 @@ - + - \ No newline at end of file + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html index 53d94d59a2..7cee7cf057 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html @@ -3,5 +3,5 @@ Test - + diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php index e263441e8c..177b5201a0 100644 --- a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php @@ -38,7 +38,7 @@ - + ', @@ -84,7 +84,7 @@ - + ', @@ -128,7 +128,7 @@ - + ', @@ -175,7 +175,7 @@ - + ', @@ -224,7 +224,7 @@ - + ', @@ -270,7 +270,7 @@ - + ', diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php index 734dadec4d..a064a27183 100644 --- a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php @@ -43,7 +43,7 @@ - + ', @@ -88,7 +88,7 @@ - + ', @@ -125,7 +125,7 @@ - + ', @@ -160,7 +160,7 @@ - + ', @@ -201,7 +201,7 @@ - + ', @@ -241,7 +241,7 @@ - + ', @@ -287,7 +287,7 @@ - + @@ -333,7 +333,7 @@ - + @@ -381,7 +381,7 @@ - + @@ -431,7 +431,7 @@ - + @@ -479,7 +479,7 @@ - + @@ -529,7 +529,7 @@ - + @@ -576,7 +576,7 @@ - + @@ -624,7 +624,7 @@ - + diff --git a/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php b/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php index d6cdde9776..38d7005697 100644 --- a/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php +++ b/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php @@ -7,7 +7,7 @@ '', 'expected' => 'Sample Page' . '' . - '' . + '' . "\n" . '', ], 'testWPEngineAddFootprintWithWhitelabel' => [ @@ -16,7 +16,7 @@ '', 'expected' => 'Sample Page' . '' . - '' . + '' . "\n" . '', ], 'testWPEngineAddFootprintNoHtmlShouldBailOut' => [ @@ -24,6 +24,6 @@ 'html' => 'Sample Page' . '', 'expected' => 'Sample Page' . - '', + '', ], ]; diff --git a/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php b/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php index 40a2e6d582..f424f71852 100644 --- a/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php +++ b/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php @@ -20,7 +20,7 @@ - + @@ -96,7 +96,7 @@ ], 'html' => [ 'original' => '', - 'expected' => '', + 'expected' => '', ], ], ], From 523ba6bfd10306d4ca37ba79b7b951481e0c0b09 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Mon, 22 Apr 2024 12:55:35 +0100 Subject: [PATCH 101/167] Uncomment code --- .../Media/AboveTheFold/Frontend/Controller.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 0811ae0bab..6a169cd5eb 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -346,7 +346,7 @@ public function inject_beacon( $html, $url, $is_mobile ): string { $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; if ( ! $this->filesystem->exists( rocket_get_constant( 'WP_ROCKET_ASSETS_JS_PATH' ) . 'lcp-beacon' . $min . '.js' ) ) { - //return $html; + return $html; } $data = [ @@ -354,7 +354,7 @@ public function inject_beacon( $html, $url, $is_mobile ): string { 'nonce' => wp_create_nonce( 'rocket_lcp' ), 'url' => $url, 'is_mobile' => $is_mobile, - 'elements' => $this->lcp_atf_elements() + 'elements' => $this->lcp_atf_elements(), ]; $inline_script = ''; @@ -428,7 +428,14 @@ private function generate_source_tags( $lcp, $start_tag, $end_tag ) { */ public function lcp_atf_elements(): string { $elements = [ - 'img', 'video', 'picture', 'p', 'main', 'div', 'li', 'svg' + 'img', + 'video', + 'picture', + 'p', + 'main', + 'div', + 'li', + 'svg', ]; $default_elements = $elements; From 7450f9579ff7f27b3a06aa871bf230a56963331a Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Mon, 22 Apr 2024 19:14:11 +0100 Subject: [PATCH 102/167] Optimise beacon script based on feedback #6537 --- assets/js/lcp-beacon.js | 97 ++++++++++++++++----------------- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 50 insertions(+), 51 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index ef85dd4a65..c48781af48 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -35,31 +35,34 @@ function LCPCandidates(count) { rocket_lcp_data.elements, )); - const topCandidates = potentialCandidates - .filter(element => { - const rect = element.getBoundingClientRect(); - return ( - rect.width > 0 && - rect.height > 0 && - isIntersecting(rect) - ); - }) - .map(element => ({ - element, - area: getArea(element), - elementInfo: getElementInfo(element), - })) - .sort((a, b) => b.area - a.area) - .slice(0, count); + const topCandidates = potentialCandidates.map(element => { + const rect = element.getBoundingClientRect(); + return { + element: element, + rect: rect, + }; + }).filter(item => { + return ( + item.rect.width > 0 && + item.rect.height > 0 && + isIntersecting(item.rect) + ); + }) + .map(item => ({ + item, + area: getArea(item.rect), + elementInfo: getElementInfo(item.element), + })) + .sort((a, b) => b.area - a.area) + .slice(0, count); return topCandidates.map(candidate => ({ - element: candidate.element, + element: candidate.item.element, elementInfo: candidate.elementInfo, })); } -function getArea(element) { - const rect = element.getBoundingClientRect(); +function getArea(rect) { const visibleWidth = Math.min(rect.width, (window.innerWidth || document.documentElement.clientWidth) - rect.left); const visibleHeight = Math.min(rect.height, (window.innerHeight || document.documentElement.clientHeight) - rect.top); @@ -104,7 +107,7 @@ function getElementInfo(element) { } } else if (nodeName === "picture") { element_info.type = "picture"; - const img = element.querySelector('img'); + const img = element.querySelector('img:not(picture>img)'); element_info.src = img ? img.src : ""; element_info.sources = Array.from(element.querySelectorAll('source')).map(source => ({ srcset: source.srcset || '', @@ -148,42 +151,38 @@ function getElementInfo(element) { let performance_images = []; -async function main() { - // Use LCPCandidates function to get the top 1 element in the viewport - const filteredArray = LCPCandidates(1); - if (filteredArray.length !== 0) { - console.log("Estimated LCP element:", filteredArray); - performance_images = filteredArray.map((item) => ({ - ...item.elementInfo, +function main() { + // Use LCPCandidates function to get all the elements in the viewport + const above_the_fold_images = LCPCandidates(Infinity); + + if (above_the_fold_images.length !== 0) { + // Get the first element in the viewport and use as LCP + performance_images = [{ + ...above_the_fold_images[0].elementInfo, label: "lcp", - })); + }]; } else { console.log("No LCP candidate found."); } - // Use LCPCandidates function to get all the elements in the viewport - const above_the_fold_images = LCPCandidates(Infinity); - - for (var i = 0; i < above_the_fold_images.length; i++) { - var image = above_the_fold_images[i].element; - var elementInfo = above_the_fold_images[i].elementInfo; + above_the_fold_images.forEach(({ element, elementInfo }) => { + const isDuplicate = isDuplicateImage(element, performance_images); - // const isDuplicate = performance_images.some( - // (item) => item.src === image.src - // ); - const isDuplicate = isDuplicateImage(image, performance_images); - - // If it's not a duplicate, push the new element if (!isDuplicate) { - performance_images.push({ - ...elementInfo, - label: "above-the-fold", - }); + performance_images.push({ ...elementInfo, label: "above-the-fold" }); } - } - console.log(performance_images); - var performance_images_json = JSON.stringify(performance_images); + }); + + let performance_images_json = JSON.stringify(performance_images); window.performance_images_json = performance_images_json; + const payload = { + action: 'rocket_lcp', + rocket_lcp_nonce: rocket_lcp_data.nonce, + url: rocket_lcp_data.url, + is_mobile: rocket_lcp_data.is_mobile, + images: performance_images_json, + status: 'success' + }; const data = new FormData(); data.append('action', 'rocket_lcp'); @@ -193,7 +192,7 @@ async function main() { data.append('images', performance_images_json); data.append('status', 'success'); - await fetch(rocket_lcp_data.ajax_url, { + fetch(rocket_lcp_data.ajax_url, { method: "POST", credentials: 'same-origin', body: data @@ -212,7 +211,7 @@ if (document.readyState !== 'loading') { setTimeout(main, 500); console.timeEnd("extract"); } else { - document.addEventListener("DOMContentLoaded", async function () { + document.addEventListener("DOMContentLoaded", function () { console.time("extract"); setTimeout(main, 500); console.timeEnd("extract"); diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 224e267fae..e7aee68169 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(o,c,s){function i(t,e){if(!c[t]){if(!o[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return i(o[t][1][e]||e)},r,r.exports,n,o,c,s)}return c[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var e=e.getBoundingClientRect();return 0({element:e,area:function(e){var t=e.getBoundingClientRect(),e=Math.min(t.width,(window.innerWidth||document.documentElement.clientWidth)-t.left),t=Math.min(t.height,(window.innerHeight||document.documentElement.clientHeight)-t.top);return e*t}(e),elementInfo:l(e)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.element,elementInfo:e.elementInfo}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const o=e.querySelector(\"image\");o&&(r.type=\"img\",r.src=o.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const c=window.getComputedStyle(e,null),s=[c.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],i=s.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",i.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!i||\"\"===i)return null;const l=[...i.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");for(var t=i(1/0),r=0;re.src===r.src)})(n,a)||a.push({...o,label:\"above-the-fold\"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const s=new FormData;s.append(\"action\",\"rocket_lcp\"),s.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),s.append(\"url\",rocket_lcp_data.url),s.append(\"is_mobile\",rocket_lcp_data.is_mobile),s.append(\"images\",c),s.append(\"status\",\"success\"),await fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",async function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:c(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function c(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0{var{element:t,elementInfo:e}=e;!function(e,t){const r=c(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,o)&&o.push({...e,label:\"above-the-fold\"})});var t=JSON.stringify(o);window.performance_images_json=t;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const r=new FormData;r.append(\"action\",\"rocket_lcp\"),r.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),r.append(\"url\",rocket_lcp_data.url),r.append(\"is_mobile\",rocket_lcp_data.is_mobile),r.append(\"images\",t),r.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:r}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(i,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(i,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index eea5f7b243..b747f478c1 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(o,c,s){function i(t,e){if(!c[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=c[t]={exports:{}},o[t][0].call(r.exports,function(e){return i(o[t][1][e]||e)},r,r.exports,n,o,c,s)}return c[t].exports}for(var l="function"==typeof require&&require,e=0;e{var e=e.getBoundingClientRect();return 0({element:e,area:function(e){var t=e.getBoundingClientRect(),e=Math.min(t.width,(window.innerWidth||document.documentElement.clientWidth)-t.left),t=Math.min(t.height,(window.innerHeight||document.documentElement.clientHeight)-t.top);return e*t}(e),elementInfo:l(e)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.element,elementInfo:e.elementInfo}))}function l(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const o=e.querySelector("image");o&&(r.type="img",r.src=o.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const c=window.getComputedStyle(e,null),s=[c.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],i=s.filter(e=>"none"!==e).join("");if(r.type="bg-img",i.includes("image-set(")&&(r.type="bg-img-set"),!i||""===i)return null;const l=[...i.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0({...e.elementInfo,label:"lcp"}))):console.log("No LCP candidate found.");for(var t=i(1/0),r=0;re.src===r.src)})(n,a)||a.push({...o,label:"above-the-fold"})}console.log(a);var c=JSON.stringify(a);window.performance_images_json=c;const s=new FormData;s.append("action","rocket_lcp"),s.append("rocket_lcp_nonce",rocket_lcp_data.nonce),s.append("url",rocket_lcp_data.url),s.append("is_mobile",rocket_lcp_data.is_mobile),s.append("images",c),s.append("status","success"),await fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:s}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",async function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:c(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function c(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0{var{element:t,elementInfo:e}=e;!function(e,t){const r=c(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,o)&&o.push({...e,label:"above-the-fold"})});var t=JSON.stringify(o);window.performance_images_json=t;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const r=new FormData;r.append("action","rocket_lcp"),r.append("rocket_lcp_nonce",rocket_lcp_data.nonce),r.append("url",rocket_lcp_data.url),r.append("is_mobile",rocket_lcp_data.is_mobile),r.append("images",t),r.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:r}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(i,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(i,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From 0b1dede8226364e89ca5c4440c52d7401ffacffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 22 Apr 2024 15:38:10 -0400 Subject: [PATCH 103/167] add safe guard for links limit filter value --- inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 7f463e3177..d460a65126 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -142,13 +142,20 @@ function ( $link ) use ( $home_url ) { // Remove duplicate links. $links = array_unique( $links ); + $default_limit = 10; + /** * Filters the number of links to return from the homepage. * - * @param int number of links to return. + * @param int $links_limit number of links to return. */ - $link_number = apply_filters( 'rocket_atf_warmup_links_number', 10 ); - $links = array_slice( $links, 0, $link_number ); + $links_limit = apply_filters( 'rocket_atf_warmup_links_number', $default_limit ); + + if ( ! is_int( $links_limit ) || $links_limit < 1 ) { + $links_limit = $default_limit; + } + + $links = array_slice( $links, 0, $links_limit ); // Add home url to the list of links. $links[] = home_url(); From 5a9d445cce668cd4b4478f657c4a916b391a1cf3 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Tue, 23 Apr 2024 09:34:48 +0100 Subject: [PATCH 104/167] Implement review --- assets/js/lcp-beacon.js | 7 ++++--- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index c48781af48..a3bf43cec7 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -155,10 +155,11 @@ function main() { // Use LCPCandidates function to get all the elements in the viewport const above_the_fold_images = LCPCandidates(Infinity); - if (above_the_fold_images.length !== 0) { - // Get the first element in the viewport and use as LCP + const firstElementWithInfo = above_the_fold_images.find(item => item.elementInfo !== null); + + if (firstElementWithInfo) { performance_images = [{ - ...above_the_fold_images[0].elementInfo, + ...firstElementWithInfo.elementInfo, label: "lcp", }]; } else { diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index e7aee68169..e9c7dd776a 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:c(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function c(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0{var{element:t,elementInfo:e}=e;!function(e,t){const r=c(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,o)&&o.push({...e,label:\"above-the-fold\"})});var t=JSON.stringify(o);window.performance_images_json=t;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const r=new FormData;r.append(\"action\",\"rocket_lcp\"),r.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),r.append(\"url\",rocket_lcp_data.url),r.append(\"is_mobile\",rocket_lcp_data.is_mobile),r.append(\"images\",t),r.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:r}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(i,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(i,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:c(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function c(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo);t?o=[{...t.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),e.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=c(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,o)&&o.push({...e,label:\"above-the-fold\"})});t=JSON.stringify(o);window.performance_images_json=t;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const r=new FormData;r.append(\"action\",\"rocket_lcp\"),r.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),r.append(\"url\",rocket_lcp_data.url),r.append(\"is_mobile\",rocket_lcp_data.is_mobile),r.append(\"images\",t),r.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:r}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(i,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(i,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index b747f478c1..cc53d770e6 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:c(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function c(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0{var{element:t,elementInfo:e}=e;!function(e,t){const r=c(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,o)&&o.push({...e,label:"above-the-fold"})});var t=JSON.stringify(o);window.performance_images_json=t;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const r=new FormData;r.append("action","rocket_lcp"),r.append("rocket_lcp_nonce",rocket_lcp_data.nonce),r.append("url",rocket_lcp_data.url),r.append("is_mobile",rocket_lcp_data.is_mobile),r.append("images",t),r.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:r}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(i,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(i,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:c(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function c(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo);t?o=[{...t.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),e.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=c(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,o)&&o.push({...e,label:"above-the-fold"})});t=JSON.stringify(o);window.performance_images_json=t;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const r=new FormData;r.append("action","rocket_lcp"),r.append("rocket_lcp_nonce",rocket_lcp_data.nonce),r.append("url",rocket_lcp_data.url),r.append("is_mobile",rocket_lcp_data.is_mobile),r.append("images",t),r.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:r}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(i,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(i,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From 29494acd6357a80b273310b7a00980a2b7590535 Mon Sep 17 00:00:00 2001 From: Mathieu Lamiot Date: Tue, 23 Apr 2024 12:07:13 +0200 Subject: [PATCH 105/167] =?UTF-8?q?Replace=C2=A0"@covers"=20with=20"Test?= =?UTF-8?q?=20class=20covering"=20on=20lcp/atf=20branch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/Integration/inc/API/bypass.php | 2 +- .../Integration/inc/Addon/Cloudflare/API/Client/delete.php | 2 +- tests/Integration/inc/Addon/Cloudflare/API/Client/get.php | 2 +- tests/Integration/inc/Addon/Cloudflare/API/Client/patch.php | 2 +- tests/Integration/inc/Addon/Cloudflare/API/Client/post.php | 2 +- .../Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php | 2 +- .../Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/getSettings.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/hasPageRule.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/isAuthValid.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/setDevMode.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/setMinify.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php | 2 +- .../inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php | 2 +- .../inc/Addon/Cloudflare/Subscriber/deactivateDevMode.php | 2 +- .../inc/Addon/Cloudflare/Subscriber/protocolRewrite.php | 2 +- .../Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php | 2 +- .../Cloudflare/Subscriber/saveCloudflareOldSettings.php | 2 +- .../inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php | 2 +- .../Cloudflare/Subscriber/setVarnishPurgeRequestHost.php | 2 +- .../inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php | 2 +- .../inc/Addon/Varnish/Subscriber/cleanDomain.php | 2 +- .../Integration/inc/Addon/Varnish/Subscriber/cleanFile.php | 2 +- .../Integration/inc/Addon/Varnish/Subscriber/cleanHome.php | 2 +- .../Integration/inc/Addon/WebP/Subscriber/convertToWebp.php | 2 +- .../inc/Engine/Admin/Beacon/Beacon/insertScript.php | 2 +- .../Deactivation/DeactivationIntent/activateSafeMode.php | 2 +- .../Admin/Deactivation/Subscriber/addDataAttribute.php | 2 +- .../Engine/Admin/Deactivation/Subscriber/addModalAssets.php | 2 +- .../Subscriber/insertDeactivationIntentForm.php | 2 +- .../Subscriber/addRegenerateConfigurationAction.php | 2 +- .../inc/Engine/Admin/Settings/Settings/sanitizeCallback.php | 4 ++-- .../Engine/Admin/Settings/Subscriber/asyncWistiaScript.php | 2 +- .../Admin/Settings/Subscriber/enqueueRocketScripts.php | 2 +- .../RocketCDN/AdminPageSubscriber/addSubscriptionModal.php | 2 +- .../AdminPageSubscriber/displayRocketcdnStatus.php | 2 +- .../AdminPageSubscriber/preserveAuthorizationToken.php | 2 +- .../CDN/RocketCDN/AdminPageSubscriber/purgeCdnCache.php | 2 +- .../CDN/RocketCDN/AdminPageSubscriber/rocketcdnField.php | 2 +- .../inc/Engine/CDN/RocketCDN/CDNOptionsManager/disable.php | 2 +- .../inc/Engine/CDN/RocketCDN/CDNOptionsManager/enable.php | 2 +- .../CDN/RocketCDN/NoticesSubscriber/addDismissScript.php | 2 +- .../CDN/RocketCDN/NoticesSubscriber/dismissNotice.php | 2 +- .../CDN/RocketCDN/NoticesSubscriber/displayRocketcdnCta.php | 2 +- .../RocketCDN/NoticesSubscriber/promoteRocketcdnNotice.php | 2 +- .../CDN/RocketCDN/NoticesSubscriber/purgeCacheNotice.php | 2 +- .../Engine/CDN/RocketCDN/NoticesSubscriber/toggleCta.php | 2 +- .../inc/Engine/CDN/RocketCDN/RESTSubscriber/disable.php | 2 +- .../inc/Engine/CDN/RocketCDN/RESTSubscriber/enable.php | 2 +- .../CDN/RocketCDN/RESTSubscriber/registerDisableRoute.php | 6 +++--- .../CDN/RocketCDN/RESTSubscriber/registerEnableRoute.php | 6 +++--- .../inc/Engine/CDN/Subscriber/addPreconnectCdn.php | 2 +- tests/Integration/inc/Engine/CDN/Subscriber/getCdnHosts.php | 2 +- .../inc/Engine/CDN/Subscriber/maybeReplaceUrl.php | 2 +- tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php | 2 +- .../inc/Engine/CDN/Subscriber/rewriteCssProperties.php | 2 +- .../Integration/inc/Engine/CDN/Subscriber/rewriteSrcset.php | 2 +- .../inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php | 2 +- .../Engine/Cache/AdminSubscriber/addWpCacheStatusTest.php | 2 +- .../inc/Engine/Cache/AdminSubscriber/maybeSetWpCache.php | 2 +- .../AdminSubscriber/noticeAdvancedCachePermissions.php | 2 +- .../Cache/AdminSubscriber/noticeWpConfigPermissions.php | 2 +- .../Engine/Cache/AdminSubscriber/registerTermsRowAction.php | 2 +- .../Integration/inc/Engine/Cache/AdvancedCache/activate.php | 2 +- .../inc/Engine/Cache/AdvancedCache/deactivate.php | 2 +- .../Engine/Cache/AdvancedCache/getAdvancedCacheContent.php | 2 +- .../inc/Engine/Cache/AdvancedCache/noticePermissions.php | 2 +- .../inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php | 2 +- .../ConfigSubscriber/changeCacheRejectUriWithPermalink.php | 2 +- .../PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php | 2 +- .../purgeCacheOnPublicSettingChange.php | 2 +- .../PurgeActionsSubscriber/purgeCacheRejectUriPartially.php | 2 +- .../Cache/PurgeActionsSubscriber/purgeDatesArchives.php | 2 +- .../Cache/PurgeActionsSubscriber/purgePostTermsUrls.php | 2 +- .../Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php | 2 +- .../PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php | 2 +- .../PurgeExpired/PurgeExpiredCache/updateLifespanValue.php | 2 +- .../Cache/PurgeExpired/Subscriber/getCacheLifespan.php | 2 +- .../Cache/PurgeExpired/Subscriber/getSubscribedEvents.php | 2 +- .../Engine/Cache/PurgeExpired/Subscriber/scheduleEvent.php | 2 +- .../Subscriber/updateLifespanOptionOnUpdate.php | 2 +- tests/Integration/inc/Engine/Cache/WPCache/activate.php | 2 +- tests/Integration/inc/Engine/Cache/WPCache/deactivate.php | 2 +- .../inc/Engine/Cache/WPCache/findWpconfigPath.php | 2 +- .../inc/Engine/Cache/WPCache/maybePreventDeactivation.php | 2 +- .../inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php | 2 +- .../inc/Engine/Cache/WPCache/setWpCacheConstant.php | 2 +- .../Integration/inc/Engine/Cache/WPCache/updateWPCache.php | 2 +- .../ExtractCSS/Subscriber/extractCssFilesFromHtml.php | 2 +- .../ExtractCSS/Subscriber/extractInlineCssFromHtml.php | 2 +- .../Common/JobManager/Cron/Subscriber/addInterval.php | 2 +- .../Common/JobManager/Cron/Subscriber/checkJobStatus.php | 2 +- .../Common/JobManager/Cron/Subscriber/cronCleanRows.php | 2 +- .../JobManager/Cron/Subscriber/cronRemoveFailedJobs.php | 2 +- .../JobManager/Cron/Subscriber/processOnSubmitJobs.php | 2 +- .../Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php | 2 +- .../JobManager/Cron/Subscriber/scheduleOnSubmitJobs.php | 2 +- .../JobManager/Cron/Subscriber/schedulePendingJobs.php | 2 +- .../Engine/CriticalPath/APIClient/sendGenerationRequest.php | 2 +- .../Admin/Subscriber/addAsyncCssMobileOption.php | 2 +- .../Admin/Subscriber/addHiddenAsyncCssMobile.php | 2 +- .../CriticalPath/Admin/Subscriber/addRegenerateMenuItem.php | 2 +- .../Engine/CriticalPath/Admin/Subscriber/cpcssHeartbeat.php | 2 +- .../Engine/CriticalPath/Admin/Subscriber/cpcssSection.php | 2 +- .../Admin/Subscriber/displayCpcssMobileSection.php | 2 +- .../CriticalPath/Admin/Subscriber/enableMobileCpcss.php | 2 +- .../Admin/Subscriber/enqueueAdminCpcssHeartbeatScript.php | 2 +- .../Admin/Subscriber/enqueueAdminEditScript.php | 2 +- .../Admin/Subscriber/setAsyncCssMobileDefaultValue.php | 2 +- .../Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php | 2 +- .../CriticalPath/CriticalCSS/getCriticalCssContent.php | 2 +- .../CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php | 2 +- .../Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php | 2 +- .../inc/Engine/CriticalPath/CriticalCSS/processHandler.php | 2 +- .../inc/Engine/CriticalPath/CriticalCSSGeneration/task.php | 2 +- .../CriticalPath/CriticalCSSSubscriber/deleteCpcss.php | 2 +- .../CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php | 2 +- .../generateCriticalCssOnActivation.php | 2 +- .../CriticalCSSSubscriber/initCriticalCssGeneration.php | 2 +- .../CriticalCSSSubscriber/insertCriticalCssBuffer.php | 2 +- .../CriticalCSSSubscriber/maybeGenerateCpcssMobile.php | 2 +- .../CriticalPath/CriticalCSSSubscriber/stopCpcssProcess.php | 2 +- .../CriticalPath/CriticalCSSSubscriber/switchToRucss.php | 2 +- .../CriticalCSSSubscriber/switchToRucssNotice.php | 2 +- .../inc/Engine/CriticalPath/DataManager/deleteCPCSS.php | 2 +- .../Engine/CriticalPath/DataManager/deleteCacheJobId.php | 2 +- .../inc/Engine/CriticalPath/DataManager/getCacheJobId.php | 2 +- .../inc/Engine/CriticalPath/DataManager/saveCPCSS.php | 2 +- .../inc/Engine/CriticalPath/DataManager/setCacheJobId.php | 2 +- .../CriticalPath/ProcessorService/processGenerate.php | 2 +- .../inc/Engine/CriticalPath/RESTWPPost/delete.php | 2 +- .../inc/Engine/CriticalPath/RESTWPPost/generate.php | 2 +- .../Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php | 2 +- .../CriticalPath/RESTWPPost/registerGenerateRoute.php | 2 +- .../inc/Engine/HealthCheck/HealthCheck/missedCron.php | 2 +- .../inc/Engine/License/API/PricingClient/getPricingData.php | 2 +- .../inc/Engine/License/API/UserClient/getUserData.php | 2 +- .../inc/Engine/License/Subscriber/addExpiredBubble.php | 2 +- .../Engine/License/Subscriber/addLicenseExpireWarning.php | 2 +- .../inc/Engine/License/Subscriber/addLocalizeScriptData.php | 2 +- .../inc/Engine/License/Subscriber/addNotificationBubble.php | 2 +- .../Engine/License/Subscriber/dismissNotificationBubble.php | 2 +- .../inc/Engine/License/Subscriber/dismissPromoBanner.php | 2 +- .../inc/Engine/License/Subscriber/dismissRenewalBanner.php | 2 +- .../inc/Engine/License/Subscriber/displayPromoBanner.php | 2 +- .../License/Subscriber/displayRenewalExpiredBanner.php | 2 +- .../Engine/License/Subscriber/displayRenewalSoonBanner.php | 2 +- .../inc/Engine/License/Subscriber/displayUpgradePopin.php | 2 +- .../inc/Engine/License/Subscriber/displayUpgradeSection.php | 2 +- .../inc/Engine/License/Subscriber/maybeDisableOcd.php | 2 +- .../Engine/License/Subscriber/setDashboardSeenTransient.php | 2 +- .../Media/AboveTheFold/AJAX/Subscriber/addLcpData.php | 2 +- .../AboveTheFold/Admin/Controller/truncateAtfAdmin.php | 2 +- .../Media/AboveTheFold/Cron/Subscriber/atfCleanup.php | 2 +- .../Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php | 2 +- .../inc/Engine/Media/EmojisSubscriber/disableEmoji.php | 2 +- .../Media/ImageDimensions/AdminSubscriber/addOption.php | 2 +- .../ImageDimensions/Subscriber/specifyImageDimensions.php | 2 +- .../inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php | 2 +- .../Lazyload/AdminSubscriber/sanitizeExcludeLazyload.php | 2 +- .../Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php | 2 +- .../Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php | 2 +- .../Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php | 2 +- .../CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php | 2 +- .../Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php | 2 +- .../inc/Engine/Media/Lazyload/Subscriber/addExclusions.php | 2 +- .../Media/Lazyload/Subscriber/insertLazyloadScript.php | 2 +- .../inc/Engine/Media/Lazyload/Subscriber/lazyload.php | 2 +- .../Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php | 2 +- .../Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php | 2 +- .../inc/Engine/Optimization/AssetsLocalCache/getContent.php | 2 +- .../CacheDynamicResource/cacheDynamicResource.php | 2 +- .../DeferJS/AdminSubscriber/addDeferJsOption.php | 2 +- .../DeferJS/AdminSubscriber/excludeJqueryDefer.php | 2 +- .../Optimization/DeferJS/Subscriber/deferInlineJs.php | 2 +- .../inc/Engine/Optimization/DeferJS/Subscriber/deferJs.php | 2 +- .../DeferJS/Subscriber/excludeJqueryCombine.php | 2 +- .../Optimization/DelayJS/Admin/Subscriber/addOptions.php | 2 +- .../DelayJS/Admin/Subscriber/maybeDisableCombineJs.php | 2 +- .../DelayJS/Admin/Subscriber/sanitizeOptions.php | 2 +- .../DelayJS/Admin/Subscriber/setOptionOnUpdate.php | 2 +- .../Optimization/DelayJS/Subscriber/addDelayJsScript.php | 2 +- .../inc/Engine/Optimization/DelayJS/Subscriber/delayJs.php | 2 +- .../Subscriber/Test_AddIncompatiblePluginsToDeactivate.php | 2 +- .../DynamicLists/Subscriber/addCacheIgnoredParameters.php | 2 +- .../DynamicLists/Subscriber/addCombineJsExcludedInline.php | 2 +- .../DynamicLists/Subscriber/addDynamicListsScript.php | 2 +- .../DynamicLists/Subscriber/addJsExcludeFiles.php | 2 +- .../DynamicLists/Subscriber/addMinifyExcludedExternalJs.php | 2 +- .../DynamicLists/Subscriber/addMoveAfterCombineJs.php | 2 +- .../DynamicLists/Subscriber/addPreloadExclusions.php | 2 +- .../DynamicLists/Subscriber/addStagingExclusions.php | 2 +- .../DynamicLists/Subscriber/clearScheduleListsUpdate.php | 2 +- .../DynamicLists/Subscriber/displayUpdateListsSection.php | 2 +- .../DynamicLists/Subscriber/registerRestRoute.php | 2 +- .../DynamicLists/Subscriber/scheduleListsUpdate.php | 2 +- .../Optimization/DynamicLists/Subscriber/updateLists.php | 2 +- .../Admin/Subscriber/displayGoogleFontsEnabler.php | 2 +- .../GoogleFonts/Admin/Subscriber/enableGoogleFonts.php | 2 +- .../Engine/Optimization/GoogleFonts/Combine/optimize.php | 2 +- .../Optimization/GoogleFonts/Subscriber/preconnect.php | 2 +- .../IEConditionalSubscriber/extractIeConditionals.php | 2 +- .../IEConditionalSubscriber/injectIeConditionals.php | 2 +- .../Optimization/Minify/AdminSubscriber/cleanMinifyAll.php | 2 +- .../Minify/CSS/AdminSubscriber/Test_onUpdate.php | 2 +- .../Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php | 2 +- .../Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php | 2 +- .../Engine/Optimization/Minify/CSS/Subscriber/onUpdate.php | 2 +- .../Engine/Optimization/Minify/CSS/Subscriber/process.php | 2 +- .../Engine/Optimization/Minify/JS/Subscriber/process.php | 2 +- .../Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php | 2 +- .../RUCSS/Admin/Database/truncateUsedCssTable.php | 2 +- .../RUCSS/Admin/OptionSubscriber/addOptionsFirstTime.php | 2 +- .../RUCSS/Admin/OptionSubscriber/sanitizeOptions.php | 2 +- .../RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php | 2 +- .../RUCSS/Admin/Subscriber/clearUsedcssResult.php | 2 +- .../RUCSS/Admin/Subscriber/deleteTermUsedCss.php | 2 +- .../Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php | 4 ++-- .../RUCSS/Admin/Subscriber/displayNoTableNotice.php | 2 +- .../RUCSS/Admin/Subscriber/maybeDeleteTransient.php | 2 +- .../Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php | 2 +- .../RUCSS/Admin/Subscriber/updateSafelistItems.php | 2 +- .../RUCSS/Frontend/Subscriber/maybeDisablePreloadFonts.php | 4 ++-- .../Optimization/RUCSS/Frontend/Subscriber/onUpdate.php | 2 +- .../Optimization/RUCSS/Frontend/Subscriber/treeshake.php | 2 +- .../inc/Engine/Plugin/RenewalNotice/renewalNotice.php | 2 +- .../Engine/Preload/Cron/Subscriber/processPendingUrls.php | 2 +- tests/Integration/inc/Engine/Preload/Fonts/preloadFonts.php | 2 +- .../inc/Engine/Preload/Frontend/Subscriber/parseSitemap.php | 2 +- .../inc/Engine/Preload/Frontend/Subscriber/preloadUrl.php | 2 +- .../Links/AdminSubscriber/addIncompatiblePlugins.php | 2 +- .../inc/Engine/Preload/Links/AdminSubscriber/addOption.php | 2 +- .../Engine/Preload/Links/Subscriber/addPreloadScript.php | 2 +- .../inc/Engine/Preload/Subscriber/cleanFullCache.php | 2 +- .../inc/Engine/Preload/Subscriber/cleanPartialCache.php | 2 +- .../Integration/inc/Engine/Preload/Subscriber/cleanUrls.php | 2 +- .../inc/Engine/Preload/Subscriber/deleteUrlOnNotFound.php | 2 +- .../inc/Engine/Preload/Subscriber/excludePrivatePostUri.php | 2 +- .../inc/Engine/Preload/Subscriber/loadInitialSitemap.php | 2 +- .../inc/Engine/Preload/Subscriber/updateCacheRow.php | 2 +- .../Integration/inc/Engine/Support/Data/getSupportData.php | 2 +- .../inc/Engine/Support/Subscriber/registerSupportRoute.php | 2 +- .../Integration/inc/Engine/WPRocketUninstall/uninstall.php | 2 +- .../inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php | 2 +- .../inc/ThirdParty/Hostings/Cloudways/varnishIP.php | 2 +- .../Hostings/Dreampress/removeHtaccessHtmlExpire.php | 2 +- .../ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php | 2 +- .../inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php | 2 +- .../inc/ThirdParty/Hostings/Godaddy/cleanDomain.php | 2 +- .../inc/ThirdParty/Hostings/Godaddy/cleanFile.php | 2 +- .../inc/ThirdParty/Hostings/Godaddy/cleanHome.php | 2 +- .../inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php | 2 +- .../inc/ThirdParty/Hostings/Godaddy/varnishField.php | 2 +- .../inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php | 2 +- .../inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php | 2 +- .../inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php | 2 +- .../inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php | 2 +- .../ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php | 2 +- .../ThirdParty/Hostings/LiteSpeed/litespeedCleanDomain.php | 2 +- .../ThirdParty/Hostings/LiteSpeed/litespeedCleanFile.php | 2 +- .../ThirdParty/Hostings/LiteSpeed/litespeedCleanHome.php | 2 +- .../inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php | 2 +- .../Hostings/O2Switch/removeHtaccessHtmlExpire.php | 2 +- .../Hostings/O2Switch/removeRegexFromPurgeUrl.php | 2 +- .../inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php | 2 +- .../inc/ThirdParty/Hostings/OneCom/disableCDNChange.php | 2 +- .../inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php | 2 +- .../Hostings/OneCom/maybeSetVarnishAddonTitle.php | 2 +- .../inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php | 2 +- .../inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php | 2 +- .../inc/ThirdParty/Hostings/Pressidium/cleanPost.php | 2 +- .../Hostings/Pressidium/clearCacheAfterPressidium.php | 2 +- .../Hostings/Pressidium/pressidiumVarnishField.php | 2 +- .../inc/ThirdParty/Hostings/Pressidium/purgeUrl.php | 2 +- .../Hostings/ProIsp/maybeSetVarnishAddonTitle.php | 2 +- .../inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php | 2 +- .../inc/ThirdParty/Hostings/SpinUpWP/removeActions.php | 2 +- .../inc/ThirdParty/Hostings/WPEngine/addFootprint.php | 2 +- .../inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php | 2 +- .../Hostings/WPEngine/runRocketBotAfterWPEngine.php | 2 +- .../inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php | 2 +- .../Hostings/WPXCloud/appendCacheControlHeader.php | 2 +- .../inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php | 2 +- .../inc/ThirdParty/Hostings/WPXCloud/varnishIP.php | 2 +- .../inc/ThirdParty/Hostings/WordPressCom/purgeWPCache.php | 2 +- .../ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php | 2 +- .../Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php | 2 +- .../Plugins/CDN/Cloudflare/addCdnHelperMessage.php | 2 +- .../Plugins/CDN/Cloudflare/disableCloudflareOption.php | 2 +- .../Plugins/CDN/Cloudflare/displayApoCacheNotice.php | 2 +- .../Plugins/CDN/Cloudflare/displayApoCookiesNotice.php | 2 +- .../CDN/Cloudflare/displayServerPushingModeNotice.php | 2 +- .../ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php | 2 +- .../ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php | 2 +- .../ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php | 2 +- .../WooCommerceSubscriber/reformatShopUrlForPreload.php | 2 +- .../showEmptyProductGalleryWithDelayJS.php | 2 +- .../showNotemptyProductGalleryWithDelayJS.php | 2 +- .../Plugins/I18n/TranslatePress/detectHomepage.php | 2 +- .../ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php | 2 +- .../Plugins/InlineRelatedPosts/excludeInlineFromRucss.php | 2 +- .../inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php | 2 +- .../inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php | 2 +- .../Plugins/Optimization/AMP/disableOptionsOnAmp.php | 2 +- .../Optimization/AMP/disableOptionsOnAmpWithCloudflare.php | 2 +- .../Plugins/Optimization/AMP/excludeScriptFromDelayJs.php | 2 +- .../Plugins/Optimization/AMP/isAmpCompatibleCallback.php | 2 +- .../warnWhenAggregateInlineCssAndCPCSSActive.php | 2 +- .../Autoptimize/warnWhenJsAggregationAndDelayJsActive.php | 2 +- .../ThirdParty/Plugins/Optimization/Ezoic/addConflict.php | 2 +- .../Plugins/Optimization/Ezoic/addExplanations.php | 2 +- .../Plugins/Optimization/Hummingbird/warningNotice.php | 2 +- .../Optimization/Perfmatters/disableRucssSetting.php | 2 +- .../Plugins/Optimization/RapidLoad/disableRucssSetting.php | 2 +- .../RocketLazyLoad/excludeRocketLazyLoadScript.php | 2 +- .../Plugins/Optimization/WPMeteor/disableDelayJs.php | 2 +- .../Optimization/WPMeteor/maybeDisableDelayJsField.php | 2 +- .../Plugins/PDFEmbedder/excludePDFEmbedderScripts.php | 2 +- .../PDFEmbedder/excludePDFEmbedderScriptsPremium.php | 2 +- .../Plugins/PDFEmbedder/excludePDFEmbedderScriptsSecure.php | 2 +- .../Plugins/PageBuilder/BeaverBuilder/purgeCache.php | 2 +- .../PageBuilder/Elementor/addFixAnimationsScript.php | 2 +- .../ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php | 2 +- .../ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php | 2 +- .../Plugins/PageBuilder/Elementor/excludePostCss.php | 2 +- .../ThirdParty/Plugins/RevolutionSlider/excludeDeferJs.php | 2 +- .../Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php | 2 +- .../ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php | 2 +- .../ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php | 2 +- .../Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php | 2 +- .../Plugins/Security/WordFence/popIpFromWhitelist.php | 2 +- .../inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php | 2 +- .../ThirdParty/Plugins/Security/WordFence/whitelistIPs.php | 2 +- .../inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php | 2 +- .../ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php | 2 +- .../Plugins/Smush/isSmushIframesLazyloadActive.php | 2 +- .../inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php | 2 +- .../Plugins/Smush/maybeDeactivateRocketLazyload.php | 2 +- .../TheEventsCalendar/excludeFromPreloadCalendars.php | 2 +- .../Plugins/UnlimitedElements/excludeInlineFromRucss.php | 2 +- .../ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php | 2 +- .../ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php | 2 +- .../Integration/inc/ThirdParty/Themes/Avada/cleanDomain.php | 2 +- .../inc/ThirdParty/Themes/Avada/excludeDeferJs.php | 2 +- .../inc/ThirdParty/Themes/Avada/excludeDelayJs.php | 2 +- .../inc/ThirdParty/Themes/Bridge/maybeClearCache.php | 2 +- .../inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php | 2 +- .../Themes/Divi/disableImageDimensionsHeightPercentage.php | 2 +- .../inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php | 2 +- .../inc/ThirdParty/Themes/Divi/handleSaveTemplate.php | 2 +- .../ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php | 2 +- .../inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php | 2 +- .../inc/ThirdParty/Themes/Flatsome/preservePatterns.php | 2 +- .../inc/ThirdParty/Themes/Jevelin/preservePatterns.php | 2 +- .../Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php | 2 +- .../Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php | 2 +- .../inc/ThirdParty/Themes/Uncode/excludeDelayJs.php | 2 +- .../Integration/inc/ThirdParty/Themes/Uncode/excludeJs.php | 2 +- .../inc/ThirdParty/Themes/Xstore/excludeInlineContent.php | 2 +- tests/Integration/inc/admin/rocketAfterSaveOptions.php | 2 +- tests/Integration/inc/admin/rocketFirstInstall.php | 2 +- tests/Integration/inc/admin/rocketNewUpgrade.php | 2 +- tests/Integration/inc/classes/Buffer/Tests/isSpeedTool.php | 2 +- .../Integration/inc/common/doAdminPostRocketPurgeCache.php | 2 +- .../Integration/inc/common/rocketCleanCacheThemeUpdate.php | 2 +- .../inc/common/rocketCleanPostCacheOnSlugChange.php | 2 +- tests/Integration/inc/common/rocketGetPurgeUrls.php | 2 +- tests/Integration/inc/common/rocketWidgetUpdateCallback.php | 2 +- tests/Integration/inc/functions/getRocketCacheRejectUri.php | 2 +- tests/Integration/inc/functions/getRocketI18nCode.php | 2 +- tests/Integration/inc/functions/getRocketI18nHomeUrl.php | 2 +- tests/Integration/inc/functions/getRocketI18nToPreserve.php | 2 +- tests/Integration/inc/functions/getRocketI18nUri.php | 2 +- tests/Integration/inc/functions/getRocketOption.php | 2 +- tests/Integration/inc/functions/getRocketParseUrl.php | 2 +- .../Integration/inc/functions/getRocketSamplePermalink.php | 2 +- .../inc/functions/isRocketGenerateCachingMobileFiles.php | 2 +- tests/Integration/inc/functions/rocketAddUrlProtocol.php | 2 +- tests/Integration/inc/functions/rocketCleanCacheBusting.php | 2 +- tests/Integration/inc/functions/rocketCleanDomain.php | 2 +- tests/Integration/inc/functions/rocketCleanFiles.php | 2 +- tests/Integration/inc/functions/rocketCleanMinify.php | 2 +- .../inc/functions/rocketDeleteLicenceDataFile.php | 2 +- .../Integration/inc/functions/rocketExtractUrlComponent.php | 2 +- .../inc/functions/rocketGenerateAdvancedCacheFile.php | 2 +- tests/Integration/inc/functions/rocketIsLiveSite.php | 2 +- tests/Integration/inc/functions/rocketIsPluginActive.php | 2 +- .../inc/functions/rocketIsPluginActiveForNetwork.php | 2 +- tests/Integration/inc/functions/rocketMkdirP.php | 2 +- tests/Integration/inc/functions/rocketPutContent.php | 2 +- tests/Integration/inc/functions/rocketRrmdir.php | 2 +- tests/Integration/inc/rocketActivation.php | 2 +- tests/Unit/inc/API/bypass.php | 2 +- tests/Unit/inc/Addon/Cloudflare/API/Client/delete.php | 2 +- tests/Unit/inc/Addon/Cloudflare/API/Client/get.php | 2 +- tests/Unit/inc/Addon/Cloudflare/API/Client/patch.php | 2 +- tests/Unit/inc/Addon/Cloudflare/API/Client/post.php | 2 +- .../Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php | 2 +- .../Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php | 2 +- tests/Unit/inc/Addon/Cloudflare/Auth/APIKey/getHeaders.php | 2 +- .../inc/Addon/Cloudflare/Auth/APIKey/isValidCredentials.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php | 2 +- tests/Unit/inc/Addon/Cloudflare/Cloudflare/getSettings.php | 2 +- tests/Unit/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php | 2 +- tests/Unit/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php | 2 +- tests/Unit/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php | 2 +- .../Unit/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php | 2 +- tests/Unit/inc/Addon/Cloudflare/Cloudflare/setDevMode.php | 2 +- tests/Unit/inc/Addon/Cloudflare/Cloudflare/setMinify.php | 2 +- .../inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php | 2 +- .../inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php | 2 +- tests/Unit/inc/Addon/Cloudflare/Subscriber/autoPurge.php | 2 +- .../Unit/inc/Addon/Cloudflare/Subscriber/autoPurgeByUrl.php | 2 +- .../inc/Addon/Cloudflare/Subscriber/deactivateDevmode.php | 2 +- .../inc/Addon/Cloudflare/Subscriber/protocolRewrite.php | 2 +- .../Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php | 2 +- .../inc/Addon/Cloudflare/Subscriber/purgeCacheNoDie.php | 2 +- .../Cloudflare/Subscriber/saveCloudflareOldSettings.php | 2 +- .../Addon/Cloudflare/Subscriber/saveCloudflareOptions.php | 2 +- .../inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php | 2 +- .../inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php | 2 +- .../Addon/WebP/AdminSubscriber/maybeDisableSettingField.php | 2 +- .../Addon/WebP/AdminSubscriber/webpSectionDescription.php | 2 +- tests/Unit/inc/Addon/WebP/Subscriber/convertToWebp.php | 2 +- .../inc/Addon/WebP/Subscriber/maybeDisableWebpCache.php | 2 +- .../WebP/Subscriber/syncWebpCacheWithThirdPartyPlugins.php | 2 +- .../ActionSchedulerSubscriber/hidePastdueStatusFilter.php | 2 +- tests/Unit/inc/Engine/Admin/Beacon/Beacon/getSuggest.php | 2 +- tests/Unit/inc/Engine/Admin/Beacon/Beacon/insertScript.php | 2 +- .../Deactivation/DeactivationIntent/activateSafeMode.php | 2 +- .../Deactivation/DeactivationIntent/addDataAttribute.php | 2 +- .../Deactivation/DeactivationIntent/addModalAssets.php | 2 +- .../Deactivation/DeactivationIntent/deactivateAndSnooze.php | 2 +- .../DeactivationIntent/insertDeactivationIntentForm.php | 2 +- .../Subscriber/addRegenerateConfigurationAction.php | 2 +- .../DomainChange/Subscriber/maybeCleanCacheDomainChange.php | 2 +- .../DomainChange/Subscriber/regenerateConfiguration.php | 2 +- .../inc/Engine/Admin/Settings/Page/asyncWistiaScript.php | 2 +- .../inc/Engine/Admin/Settings/Page/enqueueRocketScripts.php | 2 +- .../inc/Engine/Admin/Settings/Settings/sanitizeCallback.php | 2 +- tests/Unit/inc/Engine/CDN/CDN/rewrite.php | 2 +- tests/Unit/inc/Engine/CDN/CDN/rewriteCSSProperties.php | 2 +- tests/Unit/inc/Engine/CDN/CDN/rewriteSrcset.php | 2 +- tests/Unit/inc/Engine/CDN/CDN/rewriteURL.php | 2 +- tests/Unit/inc/Engine/CDN/Subscriber/getCdnHosts.php | 2 +- tests/Unit/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php | 2 +- .../inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php | 2 +- tests/Unit/inc/Engine/Cache/AdminSubscriber/onUpdate.php | 2 +- .../Engine/Cache/AdminSubscriber/registerTermsRowAction.php | 2 +- .../Engine/Cache/AdvancedCache/getAdvancedCacheContent.php | 2 +- .../inc/Engine/Cache/AdvancedCache/noticePermissions.php | 2 +- .../inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php | 2 +- .../ConfigSubscriber/changeCacheRejectUriWithPermalink.php | 2 +- .../inc/Engine/Cache/Purge/purgeCacheRejectUriPartially.php | 2 +- tests/Unit/inc/Engine/Cache/Purge/purgeDatesArchives.php | 2 +- tests/Unit/inc/Engine/Cache/Purge/purgePostTermsUrls.php | 2 +- .../PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php | 2 +- .../inc/Engine/Cache/PurgeActionsSubscriber/onUpdate.php | 2 +- .../Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php | 2 +- .../PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php | 2 +- .../PurgeExpired/PurgeExpiredCache/updateLifespanValue.php | 2 +- .../Unit/inc/Engine/Cache/WPCache/addWpCacheStatusTest.php | 2 +- tests/Unit/inc/Engine/Cache/WPCache/checkWpCacheValue.php | 2 +- .../inc/Engine/Cache/WPCache/maybePreventDeactivation.php | 2 +- tests/Unit/inc/Engine/Cache/WPCache/maybeSetWpCache.php | 2 +- .../inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php | 2 +- tests/Unit/inc/Engine/Cache/WPCache/setWpCacheConstant.php | 2 +- tests/Unit/inc/Engine/Cache/WPCache/updateWPCache.php | 2 +- tests/Unit/inc/Engine/Common/Ajax/AjaxHandler/redirect.php | 2 +- .../inc/Engine/Common/Ajax/AjaxHandler/validateReferer.php | 2 +- .../Unit/inc/Engine/Common/Cache/FilesystemCache/clear.php | 2 +- .../Unit/inc/Engine/Common/Cache/FilesystemCache/delete.php | 2 +- .../Engine/Common/Cache/FilesystemCache/deleteMultiple.php | 2 +- .../inc/Engine/Common/Cache/FilesystemCache/generateUrl.php | 2 +- tests/Unit/inc/Engine/Common/Cache/FilesystemCache/get.php | 2 +- .../inc/Engine/Common/Cache/FilesystemCache/getMultiple.php | 2 +- .../inc/Engine/Common/Cache/FilesystemCache/getRootPath.php | 2 +- tests/Unit/inc/Engine/Common/Cache/FilesystemCache/has.php | 2 +- .../Engine/Common/Cache/FilesystemCache/isAccessible.php | 2 +- tests/Unit/inc/Engine/Common/Cache/FilesystemCache/set.php | 2 +- .../inc/Engine/Common/Cache/FilesystemCache/setMultiple.php | 2 +- .../ExtractCSS/Subscriber/extractCssFilesFromHtml.php | 2 +- .../ExtractCSS/Subscriber/extractInlineCssFromHtml.php | 2 +- .../Common/JobManager/APIHandler/APIClient/addToQueue.php | 2 +- .../JobManager/APIHandler/APIClient/getQueueJobStatus.php | 2 +- .../Common/JobManager/Cron/Subscriber/cronCleanRows.php | 2 +- .../Strategy/Context/RetryContext/setStrategy.php | 2 +- .../Strategy/Strategies/DefaultProcess/execute.php | 2 +- .../JobManager/Strategy/Strategies/JobSetFail/execute.php | 2 +- .../Strategy/Strategies/ResetRetryProcess/execute.php | 2 +- .../inc/Engine/CriticalPath/APIClient/getJobDetails.php | 2 +- .../Engine/CriticalPath/APIClient/sendGenerationRequest.php | 2 +- .../CriticalPath/Admin/Admin/addRegenerateMenuItem.php | 2 +- .../inc/Engine/CriticalPath/Admin/Admin/cpcssHeartbeat.php | 2 +- .../Admin/Admin/enqueueAdminCpcssHeartbeatScript.php | 2 +- .../inc/Engine/CriticalPath/Admin/Post/cpcssActions.php | 2 +- .../inc/Engine/CriticalPath/Admin/Post/cpcssSection.php | 2 +- .../CriticalPath/Admin/Post/enqueueAdminEditScript.php | 2 +- .../CriticalPath/Admin/Settings/addAsyncCssMobileOption.php | 2 +- .../CriticalPath/Admin/Settings/addHiddenAsyncCssMobile.php | 2 +- .../Admin/Settings/displayCpcssMobileSection.php | 2 +- .../CriticalPath/Admin/Settings/enableMobileCpcss.php | 2 +- .../Admin/Settings/setAsyncCssMobileDefaultValue.php | 2 +- .../Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php | 2 +- .../CriticalPath/CriticalCSS/getCriticalCssContent.php | 2 +- .../CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php | 2 +- .../Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php | 2 +- .../inc/Engine/CriticalPath/CriticalCSS/processHandler.php | 2 +- .../inc/Engine/CriticalPath/CriticalCSSGeneration/task.php | 2 +- .../CriticalPath/CriticalCSSSubscriber/deleteCpcss.php | 2 +- .../CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php | 2 +- .../generateCriticalCssOnActivation.php | 2 +- .../CriticalCSSSubscriber/initCriticalCssGeneration.php | 2 +- .../CriticalCSSSubscriber/insertCriticalCssBuffer.php | 2 +- .../CriticalCSSSubscriber/maybeGenerateCpcssMobile.php | 2 +- .../CriticalPath/CriticalCSSSubscriber/switchToRucss.php | 2 +- .../CriticalCSSSubscriber/switchToRucssNotice.php | 2 +- .../inc/Engine/CriticalPath/DataManager/deleteCPCSS.php | 2 +- .../Engine/CriticalPath/DataManager/deleteCacheJobId.php | 2 +- .../inc/Engine/CriticalPath/DataManager/getCacheJobId.php | 2 +- .../Unit/inc/Engine/CriticalPath/DataManager/saveCPCSS.php | 2 +- .../inc/Engine/CriticalPath/DataManager/setCacheJobId.php | 2 +- .../CriticalPath/ProcessorService/processGenerate.php | 2 +- tests/Unit/inc/Engine/CriticalPath/RESTWPPost/delete.php | 2 +- tests/Unit/inc/Engine/CriticalPath/RESTWPPost/generate.php | 2 +- .../Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php | 2 +- .../CriticalPath/RESTWPPost/registerGenerateRoute.php | 2 +- tests/Unit/inc/Engine/Debug/Resolver/getServices.php | 2 +- .../ActionSchedulerCheck/checkOnUpdateOptions.php | 2 +- .../ActionSchedulerCheck/maybeRecreateAsTables.php | 2 +- .../Unit/inc/Engine/HealthCheck/HealthCheck/missedCron.php | 2 +- .../inc/Engine/License/API/Pricing/getInfinitePricing.php | 2 +- .../Engine/License/API/Pricing/getInfiniteWebsitesCount.php | 2 +- .../Unit/inc/Engine/License/API/Pricing/getPlusPricing.php | 2 +- .../Engine/License/API/Pricing/getPlusToInfinitePrice.php | 2 +- .../inc/Engine/License/API/Pricing/getPlusWebsitesCount.php | 2 +- tests/Unit/inc/Engine/License/API/Pricing/getPromoData.php | 2 +- tests/Unit/inc/Engine/License/API/Pricing/getPromoEnd.php | 2 +- .../License/API/Pricing/getRegularPlusToInfinitePrice.php | 2 +- .../License/API/Pricing/getRegularSingleToInfinitePrice.php | 2 +- .../License/API/Pricing/getRegularSingleToPlusPrice.php | 2 +- .../Unit/inc/Engine/License/API/Pricing/getRenewalsData.php | 2 +- .../inc/Engine/License/API/Pricing/getSinglePricing.php | 2 +- .../Engine/License/API/Pricing/getSingleToInfinitePrice.php | 2 +- .../inc/Engine/License/API/Pricing/getSingleToPlusPrice.php | 2 +- .../Engine/License/API/Pricing/getSingleWebsitesCount.php | 2 +- tests/Unit/inc/Engine/License/API/Pricing/isPromoActive.php | 2 +- .../inc/Engine/License/API/PricingClient/getPricingData.php | 2 +- .../Engine/License/API/User/IsLicenseExpiredGracePeriod.php | 2 +- tests/Unit/inc/Engine/License/API/User/getCreationDate.php | 2 +- .../inc/Engine/License/API/User/getLicenseExpiration.php | 2 +- tests/Unit/inc/Engine/License/API/User/getLicenseType.php | 2 +- .../inc/Engine/License/API/User/getUpgradeInfiniteUrl.php | 2 +- .../Unit/inc/Engine/License/API/User/getUpgradePlusUrl.php | 2 +- tests/Unit/inc/Engine/License/API/User/isAutoRenew.php | 2 +- tests/Unit/inc/Engine/License/API/User/isLicenseExpired.php | 2 +- .../Unit/inc/Engine/License/API/UserClient/getUserData.php | 2 +- tests/Unit/inc/Engine/License/Renewal/addExpiredBubble.php | 2 +- .../inc/Engine/License/Renewal/addLicenseExpireWarning.php | 2 +- .../inc/Engine/License/Renewal/addLocalizeScriptData.php | 2 +- .../Engine/License/Renewal/dismissRenewalExpiredBanner.php | 2 +- .../Engine/License/Renewal/displayRenewalExpiredBanner.php | 2 +- .../inc/Engine/License/Renewal/displayRenewalSoonBanner.php | 2 +- tests/Unit/inc/Engine/License/Renewal/maybeDisableOcd.php | 2 +- .../Engine/License/Renewal/setDashboardSeenTransient.php | 2 +- .../inc/Engine/License/Upgrade/addLocalizeScriptData.php | 2 +- .../inc/Engine/License/Upgrade/addNotificationBubble.php | 2 +- .../Engine/License/Upgrade/dismissNotificationBubble.php | 2 +- .../Unit/inc/Engine/License/Upgrade/dismissPromoBanner.php | 2 +- .../Unit/inc/Engine/License/Upgrade/displayPromoBanner.php | 2 +- .../Unit/inc/Engine/License/Upgrade/displayUpgradePopin.php | 2 +- .../inc/Engine/License/Upgrade/displayUpgradeSection.php | 2 +- .../Media/AboveTheFold/AJAX/Controller/addLcpData.php | 2 +- .../Media/AboveTheFold/Admin/Controller/deletePostAtf.php | 2 +- .../Media/AboveTheFold/Admin/Controller/deleteTermAtf.php | 2 +- .../Media/AboveTheFold/Admin/Controller/truncateAtf.php | 2 +- .../AboveTheFold/Frontend/Controller/addExclusions.php | 2 +- .../Media/AboveTheFold/WarmUp/Controller/fetchLinks.php | 2 +- .../Media/ImageDimensions/ImageDimensions/addOption.php | 2 +- .../ImageDimensions/specifyImageDimensions.php | 2 +- .../inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php | 2 +- .../Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php | 2 +- .../Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php | 2 +- .../Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php | 2 +- .../Media/Lazyload/CSS/Front/ContentFetcher/fetch.php | 2 +- .../Engine/Media/Lazyload/CSS/Front/Extractor/extract.php | 2 +- .../Media/Lazyload/CSS/Front/FileResolver/resolve.php | 2 +- .../Media/Lazyload/CSS/Front/MappingFormatter/format.php | 2 +- .../Media/Lazyload/CSS/Front/RuleFormatter/format.php | 2 +- .../Media/Lazyload/CSS/Front/TagGenerator/generate.php | 2 +- .../inc/Engine/Media/Lazyload/CSS/Subscriber/addLazyTag.php | 2 +- .../Media/Lazyload/CSS/Subscriber/clearGeneratedCss.php | 2 +- .../Media/Lazyload/CSS/Subscriber/createLazyCssFiles.php | 2 +- .../Media/Lazyload/CSS/Subscriber/createLazyInlineCss.php | 2 +- .../CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php | 2 +- .../Media/Lazyload/CSS/Subscriber/insertLazyloadScript.php | 2 +- .../Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php | 2 +- .../inc/Engine/Media/Lazyload/Subscriber/addExclusions.php | 2 +- .../Media/Lazyload/Subscriber/insertLazyloadScript.php | 2 +- .../Unit/inc/Engine/Media/Lazyload/Subscriber/lazyload.php | 2 +- .../Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php | 2 +- .../Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php | 2 +- .../inc/Engine/Optimization/AssetsLocalCache/getContent.php | 2 +- .../Optimization/AssetsLocalCache/validateIntegrity.php | 2 +- .../Engine/Optimization/CSSTraitApplyFontDisplaySwap.php | 2 +- .../Optimization/CacheDynamicResource/isExcludedFile.php | 2 +- .../inc/Engine/Optimization/DeferJS/DeferJS/addOption.php | 2 +- .../Engine/Optimization/DeferJS/DeferJS/deferInlineJs.php | 2 +- .../inc/Engine/Optimization/DeferJS/DeferJS/deferJs.php | 2 +- .../Optimization/DeferJS/DeferJS/excludeJqueryCombine.php | 2 +- .../Optimization/DeferJS/DeferJS/excludeJqueryUpgrade.php | 2 +- .../inc/Engine/Optimization/DeferJS/DeferJS/getExcluded.php | 2 +- .../Optimization/DelayJS/Admin/Settings/addOptions.php | 2 +- .../DelayJS/Admin/Settings/maybeDisableCombineJs.php | 2 +- .../Optimization/DelayJS/Admin/Settings/sanitizeOptions.php | 2 +- .../DelayJS/Admin/Settings/setOptionOnUpdate.php | 2 +- tests/Unit/inc/Engine/Optimization/DelayJS/HTML/delayJs.php | 2 +- .../Optimization/DynamicLists/DataManager/getLists.php | 2 +- .../Optimization/DynamicLists/DataManager/getListsHash.php | 2 +- .../DynamicLists/DataManager/saveDynamicLists.php | 2 +- .../DynamicLists/DynamicLists/clearScheduleListsUpdate.php | 2 +- .../DynamicLists/DynamicLists/getCacheIgnoredParameters.php | 2 +- .../DynamicLists/getCombineJsExcludedInline.php | 2 +- .../DynamicLists/DynamicLists/getIncompatiblePlugins.php | 2 +- .../DynamicLists/DynamicLists/getJsExcludeFiles.php | 2 +- .../DynamicLists/getJsMinifyExcludedExternal.php | 2 +- .../DynamicLists/DynamicLists/getJsMoveAfterCombine.php | 2 +- .../DynamicLists/DynamicLists/getPreloadExclusions.php | 2 +- .../Optimization/DynamicLists/DynamicLists/getStagings.php | 2 +- .../DynamicLists/DynamicLists/registerRestRoute.php | 2 +- .../DynamicLists/DynamicLists/restUpdateResponse.php | 2 +- .../DynamicLists/DynamicLists/scheduleListsUpdate.php | 2 +- .../DynamicLists/DynamicLists/updateListsFromRemote.php | 2 +- .../IncompatiblePluginsLists/DataManager/getPluginsList.php | 2 +- .../DynamicLists/Subscriber/addDynamicListsScript.php | 2 +- .../Admin/Settings/displayGoogleFontsEnabler.php | 2 +- .../GoogleFonts/Admin/Settings/enableGoogleFonts.php | 2 +- .../Engine/Optimization/GoogleFonts/Combine/optimize.php | 2 +- .../Engine/Optimization/GoogleFonts/CombineV2/optimize.php | 2 +- .../Optimization/GoogleFonts/Subscriber/preconnect.php | 2 +- .../IEConditionalSubscriber/extractIeConditionals.php | 2 +- .../IEConditionalSubscriber/injectIeConditionals.php | 2 +- .../Optimization/Minify/AdminSubscriber/cleanMinifyAll.php | 2 +- .../Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php | 2 +- .../Optimization/Minify/CSS/AdminSubscriber/onUpdate.php | 2 +- .../Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php | 2 +- .../inc/Engine/Optimization/Minify/CSS/Minify/optimize.php | 2 +- .../inc/Engine/Optimization/Minify/JS/Combine/optimize.php | 2 +- .../inc/Engine/Optimization/Minify/JS/Minify/optimize.php | 2 +- .../Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php | 2 +- .../RUCSS/Admin/Database/dropResourcesTable.php | 2 +- .../RUCSS/Admin/Database/dropRucssDatabaseTables.php | 2 +- .../RUCSS/Admin/Database/truncateUsedCssTable.php | 2 +- .../Engine/Optimization/RUCSS/Admin/Settings/addOptions.php | 2 +- .../RUCSS/Admin/Settings/displayNoTableNotice.php | 2 +- .../Optimization/RUCSS/Admin/Settings/sanitizeOptions.php | 2 +- .../RUCSS/Admin/Settings/updateSafelistItems.php | 2 +- .../RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php | 2 +- .../RUCSS/Admin/Subscriber/deleteTermUsedCss.php | 2 +- .../Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php | 2 +- .../RUCSS/Admin/Subscriber/maybeDeleteTransient.php | 2 +- .../RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php | 2 +- .../Optimization/RUCSS/Admin/Subscriber/spawnCron.php | 2 +- .../Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php | 2 +- .../RUCSS/Controller/Filesystem/deleteAllUsedCss.php | 2 +- .../RUCSS/Controller/Filesystem/deleteUsedCss.php | 2 +- .../Optimization/RUCSS/Controller/Filesystem/getUsedCss.php | 2 +- .../RUCSS/Controller/Filesystem/writeUsedCss.php | 2 +- .../Optimization/RUCSS/Controller/UsedCSS/treeshake.php | 2 +- .../RUCSS/Database/Queries/UsedCSS/createNewJob.php | 2 +- .../RUCSS/Database/Queries/UsedCSS/resetJob.php | 2 +- .../Optimization/RUCSS/Frontend/Subscriber/onInstall.php | 2 +- .../Optimization/RUCSS/Frontend/Subscriber/onUpdate.php | 2 +- .../Plugin/InformationSubscriber/addPluginsToResult.php | 2 +- .../Unit/inc/Engine/Plugin/RenewalNotice/renewalNotice.php | 2 +- .../Preload/Admin/Settings/maybeDisplayPreloadNotice.php | 2 +- .../Preload/Controller/CheckFinished/checkFinished.php | 2 +- .../inc/Engine/Preload/Controller/ClearCache/fullClean.php | 2 +- .../Engine/Preload/Controller/ClearCache/partialClean.php | 2 +- .../Preload/Controller/LoadInitialSitemap/cancelPreload.php | 2 +- .../Controller/LoadInitialSitemap/loadInitialSitemap.php | 2 +- .../Controller/PreloadUrl/getMobileUserAgentPrefix.php | 2 +- .../Preload/Controller/PreloadUrl/isAlreadyCached.php | 2 +- .../inc/Engine/Preload/Controller/PreloadUrl/preloadUrl.php | 2 +- .../Preload/Controller/PreloadUrl/processPendingJobs.php | 2 +- .../Unit/inc/Engine/Preload/Cron/Subscriber/addInterval.php | 2 +- .../Preload/Cron/Subscriber/addRevertOldFailedInterval.php | 2 +- .../Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php | 2 +- .../Engine/Preload/Cron/Subscriber/schedulePendingJobs.php | 2 +- .../Preload/Cron/Subscriber/scheduleRevertOldFailedRows.php | 2 +- .../Preload/Database/Queries/Cache/createOrNothing.php | 2 +- .../Preload/Database/Queries/Cache/createOrUpdate.php | 2 +- .../Engine/Preload/Database/Queries/Cache/deleteByUrl.php | 2 +- .../Preload/Database/Queries/Cache/getPendingJobs.php | 2 +- .../Engine/Preload/Database/Queries/Cache/getRowsByUrl.php | 2 +- .../Engine/Preload/Database/Queries/Cache/isPreloaded.php | 2 +- .../Preload/Database/Queries/Cache/makeStatusComplete.php | 2 +- .../Database/Queries/Cache/removeAllNotAccessedRows.php | 2 +- .../Preload/Database/Queries/Cache/revertInProgress.php | 2 +- tests/Unit/inc/Engine/Preload/Fonts/preloadFonts.php | 2 +- .../Engine/Preload/Frontend/FetchSitemap/parseSitemap.php | 2 +- .../inc/Engine/Preload/Frontend/SitemapParser/getLinks.php | 2 +- .../Links/AdminSubscriber/addIncompatiblePlugins.php | 2 +- .../inc/Engine/Preload/Links/AdminSubscriber/addOption.php | 2 +- .../inc/Engine/Preload/Subscriber/excludePrivatePostUri.php | 2 +- .../Unit/inc/Engine/Preload/Subscriber/formatPreloadUrl.php | 2 +- .../inc/Engine/Saas/Admin/Notices/addLocalizeScriptData.php | 2 +- .../Engine/Saas/Admin/Notices/displayProcessingNotice.php | 2 +- .../Engine/Saas/Admin/Notices/displaySaasErrorNotice.php | 2 +- .../inc/Engine/Saas/Admin/Notices/displaySuccessNotice.php | 2 +- tests/Unit/inc/Engine/Support/Data/getSupportData.php | 2 +- tests/Unit/inc/Engine/Support/Rest/getSupportData.php | 2 +- .../inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php | 2 +- tests/Unit/inc/ThirdParty/Hostings/Cloudways/varnishIP.php | 2 +- .../Hostings/Dreampress/removeHtaccessHtmlExpire.php | 2 +- .../ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php | 2 +- .../inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php | 2 +- tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanDomain.php | 2 +- tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanFile.php | 2 +- tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanHome.php | 2 +- .../inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php | 2 +- tests/Unit/inc/ThirdParty/Hostings/Godaddy/varnishField.php | 2 +- .../inc/ThirdParty/Hostings/HostResolver/getHostService.php | 2 +- .../Hostings/HostSubscriberFactory/getSubscriber.php | 2 +- .../inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php | 2 +- .../inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php | 2 +- .../inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php | 2 +- .../inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php | 2 +- .../inc/ThirdParty/Hostings/Kinsta/displayErrorNotice.php | 2 +- .../ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php | 2 +- .../inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php | 2 +- .../Hostings/O2Switch/removeHtaccessHtmlExpire.php | 2 +- .../Hostings/O2Switch/removeRegexFromPurgeUrl.php | 2 +- .../inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php | 2 +- .../inc/ThirdParty/Hostings/OneCom/disableCDNChange.php | 2 +- .../Unit/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php | 2 +- .../inc/ThirdParty/Hostings/OneCom/maybeEnableCDNOption.php | 2 +- .../Hostings/OneCom/maybeSetVarnishAddonTitle.php | 2 +- .../inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php | 2 +- .../inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php | 2 +- tests/Unit/inc/ThirdParty/Hostings/Pressidium/cleanPost.php | 2 +- .../inc/ThirdParty/Hostings/Pressidium/cleanPressidium.php | 2 +- .../Hostings/Pressidium/clearCacheAfterPressidium.php | 2 +- .../Hostings/Pressidium/pressidiumVarnishField.php | 2 +- tests/Unit/inc/ThirdParty/Hostings/Pressidium/purgeUrl.php | 2 +- .../Hostings/ProIsp/maybeSetVarnishAddonTitle.php | 2 +- .../ThirdParty/Hostings/Savvii/clearCacheAfterSavvii.php | 2 +- .../inc/ThirdParty/Hostings/Savvii/varnishAddonTitle.php | 2 +- tests/Unit/inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php | 2 +- .../Unit/inc/ThirdParty/Hostings/SpinUpWP/removeActions.php | 2 +- .../Unit/inc/ThirdParty/Hostings/WPEngine/addFootprint.php | 2 +- .../Unit/inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php | 2 +- .../Hostings/WPEngine/runRocketBotAfterWPEngine.php | 2 +- .../inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php | 2 +- .../Hostings/WPXCloud/appendCacheControlHeader.php | 2 +- .../inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php | 2 +- tests/Unit/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php | 2 +- .../ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php | 2 +- .../Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php | 2 +- .../Plugins/CDN/Cloudflare/addCdnHelperMessage.php | 2 +- .../Plugins/CDN/Cloudflare/disableCloudflareOption.php | 2 +- .../Plugins/CDN/Cloudflare/displayApoCacheNotice.php | 2 +- .../Plugins/CDN/Cloudflare/displayApoCookiesNotice.php | 2 +- .../CDN/Cloudflare/displayServerPushingModeNotice.php | 2 +- .../ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php | 2 +- .../ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php | 2 +- .../ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php | 2 +- .../Ecommerce/WooCommerceSubscriber/cacheEmptyCart.php | 2 +- .../Ecommerce/WooCommerceSubscriber/excludePages.php | 2 +- .../WooCommerceSubscriber/reformatShopUrlForPreload.php | 2 +- .../Ecommerce/WooCommerceSubscriber/serveCacheEmptyCart.php | 2 +- .../showEmptyProductGalleryWithDelayJS.php | 2 +- .../showNotemptyProductGalleryWithDelayJS.php | 2 +- .../Plugins/I18n/TranslatePress/addLangsToAdminBar.php | 2 +- .../Plugins/I18n/TranslatePress/detectHomepage.php | 2 +- .../Plugins/I18n/TranslatePress/getActiveLanguagesCodes.php | 2 +- .../Plugins/I18n/TranslatePress/getActiveLanguagesUri.php | 2 +- .../Plugins/I18n/TranslatePress/getHomeUrlForLang.php | 2 +- .../Plugins/I18n/TranslatePress/getTranslatedPostUrls.php | 2 +- .../Plugins/I18n/TranslatePress/isTranslatepress.php | 2 +- .../Plugins/I18n/TranslatePress/setCurrentLanguage.php | 2 +- .../WPML/onChangeDirectoryForDefaultLanguageCleanCache.php | 2 +- .../ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php | 2 +- .../Plugins/InlineRelatedPosts/excludeInlineFromRucss.php | 2 +- .../inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php | 2 +- .../inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php | 2 +- .../Plugins/Optimization/AMP/disableOptionsOnAmp.php | 2 +- .../Plugins/Optimization/AMP/excludeScriptFromDelayJs.php | 2 +- .../Plugins/Optimization/AMP/isAmpCompatibleCallback.php | 2 +- .../Optimization/Perfmatters/disableRucssSetting.php | 2 +- .../Plugins/Optimization/RapidLoad/disableRucssSetting.php | 2 +- .../RapidLoad/rocketCleanCacheOnDeactivation.php | 2 +- .../RocketLazyLoad/excludeRocketLazyLoadScript.php | 2 +- .../Plugins/Optimization/WPMeteor/disableDelayJs.php | 2 +- .../Optimization/WPMeteor/maybeDisableDelayJsField.php | 2 +- .../inc/ThirdParty/Plugins/PWA/excludeServiceWorker.php | 2 +- .../Plugins/PageBuilder/BeaverBuilder/purgeCache.php | 2 +- .../PageBuilder/Elementor/addFixAnimationsScript.php | 2 +- .../ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php | 2 +- .../ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php | 2 +- .../Plugins/PageBuilder/Elementor/excludePostCss.php | 2 +- .../Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php | 2 +- .../ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php | 2 +- .../ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php | 2 +- .../Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php | 2 +- .../Plugins/Security/WordFence/popIpFromWhitelist.php | 2 +- .../inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php | 2 +- .../ThirdParty/Plugins/Security/WordFence/whitelistIPs.php | 2 +- .../inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php | 2 +- .../ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php | 2 +- .../Plugins/Smush/isSmushIframesLazyloadActive.php | 2 +- .../inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php | 2 +- .../Plugins/Smush/maybeDeactivateRocketLazyload.php | 2 +- .../Plugins/ThirstyAffiliates/excludeLinkPrefix.php | 2 +- .../Plugins/UnlimitedElements/excludeInlineFromRucss.php | 2 +- .../Plugins/WPGeotargeting/activateGeotargetingwp.php | 2 +- .../ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php | 2 +- .../Plugins/WPGeotargeting/deactivateGeotargetingwp.php | 2 +- .../ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php | 2 +- tests/Unit/inc/ThirdParty/Themes/Avada/disableCompilers.php | 2 +- .../ThirdParty/Themes/Avada/fixRegexLazyloadBgImages.php | 2 +- .../inc/ThirdParty/Themes/Divi/addDiviToDescription.php | 2 +- .../inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php | 2 +- .../inc/ThirdParty/Themes/Divi/disableDynamicCssOnRucss.php | 2 +- .../Themes/Divi/disableImageDimensionsHeightPercentage.php | 2 +- tests/Unit/inc/ThirdParty/Themes/Divi/excludeJS.php | 2 +- .../inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php | 2 +- .../Unit/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php | 2 +- .../ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php | 2 +- .../inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php | 2 +- .../inc/ThirdParty/Themes/Flatsome/preservePatterns.php | 2 +- .../Unit/inc/ThirdParty/Themes/Jevelin/preservePatterns.php | 2 +- .../Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php | 2 +- .../ThirdParty/Themes/Polygon/addRucssContentExcluded.php | 2 +- .../Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php | 2 +- .../ThirdParty/Themes/Themify/disableConcatOnSavingData.php | 2 +- .../ThirdParty/Themes/Themify/disablingConcatOnRucss.php | 2 +- .../inc/ThirdParty/Themes/Themify/maybeEnableDevMode.php | 2 +- tests/Unit/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php | 2 +- tests/Unit/inc/ThirdParty/Themes/Uncode/excludeJs.php | 2 +- .../inc/ThirdParty/Themes/Xstore/excludeInlineContent.php | 2 +- tests/Unit/inc/admin/rocketAfterSaveOptions.php | 2 +- tests/Unit/inc/admin/rocketFirstInstall.php | 2 +- tests/Unit/inc/admin/rocketNewUpgrade.php | 2 +- tests/Unit/inc/classes/Buffer/Tests/canProcessBuffer.php | 2 +- tests/Unit/inc/classes/Buffer/Tests/isFeedUri.php | 2 +- tests/Unit/inc/classes/Buffer/Tests/isSpeedTool.php | 2 +- .../plugins/Images/Webp/EWWW_Subscriber/getBasename.php | 2 +- .../Images/Webp/EWWW_Subscriber/isConvertingToWebp.php | 2 +- .../plugins/Images/Webp/EWWW_Subscriber/isServingWebp.php | 2 +- .../Webp/EWWW_Subscriber/isServingWebpCompatibleWithCdn.php | 2 +- .../plugins/Images/Webp/EWWW_Subscriber/loadHooks.php | 2 +- .../Images/Webp/EWWW_Subscriber/maybeRemoveImagesCnames.php | 2 +- .../EWWW_Subscriber/maybeRemoveImagesFromCdnDropdown.php | 2 +- .../plugins/Images/Webp/Imagify_Subscriber/getBasename.php | 2 +- .../Images/Webp/Imagify_Subscriber/isConvertingToWebp.php | 2 +- .../Images/Webp/Imagify_Subscriber/isServingWebp.php | 2 +- .../Imagify_Subscriber/isServingWebpCompatibleWithCdn.php | 2 +- .../plugins/Images/Webp/Imagify_Subscriber/loadHooks.php | 2 +- .../Webp/Imagify_Subscriber/syncOnNetworkOptionAdd.php | 2 +- .../Webp/Imagify_Subscriber/syncOnNetworkOptionDelete.php | 2 +- .../Webp/Imagify_Subscriber/syncOnNetworkOptionUpdate.php | 2 +- .../Images/Webp/Imagify_Subscriber/syncOnOptionAdd.php | 2 +- .../Images/Webp/Imagify_Subscriber/syncOnOptionDelete.php | 2 +- .../Images/Webp/Imagify_Subscriber/syncOnOptionUpdate.php | 2 +- tests/Unit/inc/common/doAdminPostRocketPurgeCache.php | 2 +- tests/Unit/inc/common/rocketCleanCacheThemeUpdate.php | 2 +- tests/Unit/inc/common/rocketCleanPostCacheOnSlugChange.php | 2 +- tests/Unit/inc/common/rocketGetPurgeUrls.php | 2 +- tests/Unit/inc/common/rocketWidgetUpdateCallback.php | 2 +- tests/Unit/inc/functions/_rocketGetCacheDirs.php | 2 +- tests/Unit/inc/functions/_rocketGetDirFilesByRegex.php | 2 +- .../inc/functions/_rocketGetRecursiveDirFilesByRegex.php | 2 +- tests/Unit/inc/functions/_rocketNormalizePath.php | 2 +- tests/Unit/inc/functions/getRocketCacheRejectUri.php | 2 +- tests/Unit/inc/functions/getRocketI18nCode.php | 2 +- tests/Unit/inc/functions/getRocketI18nHomeUrl.php | 2 +- tests/Unit/inc/functions/getRocketI18nToPreserve.php | 2 +- tests/Unit/inc/functions/getRocketI18nUri.php | 2 +- tests/Unit/inc/functions/getRocketParseUrl.php | 2 +- tests/Unit/inc/functions/getRocketSamplePermalink.php | 2 +- .../inc/functions/isRocketGenerateCachingMobileFiles.php | 2 +- tests/Unit/inc/functions/rocketAddUrlProtocol.php | 2 +- tests/Unit/inc/functions/rocketCheckKey.php | 2 +- tests/Unit/inc/functions/rocketCleanCacheBusting.php | 2 +- tests/Unit/inc/functions/rocketCleanDomain.php | 2 +- tests/Unit/inc/functions/rocketCleanFiles.php | 2 +- tests/Unit/inc/functions/rocketCleanHomeFeeds.php | 2 +- tests/Unit/inc/functions/rocketCleanMinify.php | 2 +- tests/Unit/inc/functions/rocketDeleteLicenceDataFile.php | 2 +- tests/Unit/inc/functions/rocketExtractUrlComponent.php | 2 +- .../Unit/inc/functions/rocketGenerateAdvancedCacheFile.php | 2 +- tests/Unit/inc/functions/rocketGetFilesystemPerms.php | 2 +- tests/Unit/inc/functions/rocketGetPHPFilesInDir.php | 2 +- tests/Unit/inc/functions/rocketHasI18n.php | 2 +- tests/Unit/inc/functions/rocketIsLiveSite.php | 2 +- tests/Unit/inc/functions/rocketIsPluginActive.php | 2 +- tests/Unit/inc/functions/rocketIsPluginActiveForNetwork.php | 2 +- tests/Unit/inc/functions/rocketIsStream.php | 2 +- tests/Unit/inc/functions/rocketMkdirP.php | 2 +- tests/Unit/inc/functions/rocketPutContent.php | 2 +- tests/Unit/inc/functions/rocketRrmdir.php | 2 +- tests/Unit/inc/functions/rocketValidateCss.php | 2 +- tests/Unit/inc/rocketGetConstant.php | 2 +- tests/Unit/inc/rocketHasConstant.php | 2 +- 912 files changed, 919 insertions(+), 919 deletions(-) diff --git a/tests/Integration/inc/API/bypass.php b/tests/Integration/inc/API/bypass.php index 10201d0a1c..5440eff298 100644 --- a/tests/Integration/inc/API/bypass.php +++ b/tests/Integration/inc/API/bypass.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers ::rocket_bypass + * Test class covering ::rocket_bypass * @group API */ class Bypass extends TestCase { diff --git a/tests/Integration/inc/Addon/Cloudflare/API/Client/delete.php b/tests/Integration/inc/Addon/Cloudflare/API/Client/delete.php index a4359cce66..a3e6f4614b 100644 --- a/tests/Integration/inc/Addon/Cloudflare/API/Client/delete.php +++ b/tests/Integration/inc/Addon/Cloudflare/API/Client/delete.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\API\Client::delete + * Test class covering WP_Rocket\Addon\Cloudflare\API\Client::delete * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/API/Client/get.php b/tests/Integration/inc/Addon/Cloudflare/API/Client/get.php index abd717a1e4..8fb4875bd7 100644 --- a/tests/Integration/inc/Addon/Cloudflare/API/Client/get.php +++ b/tests/Integration/inc/Addon/Cloudflare/API/Client/get.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\API\Client::get + * Test class covering WP_Rocket\Addon\Cloudflare\API\Client::get * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/API/Client/patch.php b/tests/Integration/inc/Addon/Cloudflare/API/Client/patch.php index e688e8d7cc..4536003c01 100644 --- a/tests/Integration/inc/Addon/Cloudflare/API/Client/patch.php +++ b/tests/Integration/inc/Addon/Cloudflare/API/Client/patch.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\API\Client::patch + * Test class covering WP_Rocket\Addon\Cloudflare\API\Client::patch * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/API/Client/post.php b/tests/Integration/inc/Addon/Cloudflare/API/Client/post.php index c8d28cfe86..8b7503ba9a 100644 --- a/tests/Integration/inc/Addon/Cloudflare/API/Client/post.php +++ b/tests/Integration/inc/Addon/Cloudflare/API/Client/post.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\API\Client::post + * Test class covering WP_Rocket\Addon\Cloudflare\API\Client::post * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php b/tests/Integration/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php index 8c272e2dcd..d083618207 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php +++ b/tests/Integration/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Admin\Subscriber::maybe_display_purge_notice + * Test class covering WP_Rocket\Addon\Cloudflare\Admin\Subscriber::maybe_display_purge_notice * * @group CloudflareAdmin */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php b/tests/Integration/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php index 78c73ba007..8687fb89a5 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php +++ b/tests/Integration/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Admin\Subscriber::maybe_display_update_settings_notice + * Test class covering WP_Rocket\Addon\Cloudflare\Admin\Subscriber::maybe_display_update_settings_notice * * @group CloudflareAdmin */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php index 39407eb53c..744c1a143e 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::get_cloudflare_ips + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::get_cloudflare_ips * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/getSettings.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/getSettings.php index 80f8b10675..fe9f286a7c 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/getSettings.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/getSettings.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::get_settings + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::get_settings * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php index f8e7ab76e6..101458a97e 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::has_page_rule + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::has_page_rule * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php index a59c669c1f..1a22681786 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::is_auth_valid + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::is_auth_valid * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php index 2dba9bc904..28c0085665 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::purge_by_url + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::purge_by_url * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php index 8160ecd06a..b55ffc6d8a 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::purge_cloudflare + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::purge_cloudflare * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php index d7695d5884..b367c061ca 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_browser_cache_ttl + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_browser_cache_ttl * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php index e6ac1b060c..ef6e69b289 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_cache_level + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_cache_level * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setDevMode.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setDevMode.php index 975f522c9b..eacdb2e1c7 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setDevMode.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setDevMode.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_dev_mode + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_dev_mode * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setMinify.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setMinify.php index 5aabfc36fa..46f62a5671 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setMinify.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setMinify.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_minify + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_minify * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php index 514470fa34..ea6effdc27 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php +++ b/tests/Integration/inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_rocket_loader + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_rocket_loader * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php b/tests/Integration/inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php index dd00780e31..55c8db18ea 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php +++ b/tests/Integration/inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Addon\Cloudflare\Subscriber::add_cdn_helper_message + * Test class covering \WP_Rocket\Addon\Cloudflare\Subscriber::add_cdn_helper_message * @group Cloudflare */ class Test_addCdnHelperMessage extends TestCase { diff --git a/tests/Integration/inc/Addon/Cloudflare/Subscriber/deactivateDevMode.php b/tests/Integration/inc/Addon/Cloudflare/Subscriber/deactivateDevMode.php index 07b83edd0b..275bbfd77a 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Subscriber/deactivateDevMode.php +++ b/tests/Integration/inc/Addon/Cloudflare/Subscriber/deactivateDevMode.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::deactivate_devmode + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::deactivate_devmode * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewrite.php b/tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewrite.php index 72cccf926a..082a329f30 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewrite.php +++ b/tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewrite.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::protocol_rewrite + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::protocol_rewrite * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php b/tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php index 3034a3f726..52a2c67256 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php +++ b/tests/Integration/inc/Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::protocol_rewrite_srcset + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::protocol_rewrite_srcset * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Subscriber/saveCloudflareOldSettings.php b/tests/Integration/inc/Addon/Cloudflare/Subscriber/saveCloudflareOldSettings.php index f875a69257..27d3930ad5 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Subscriber/saveCloudflareOldSettings.php +++ b/tests/Integration/inc/Addon/Cloudflare/Subscriber/saveCloudflareOldSettings.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::save_cloudflare_old_settings + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::save_cloudflare_old_settings * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php b/tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php index 1e38c2ddfc..6aa70a6f60 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php +++ b/tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::set_varnish_localhost + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::set_varnish_localhost * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishPurgeRequestHost.php b/tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishPurgeRequestHost.php index dec98f21f1..a250dbc2b0 100644 --- a/tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishPurgeRequestHost.php +++ b/tests/Integration/inc/Addon/Cloudflare/Subscriber/setVarnishPurgeRequestHost.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::set_varnish_purge_request_host + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::set_varnish_purge_request_host * * @group Cloudflare */ diff --git a/tests/Integration/inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php b/tests/Integration/inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php index c2345121a4..eaf0791a58 100644 --- a/tests/Integration/inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php +++ b/tests/Integration/inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Addon\Sucuri\Subscriber::add_cdn_helper_message + * Test class covering \WP_Rocket\Addon\Sucuri\Subscriber::add_cdn_helper_message */ class Test_addCdnHelperMessage extends TestCase { diff --git a/tests/Integration/inc/Addon/Varnish/Subscriber/cleanDomain.php b/tests/Integration/inc/Addon/Varnish/Subscriber/cleanDomain.php index e2add7d6ed..1f84bc235e 100644 --- a/tests/Integration/inc/Addon/Varnish/Subscriber/cleanDomain.php +++ b/tests/Integration/inc/Addon/Varnish/Subscriber/cleanDomain.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Varnish\Subscriber::clean_domain + * Test class covering WP_Rocket\Addon\Varnish\Subscriber::clean_domain * @group Varnish * @group Addon */ diff --git a/tests/Integration/inc/Addon/Varnish/Subscriber/cleanFile.php b/tests/Integration/inc/Addon/Varnish/Subscriber/cleanFile.php index f91f92cc89..6a49524cf7 100644 --- a/tests/Integration/inc/Addon/Varnish/Subscriber/cleanFile.php +++ b/tests/Integration/inc/Addon/Varnish/Subscriber/cleanFile.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Varnish\Subscriber::clean_file + * Test class covering WP_Rocket\Addon\Varnish\Subscriber::clean_file * @group Varnish * @group Addon */ diff --git a/tests/Integration/inc/Addon/Varnish/Subscriber/cleanHome.php b/tests/Integration/inc/Addon/Varnish/Subscriber/cleanHome.php index 8a7ba19c6d..90a11b9085 100644 --- a/tests/Integration/inc/Addon/Varnish/Subscriber/cleanHome.php +++ b/tests/Integration/inc/Addon/Varnish/Subscriber/cleanHome.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\Addon\Varnish\Subscriber::clean_home + * Test class covering WP_Rocket\Addon\Varnish\Subscriber::clean_home * @group Varnish * @group Addon */ diff --git a/tests/Integration/inc/Addon/WebP/Subscriber/convertToWebp.php b/tests/Integration/inc/Addon/WebP/Subscriber/convertToWebp.php index bd1627cd59..67c5f6e4e0 100644 --- a/tests/Integration/inc/Addon/WebP/Subscriber/convertToWebp.php +++ b/tests/Integration/inc/Addon/WebP/Subscriber/convertToWebp.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Addon\WebP\Subscriber::convert_to_webp + * Test class covering \WP_Rocket\Addon\WebP\Subscriber::convert_to_webp * @group WebP */ class Test_ConvertToWebp extends FilesystemTestCase { diff --git a/tests/Integration/inc/Engine/Admin/Beacon/Beacon/insertScript.php b/tests/Integration/inc/Engine/Admin/Beacon/Beacon/insertScript.php index 13dcf93912..9d00b1aafd 100644 --- a/tests/Integration/inc/Engine/Admin/Beacon/Beacon/insertScript.php +++ b/tests/Integration/inc/Engine/Admin/Beacon/Beacon/insertScript.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\Beacon\Beacon::insert_script + * Test class covering \WP_Rocket\Engine\Admin\Beacon\Beacon::insert_script * * @group Beacon * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Admin/Deactivation/DeactivationIntent/activateSafeMode.php b/tests/Integration/inc/Engine/Admin/Deactivation/DeactivationIntent/activateSafeMode.php index 480fc4b67d..f8390ed6d2 100644 --- a/tests/Integration/inc/Engine/Admin/Deactivation/DeactivationIntent/activateSafeMode.php +++ b/tests/Integration/inc/Engine/Admin/Deactivation/DeactivationIntent/activateSafeMode.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::activate_safe_mode + * Test class covering \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::activate_safe_mode * * @group DeactivationIntent * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/addDataAttribute.php b/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/addDataAttribute.php index eedd66991b..95a4743a6c 100644 --- a/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/addDataAttribute.php +++ b/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/addDataAttribute.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::add_data_attribute + * Test class covering \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::add_data_attribute * * @group AdminOnly * @group DeactivationIntent diff --git a/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/addModalAssets.php b/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/addModalAssets.php index e770205a1e..ebd0e927bc 100644 --- a/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/addModalAssets.php +++ b/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/addModalAssets.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::add_modal_assets + * Test class covering \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::add_modal_assets * * @group AdminOnly * @group DeactivationIntent diff --git a/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/insertDeactivationIntentForm.php b/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/insertDeactivationIntentForm.php index 01f31a6884..361e9ef520 100644 --- a/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/insertDeactivationIntentForm.php +++ b/tests/Integration/inc/Engine/Admin/Deactivation/Subscriber/insertDeactivationIntentForm.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::insert_deactivation_intent_form + * Test class covering \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::insert_deactivation_intent_form * * @group AdminOnly * @group DeactivationIntent diff --git a/tests/Integration/inc/Engine/Admin/DomainChange/Subscriber/addRegenerateConfigurationAction.php b/tests/Integration/inc/Engine/Admin/DomainChange/Subscriber/addRegenerateConfigurationAction.php index 5f05599048..245ddd686f 100644 --- a/tests/Integration/inc/Engine/Admin/DomainChange/Subscriber/addRegenerateConfigurationAction.php +++ b/tests/Integration/inc/Engine/Admin/DomainChange/Subscriber/addRegenerateConfigurationAction.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Admin\DomainChange\Subscriber::add_regenerate_configuration_action + * Test class covering \WP_Rocket\Engine\Admin\DomainChange\Subscriber::add_regenerate_configuration_action */ class Test_addRegenerateConfigurationAction extends TestCase { diff --git a/tests/Integration/inc/Engine/Admin/Settings/Settings/sanitizeCallback.php b/tests/Integration/inc/Engine/Admin/Settings/Settings/sanitizeCallback.php index 79ee538bcc..0207101d09 100644 --- a/tests/Integration/inc/Engine/Admin/Settings/Settings/sanitizeCallback.php +++ b/tests/Integration/inc/Engine/Admin/Settings/Settings/sanitizeCallback.php @@ -6,8 +6,8 @@ use WP_Rocket\Tests\Integration\DBTrait; /** - * @covers \WP_Rocket\Engine\Admin\Settings\Settings::sanitize_callback - * @covers ::rocket_validate_css + * Test class covering \WP_Rocket\Engine\Admin\Settings\Settings::sanitize_callback + * Test class covering ::rocket_validate_css * * @group AdminOnly * @group Settings diff --git a/tests/Integration/inc/Engine/Admin/Settings/Subscriber/asyncWistiaScript.php b/tests/Integration/inc/Engine/Admin/Settings/Subscriber/asyncWistiaScript.php index da7bb57e5e..481968dff8 100644 --- a/tests/Integration/inc/Engine/Admin/Settings/Subscriber/asyncWistiaScript.php +++ b/tests/Integration/inc/Engine/Admin/Settings/Subscriber/asyncWistiaScript.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers \WP_Rocket\Engine\Admin\Settings\Subscriber::async_wistia_script + * Test class covering \WP_Rocket\Engine\Admin\Settings\Subscriber::async_wistia_script * @group AdminOnly * @group SettingsPage */ diff --git a/tests/Integration/inc/Engine/Admin/Settings/Subscriber/enqueueRocketScripts.php b/tests/Integration/inc/Engine/Admin/Settings/Subscriber/enqueueRocketScripts.php index 9bef560e21..01104ca44a 100644 --- a/tests/Integration/inc/Engine/Admin/Settings/Subscriber/enqueueRocketScripts.php +++ b/tests/Integration/inc/Engine/Admin/Settings/Subscriber/enqueueRocketScripts.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers \WP_Rocket\Engine\Admin\Settings\Subscriber::enqueue_rocket_scripts + * Test class covering \WP_Rocket\Engine\Admin\Settings\Subscriber::enqueue_rocket_scripts * @group AdminOnly * @group SettingsPage */ diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/addSubscriptionModal.php b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/addSubscriptionModal.php index f5f9ff094c..9ccda62713 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/addSubscriptionModal.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/addSubscriptionModal.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\inc\Engine\CDN\RocketCDN\TestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::add_subscription_modal + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::add_subscription_modal * @uses ::rocket_is_live_site * @uses ::rocket_get_constant * diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/displayRocketcdnStatus.php b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/displayRocketcdnStatus.php index 26b9933e12..a2cd270021 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/displayRocketcdnStatus.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/displayRocketcdnStatus.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\inc\Engine\CDN\RocketCDN\TestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::display_rocketcdn_status + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::display_rocketcdn_status * @uses \WP_Rocket\Engine\CDN\RocketCDN\APIClient::get_subscription_data * @uses ::rocket_is_live_site * @uses ::rocket_get_constant diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/preserveAuthorizationToken.php b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/preserveAuthorizationToken.php index 52f12aad5d..8779e83d40 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/preserveAuthorizationToken.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/preserveAuthorizationToken.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\inc\Engine\CDN\RocketCDN\TestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::preserve_authorization_token + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::preserve_authorization_token * @uses \WP_Rocket\Engine\CDN\RocketCDN\APIClient::preserve_authorization_token * * @group AdminOnly diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/purgeCdnCache.php b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/purgeCdnCache.php index d3bc9681fe..5ff662fd9f 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/purgeCdnCache.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/purgeCdnCache.php @@ -8,7 +8,7 @@ use WPDieException; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::purge_cdn_cache + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::purge_cdn_cache * @uses ::rocket_get_constant * * @group AdminOnly diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/rocketcdnField.php b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/rocketcdnField.php index 99e888bd8f..eb375785d3 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/rocketcdnField.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/AdminPageSubscriber/rocketcdnField.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\inc\Engine\CDN\RocketCDN\TestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::rocketcdn_field + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\AdminPageSubscriber::rocketcdn_field * * @uses \WP_Rocket\Engine\CDN\RocketCDN\APIClient::get_subscription_data * @uses \WP_Rocket\Admin\Options_Data::get diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/CDNOptionsManager/disable.php b/tests/Integration/inc/Engine/CDN/RocketCDN/CDNOptionsManager/disable.php index 0489929975..6e08bce916 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/CDNOptionsManager/disable.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/CDNOptionsManager/disable.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\CDN\RocketCDN\CDNOptionsManager; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\CDNOptionsManager::disable + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\CDNOptionsManager::disable * @uses \WP_Rocket\Admin\Options_Data::set * @uses \WP_Rocket\Admin\Options::set * @uses \WP_Rocket\Admin\Options::get_option_name diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/CDNOptionsManager/enable.php b/tests/Integration/inc/Engine/CDN/RocketCDN/CDNOptionsManager/enable.php index fbe1d41443..0608de838b 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/CDNOptionsManager/enable.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/CDNOptionsManager/enable.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\CDN\RocketCDN\CDNOptionsManager; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\CDNOptionsManager::enable + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\CDNOptionsManager::enable * @uses \WP_Rocket\Admin\Options_Data::set * @uses \WP_Rocket\Admin\Options::set * @uses \WP_Rocket\Admin\Options::get_option_name diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/addDismissScript.php b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/addDismissScript.php index fede742493..758a194909 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/addDismissScript.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/addDismissScript.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\inc\Engine\CDN\RocketCDN\TestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::add_dismiss_script + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::add_dismiss_script * @uses ::rocket_is_live_site * * @group AdminOnly diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/dismissNotice.php b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/dismissNotice.php index 1a36694f42..de9de25572 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/dismissNotice.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/dismissNotice.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AjaxTestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::dismiss_notice + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::dismiss_notice * * @group AdminOnly * @group RocketCDN diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/displayRocketcdnCta.php b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/displayRocketcdnCta.php index fe4f8eea04..4db1122863 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/displayRocketcdnCta.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/displayRocketcdnCta.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\inc\Engine\CDN\RocketCDN\TestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::display_rocketcdn_cta + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::display_rocketcdn_cta * @uses ::rocket_is_live_site * @uses \WP_Rocket\Engine\CDN\RocketCDN\APIClient::get_subscription_data * @uses \WP_Rocket\Engine\CDN\RocketCDN\APIClient::get_pricing_data diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/promoteRocketcdnNotice.php b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/promoteRocketcdnNotice.php index 25e7888b65..ac50f48ad8 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/promoteRocketcdnNotice.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/promoteRocketcdnNotice.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\inc\Engine\CDN\RocketCDN\TestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::promote_rocketcdn_notice + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::promote_rocketcdn_notice * @uses ::rocket_is_live_site * @uses \WP_Rocket\Abstract_Render::generate * @uses ::rocket_direct_filesystem diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/purgeCacheNotice.php b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/purgeCacheNotice.php index f3e3d78b7d..9f93a87a4d 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/purgeCacheNotice.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/purgeCacheNotice.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::purge_cache_notice + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::purge_cache_notice * @uses ::rocket_notice_html * * @group AdminOnly diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/toggleCta.php b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/toggleCta.php index 1981a1a2f7..f8341963c2 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/toggleCta.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/NoticesSubscriber/toggleCta.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AjaxTestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::toggle_cta + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\NoticesSubscriber::toggle_cta * * @group AdminOnly * @group RocketCDN diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/disable.php b/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/disable.php index be0adb14d8..afa86fb69f 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/disable.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/disable.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\ApiTestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::disable + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::disable * @uses \WP_Rocket\Engine\CDN\RocketCDN\CDNOptionsManager::disable * * @group RocketCDN diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/enable.php b/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/enable.php index 3f3dddcc36..aeaa1ff171 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/enable.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/enable.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\ApiTestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::enable + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::enable * @uses \WP_Rocket\Engine\CDN\RocketCDN\CDNOptionsManager::enable * * @group RocketCDN diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/registerDisableRoute.php b/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/registerDisableRoute.php index 54bf1bbb98..3e6355be8a 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/registerDisableRoute.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/registerDisableRoute.php @@ -5,9 +5,9 @@ use WP_Rocket\Tests\Integration\ApiTestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::register_disable_route - * @covers \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::validate_email - * @covers \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::validate_key + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::register_disable_route + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::validate_email + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::validate_key * * @uses \WP_Rocket\Admin\Options_Data::get * @uses ::rocket_has_constant diff --git a/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/registerEnableRoute.php b/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/registerEnableRoute.php index 2861fc9072..334f32df16 100644 --- a/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/registerEnableRoute.php +++ b/tests/Integration/inc/Engine/CDN/RocketCDN/RESTSubscriber/registerEnableRoute.php @@ -5,9 +5,9 @@ use WP_Rocket\Tests\Integration\ApiTestCase; /** - * @covers \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::register_enable_route - * @covers \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::validate_email - * @covers \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::validate_key + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::register_enable_route + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::validate_email + * Test class covering \WP_Rocket\Engine\CDN\RocketCDN\RESTSubscriber::validate_key * * @uses \WP_Rocket\Admin\Options_Data::get * diff --git a/tests/Integration/inc/Engine/CDN/Subscriber/addPreconnectCdn.php b/tests/Integration/inc/Engine/CDN/Subscriber/addPreconnectCdn.php index 8013aa2d62..2ead21bf6d 100644 --- a/tests/Integration/inc/Engine/CDN/Subscriber/addPreconnectCdn.php +++ b/tests/Integration/inc/Engine/CDN/Subscriber/addPreconnectCdn.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\CDN\Subscriber; /** - * @covers \WP_Rocket\Engine\CDN\Subscriber::add_preconnect_cdn + * Test class covering \WP_Rocket\Engine\CDN\Subscriber::add_preconnect_cdn * @uses \WP_Rocket\Engine\CDN\CDN::get_cdn_urls * @group CDN */ diff --git a/tests/Integration/inc/Engine/CDN/Subscriber/getCdnHosts.php b/tests/Integration/inc/Engine/CDN/Subscriber/getCdnHosts.php index 31642793b0..4c450d1bbd 100644 --- a/tests/Integration/inc/Engine/CDN/Subscriber/getCdnHosts.php +++ b/tests/Integration/inc/Engine/CDN/Subscriber/getCdnHosts.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\CDN\Subscriber; /** - * @covers \WP_Rocket\Engine\CDN\Subscriber::get_cdn_hosts + * Test class covering \WP_Rocket\Engine\CDN\Subscriber::get_cdn_hosts * @uses \WP_Rocket\Engine\CDN\CDN::get_cdn_urls * @uses ::rocket_add_url_protocol * @group CDN diff --git a/tests/Integration/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php b/tests/Integration/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php index faf8e66d35..17504b2031 100644 --- a/tests/Integration/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php +++ b/tests/Integration/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\CDN\Subscriber; /** - * @covers \WP_Rocket\Engine\CDN\Subscriber::maybe_replace_url + * Test class covering \WP_Rocket\Engine\CDN\Subscriber::maybe_replace_url * @uses \WP_Rocket\Engine\CDN\CDN::get_cdn_urls * @group CDN */ diff --git a/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php b/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php index 5888584f2d..4aeaa633a5 100644 --- a/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php +++ b/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\CDN\Subscriber; /** - * @covers \WP_Rocket\Engine\CDN\Subscriber::rewrite + * Test class covering \WP_Rocket\Engine\CDN\Subscriber::rewrite * @uses \WP_Rocket\Engine\CDN\CDN::rewrite * @group CDN * @group rewrite diff --git a/tests/Integration/inc/Engine/CDN/Subscriber/rewriteCssProperties.php b/tests/Integration/inc/Engine/CDN/Subscriber/rewriteCssProperties.php index d2472d4040..c95f8b9e0c 100644 --- a/tests/Integration/inc/Engine/CDN/Subscriber/rewriteCssProperties.php +++ b/tests/Integration/inc/Engine/CDN/Subscriber/rewriteCssProperties.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\CDN\Subscriber; /** - * @covers \WP_Rocket\Engine\CDN\Subscriber::rewrite_css_properties + * Test class covering \WP_Rocket\Engine\CDN\Subscriber::rewrite_css_properties * @uses \WP_Rocket\Engine\CDN\CDN::rewrite_css_properties * @uses \WP_Rocket\Admin\Options_Data::get * @group CDN diff --git a/tests/Integration/inc/Engine/CDN/Subscriber/rewriteSrcset.php b/tests/Integration/inc/Engine/CDN/Subscriber/rewriteSrcset.php index bbb4aeb24c..8635f16eb1 100644 --- a/tests/Integration/inc/Engine/CDN/Subscriber/rewriteSrcset.php +++ b/tests/Integration/inc/Engine/CDN/Subscriber/rewriteSrcset.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\CDN\Subscriber; /** - * @covers \WP_Rocket\Engine\CDN\Subscriber::rewrite_srcset + * Test class covering \WP_Rocket\Engine\CDN\Subscriber::rewrite_srcset * @uses \WP_Rocket\Engine\CDN\CDN::rewrite_srcset * @group CDN */ diff --git a/tests/Integration/inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php b/tests/Integration/inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php index ca7616ef71..8254fa3cbc 100644 --- a/tests/Integration/inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php +++ b/tests/Integration/inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers WP_Rocket\Engine\Cache\AdminSubscriber::add_purge_term_link + * Test class covering WP_Rocket\Engine\Cache\AdminSubscriber::add_purge_term_link * * @group AdminOnly * @group Cache diff --git a/tests/Integration/inc/Engine/Cache/AdminSubscriber/addWpCacheStatusTest.php b/tests/Integration/inc/Engine/Cache/AdminSubscriber/addWpCacheStatusTest.php index 4a03e4aab4..a6f045f445 100644 --- a/tests/Integration/inc/Engine/Cache/AdminSubscriber/addWpCacheStatusTest.php +++ b/tests/Integration/inc/Engine/Cache/AdminSubscriber/addWpCacheStatusTest.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers WP_Rocket\Engine\Cache\AdminSubscriber::add_wp_cache_status_test + * Test class covering WP_Rocket\Engine\Cache\AdminSubscriber::add_wp_cache_status_test * * @group AdminOnly * @group WPCache diff --git a/tests/Integration/inc/Engine/Cache/AdminSubscriber/maybeSetWpCache.php b/tests/Integration/inc/Engine/Cache/AdminSubscriber/maybeSetWpCache.php index a9c34b1b68..4b1844177e 100644 --- a/tests/Integration/inc/Engine/Cache/AdminSubscriber/maybeSetWpCache.php +++ b/tests/Integration/inc/Engine/Cache/AdminSubscriber/maybeSetWpCache.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers WP_Rocket\Engine\Cache\AdminSubscriber::maybe_set_wp_cache + * Test class covering WP_Rocket\Engine\Cache\AdminSubscriber::maybe_set_wp_cache * * @group AdminOnly * @group WPCache diff --git a/tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeAdvancedCachePermissions.php b/tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeAdvancedCachePermissions.php index 08e8d9d02b..fb3811ef7c 100644 --- a/tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeAdvancedCachePermissions.php +++ b/tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeAdvancedCachePermissions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers WP_Rocket\Engine\Cache\AdminSubscriber::notice_advanced_cache_permissions + * Test class covering WP_Rocket\Engine\Cache\AdminSubscriber::notice_advanced_cache_permissions * * @group AdminOnly * @group AdvancedCache diff --git a/tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeWpConfigPermissions.php b/tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeWpConfigPermissions.php index c61723628f..a5ccf6bdb3 100644 --- a/tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeWpConfigPermissions.php +++ b/tests/Integration/inc/Engine/Cache/AdminSubscriber/noticeWpConfigPermissions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers WP_Rocket\Engine\Cache\AdminSubscriber::notice_wp_config_permissions + * Test class covering WP_Rocket\Engine\Cache\AdminSubscriber::notice_wp_config_permissions * * @group AdminOnly * @group WPCache diff --git a/tests/Integration/inc/Engine/Cache/AdminSubscriber/registerTermsRowAction.php b/tests/Integration/inc/Engine/Cache/AdminSubscriber/registerTermsRowAction.php index f105fe8613..7fe6d689eb 100644 --- a/tests/Integration/inc/Engine/Cache/AdminSubscriber/registerTermsRowAction.php +++ b/tests/Integration/inc/Engine/Cache/AdminSubscriber/registerTermsRowAction.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers WP_Rocket\Engine\Cache\AdminSubscriber::register_terms_row_action + * Test class covering WP_Rocket\Engine\Cache\AdminSubscriber::register_terms_row_action * * @group AdminOnly * @group Cache diff --git a/tests/Integration/inc/Engine/Cache/AdvancedCache/activate.php b/tests/Integration/inc/Engine/Cache/AdvancedCache/activate.php index 09fa0a7d35..f6f39f5a29 100644 --- a/tests/Integration/inc/Engine/Cache/AdvancedCache/activate.php +++ b/tests/Integration/inc/Engine/Cache/AdvancedCache/activate.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::activate + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::activate * * @group AdvancedCache */ diff --git a/tests/Integration/inc/Engine/Cache/AdvancedCache/deactivate.php b/tests/Integration/inc/Engine/Cache/AdvancedCache/deactivate.php index 2a78f06345..9bf75628eb 100644 --- a/tests/Integration/inc/Engine/Cache/AdvancedCache/deactivate.php +++ b/tests/Integration/inc/Engine/Cache/AdvancedCache/deactivate.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::activate + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::activate * * @group AdvancedCache */ diff --git a/tests/Integration/inc/Engine/Cache/AdvancedCache/getAdvancedCacheContent.php b/tests/Integration/inc/Engine/Cache/AdvancedCache/getAdvancedCacheContent.php index 2b3e06e4bc..ee81d711d4 100644 --- a/tests/Integration/inc/Engine/Cache/AdvancedCache/getAdvancedCacheContent.php +++ b/tests/Integration/inc/Engine/Cache/AdvancedCache/getAdvancedCacheContent.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::get_advanced_cache_content + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::get_advanced_cache_content * @uses ::is_rocket_generate_caching_mobile_files * @uses ::rocket_get_constant * @uses ::rocket_direct_filesystem diff --git a/tests/Integration/inc/Engine/Cache/AdvancedCache/noticePermissions.php b/tests/Integration/inc/Engine/Cache/AdvancedCache/noticePermissions.php index c929b2797f..a64834a8cc 100644 --- a/tests/Integration/inc/Engine/Cache/AdvancedCache/noticePermissions.php +++ b/tests/Integration/inc/Engine/Cache/AdvancedCache/noticePermissions.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::notice_permissions + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::notice_permissions * @uses ::rocket_get_constant * @uses ::rocket_notice_html * @uses ::rocket_direct_filesystem diff --git a/tests/Integration/inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php b/tests/Integration/inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php index cc812a310c..2d7a61cdf4 100644 --- a/tests/Integration/inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php +++ b/tests/Integration/inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::update_advanced_cache + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::update_advanced_cache * @uses ::rocket_get_filesystem_perms * * @group AdvancedCache diff --git a/tests/Integration/inc/Engine/Cache/Config/ConfigSubscriber/changeCacheRejectUriWithPermalink.php b/tests/Integration/inc/Engine/Cache/Config/ConfigSubscriber/changeCacheRejectUriWithPermalink.php index 30f80b3fa1..c8db435553 100644 --- a/tests/Integration/inc/Engine/Cache/Config/ConfigSubscriber/changeCacheRejectUriWithPermalink.php +++ b/tests/Integration/inc/Engine/Cache/Config/ConfigSubscriber/changeCacheRejectUriWithPermalink.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Cache\Config\ConfigSubscriber::change_cache_reject_uri_with_permalink + * Test class covering \WP_Rocket\Engine\Cache\Config\ConfigSubscriber::change_cache_reject_uri_with_permalink */ class Test_ChangeCacheRejectUriWithPermalink extends TestCase { /** diff --git a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php index 40dc2d5910..e942a842f0 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php +++ b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:maybe_purge_cache_on_term_change + * Test class covering \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:maybe_purge_cache_on_term_change * @uses ::rocket_clean_domain * * @group purge_actions diff --git a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeCacheOnPublicSettingChange.php b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeCacheOnPublicSettingChange.php index f635e53c8b..a828912fe1 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeCacheOnPublicSettingChange.php +++ b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeCacheOnPublicSettingChange.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_clean_domain + * Test class covering ::rocket_clean_domain * @uses ::get_rocket_i18n_home_url * @uses ::get_rocket_i18n_to_preserve * @uses ::get_rocket_i18n_uri diff --git a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeCacheRejectUriPartially.php b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeCacheRejectUriPartially.php index c8f7706620..83c594864c 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeCacheRejectUriPartially.php +++ b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeCacheRejectUriPartially.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:purge_cache_reject_uri_partially + * Test class covering \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:purge_cache_reject_uri_partially */ class Test_PurgeCacheRejectUriPartially extends FilesystemTestCase { protected $path_to_test_data = '/inc/Engine/Cache/Purge/purgeCacheRejectUriPartially.php'; diff --git a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeDatesArchives.php b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeDatesArchives.php index b86875d408..e27cf5c13c 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeDatesArchives.php +++ b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeDatesArchives.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:purge_dates_archives + * Test class covering \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:purge_dates_archives * @uses ::get_rocket_parse_url * * @group purge_actions diff --git a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgePostTermsUrls.php b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgePostTermsUrls.php index 8029e49e12..be8dc9e5b8 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgePostTermsUrls.php +++ b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgePostTermsUrls.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:purge_post_terms_urls + * Test class covering \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:purge_post_terms_urls * @uses ::get_rocket_parse_url * * @group purge_actions diff --git a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php index fc64d923f5..894ff34818 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php +++ b/tests/Integration/inc/Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:purge_user_cache + * Test class covering \WP_Rocket\Engine\Cache\PurgeActionsSubscriber:purge_user_cache * @uses ::rocket_clean_user * @uses ::get_rocket_parse_url * @uses ::get_rocket_i18n_uri diff --git a/tests/Integration/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php b/tests/Integration/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php index 7cd9864af4..bea24c56f8 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php +++ b/tests/Integration/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers PurgeExpiredCache::purge_expired_files + * Test class covering PurgeExpiredCache::purge_expired_files * @uses ::get_rocket_i18n_uri * @uses ::rocket_direct_filesystem * @uses ::get_rocket_parse_url diff --git a/tests/Integration/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/updateLifespanValue.php b/tests/Integration/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/updateLifespanValue.php index 9a7804a0c3..add3f28574 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/updateLifespanValue.php +++ b/tests/Integration/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/updateLifespanValue.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers PurgeExpiredCache::update_lifespan_value + * Test class covering PurgeExpiredCache::update_lifespan_value * @group Cache */ class Test_UpdateLifespanValue extends TestCase { diff --git a/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/getCacheLifespan.php b/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/getCacheLifespan.php index 8cd648c3ed..af80a82059 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/getCacheLifespan.php +++ b/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/getCacheLifespan.php @@ -9,7 +9,7 @@ use WP_Rocket\Engine\Cache\PurgeExpired\Subscriber; /** - * @covers Subscriber::get_cache_lifespan + * Test class covering Subscriber::get_cache_lifespan * @uses \WP_Rocket\Admin\Options * @uses \WP_Rocket\Admin\Options_Data * @group Subscriber diff --git a/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/getSubscribedEvents.php b/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/getSubscribedEvents.php index dfd5638820..3f3807f7c2 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/getSubscribedEvents.php +++ b/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/getSubscribedEvents.php @@ -6,7 +6,7 @@ use WP_Rocket\Engine\Cache\PurgeExpired\Subscriber; /** - * @covers Subscriber::get_subscribed_events + * Test class covering Subscriber::get_subscribed_events * @group Subscriber */ class TestGetSubscribedEvents extends TestCase { diff --git a/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/scheduleEvent.php b/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/scheduleEvent.php index 61acbcd069..49901e01ac 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/scheduleEvent.php +++ b/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/scheduleEvent.php @@ -9,7 +9,7 @@ use WP_Rocket\Engine\Cache\PurgeExpired\Subscriber; /** - * @covers Subscriber::schedule_event + * Test class covering Subscriber::schedule_event * @uses Subscriber::get_cache_lifespan * @uses \WP_Rocket\Admin\Options * @uses \WP_Rocket\Admin\Options_Data diff --git a/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/updateLifespanOptionOnUpdate.php b/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/updateLifespanOptionOnUpdate.php index bce326049d..a9cbc6e767 100644 --- a/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/updateLifespanOptionOnUpdate.php +++ b/tests/Integration/inc/Engine/Cache/PurgeExpired/Subscriber/updateLifespanOptionOnUpdate.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers Subscriber::update_lifespan_option_on_update + * Test class covering Subscriber::update_lifespan_option_on_update * @group Cache */ class Test_UpdateLifespanOptionOnUpdate extends TestCase { diff --git a/tests/Integration/inc/Engine/Cache/WPCache/activate.php b/tests/Integration/inc/Engine/Cache/WPCache/activate.php index 49873eff99..1ed23df8eb 100644 --- a/tests/Integration/inc/Engine/Cache/WPCache/activate.php +++ b/tests/Integration/inc/Engine/Cache/WPCache/activate.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::activate + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::activate * * @group WPCache */ diff --git a/tests/Integration/inc/Engine/Cache/WPCache/deactivate.php b/tests/Integration/inc/Engine/Cache/WPCache/deactivate.php index 82b76b956f..22e0e23024 100644 --- a/tests/Integration/inc/Engine/Cache/WPCache/deactivate.php +++ b/tests/Integration/inc/Engine/Cache/WPCache/deactivate.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::deactivate + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::deactivate * * @group WPCache */ diff --git a/tests/Integration/inc/Engine/Cache/WPCache/findWpconfigPath.php b/tests/Integration/inc/Engine/Cache/WPCache/findWpconfigPath.php index c3c1932ec8..aff0e4807a 100644 --- a/tests/Integration/inc/Engine/Cache/WPCache/findWpconfigPath.php +++ b/tests/Integration/inc/Engine/Cache/WPCache/findWpconfigPath.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::find_wp_config_path + * Test class covering \WP_Rocket\Engine\Cache\WPCache::find_wp_config_path * * @group WPCache */ diff --git a/tests/Integration/inc/Engine/Cache/WPCache/maybePreventDeactivation.php b/tests/Integration/inc/Engine/Cache/WPCache/maybePreventDeactivation.php index aef67305f2..032f4b408e 100644 --- a/tests/Integration/inc/Engine/Cache/WPCache/maybePreventDeactivation.php +++ b/tests/Integration/inc/Engine/Cache/WPCache/maybePreventDeactivation.php @@ -5,7 +5,7 @@ use WP_Rocket\Engine\Cache\WPCache; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::maybe_prevent_deactivation + * Test class covering \WP_Rocket\Engine\Cache\WPCache::maybe_prevent_deactivation * @uses ::find_wp_config_path * * @group WPCache diff --git a/tests/Integration/inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php b/tests/Integration/inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php index 867293fc13..ecbdc969f0 100644 --- a/tests/Integration/inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php +++ b/tests/Integration/inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::notice_wp_config_permissions + * Test class covering \WP_Rocket\Engine\Cache\WPCache::notice_wp_config_permissions * @uses ::rocket_get_constant * @uses ::rocket_notice_html * diff --git a/tests/Integration/inc/Engine/Cache/WPCache/setWpCacheConstant.php b/tests/Integration/inc/Engine/Cache/WPCache/setWpCacheConstant.php index 1a09fb56ce..ccee096a80 100644 --- a/tests/Integration/inc/Engine/Cache/WPCache/setWpCacheConstant.php +++ b/tests/Integration/inc/Engine/Cache/WPCache/setWpCacheConstant.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\CapTrait; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::set_wp_cache_constant + * Test class covering \WP_Rocket\Engine\Cache\WPCache::set_wp_cache_constant * @uses ::rocket_valid_key * * @group WPCache diff --git a/tests/Integration/inc/Engine/Cache/WPCache/updateWPCache.php b/tests/Integration/inc/Engine/Cache/WPCache/updateWPCache.php index e5ddaf7e0f..927477b03c 100644 --- a/tests/Integration/inc/Engine/Cache/WPCache/updateWPCache.php +++ b/tests/Integration/inc/Engine/Cache/WPCache/updateWPCache.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::update_wp_cache + * Test class covering \WP_Rocket\Engine\Cache\WPCache::update_wp_cache * @uses rocket_valid_key() * @uses ::set_wp_cache_constant * diff --git a/tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractCssFilesFromHtml.php b/tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractCssFilesFromHtml.php index af108493ac..fd10e039af 100644 --- a/tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractCssFilesFromHtml.php +++ b/tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractCssFilesFromHtml.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Common\ExtractCSS\Subscriber::extract_css_files_from_html + * Test class covering \WP_Rocket\Engine\Common\ExtractCSS\Subscriber::extract_css_files_from_html */ class Test_extractCssFilesFromHtml extends TestCase { diff --git a/tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractInlineCssFromHtml.php b/tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractInlineCssFromHtml.php index 7f37b9099d..f7708b3e23 100644 --- a/tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractInlineCssFromHtml.php +++ b/tests/Integration/inc/Engine/Common/ExtractCSS/Subscriber/extractInlineCssFromHtml.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Common\ExtractCSS\Subscriber::extract_inline_css_from_html + * Test class covering \WP_Rocket\Engine\Common\ExtractCSS\Subscriber::extract_inline_css_from_html */ class Test_extractInlineCssFromHtml extends TestCase { diff --git a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/addInterval.php b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/addInterval.php index 511f554b23..b935b585df 100644 --- a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/addInterval.php +++ b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/addInterval.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::add_interval + * Test class covering \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::add_interval * * @group JobManager */ diff --git a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/checkJobStatus.php b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/checkJobStatus.php index 7cc9bf2197..4d56ac8625 100644 --- a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/checkJobStatus.php +++ b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/checkJobStatus.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::check_job_status + * Test class covering \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::check_job_status * * @group JobManager */ diff --git a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronCleanRows.php b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronCleanRows.php index 93358f702f..40ebde59a6 100644 --- a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronCleanRows.php +++ b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronCleanRows.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::cron_clean_rows + * Test class covering \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::cron_clean_rows * * @group JobManager */ diff --git a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronRemoveFailedJobs.php b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronRemoveFailedJobs.php index d761543386..36bb00a219 100644 --- a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronRemoveFailedJobs.php +++ b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/cronRemoveFailedJobs.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::cron_remove_failed_jobs + * Test class covering \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::cron_remove_failed_jobs * * @group JobManager */ diff --git a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/processOnSubmitJobs.php b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/processOnSubmitJobs.php index e73d9e8ce3..51501880ab 100644 --- a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/processOnSubmitJobs.php +++ b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/processOnSubmitJobs.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::process_on_submit_jobs + * Test class covering \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::process_on_submit_jobs * * @group JobManager */ diff --git a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php index 94ac33a8b1..96d0900f96 100644 --- a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php +++ b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::schedule_clean_not_commonly_used_rows + * Test class covering \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::schedule_clean_not_commonly_used_rows * * @group JobManager */ diff --git a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/scheduleOnSubmitJobs.php b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/scheduleOnSubmitJobs.php index 1ae7ca62d4..98a7c0b53c 100644 --- a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/scheduleOnSubmitJobs.php +++ b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/scheduleOnSubmitJobs.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::schedule_on_submit_jobs + * Test class covering \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::schedule_on_submit_jobs * * @group JobManager */ diff --git a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/schedulePendingJobs.php b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/schedulePendingJobs.php index ff7795af7c..9699271d0f 100644 --- a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/schedulePendingJobs.php +++ b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/schedulePendingJobs.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::schedule_pending_jobs + * Test class covering \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::schedule_pending_jobs * * @group JobManager */ diff --git a/tests/Integration/inc/Engine/CriticalPath/APIClient/sendGenerationRequest.php b/tests/Integration/inc/Engine/CriticalPath/APIClient/sendGenerationRequest.php index 4c59ea3d37..a0bbf4eb79 100644 --- a/tests/Integration/inc/Engine/CriticalPath/APIClient/sendGenerationRequest.php +++ b/tests/Integration/inc/Engine/CriticalPath/APIClient/sendGenerationRequest.php @@ -6,7 +6,7 @@ use WP_Error; /** - * @covers \WP_Rocket\Engine\CriticalPath\APIClient::send_generation_request + * Test class covering \WP_Rocket\Engine\CriticalPath\APIClient::send_generation_request * @group CriticalPath */ class Test_SendGenerationRequest extends TestCase { diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addAsyncCssMobileOption.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addAsyncCssMobileOption.php index 4555a87edf..a6a5c069e0 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addAsyncCssMobileOption.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addAsyncCssMobileOption.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::add_async_css_mobile_option + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::add_async_css_mobile_option * * @group AdminOnly * @group CriticalPath diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addHiddenAsyncCssMobile.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addHiddenAsyncCssMobile.php index 82c88801f4..192f6aa339 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addHiddenAsyncCssMobile.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addHiddenAsyncCssMobile.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::add_hidden_async_css_mobile + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::add_hidden_async_css_mobile * * @group AdminOnly * @group CriticalPath diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addRegenerateMenuItem.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addRegenerateMenuItem.php index 9ed89b3e2a..27a9df5283 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addRegenerateMenuItem.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/addRegenerateMenuItem.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::add_regenerate_menu_item + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::add_regenerate_menu_item * @uses \WP_Rocket\Tests\CriticalPath\Admin\Admin::add_regenerate_menu_item * @uses \WP_Rocket\Admin\Options_Data::get * @uses ::rocket_has_constant diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/cpcssHeartbeat.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/cpcssHeartbeat.php index 821a6a142f..5bd15c8a5b 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/cpcssHeartbeat.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/cpcssHeartbeat.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Integration\DBTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::cpcss_heartbeat + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::cpcss_heartbeat * @uses \WP_Rocket\Admin\Options_Data::get * @uses \WP_Rocket\Engine\CriticalPath\Admin\Admin::cpcss_heartbeat * @uses \WP_Rocket\Engine\CriticalPath\APIClient::send_generation_request diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/cpcssSection.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/cpcssSection.php index ed155105b4..7a662d96b2 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/cpcssSection.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/cpcssSection.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::cpcss_section + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::cpcss_section * @uses ::rocket_direct_filesystem * @uses ::is_rocket_post_excluded_option * diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/displayCpcssMobileSection.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/displayCpcssMobileSection.php index ce8c06a4b0..57a344cfab 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/displayCpcssMobileSection.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/displayCpcssMobileSection.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::display_cpcss_mobile_section + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::display_cpcss_mobile_section * * @group AdminOnly * @group CriticalPath diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enableMobileCpcss.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enableMobileCpcss.php index ace4969d0c..49a0534193 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enableMobileCpcss.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enableMobileCpcss.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\DBTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::enable_mobile_cpcss + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::enable_mobile_cpcss * @uses ::rocket_get_constant * * @group AdminOnly diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enqueueAdminCpcssHeartbeatScript.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enqueueAdminCpcssHeartbeatScript.php index 750c6e5861..20d40e504f 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enqueueAdminCpcssHeartbeatScript.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enqueueAdminCpcssHeartbeatScript.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::enqueue_admin_cpcss_heartbeat_script + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::enqueue_admin_cpcss_heartbeat_script * @uses ::rocket_get_constant * * @group AdminOnly diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enqueueAdminEditScript.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enqueueAdminEditScript.php index c7ee12484b..34919b15e8 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enqueueAdminEditScript.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/enqueueAdminEditScript.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::enqueue_admin_edit_script + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::enqueue_admin_edit_script * @uses ::rocket_get_constant * * @group AdminOnly diff --git a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/setAsyncCssMobileDefaultValue.php b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/setAsyncCssMobileDefaultValue.php index 8a92c63e9e..ebefde5a78 100644 --- a/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/setAsyncCssMobileDefaultValue.php +++ b/tests/Integration/inc/Engine/CriticalPath/Admin/Subscriber/setAsyncCssMobileDefaultValue.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::set_async_css_mobile_default_value + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::set_async_css_mobile_default_value * * @group AdminOnly * @group CriticalPath diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php index 8521c1acd1..1d5e04330f 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::clean_critical_css + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::clean_critical_css * * @group AdminOnly * @group CriticalPath diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCriticalCssContent.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCriticalCssContent.php index 69d33d01c6..fa0d1122f6 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCriticalCssContent.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCriticalCssContent.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_critical_css_content + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_critical_css_content * @uses ::rocket_get_constant * @uses \WP_Rocket\Admin\Options_Data::get * diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php index dd72f6984b..3d6e761d85 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_current_page_critical_css + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_current_page_critical_css * * @group CriticalPath * @group vfs diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php index e0c07d69a1..7d07c6075b 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php @@ -11,7 +11,7 @@ use Mockery; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_exclude_async_css + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_exclude_async_css * * @group CriticalPath */ diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/processHandler.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/processHandler.php index 83904335ca..93408f0b26 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/processHandler.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSS/processHandler.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::process_handler + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::process_handler * @uses \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::save * @uses \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::dispatch * @uses \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::cancel_process diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSGeneration/task.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSGeneration/task.php index 9938f5c423..e137af452e 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSGeneration/task.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSGeneration/task.php @@ -9,7 +9,7 @@ use WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::task + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::task * * @group CriticalPath */ diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/deleteCpcss.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/deleteCpcss.php index 3762d67ae1..1aefe8ce7c 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/deleteCpcss.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/deleteCpcss.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\ContentTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::delete_cpcss + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::delete_cpcss * @uses \WP_Rocket\Admin\Options_Data::get * * @group CriticalPath diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php index 184f36632c..99ef03ca7e 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php @@ -4,7 +4,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::exclude_inline_js + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::exclude_inline_js * * @group Subscribers * @group CriticalCss diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/generateCriticalCssOnActivation.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/generateCriticalCssOnActivation.php index e8791c4139..4cff2996bb 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/generateCriticalCssOnActivation.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/generateCriticalCssOnActivation.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::generate_critical_css_on_activation + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::generate_critical_css_on_activation * @uses \WP_Rocket\Engine\CriticalPath\CriticalCss::get_critical_css_path * @uses \WP_Rocket\Engine\CriticalPath\CriticalCss::process_handler * @uses \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::cancel_process diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/initCriticalCssGeneration.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/initCriticalCssGeneration.php index 8ec2f24526..b4fb337a25 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/initCriticalCssGeneration.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/initCriticalCssGeneration.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::init_critical_css_generation + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::init_critical_css_generation * @uses \WP_Rocket\Engine\CriticalPath\CriticalCss::process_handler * @uses \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::cancel_process * @uses ::rocket_get_constant diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/insertCriticalCssBuffer.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/insertCriticalCssBuffer.php index d8699a37a0..77556da3aa 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/insertCriticalCssBuffer.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/insertCriticalCssBuffer.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::insert_critical_css_buffer + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::insert_critical_css_buffer * @uses ::rocket_get_constant * @uses ::is_rocket_post_excluded_option * @uses \WP_Rocket\Engine\CriticalPath\CriticalCss::get_critical_css_content diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/maybeGenerateCpcssMobile.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/maybeGenerateCpcssMobile.php index 1016454a71..4a53becd5b 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/maybeGenerateCpcssMobile.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/maybeGenerateCpcssMobile.php @@ -7,7 +7,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::maybe_generate_cpcss_mobile + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::maybe_generate_cpcss_mobile * @uses \WP_Rocket\Engine\CriticalPath\CriticalCss::process_handler * @uses \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::cancel_process * @uses ::rocket_get_constant diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/stopCpcssProcess.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/stopCpcssProcess.php index 009e1bdc3f..b4143a8c30 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/stopCpcssProcess.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/stopCpcssProcess.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\ContentTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::stop_critical_css_generation + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::stop_critical_css_generation * * @group CriticalPath * @group vfs diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucss.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucss.php index e65a63dfa2..3224f241c1 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucss.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucss.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::switch_to_rucss + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::switch_to_rucss * @group AdminOnly */ class Test_switchToRucss extends TestCase { diff --git a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucssNotice.php b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucssNotice.php index cd489750c6..4642991e41 100644 --- a/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucssNotice.php +++ b/tests/Integration/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucssNotice.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::switch_to_rucss_notice + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::switch_to_rucss_notice * @group AdminOnly */ class Test_switchToRucssNotice extends TestCase { diff --git a/tests/Integration/inc/Engine/CriticalPath/DataManager/deleteCPCSS.php b/tests/Integration/inc/Engine/CriticalPath/DataManager/deleteCPCSS.php index 1124ddca7d..327c407f06 100644 --- a/tests/Integration/inc/Engine/CriticalPath/DataManager/deleteCPCSS.php +++ b/tests/Integration/inc/Engine/CriticalPath/DataManager/deleteCPCSS.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::delete_cpcss + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::delete_cpcss * @uses ::rocket_direct_filesystem * * @group CriticalPath diff --git a/tests/Integration/inc/Engine/CriticalPath/DataManager/deleteCacheJobId.php b/tests/Integration/inc/Engine/CriticalPath/DataManager/deleteCacheJobId.php index 9367866de1..81225fae4b 100644 --- a/tests/Integration/inc/Engine/CriticalPath/DataManager/deleteCacheJobId.php +++ b/tests/Integration/inc/Engine/CriticalPath/DataManager/deleteCacheJobId.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::delete_cache_job_id + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::delete_cache_job_id * * @group CriticalPath */ diff --git a/tests/Integration/inc/Engine/CriticalPath/DataManager/getCacheJobId.php b/tests/Integration/inc/Engine/CriticalPath/DataManager/getCacheJobId.php index 9149e2494e..d896ee62c3 100644 --- a/tests/Integration/inc/Engine/CriticalPath/DataManager/getCacheJobId.php +++ b/tests/Integration/inc/Engine/CriticalPath/DataManager/getCacheJobId.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::get_cache_job_id + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::get_cache_job_id * * @group CriticalPath */ diff --git a/tests/Integration/inc/Engine/CriticalPath/DataManager/saveCPCSS.php b/tests/Integration/inc/Engine/CriticalPath/DataManager/saveCPCSS.php index 78d717dfb3..6ef3579ea1 100644 --- a/tests/Integration/inc/Engine/CriticalPath/DataManager/saveCPCSS.php +++ b/tests/Integration/inc/Engine/CriticalPath/DataManager/saveCPCSS.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::save_cpcss + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::save_cpcss * * @group CriticalPath * @group vfs diff --git a/tests/Integration/inc/Engine/CriticalPath/DataManager/setCacheJobId.php b/tests/Integration/inc/Engine/CriticalPath/DataManager/setCacheJobId.php index c2245f6535..50db869c72 100644 --- a/tests/Integration/inc/Engine/CriticalPath/DataManager/setCacheJobId.php +++ b/tests/Integration/inc/Engine/CriticalPath/DataManager/setCacheJobId.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::set_cache_job_id + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::set_cache_job_id * * @group CriticalPath */ diff --git a/tests/Integration/inc/Engine/CriticalPath/ProcessorService/processGenerate.php b/tests/Integration/inc/Engine/CriticalPath/ProcessorService/processGenerate.php index 7ddc0c9e10..0a9ad2c3c9 100644 --- a/tests/Integration/inc/Engine/CriticalPath/ProcessorService/processGenerate.php +++ b/tests/Integration/inc/Engine/CriticalPath/ProcessorService/processGenerate.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\ProcessorService::process_generate + * Test class covering \WP_Rocket\Engine\CriticalPath\ProcessorService::process_generate * * @group CriticalPath * @group vfs diff --git a/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/delete.php b/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/delete.php index 370645f5c4..6b31b8fb71 100644 --- a/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/delete.php +++ b/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/delete.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\RESTVfsTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\RESTWPPost::delete + * Test class covering \WP_Rocket\Engine\CriticalPath\RESTWPPost::delete * @uses \WP_Rocket\Engine\CriticalPath\ProcessorService::process_delete * @uses \WP_Rocket\Engine\CriticalPath\DataManager::delete_cpcss * @uses \WP_Rocket\Admin\Options_Data::get diff --git a/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/generate.php b/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/generate.php index 279bfdbcc0..5bb33a4268 100644 --- a/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/generate.php +++ b/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/generate.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\RESTVfsTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\RESTWPPost::generate + * Test class covering \WP_Rocket\Engine\CriticalPath\RESTWPPost::generate * @group CriticalPath * @group vfs */ diff --git a/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php b/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php index fe1bd73bef..f1b2c42ecd 100644 --- a/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php +++ b/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\RESTVfsTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\RESTWPPost::register_delete_route + * Test class covering \WP_Rocket\Engine\CriticalPath\RESTWPPost::register_delete_route * @group CriticalPath */ class Test_RegisterDeleteRouter extends RESTVfsTestCase { diff --git a/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/registerGenerateRoute.php b/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/registerGenerateRoute.php index 763e0a7685..1ba7884552 100644 --- a/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/registerGenerateRoute.php +++ b/tests/Integration/inc/Engine/CriticalPath/RESTWPPost/registerGenerateRoute.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\RESTVfsTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\RESTWPPost::register_generate_route + * Test class covering \WP_Rocket\Engine\CriticalPath\RESTWPPost::register_generate_route * * @group CriticalPath */ diff --git a/tests/Integration/inc/Engine/HealthCheck/HealthCheck/missedCron.php b/tests/Integration/inc/Engine/HealthCheck/HealthCheck/missedCron.php index a8cb3c6d5f..3f5793bef6 100644 --- a/tests/Integration/inc/Engine/HealthCheck/HealthCheck/missedCron.php +++ b/tests/Integration/inc/Engine/HealthCheck/HealthCheck/missedCron.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\HealthCheck\HealthCheck::missed_cron + * Test class covering \WP_Rocket\Engine\HealthCheck\HealthCheck::missed_cron * * @group HealthCheck * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/API/PricingClient/getPricingData.php b/tests/Integration/inc/Engine/License/API/PricingClient/getPricingData.php index d4ccae4fe0..0caddb8cec 100644 --- a/tests/Integration/inc/Engine/License/API/PricingClient/getPricingData.php +++ b/tests/Integration/inc/Engine/License/API/PricingClient/getPricingData.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\PricingClient::get_pricing_data + * Test class covering \WP_Rocket\Engine\License\API\PricingClient::get_pricing_data * * @group License */ diff --git a/tests/Integration/inc/Engine/License/API/UserClient/getUserData.php b/tests/Integration/inc/Engine/License/API/UserClient/getUserData.php index 578146553b..8fc3eea35c 100644 --- a/tests/Integration/inc/Engine/License/API/UserClient/getUserData.php +++ b/tests/Integration/inc/Engine/License/API/UserClient/getUserData.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\UserClient::get_user_data + * Test class covering \WP_Rocket\Engine\License\API\UserClient::get_user_data * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/addExpiredBubble.php b/tests/Integration/inc/Engine/License/Subscriber/addExpiredBubble.php index 462c020e35..62f3078dd5 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/addExpiredBubble.php +++ b/tests/Integration/inc/Engine/License/Subscriber/addExpiredBubble.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::add_expired_bubble + * Test class covering \WP_Rocket\Engine\License\Subscriber::add_expired_bubble * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/addLicenseExpireWarning.php b/tests/Integration/inc/Engine/License/Subscriber/addLicenseExpireWarning.php index f080559233..5d7f9f16b9 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/addLicenseExpireWarning.php +++ b/tests/Integration/inc/Engine/License/Subscriber/addLicenseExpireWarning.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::add_license_expire_warning + * Test class covering \WP_Rocket\Engine\License\Subscriber::add_license_expire_warning * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/addLocalizeScriptData.php b/tests/Integration/inc/Engine/License/Subscriber/addLocalizeScriptData.php index f50eade5a1..7cf3af78f7 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/addLocalizeScriptData.php +++ b/tests/Integration/inc/Engine/License/Subscriber/addLocalizeScriptData.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::add_localize_script_data + * Test class covering \WP_Rocket\Engine\License\Subscriber::add_localize_script_data * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/addNotificationBubble.php b/tests/Integration/inc/Engine/License/Subscriber/addNotificationBubble.php index a691d18e77..b45727e1a4 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/addNotificationBubble.php +++ b/tests/Integration/inc/Engine/License/Subscriber/addNotificationBubble.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::add_notification_bubble + * Test class covering \WP_Rocket\Engine\License\Subscriber::add_notification_bubble * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/dismissNotificationBubble.php b/tests/Integration/inc/Engine/License/Subscriber/dismissNotificationBubble.php index 4d3c3e2ec7..175bf9878c 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/dismissNotificationBubble.php +++ b/tests/Integration/inc/Engine/License/Subscriber/dismissNotificationBubble.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::dismiss_notification_bubble + * Test class covering \WP_Rocket\Engine\License\Subscriber::dismiss_notification_bubble * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/dismissPromoBanner.php b/tests/Integration/inc/Engine/License/Subscriber/dismissPromoBanner.php index 8ce63e63b7..cbd40d4f54 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/dismissPromoBanner.php +++ b/tests/Integration/inc/Engine/License/Subscriber/dismissPromoBanner.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AjaxTestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::dismiss_promo_banner + * Test class covering \WP_Rocket\Engine\License\Subscriber::dismiss_promo_banner * * @group AdminOnly * @group License diff --git a/tests/Integration/inc/Engine/License/Subscriber/dismissRenewalBanner.php b/tests/Integration/inc/Engine/License/Subscriber/dismissRenewalBanner.php index 812a61ea4a..af2e2bbb9f 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/dismissRenewalBanner.php +++ b/tests/Integration/inc/Engine/License/Subscriber/dismissRenewalBanner.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AjaxTestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::dismiss_renewal_banner + * Test class covering \WP_Rocket\Engine\License\Subscriber::dismiss_renewal_banner * * @group AdminOnly * @group License diff --git a/tests/Integration/inc/Engine/License/Subscriber/displayPromoBanner.php b/tests/Integration/inc/Engine/License/Subscriber/displayPromoBanner.php index c3e2813b98..ea1ccfba71 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/displayPromoBanner.php +++ b/tests/Integration/inc/Engine/License/Subscriber/displayPromoBanner.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::display_promo_banner + * Test class covering \WP_Rocket\Engine\License\Subscriber::display_promo_banner * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/displayRenewalExpiredBanner.php b/tests/Integration/inc/Engine/License/Subscriber/displayRenewalExpiredBanner.php index 9eef485e11..8fbe167fbb 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/displayRenewalExpiredBanner.php +++ b/tests/Integration/inc/Engine/License/Subscriber/displayRenewalExpiredBanner.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::display_renewal_expired_banner + * Test class covering \WP_Rocket\Engine\License\Subscriber::display_renewal_expired_banner * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/displayRenewalSoonBanner.php b/tests/Integration/inc/Engine/License/Subscriber/displayRenewalSoonBanner.php index 7e181d1d17..43c800e236 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/displayRenewalSoonBanner.php +++ b/tests/Integration/inc/Engine/License/Subscriber/displayRenewalSoonBanner.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::display_renewal_soon_banner + * Test class covering \WP_Rocket\Engine\License\Subscriber::display_renewal_soon_banner * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/displayUpgradePopin.php b/tests/Integration/inc/Engine/License/Subscriber/displayUpgradePopin.php index 4f7988f6af..f78641afe5 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/displayUpgradePopin.php +++ b/tests/Integration/inc/Engine/License/Subscriber/displayUpgradePopin.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::display_upgrade_popin + * Test class covering \WP_Rocket\Engine\License\Subscriber::display_upgrade_popin * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/displayUpgradeSection.php b/tests/Integration/inc/Engine/License/Subscriber/displayUpgradeSection.php index cb2ac62844..002cf0776f 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/displayUpgradeSection.php +++ b/tests/Integration/inc/Engine/License/Subscriber/displayUpgradeSection.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::display_upgrade_section + * Test class covering \WP_Rocket\Engine\License\Subscriber::display_upgrade_section * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/maybeDisableOcd.php b/tests/Integration/inc/Engine/License/Subscriber/maybeDisableOcd.php index 5b715a8599..61c8d47628 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/maybeDisableOcd.php +++ b/tests/Integration/inc/Engine/License/Subscriber/maybeDisableOcd.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::maybe_disable_ocd + * Test class covering \WP_Rocket\Engine\License\Subscriber::maybe_disable_ocd * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/License/Subscriber/setDashboardSeenTransient.php b/tests/Integration/inc/Engine/License/Subscriber/setDashboardSeenTransient.php index 4d22a107d3..78db31a553 100644 --- a/tests/Integration/inc/Engine/License/Subscriber/setDashboardSeenTransient.php +++ b/tests/Integration/inc/Engine/License/Subscriber/setDashboardSeenTransient.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\License\Subscriber::set_dashboard_seen_transient + * Test class covering \WP_Rocket\Engine\License\Subscriber::set_dashboard_seen_transient * * @group License * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php b/tests/Integration/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php index 9ec8d87fdf..d6ffaec6ba 100644 --- a/tests/Integration/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php +++ b/tests/Integration/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AjaxTestCase; /** - * @covers WP_Rocket\Engine\Media\AboveTheFold\AJAX\Subscriber::add_lcp_data + * Test class covering WP_Rocket\Engine\Media\AboveTheFold\AJAX\Subscriber::add_lcp_data * * @group AboveTheFold */ diff --git a/tests/Integration/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtfAdmin.php b/tests/Integration/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtfAdmin.php index 7efd9f008b..406dd11de6 100644 --- a/tests/Integration/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtfAdmin.php +++ b/tests/Integration/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtfAdmin.php @@ -9,7 +9,7 @@ use WP_Rocket\Engine\Media\AboveTheFold\WarmUp\Controller; /** - * @covers \WP_Rocket\Engine\Media\AboveTheFold\Admin\Controller::truncate_atf_admin + * Test class covering \WP_Rocket\Engine\Media\AboveTheFold\Admin\Controller::truncate_atf_admin * * @group AboveTheFold */ diff --git a/tests/Integration/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php b/tests/Integration/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php index 19ae3f4a49..17a599fc46 100644 --- a/tests/Integration/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php +++ b/tests/Integration/inc/Engine/Media/AboveTheFold/Cron/Subscriber/atfCleanup.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\AboveTheFold\Cron\Subscriber::atf_cleanup + * Test class covering \WP_Rocket\Engine\Media\AboveTheFold\Cron\Subscriber::atf_cleanup * * @group AboveTheFold */ diff --git a/tests/Integration/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php b/tests/Integration/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php index 2e580f1998..4b7348a8da 100644 --- a/tests/Integration/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php +++ b/tests/Integration/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Media\AboveTheFold\Frontend\Subscriber::lcp + * Test class covering \WP_Rocket\Engine\Media\AboveTheFold\Frontend\Subscriber::lcp * * @group AboveTheFold */ diff --git a/tests/Integration/inc/Engine/Media/EmojisSubscriber/disableEmoji.php b/tests/Integration/inc/Engine/Media/EmojisSubscriber/disableEmoji.php index fa8c0bd0d6..fe8595155e 100644 --- a/tests/Integration/inc/Engine/Media/EmojisSubscriber/disableEmoji.php +++ b/tests/Integration/inc/Engine/Media/EmojisSubscriber/disableEmoji.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\EmojisSubscriber::disable_emoji + * Test class covering \WP_Rocket\Engine\Media\EmojisSubscriber::disable_emoji * * @group Media * @group Emojis diff --git a/tests/Integration/inc/Engine/Media/ImageDimensions/AdminSubscriber/addOption.php b/tests/Integration/inc/Engine/Media/ImageDimensions/AdminSubscriber/addOption.php index fdb214d5a2..ffe184e47a 100644 --- a/tests/Integration/inc/Engine/Media/ImageDimensions/AdminSubscriber/addOption.php +++ b/tests/Integration/inc/Engine/Media/ImageDimensions/AdminSubscriber/addOption.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\ImageDimensions\AdminSubscriber::add_option + * Test class covering \WP_Rocket\Engine\Media\ImageDimensions\AdminSubscriber::add_option * * @group AdminOnly * @group ImageDimensions diff --git a/tests/Integration/inc/Engine/Media/ImageDimensions/Subscriber/specifyImageDimensions.php b/tests/Integration/inc/Engine/Media/ImageDimensions/Subscriber/specifyImageDimensions.php index 7b971213e7..1269bfbe06 100644 --- a/tests/Integration/inc/Engine/Media/ImageDimensions/Subscriber/specifyImageDimensions.php +++ b/tests/Integration/inc/Engine/Media/ImageDimensions/Subscriber/specifyImageDimensions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Media\ImageDimensions\Subscriber::specify_image_dimensions + * Test class covering \WP_Rocket\Engine\Media\ImageDimensions\Subscriber::specify_image_dimensions * @group ImageDimensions * @group Media */ diff --git a/tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php b/tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php index 5d279dc5d9..a8fc8b4d5f 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\AdminSubscriber::add_option + * Test class covering \WP_Rocket\Engine\Media\Lazyload\AdminSubscriber::add_option * * @group AdminOnly * @group Lazyload diff --git a/tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/sanitizeExcludeLazyload.php b/tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/sanitizeExcludeLazyload.php index 6d22a2cefd..27cce675a7 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/sanitizeExcludeLazyload.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/AdminSubscriber/sanitizeExcludeLazyload.php @@ -9,7 +9,7 @@ use Mockery; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\AdminSubscriber::sanitize_exclude_lazyload + * Test class covering \WP_Rocket\Engine\Media\Lazyload\AdminSubscriber::sanitize_exclude_lazyload * * @group AdminOnly * @group Media diff --git a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php index 6cf24faf0b..cf0c7c46e6 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::add_meta_box + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::add_meta_box * @group AdminOnly */ class Test_AddMetaBox extends TestCase { diff --git a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php index b45d089aa8..160b14fbc0 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::add_option_safemode + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::add_option_safemode * @group AdminOnly */ class Test_addOptionSafemode extends TestCase { diff --git a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php index 9b170fb0be..4de4a33c29 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::maybe_add_error_notice + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::maybe_add_error_notice * @group AdminOnly */ class Test_maybeAddErrorNotice extends FilesystemTestCase { diff --git a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php index c90bdc2dde..472ec6e26c 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::exclude_rocket_lazyload_excluded_src + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::exclude_rocket_lazyload_excluded_src */ class Test_excludeRocketLazyloadExcludedSrc extends TestCase { diff --git a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php index 21466e7db0..6b36e44738 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php @@ -7,7 +7,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::maybe_replace_css_images + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::maybe_replace_css_images */ class Test_maybeReplaceCssImages extends FilesystemTestCase { diff --git a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/addExclusions.php b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/addExclusions.php index b6db47cebb..0c6d1c70ce 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/addExclusions.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/addExclusions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::add_exclusions + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::add_exclusions * * @group Media * @group Lazyload diff --git a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/insertLazyloadScript.php b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/insertLazyloadScript.php index 2ffda70031..83cc336029 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/insertLazyloadScript.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/insertLazyloadScript.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::insert_lazyload_script + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::insert_lazyload_script * @uses ::rocket_get_constant * @uses \RocketLazyload\Assets::insertLazyloadScript * diff --git a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyload.php b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyload.php index 231f5cb2af..47221cf274 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyload.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyload.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::lazyload + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::lazyload * @uses ::rocket_get_constant * * @group Lazyload diff --git a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php index 6f0f5752c7..29ddd256b2 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::lazyload_responsive + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::lazyload_responsive * * @group Media * @group Lazyload diff --git a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php index b81e81c894..f75f96d229 100644 --- a/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php +++ b/tests/Integration/inc/Engine/Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::maybe_disable_core_lazyload + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::maybe_disable_core_lazyload * * @group Media * @group Lazyload diff --git a/tests/Integration/inc/Engine/Optimization/AssetsLocalCache/getContent.php b/tests/Integration/inc/Engine/Optimization/AssetsLocalCache/getContent.php index d4ca1746bd..bb8fd8eeee 100644 --- a/tests/Integration/inc/Engine/Optimization/AssetsLocalCache/getContent.php +++ b/tests/Integration/inc/Engine/Optimization/AssetsLocalCache/getContent.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\AssetsLocalCache::get_content + * Test class covering \WP_Rocket\Engine\Optimization\AssetsLocalCache::get_content * @group Optimize * @group AssetsLocalCache */ diff --git a/tests/Integration/inc/Engine/Optimization/CacheDynamicResource/cacheDynamicResource.php b/tests/Integration/inc/Engine/Optimization/CacheDynamicResource/cacheDynamicResource.php index 5e1445a7ad..1d18dd3716 100644 --- a/tests/Integration/inc/Engine/Optimization/CacheDynamicResource/cacheDynamicResource.php +++ b/tests/Integration/inc/Engine/Optimization/CacheDynamicResource/cacheDynamicResource.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\CacheDynamicResource::cache_dynamic_resource + * Test class covering \WP_Rocket\Engine\Optimization\CacheDynamicResource::cache_dynamic_resource * @group CacheDynamicResource */ class Test_CacheDynamicResource extends FilesystemTestCase { diff --git a/tests/Integration/inc/Engine/Optimization/DeferJS/AdminSubscriber/addDeferJsOption.php b/tests/Integration/inc/Engine/Optimization/DeferJS/AdminSubscriber/addDeferJsOption.php index dfdb9ae13b..f424ed03a2 100644 --- a/tests/Integration/inc/Engine/Optimization/DeferJS/AdminSubscriber/addDeferJsOption.php +++ b/tests/Integration/inc/Engine/Optimization/DeferJS/AdminSubscriber/addDeferJsOption.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\AdminSubscriber::add_defer_js_option + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\AdminSubscriber::add_defer_js_option * * @group AdminOnly * @group DeferJS diff --git a/tests/Integration/inc/Engine/Optimization/DeferJS/AdminSubscriber/excludeJqueryDefer.php b/tests/Integration/inc/Engine/Optimization/DeferJS/AdminSubscriber/excludeJqueryDefer.php index b9da767c0a..461fab7edc 100644 --- a/tests/Integration/inc/Engine/Optimization/DeferJS/AdminSubscriber/excludeJqueryDefer.php +++ b/tests/Integration/inc/Engine/Optimization/DeferJS/AdminSubscriber/excludeJqueryDefer.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\AdminSubscriber::exclude_jquery_defer + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\AdminSubscriber::exclude_jquery_defer * * @group DeferJS * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferInlineJs.php b/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferInlineJs.php index f893578878..3d1398a2d0 100644 --- a/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferInlineJs.php +++ b/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferInlineJs.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\Subscriber::defer_inline_js + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\Subscriber::defer_inline_js * * @group DeferJSInline */ diff --git a/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferJs.php b/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferJs.php index 75aeba6e20..64597a0edc 100644 --- a/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferJs.php +++ b/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/deferJs.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\Subscriber::defer_js + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\Subscriber::defer_js * * @group DeferJS */ diff --git a/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/excludeJqueryCombine.php b/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/excludeJqueryCombine.php index 78643f14d6..d86fdfb5f8 100644 --- a/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/excludeJqueryCombine.php +++ b/tests/Integration/inc/Engine/Optimization/DeferJS/Subscriber/excludeJqueryCombine.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\Subscriber::exclude_jquery_combine + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\Subscriber::exclude_jquery_combine * * @group DeferJS */ diff --git a/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/addOptions.php b/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/addOptions.php index 3cbbb1fa77..4d33d634bc 100644 --- a/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/addOptions.php +++ b/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/addOptions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Admin\Subscriber::add_options + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Admin\Subscriber::add_options * * @group DelayJS * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/maybeDisableCombineJs.php b/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/maybeDisableCombineJs.php index 2bb27fd36a..0426ad1aaa 100644 --- a/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/maybeDisableCombineJs.php +++ b/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/maybeDisableCombineJs.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Admin\Subscriber::maybe_disable_combine_js + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Admin\Subscriber::maybe_disable_combine_js * * @group DelayJS * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/sanitizeOptions.php b/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/sanitizeOptions.php index fd9e9be040..d2d0c2c04a 100644 --- a/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/sanitizeOptions.php +++ b/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/sanitizeOptions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Admin\Subscriber::sanitize_options + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Admin\Subscriber::sanitize_options * * @group DelayJS * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/setOptionOnUpdate.php b/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/setOptionOnUpdate.php index 1203742202..125048c82c 100644 --- a/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/setOptionOnUpdate.php +++ b/tests/Integration/inc/Engine/Optimization/DelayJS/Admin/Subscriber/setOptionOnUpdate.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Admin\Subscriber::set_option_on_update + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Admin\Subscriber::set_option_on_update * * @group DelayJS * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/addDelayJsScript.php b/tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/addDelayJsScript.php index 0047f932f6..e6df31784c 100644 --- a/tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/addDelayJsScript.php +++ b/tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/addDelayJsScript.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Subscriber::add_delay_js_script + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Subscriber::add_delay_js_script * @group Optimize * @group DelayJS * diff --git a/tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/delayJs.php b/tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/delayJs.php index 3c96e4ff56..bafed26121 100644 --- a/tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/delayJs.php +++ b/tests/Integration/inc/Engine/Optimization/DelayJS/Subscriber/delayJs.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Subscriber::delay_js + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Subscriber::delay_js * @group Optimize * @group DelayJS * diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/Test_AddIncompatiblePluginsToDeactivate.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/Test_AddIncompatiblePluginsToDeactivate.php index 46fe1a9f4b..5a325bb559 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/Test_AddIncompatiblePluginsToDeactivate.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/Test_AddIncompatiblePluginsToDeactivate.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_incompatible_plugins_to_deactivate() + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_incompatible_plugins_to_deactivate() * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCacheIgnoredParameters.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCacheIgnoredParameters.php index 6f9daafbe4..56f4a0f33b 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCacheIgnoredParameters.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCacheIgnoredParameters.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_cache_ignored_parameters + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_cache_ignored_parameters * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCombineJsExcludedInline.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCombineJsExcludedInline.php index 466e36398b..53bc5aa87b 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCombineJsExcludedInline.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addCombineJsExcludedInline.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_combine_js_excluded_inline + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_combine_js_excluded_inline * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addDynamicListsScript.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addDynamicListsScript.php index b2688afe79..e72d82bdc6 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addDynamicListsScript.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addDynamicListsScript.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_dynamic_lists_script + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_dynamic_lists_script * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addJsExcludeFiles.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addJsExcludeFiles.php index c7b2234ac5..2dfdfb43f5 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addJsExcludeFiles.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addJsExcludeFiles.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_js_exclude_files() + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_js_exclude_files() * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMinifyExcludedExternalJs.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMinifyExcludedExternalJs.php index 2d2d4be47d..74795b65aa 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMinifyExcludedExternalJs.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMinifyExcludedExternalJs.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_minify_excluded_external_js + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_minify_excluded_external_js * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMoveAfterCombineJs.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMoveAfterCombineJs.php index 22468ce9d5..7e89a80cf9 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMoveAfterCombineJs.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addMoveAfterCombineJs.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_move_after_combine_js + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_move_after_combine_js * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addPreloadExclusions.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addPreloadExclusions.php index 20caa1d13a..4971c816b5 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addPreloadExclusions.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addPreloadExclusions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_preload_exclusions() + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_preload_exclusions() * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addStagingExclusions.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addStagingExclusions.php index f4f515a1dc..d6d611b06f 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addStagingExclusions.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/addStagingExclusions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_staging_exclusions() + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_staging_exclusions() * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/clearScheduleListsUpdate.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/clearScheduleListsUpdate.php index aeeb7913af..a33a4101ae 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/clearScheduleListsUpdate.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/clearScheduleListsUpdate.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::clear_schedule_lists_update + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::clear_schedule_lists_update * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/displayUpdateListsSection.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/displayUpdateListsSection.php index c100c9d920..dd3422eb93 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/displayUpdateListsSection.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/displayUpdateListsSection.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::display_update_lists_section + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::display_update_lists_section * * @group DynamicLists * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/registerRestRoute.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/registerRestRoute.php index 804db8db12..98712ed6ed 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/registerRestRoute.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/registerRestRoute.php @@ -5,7 +5,7 @@ use WPMedia\PHPUnit\Integration\RESTfulTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::register_rest_route + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::register_rest_route * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/scheduleListsUpdate.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/scheduleListsUpdate.php index 9bb49be914..93697b4132 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/scheduleListsUpdate.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/scheduleListsUpdate.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::schedule_lists_update + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::schedule_lists_update * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/updateLists.php b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/updateLists.php index 3327bc8208..4a7f737b16 100644 --- a/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/updateLists.php +++ b/tests/Integration/inc/Engine/Optimization/DynamicLists/Subscriber/updateLists.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::update_lists + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::update_lists * * @group DynamicLists */ diff --git a/tests/Integration/inc/Engine/Optimization/GoogleFonts/Admin/Subscriber/displayGoogleFontsEnabler.php b/tests/Integration/inc/Engine/Optimization/GoogleFonts/Admin/Subscriber/displayGoogleFontsEnabler.php index e66ac9d534..9992d6c551 100644 --- a/tests/Integration/inc/Engine/Optimization/GoogleFonts/Admin/Subscriber/displayGoogleFontsEnabler.php +++ b/tests/Integration/inc/Engine/Optimization/GoogleFonts/Admin/Subscriber/displayGoogleFontsEnabler.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Subscriber::display_google_fonts_enabler + * Test class covering \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Subscriber::display_google_fonts_enabler * @uses \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Settings::display_google_fonts_enabler * * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/GoogleFonts/Admin/Subscriber/enableGoogleFonts.php b/tests/Integration/inc/Engine/Optimization/GoogleFonts/Admin/Subscriber/enableGoogleFonts.php index 8033d3450a..eaf99f0db4 100644 --- a/tests/Integration/inc/Engine/Optimization/GoogleFonts/Admin/Subscriber/enableGoogleFonts.php +++ b/tests/Integration/inc/Engine/Optimization/GoogleFonts/Admin/Subscriber/enableGoogleFonts.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AjaxTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Subscriber::enable_google_fonts + * Test class covering \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Subscriber::enable_google_fonts * @uses \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Settings::enable_google_fonts * * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/GoogleFonts/Combine/optimize.php b/tests/Integration/inc/Engine/Optimization/GoogleFonts/Combine/optimize.php index 22ba62a785..1a97e8b243 100644 --- a/tests/Integration/inc/Engine/Optimization/GoogleFonts/Combine/optimize.php +++ b/tests/Integration/inc/Engine/Optimization/GoogleFonts/Combine/optimize.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\GoogleFonts::optimize + * Test class covering \WP_Rocket\Engine\Optimization\GoogleFonts::optimize * * @uses \WP_Rocket\Logger\Logger * diff --git a/tests/Integration/inc/Engine/Optimization/GoogleFonts/Subscriber/preconnect.php b/tests/Integration/inc/Engine/Optimization/GoogleFonts/Subscriber/preconnect.php index 26b335e082..0da6aa8001 100644 --- a/tests/Integration/inc/Engine/Optimization/GoogleFonts/Subscriber/preconnect.php +++ b/tests/Integration/inc/Engine/Optimization/GoogleFonts/Subscriber/preconnect.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\GoogleFonts\Subscriber::preconnect + * Test class covering \WP_Rocket\Engine\Optimization\GoogleFonts\Subscriber::preconnect * @group CombineGoogleFonts */ class Test_Preconnect extends TestCase { diff --git a/tests/Integration/inc/Engine/Optimization/IEConditionalSubscriber/extractIeConditionals.php b/tests/Integration/inc/Engine/Optimization/IEConditionalSubscriber/extractIeConditionals.php index bd008e38ed..061f5b7956 100644 --- a/tests/Integration/inc/Engine/Optimization/IEConditionalSubscriber/extractIeConditionals.php +++ b/tests/Integration/inc/Engine/Optimization/IEConditionalSubscriber/extractIeConditionals.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\Optimization\IEConditionalSubscriber; /** - * @covers \WP_Rocket\Engine\Optimization\IEConditionalSubscriber::extract_ie_conditionals + * Test class covering \WP_Rocket\Engine\Optimization\IEConditionalSubscriber::extract_ie_conditionals * * @group IE * @group Optimization diff --git a/tests/Integration/inc/Engine/Optimization/IEConditionalSubscriber/injectIeConditionals.php b/tests/Integration/inc/Engine/Optimization/IEConditionalSubscriber/injectIeConditionals.php index 25b8cba330..22aa89d693 100644 --- a/tests/Integration/inc/Engine/Optimization/IEConditionalSubscriber/injectIeConditionals.php +++ b/tests/Integration/inc/Engine/Optimization/IEConditionalSubscriber/injectIeConditionals.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\Engine\Optimization\IEConditionalSubscriber; /** - * @covers \WP_Rocket\Engine\Optimization\IEConditionalSubscriber::inject_ie_conditionals + * Test class covering \WP_Rocket\Engine\Optimization\IEConditionalSubscriber::inject_ie_conditionals * * @group IE * @group Optimization diff --git a/tests/Integration/inc/Engine/Optimization/Minify/AdminSubscriber/cleanMinifyAll.php b/tests/Integration/inc/Engine/Optimization/Minify/AdminSubscriber/cleanMinifyAll.php index 741517ec5e..31d472f314 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/AdminSubscriber/cleanMinifyAll.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/AdminSubscriber/cleanMinifyAll.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\AdminSubscriber::clean_minify_all + * Test class covering \WP_Rocket\Engine\Optimization\Minify\AdminSubscriber::clean_minify_all * @uses ::rocket_clean_minify * @uses ::rocket_direct_filesystem * diff --git a/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/Test_onUpdate.php b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/Test_onUpdate.php index d95f0fdd2d..cb09630277 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/Test_onUpdate.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/Test_onUpdate.php @@ -7,7 +7,7 @@ use function Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::on_update + * Test class covering \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::on_update */ class Test_onUpdate extends TestCase { diff --git a/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php index c769131af9..6284a5d4d8 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\inc\Engine\Optimization\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::clean_minify + * Test class covering \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::clean_minify * @uses ::rocket_clean_minify * @uses ::rocket_direct_filesystem * diff --git a/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php index 508f903277..e023cf20e5 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::regenerate_minify_css_key + * Test class covering \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::regenerate_minify_css_key * @uses ::create_rocket_uniqid * * @group Optimize diff --git a/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/onUpdate.php b/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/onUpdate.php index f04c8247ab..02f3a5ac59 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/onUpdate.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/onUpdate.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\CSS\Subscriber::on_update + * Test class covering \WP_Rocket\Engine\Optimization\Minify\CSS\Subscriber::on_update */ class Test_onUpdate extends TestCase { diff --git a/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php b/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php index cdc7f5f603..0fea8ec354 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\CSS\Subscriber::process + * Test class covering \WP_Rocket\Engine\Optimization\Minify\CSS\Subscriber::process * @uses \WP_Rocket\Engine\Optimization\Minify\CSS\Combine::optimize * @uses \WP_Rocket\Engine\Optimization\Minify\CSS\Minify::optimize * @uses ::get_rocket_parse_url diff --git a/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php b/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php index a7b7d7b6f0..c183d02acc 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\inc\Engine\Optimization\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\JS\Subscriber::process + * Test class covering \WP_Rocket\Engine\Optimization\Minify\JS\Subscriber::process * @uses \WP_Rocket\Engine\Optimization\Minify\JS\Combine::optimize * @uses \WP_Rocket\Engine\Optimization\Minify\JS\Minify::optimize * @uses ::get_rocket_parse_url diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php index 26de82c48d..9b64530c19 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::delete_old_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::delete_old_used_css * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/truncateUsedCssTable.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/truncateUsedCssTable.php index eb170b9629..ef50ec18ef 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/truncateUsedCssTable.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Database/truncateUsedCssTable.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::truncate_used_css_table + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::truncate_used_css_table * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/addOptionsFirstTime.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/addOptionsFirstTime.php index 41bcadb45c..a033121f20 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/addOptionsFirstTime.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/addOptionsFirstTime.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\OptionSubscriber::add_options + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\OptionSubscriber::add_options * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/sanitizeOptions.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/sanitizeOptions.php index 4231b03da5..bb4aa725ce 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/sanitizeOptions.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/OptionSubscriber/sanitizeOptions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\OptionSubscriber::sanitize_options + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\OptionSubscriber::sanitize_options * * @group AdminOnly */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php index 620592858b..44af5794cb 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::clean_used_css_and_cache + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::clean_used_css_and_cache * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/clearUsedcssResult.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/clearUsedcssResult.php index 2bef9d66bd..0e5294c8e5 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/clearUsedcssResult.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/clearUsedcssResult.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::clear_usedcss_result + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::clear_usedcss_result * * @group RUCSS * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteTermUsedCss.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteTermUsedCss.php index 2df186a571..2748b1d34e 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteTermUsedCss.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteTermUsedCss.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::delete_term_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::delete_term_used_css * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php index 1c459dec4c..be43bff51a 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php @@ -8,8 +8,8 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::delete_used_css_on_update_or_delete - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS::delete_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::delete_used_css_on_update_or_delete + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS::delete_used_css * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/displayNoTableNotice.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/displayNoTableNotice.php index 8135159d7f..b135ee879d 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/displayNoTableNotice.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/displayNoTableNotice.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Integration\DBTrait; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::display_no_table_notice + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::display_no_table_notice * * @group RUCSS * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeDeleteTransient.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeDeleteTransient.php index a11ea9aa91..b2dbcc542f 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeDeleteTransient.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeDeleteTransient.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::maybe_delete_transient + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::maybe_delete_transient */ class Test_maybeDeleteTransient extends TestCase { diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php index ff65ef6147..d5c73b269a 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::truncate_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::truncate_used_css * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/updateSafelistItems.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/updateSafelistItems.php index 489e0d194f..75df2eac5c 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/updateSafelistItems.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Admin/Subscriber/updateSafelistItems.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::update_safelist_items + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::update_safelist_items * * @group RUCSS * @group AdminOnly diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/maybeDisablePreloadFonts.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/maybeDisablePreloadFonts.php index 23d9a0e1d7..33c394f56d 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/maybeDisablePreloadFonts.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/maybeDisablePreloadFonts.php @@ -6,8 +6,8 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::maybe_disable_preload_fonts - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS::is_allowed() + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::maybe_disable_preload_fonts + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS::is_allowed() * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onUpdate.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onUpdate.php index 9cc3c0f2db..ff96e6a114 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onUpdate.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onUpdate.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::on_update + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::on_update * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/treeshake.php b/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/treeshake.php index b326bab711..b87db75fe5 100644 --- a/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/treeshake.php +++ b/tests/Integration/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/treeshake.php @@ -8,7 +8,7 @@ /** * @group RUCSS - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::treeshake + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::treeshake * * @group RUCSS */ diff --git a/tests/Integration/inc/Engine/Plugin/RenewalNotice/renewalNotice.php b/tests/Integration/inc/Engine/Plugin/RenewalNotice/renewalNotice.php index ab2d601d75..fef70a9104 100644 --- a/tests/Integration/inc/Engine/Plugin/RenewalNotice/renewalNotice.php +++ b/tests/Integration/inc/Engine/Plugin/RenewalNotice/renewalNotice.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Plugin\RenewalNotice::renewal_notice + * Test class covering \WP_Rocket\Engine\Plugin\RenewalNotice::renewal_notice * * @group Plugin */ diff --git a/tests/Integration/inc/Engine/Preload/Cron/Subscriber/processPendingUrls.php b/tests/Integration/inc/Engine/Preload/Cron/Subscriber/processPendingUrls.php index 8745e87a4b..1734d5cd24 100644 --- a/tests/Integration/inc/Engine/Preload/Cron/Subscriber/processPendingUrls.php +++ b/tests/Integration/inc/Engine/Preload/Cron/Subscriber/processPendingUrls.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Cron\Subscriber::process_pending_urls + * Test class covering \WP_Rocket\Engine\Preload\Cron\Subscriber::process_pending_urls */ class Test_processPendingUrls extends TestCase { diff --git a/tests/Integration/inc/Engine/Preload/Fonts/preloadFonts.php b/tests/Integration/inc/Engine/Preload/Fonts/preloadFonts.php index 2e01b347c8..750f174ddd 100644 --- a/tests/Integration/inc/Engine/Preload/Fonts/preloadFonts.php +++ b/tests/Integration/inc/Engine/Preload/Fonts/preloadFonts.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Fonts::preload_fonts + * Test class covering \WP_Rocket\Engine\Preload\Fonts::preload_fonts * * @group Preload * @group PreloadFonts diff --git a/tests/Integration/inc/Engine/Preload/Frontend/Subscriber/parseSitemap.php b/tests/Integration/inc/Engine/Preload/Frontend/Subscriber/parseSitemap.php index 12bdb45d7f..c030c6cc0a 100644 --- a/tests/Integration/inc/Engine/Preload/Frontend/Subscriber/parseSitemap.php +++ b/tests/Integration/inc/Engine/Preload/Frontend/Subscriber/parseSitemap.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Frontend\Subscriber::parse_sitemap + * Test class covering \WP_Rocket\Engine\Preload\Frontend\Subscriber::parse_sitemap * @group Preload */ class Test_ParseSitemap extends TestCase { diff --git a/tests/Integration/inc/Engine/Preload/Frontend/Subscriber/preloadUrl.php b/tests/Integration/inc/Engine/Preload/Frontend/Subscriber/preloadUrl.php index e7682b25fa..fab6918b69 100644 --- a/tests/Integration/inc/Engine/Preload/Frontend/Subscriber/preloadUrl.php +++ b/tests/Integration/inc/Engine/Preload/Frontend/Subscriber/preloadUrl.php @@ -8,7 +8,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Preload\Frontend\Subscriber::preload_url + * Test class covering \WP_Rocket\Engine\Preload\Frontend\Subscriber::preload_url * @group Preload */ class Test_PreloadUrl extends AdminTestCase diff --git a/tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addIncompatiblePlugins.php b/tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addIncompatiblePlugins.php index e03bc762a8..0034a5c52c 100644 --- a/tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addIncompatiblePlugins.php +++ b/tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addIncompatiblePlugins.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Links\AdminSubscriber::add_incompatible_plugins + * Test class covering \WP_Rocket\Engine\Preload\Links\AdminSubscriber::add_incompatible_plugins * * @group PreloadLinks */ diff --git a/tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addOption.php b/tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addOption.php index b6fb3bc1aa..eed09b5f7b 100644 --- a/tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addOption.php +++ b/tests/Integration/inc/Engine/Preload/Links/AdminSubscriber/addOption.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Links\AdminSubscriber::add_option + * Test class covering \WP_Rocket\Engine\Preload\Links\AdminSubscriber::add_option * * @group AdminOnly * @group PreloadLinks diff --git a/tests/Integration/inc/Engine/Preload/Links/Subscriber/addPreloadScript.php b/tests/Integration/inc/Engine/Preload/Links/Subscriber/addPreloadScript.php index 0f466e2310..dcd89b1e62 100644 --- a/tests/Integration/inc/Engine/Preload/Links/Subscriber/addPreloadScript.php +++ b/tests/Integration/inc/Engine/Preload/Links/Subscriber/addPreloadScript.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Links\Subscriber::add_preload_script + * Test class covering \WP_Rocket\Engine\Preload\Links\Subscriber::add_preload_script * * @group PreloadLinks */ diff --git a/tests/Integration/inc/Engine/Preload/Subscriber/cleanFullCache.php b/tests/Integration/inc/Engine/Preload/Subscriber/cleanFullCache.php index 50dab828e4..0b64ff0c26 100644 --- a/tests/Integration/inc/Engine/Preload/Subscriber/cleanFullCache.php +++ b/tests/Integration/inc/Engine/Preload/Subscriber/cleanFullCache.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers \WP_Rocket\Engine\Preload\Subscriber::clean_full_cache + * Test class covering \WP_Rocket\Engine\Preload\Subscriber::clean_full_cache */ class Test_CleanFullCache extends AdminTestCase { diff --git a/tests/Integration/inc/Engine/Preload/Subscriber/cleanPartialCache.php b/tests/Integration/inc/Engine/Preload/Subscriber/cleanPartialCache.php index b4b87b3be4..025d1bbf4b 100644 --- a/tests/Integration/inc/Engine/Preload/Subscriber/cleanPartialCache.php +++ b/tests/Integration/inc/Engine/Preload/Subscriber/cleanPartialCache.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\IsolateHookTrait; /** - * @covers \WP_Rocket\Engine\Preload\Subscriber::clean_partial_cache + * Test class covering \WP_Rocket\Engine\Preload\Subscriber::clean_partial_cache */ class Test_CleanPartialCache extends AdminTestCase { diff --git a/tests/Integration/inc/Engine/Preload/Subscriber/cleanUrls.php b/tests/Integration/inc/Engine/Preload/Subscriber/cleanUrls.php index adf475a0e7..1063946018 100644 --- a/tests/Integration/inc/Engine/Preload/Subscriber/cleanUrls.php +++ b/tests/Integration/inc/Engine/Preload/Subscriber/cleanUrls.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers \WP_Rocket\Engine\Preload\Subscriber::clean_urls + * Test class covering \WP_Rocket\Engine\Preload\Subscriber::clean_urls */ class Test_CleanUrls extends AdminTestCase { diff --git a/tests/Integration/inc/Engine/Preload/Subscriber/deleteUrlOnNotFound.php b/tests/Integration/inc/Engine/Preload/Subscriber/deleteUrlOnNotFound.php index c8391ec2b3..1cc670755b 100644 --- a/tests/Integration/inc/Engine/Preload/Subscriber/deleteUrlOnNotFound.php +++ b/tests/Integration/inc/Engine/Preload/Subscriber/deleteUrlOnNotFound.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\IsolateHookTrait; /** - * @covers \WP_Rocket\Engine\Preload\Subscriber::delete_url_on_not_found + * Test class covering \WP_Rocket\Engine\Preload\Subscriber::delete_url_on_not_found * @group Preload */ class Test_DeleteUrlOnNotFound extends AdminTestCase diff --git a/tests/Integration/inc/Engine/Preload/Subscriber/excludePrivatePostUri.php b/tests/Integration/inc/Engine/Preload/Subscriber/excludePrivatePostUri.php index 0e6ff571a7..80b73a9373 100644 --- a/tests/Integration/inc/Engine/Preload/Subscriber/excludePrivatePostUri.php +++ b/tests/Integration/inc/Engine/Preload/Subscriber/excludePrivatePostUri.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Subscriber::exclude_private_post_uri + * Test class covering \WP_Rocket\Engine\Preload\Subscriber::exclude_private_post_uri * * @group Preload */ diff --git a/tests/Integration/inc/Engine/Preload/Subscriber/loadInitialSitemap.php b/tests/Integration/inc/Engine/Preload/Subscriber/loadInitialSitemap.php index 7a8760dc1e..4f25ef1372 100644 --- a/tests/Integration/inc/Engine/Preload/Subscriber/loadInitialSitemap.php +++ b/tests/Integration/inc/Engine/Preload/Subscriber/loadInitialSitemap.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\ASTrait; /** - * @covers \WP_Rocket\Engine\Preload\Subscriber::maybe_load_initial_sitemap + * Test class covering \WP_Rocket\Engine\Preload\Subscriber::maybe_load_initial_sitemap * @group Preload */ class Test_LoadInitialSitemap extends AdminTestCase diff --git a/tests/Integration/inc/Engine/Preload/Subscriber/updateCacheRow.php b/tests/Integration/inc/Engine/Preload/Subscriber/updateCacheRow.php index beed3a6534..0fdfaee282 100644 --- a/tests/Integration/inc/Engine/Preload/Subscriber/updateCacheRow.php +++ b/tests/Integration/inc/Engine/Preload/Subscriber/updateCacheRow.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers \WP_Rocket\Engine\Preload\Subscriber::update_cache_row + * Test class covering \WP_Rocket\Engine\Preload\Subscriber::update_cache_row * @group Preload */ class Test_UpdateCacheRow extends AdminTestCase diff --git a/tests/Integration/inc/Engine/Support/Data/getSupportData.php b/tests/Integration/inc/Engine/Support/Data/getSupportData.php index c902196798..f9e45ad4d5 100644 --- a/tests/Integration/inc/Engine/Support/Data/getSupportData.php +++ b/tests/Integration/inc/Engine/Support/Data/getSupportData.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\Engine\Support\Data::get_support_data + * Test class covering \WP_Rocket\Engine\Support\Data::get_support_data * * @group Support */ diff --git a/tests/Integration/inc/Engine/Support/Subscriber/registerSupportRoute.php b/tests/Integration/inc/Engine/Support/Subscriber/registerSupportRoute.php index 2c5fc352bd..553ebbb390 100644 --- a/tests/Integration/inc/Engine/Support/Subscriber/registerSupportRoute.php +++ b/tests/Integration/inc/Engine/Support/Subscriber/registerSupportRoute.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\StubTrait; /** - * @covers \WP_Rocket\Engine\Support\Subscriber::register_support_route + * Test class covering \WP_Rocket\Engine\Support\Subscriber::register_support_route * * @group Support */ diff --git a/tests/Integration/inc/Engine/WPRocketUninstall/uninstall.php b/tests/Integration/inc/Engine/WPRocketUninstall/uninstall.php index b30272515c..5478b890a2 100644 --- a/tests/Integration/inc/Engine/WPRocketUninstall/uninstall.php +++ b/tests/Integration/inc/Engine/WPRocketUninstall/uninstall.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers WPRocketUninstall::uninstall + * Test class covering WPRocketUninstall::uninstall * * @group AdminOnly * @group Uninstall diff --git a/tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php b/tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php index 620bbe647c..f45a1b88b8 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php @@ -5,7 +5,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Cloudways::varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\Cloudways::varnish_addon_title * @group Cloudways * @group ThirdParty */ diff --git a/tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishIP.php b/tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishIP.php index b4cd7b2ec0..3628a0337c 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishIP.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Cloudways/varnishIP.php @@ -5,7 +5,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Cloudways::varnish_ip + * Test class covering \WP_Rocket\ThirdParty\Hostings\Cloudways::varnish_ip * @group Cloudways * @group ThirdParty */ diff --git a/tests/Integration/inc/ThirdParty/Hostings/Dreampress/removeHtaccessHtmlExpire.php b/tests/Integration/inc/ThirdParty/Hostings/Dreampress/removeHtaccessHtmlExpire.php index 8ac17c114d..83891f4b20 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Dreampress/removeHtaccessHtmlExpire.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Dreampress/removeHtaccessHtmlExpire.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Dreampress::remove_htaccess_html_expire + * Test class covering \WP_Rocket\ThirdParty\Hostings\Dreampress::remove_htaccess_html_expire * * @group Dreampress * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php b/tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php index 4fc50a4418..2685e1e699 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Dreampress::set_varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\Dreampress::set_varnish_addon_title * * @group Dreampress * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php b/tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php index 49bd9246c6..1210fbe8c6 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Dreampress::set_varnish_host + * Test class covering \WP_Rocket\ThirdParty\Hostings\Dreampress::set_varnish_host * * @group Dreampress * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanDomain.php b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanDomain.php index 7198bc41d9..b6227430a7 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanDomain.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanDomain.php @@ -4,7 +4,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_domain + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_domain * * @group Godaddy * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanFile.php b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanFile.php index 26b56508d1..dc05055e71 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanFile.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanFile.php @@ -4,7 +4,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_file + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_file * * @group Godaddy * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanHome.php b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanHome.php index 1403c37a70..a7a3d3b8c7 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanHome.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/cleanHome.php @@ -4,7 +4,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_home + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_home * * @group Godaddy * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php index 469fdc53a1..ffe199c7bf 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php @@ -4,7 +4,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::remove_html_expire + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::remove_html_expire * * @group Godaddy * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/varnishField.php b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/varnishField.php index f2009b910e..3d5b1e3ffe 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Godaddy/varnishField.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Godaddy/varnishField.php @@ -4,7 +4,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::varnish_field + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::varnish_field * * @group Godaddy * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php index 328e407e68..85615afa0b 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache * * @group Kinsta * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php index d00d6aa245..d8fd33e938 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache_home + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache_home * * @group Kinsta * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php index 431f8d1d8c..f440c2ba62 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache_url + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache_url * * @group Kinsta * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php index 93ffa017d9..67d653cf7b 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_post_cache + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_post_cache * * @group Kinsta * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php index 88026275f1..3a545aa586 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::remove_partial_purge_hooks + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::remove_partial_purge_hooks * * @group Kinsta * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanDomain.php b/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanDomain.php index c6f59e5f33..1d68a6adb4 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanDomain.php +++ b/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanDomain.php @@ -2,7 +2,7 @@ namespace WP_Rocket\Tests\Integration\inc\ThirdParty\Hostings\LiteSpeed; /** - * @covers \WP_Rocket\ThirdParty\Hostings\LiteSpeed::litespeed_clean_domain + * Test class covering \WP_Rocket\ThirdParty\Hostings\LiteSpeed::litespeed_clean_domain * * @group LiteSpeed * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanFile.php b/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanFile.php index c2a4f52211..ab65952c7c 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanFile.php +++ b/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanFile.php @@ -2,7 +2,7 @@ namespace WP_Rocket\Tests\Integration\inc\ThirdParty\Hostings\LiteSpeed; /** - * @covers \WP_Rocket\ThirdParty\Hostings\LiteSpeed::litespeed_clean_domain + * Test class covering \WP_Rocket\ThirdParty\Hostings\LiteSpeed::litespeed_clean_domain * * @group LiteSpeed * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanHome.php b/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanHome.php index e755d0146e..ec092e68fa 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanHome.php +++ b/tests/Integration/inc/ThirdParty/Hostings/LiteSpeed/litespeedCleanHome.php @@ -2,7 +2,7 @@ namespace WP_Rocket\Tests\Integration\inc\ThirdParty\Hostings\LiteSpeed; /** - * @covers \WP_Rocket\ThirdParty\Hostings\LiteSpeed::litespeed_clean_domain + * Test class covering \WP_Rocket\ThirdParty\Hostings\LiteSpeed::litespeed_clean_domain * * @group LiteSpeed * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php b/tests/Integration/inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php index 4e17d507cb..1462421827 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php +++ b/tests/Integration/inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\O2Switch; /** - * @covers \WP_Rocket\ThirdParty\Hostings\O2Switch::add_purge_headers + * Test class covering \WP_Rocket\ThirdParty\Hostings\O2Switch::add_purge_headers * * @group O2Switch * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeHtaccessHtmlExpire.php b/tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeHtaccessHtmlExpire.php index 3f86cc44a0..2ca2935f0b 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeHtaccessHtmlExpire.php +++ b/tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeHtaccessHtmlExpire.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\O2Switch::remove_htaccess_html_expire + * Test class covering \WP_Rocket\ThirdParty\Hostings\O2Switch::remove_htaccess_html_expire * * @group O2Switch * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeRegexFromPurgeUrl.php b/tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeRegexFromPurgeUrl.php index b95473da0a..74d69e24f9 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeRegexFromPurgeUrl.php +++ b/tests/Integration/inc/ThirdParty/Hostings/O2Switch/removeRegexFromPurgeUrl.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\O2Switch; /** - * @covers \WP_Rocket\ThirdParty\Hostings\O2Switch::remove_regex_from_purge_url + * Test class covering \WP_Rocket\ThirdParty\Hostings\O2Switch::remove_regex_from_purge_url * * @group O2Switch * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php b/tests/Integration/inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php index 1be4ba9b4c..2a7bc48e46 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php +++ b/tests/Integration/inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\O2Switch::varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\O2Switch::varnish_addon_title * * @group O2Switch * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/OneCom/disableCDNChange.php b/tests/Integration/inc/ThirdParty/Hostings/OneCom/disableCDNChange.php index 0a70a83f5f..9a76449aad 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/OneCom/disableCDNChange.php +++ b/tests/Integration/inc/ThirdParty/Hostings/OneCom/disableCDNChange.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::disable_cdn_change + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::disable_cdn_change * @group OneCom */ class Test_DisableCDNChange extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php b/tests/Integration/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php index b1317a96b6..d745800205 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php +++ b/tests/Integration/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::exclude_from_cdn + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::exclude_from_cdn * @group OneCom */ class Test_ExcludeFromCDN extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeSetVarnishAddonTitle.php b/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeSetVarnishAddonTitle.php index 239a0d43a7..3b39e3bd46 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeSetVarnishAddonTitle.php +++ b/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeSetVarnishAddonTitle.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_set_varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_set_varnish_addon_title * @group OneCom */ class Test_MaybeSetVarnishAddonTitle extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php b/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php index bc76fd5a87..c6e5ac9260 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php +++ b/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option * @group OneCom */ class Test_MaybeUpdateCDNCname extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php b/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php index d4a501a5f5..6e34e56b52 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php +++ b/tests/Integration/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option * @group OneCom */ class Test_MaybeUpdateCDNZone extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/Pressidium/cleanPost.php b/tests/Integration/inc/ThirdParty/Hostings/Pressidium/cleanPost.php index d508e1b68d..7b3976561d 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Pressidium/cleanPost.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Pressidium/cleanPost.php @@ -9,7 +9,7 @@ /** - * @covers \WP_Rocket\ThirdParty\Hostings\Pressidium::clean_post + * Test class covering \WP_Rocket\ThirdParty\Hostings\Pressidium::clean_post * @group Pressidium */ class Test_cleanPost extends TestCase diff --git a/tests/Integration/inc/ThirdParty/Hostings/Pressidium/clearCacheAfterPressidium.php b/tests/Integration/inc/ThirdParty/Hostings/Pressidium/clearCacheAfterPressidium.php index 02df4f1851..c512b0a2ac 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Pressidium/clearCacheAfterPressidium.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Pressidium/clearCacheAfterPressidium.php @@ -7,7 +7,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Pressidium::clear_cache_after_pressidium + * Test class covering \WP_Rocket\ThirdParty\Hostings\Pressidium::clear_cache_after_pressidium * @group Pressidium */ class Test_clearCacheAfterPressidium extends AdminTestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/Pressidium/pressidiumVarnishField.php b/tests/Integration/inc/ThirdParty/Hostings/Pressidium/pressidiumVarnishField.php index 3ac9c99330..7018b84752 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Pressidium/pressidiumVarnishField.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Pressidium/pressidiumVarnishField.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Pressidium::pressidium_varnish_field + * Test class covering \WP_Rocket\ThirdParty\Hostings\Pressidium::pressidium_varnish_field * @group Pressidium */ class Test_pressidiumVarnishField extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/Pressidium/purgeUrl.php b/tests/Integration/inc/ThirdParty/Hostings/Pressidium/purgeUrl.php index f40812c84a..05ead80735 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/Pressidium/purgeUrl.php +++ b/tests/Integration/inc/ThirdParty/Hostings/Pressidium/purgeUrl.php @@ -9,7 +9,7 @@ /** - * @covers \WP_Rocket\ThirdParty\Hostings\Pressidium::purge_url + * Test class covering \WP_Rocket\ThirdParty\Hostings\Pressidium::purge_url * @group Pressidium */ class Test_purgeUrl extends TestCase diff --git a/tests/Integration/inc/ThirdParty/Hostings/ProIsp/maybeSetVarnishAddonTitle.php b/tests/Integration/inc/ThirdParty/Hostings/ProIsp/maybeSetVarnishAddonTitle.php index 13b36fe181..5b3d6804f6 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/ProIsp/maybeSetVarnishAddonTitle.php +++ b/tests/Integration/inc/ThirdParty/Hostings/ProIsp/maybeSetVarnishAddonTitle.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\ProIsp::maybe_set_varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\ProIsp::maybe_set_varnish_addon_title * @group ProIsp */ class Test_MaybeSetVarnishAddonTitle extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php b/tests/Integration/inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php index 94218c9913..090d29deda 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php +++ b/tests/Integration/inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\SpinUpWP::purge_site + * Test class covering \WP_Rocket\ThirdParty\Hostings\SpinUpWP::purge_site * * @group SpinUpWP * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/SpinUpWP/removeActions.php b/tests/Integration/inc/ThirdParty/Hostings/SpinUpWP/removeActions.php index 57e2492d96..97ec3ff456 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/SpinUpWP/removeActions.php +++ b/tests/Integration/inc/ThirdParty/Hostings/SpinUpWP/removeActions.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\SpinUpWP::remove_actions + * Test class covering \WP_Rocket\ThirdParty\Hostings\SpinUpWP::remove_actions * * @group SpinUpWP * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php index 8c3968ffce..25cce78b20 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPEngine::add_footprint + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPEngine::add_footprint * @uses ::rocket_get_constant * * @group WPEngine diff --git a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php index 4371031151..57c7216ad9 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPEngine::clean_wpengine + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPEngine::clean_wpengine * * @group WPEngine * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/runRocketBotAfterWPEngine.php b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/runRocketBotAfterWPEngine.php index ec0e3bced3..91633be3c9 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/runRocketBotAfterWPEngine.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/runRocketBotAfterWPEngine.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\CapTrait; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPEngine::run_rocket_bot_after_wpengine + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPEngine::run_rocket_bot_after_wpengine * @uses ::rocket_has_constant * @uses ::rocket_get_constant * @uses ::run_rocket_bot diff --git a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php index 6aa615a5f6..7cb57c7d4a 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php @@ -4,7 +4,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPEngine::varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPEngine::varnish_addon_title * * @group WPEngine * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/appendCacheControlHeader.php b/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/appendCacheControlHeader.php index fe72fc2519..c109f445ab 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/appendCacheControlHeader.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/appendCacheControlHeader.php @@ -4,7 +4,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPXCloud::append_cache_control_header + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPXCloud::append_cache_control_header * * @group WPXCloud */ diff --git a/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php b/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php index aa4c51e4d0..0d3e2d6803 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php @@ -5,7 +5,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPXCloud::varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPXCloud::varnish_addon_title * @group WPXCloud */ class Test_VarnishAddonTitle extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php b/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php index 11f9e2e50b..3f223a7b48 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPXCloud::varnish_ip + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPXCloud::varnish_ip * @group WPXCloud */ class Test_VarnishIP extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Hostings/WordPressCom/purgeWPCache.php b/tests/Integration/inc/ThirdParty/Hostings/WordPressCom/purgeWPCache.php index 803d63fbbd..8f82a517c2 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WordPressCom/purgeWPCache.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WordPressCom/purgeWPCache.php @@ -4,7 +4,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WordPressCom::purge_wp_cache + * Test class covering \WP_Rocket\ThirdParty\Hostings\WordPressCom::purge_wp_cache * * @group WordPressCom * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php b/tests/Integration/inc/ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php index 1fcbd26d94..ae8c93a6f4 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\SettingsTrait; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ads\Adthrive::add_delay_js_exclusion + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ads\Adthrive::add_delay_js_exclusion * * @group Adthrive * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php b/tests/Integration/inc/ThirdParty/Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php index 61a14fe5c0..fe04d429e1 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ads\Adthrive::maybe_add_delay_js_exclusion + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ads\Adthrive::maybe_add_delay_js_exclusion * * @group Adthrive * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/addCdnHelperMessage.php b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/addCdnHelperMessage.php index 148dc516b0..56b8c1a4de 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/addCdnHelperMessage.php +++ b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/addCdnHelperMessage.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::add_cdn_helper_message + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::add_cdn_helper_message */ class Test_addCdnHelperMessage extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/disableCloudflareOption.php b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/disableCloudflareOption.php index ebf2e1a076..39a32b7116 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/disableCloudflareOption.php +++ b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/disableCloudflareOption.php @@ -8,7 +8,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::disable_cloudflare_option + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::disable_cloudflare_option * * @group ThirdParty * @group CloudflarePlugin diff --git a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCacheNotice.php b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCacheNotice.php index 444bb3e796..1ed66cfc3f 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCacheNotice.php +++ b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCacheNotice.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_apo_cache_notice + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_apo_cache_notice * * @group AdminOnly * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCookiesNotice.php b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCookiesNotice.php index 49fd5c926a..0fca02ed1c 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCookiesNotice.php +++ b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCookiesNotice.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\AdminTestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_apo_cookies_notice + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_apo_cookies_notice * * @group AdminOnly * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayServerPushingModeNotice.php b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayServerPushingModeNotice.php index 4065823df4..769ced260d 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayServerPushingModeNotice.php +++ b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/displayServerPushingModeNotice.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_server_pushing_mode_notice + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_server_pushing_mode_notice * * @group AdminOnly * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php index 02f37c79d5..bc406760f1 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php +++ b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::hide_addon_radio + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::hide_addon_radio * * @group ThirdParty * @group CloudflarePlugin diff --git a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php index c89fbb93de..7511f70f67 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php +++ b/tests/Integration/inc/ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::update_addon_field + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::update_addon_field * * @group ThirdParty * @group CloudflarePlugin diff --git a/tests/Integration/inc/ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php b/tests/Integration/inc/ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php index 56a5562e44..f383312286 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php +++ b/tests/Integration/inc/ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php @@ -3,7 +3,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\ConvertPlug::excluded_from_rucss + * Test class covering \WP_Rocket\ThirdParty\Plugins\ConvertPlug::excluded_from_rucss * @group ConvertPlug */ class Test_ExcludedFromRucss extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/reformatShopUrlForPreload.php b/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/reformatShopUrlForPreload.php index bf3840cf3f..fcae0d5a49 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/reformatShopUrlForPreload.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/reformatShopUrlForPreload.php @@ -7,7 +7,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::reformat_shop_url_for_preload + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::reformat_shop_url_for_preload * @group WooCommerce * @group ThirdParty * @group WithWoo diff --git a/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showEmptyProductGalleryWithDelayJS.php b/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showEmptyProductGalleryWithDelayJS.php index e74ae752bc..38fdf1ced3 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showEmptyProductGalleryWithDelayJS.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showEmptyProductGalleryWithDelayJS.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::show_empty_product_gallery_with_delayJS + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::show_empty_product_gallery_with_delayJS * @group WooCommerce * @group ThirdParty * @group WithWoo diff --git a/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showNotemptyProductGalleryWithDelayJS.php b/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showNotemptyProductGalleryWithDelayJS.php index a93d4fde30..ff2b1162be 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showNotemptyProductGalleryWithDelayJS.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showNotemptyProductGalleryWithDelayJS.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::show_notempty_product_gallery_with_delayJS + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::show_notempty_product_gallery_with_delayJS * @group WooCommerce * @group ThirdParty * @group WithWoo diff --git a/tests/Integration/inc/ThirdParty/Plugins/I18n/TranslatePress/detectHomepage.php b/tests/Integration/inc/ThirdParty/Plugins/I18n/TranslatePress/detectHomepage.php index e5bbba307c..844361c85b 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/I18n/TranslatePress/detectHomepage.php +++ b/tests/Integration/inc/ThirdParty/Plugins/I18n/TranslatePress/detectHomepage.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::detect_homepage + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::detect_homepage * @group TranslatePress */ class Test_detectHomepage extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php b/tests/Integration/inc/ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php index fc7e5c0b6c..061f761222 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php +++ b/tests/Integration/inc/ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php @@ -8,7 +8,7 @@ /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\Weglot::add_langs_to_referer + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\Weglot::add_langs_to_referer * @group Weglot */ class Test_addLangsToReferer extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Plugins/InlineRelatedPosts/excludeInlineFromRucss.php b/tests/Integration/inc/ThirdParty/Plugins/InlineRelatedPosts/excludeInlineFromRucss.php index e427cc863d..230a7630a9 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/InlineRelatedPosts/excludeInlineFromRucss.php +++ b/tests/Integration/inc/ThirdParty/Plugins/InlineRelatedPosts/excludeInlineFromRucss.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Plugins\InlineRelatedPosts; /** - * @covers \WP_Rocket\ThirdParty\Plugins\InlineRelatedPosts::exclude_inline_from_rucss + * Test class covering \WP_Rocket\ThirdParty\Plugins\InlineRelatedPosts::exclude_inline_from_rucss * @group InlineRelatedPosts */ class Test_ExcludeInlineFromRucss extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php b/tests/Integration/inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php index 9dd1daec13..950985a6f7 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Jetpack::add_jetpack_sitemap + * Test class covering \WP_Rocket\ThirdParty\Plugins\Jetpack::add_jetpack_sitemap * * @group Jetpack * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php b/tests/Integration/inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php index d151d6dd09..78354962e2 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php +++ b/tests/Integration/inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\ModPagespeed::show_admin_notice + * Test class covering \WP_Rocket\ThirdParty\Plugins\ModPagespeed::show_admin_notice * @group AdminOnly * @group mod_pagespeed * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmp.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmp.php index dc42e2ef87..86a0e6af11 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmp.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmp.php @@ -6,7 +6,7 @@ use AMP_Options_Manager; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::disable_options_on_amp + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::disable_options_on_amp * @group ThirdParty * @group WithAmp */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmpWithCloudflare.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmpWithCloudflare.php index 651a49769a..7bdc059421 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmpWithCloudflare.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmpWithCloudflare.php @@ -5,7 +5,7 @@ use AMP_Theme_Support;; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::disable_options_on_amp + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::disable_options_on_amp * @group WithAmpAndCloudflare */ class Test_DisableOptionsOnAmpWithCloudflare extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php index cdd16e4df0..56d0a40d05 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::exclude_script_from_delay_js + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::exclude_script_from_delay_js * @group ThirdParty * @group WithAmp */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/isAmpCompatibleCallback.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/isAmpCompatibleCallback.php index ebd87d2272..55523d960a 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/isAmpCompatibleCallback.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/AMP/isAmpCompatibleCallback.php @@ -6,7 +6,7 @@ use AMP_Options_Manager; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::is_amp_compatible_callback + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::is_amp_compatible_callback * @group ThirdParty * @group WithAmp */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Autoptimize/warnWhenAggregateInlineCssAndCPCSSActive.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Autoptimize/warnWhenAggregateInlineCssAndCPCSSActive.php index 18ea57d2e2..5ea5ce5143 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Autoptimize/warnWhenAggregateInlineCssAndCPCSSActive.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Autoptimize/warnWhenAggregateInlineCssAndCPCSSActive.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\ThirdParty\Plugins\Optimization\Autoptimize::warn_when_aggregate_inline_css_and_cpcss_active + * Test class covering WP_Rocket\ThirdParty\Plugins\Optimization\Autoptimize::warn_when_aggregate_inline_css_and_cpcss_active * * @group Autoptimize * @group AdminOnly diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Autoptimize/warnWhenJsAggregationAndDelayJsActive.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Autoptimize/warnWhenJsAggregationAndDelayJsActive.php index 3e07a874a1..5a0ac3af78 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Autoptimize/warnWhenJsAggregationAndDelayJsActive.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Autoptimize/warnWhenJsAggregationAndDelayJsActive.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\ThirdParty\Plugins\Optimization\Autoptimize::warn_when_js_aggregation_and_delay_js_active + * Test class covering WP_Rocket\ThirdParty\Plugins\Optimization\Autoptimize::warn_when_js_aggregation_and_delay_js_active * * @group Autoptimize * @group AdminOnly diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addConflict.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addConflict.php index c2bb774069..5c6b63e240 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addConflict.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addConflict.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\Ezoic::add_conflict + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\Ezoic::add_conflict * * @group Ezoic * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addExplanations.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addExplanations.php index 064aca7e1d..e362620295 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addExplanations.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Ezoic/addExplanations.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\Ezoic::add_explanations + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\Ezoic::add_explanations * * @group Ezoic * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Hummingbird/warningNotice.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Hummingbird/warningNotice.php index e358ef4186..50255c82f3 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Hummingbird/warningNotice.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Hummingbird/warningNotice.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\Hummingbird::warning_notice + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\Hummingbird::warning_notice * * @group Hummingbird * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Perfmatters/disableRucssSetting.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Perfmatters/disableRucssSetting.php index 74c0c9d4d8..4047dbca4d 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/Perfmatters/disableRucssSetting.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/Perfmatters/disableRucssSetting.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\ThirdParty\Plugins\Optimization\Perfmatters::disable_rucss_option + * Test class covering WP_Rocket\ThirdParty\Plugins\Optimization\Perfmatters::disable_rucss_option * * @group Perfmatters */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/RapidLoad/disableRucssSetting.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/RapidLoad/disableRucssSetting.php index b989f91421..5fa0665f83 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/RapidLoad/disableRucssSetting.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/RapidLoad/disableRucssSetting.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\ThirdParty\Plugins\Optimization\RapidLoad::disable_rucss_option + * Test class covering WP_Rocket\ThirdParty\Plugins\Optimization\RapidLoad::disable_rucss_option * * @group RapidLoad */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/RocketLazyLoad/excludeRocketLazyLoadScript.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/RocketLazyLoad/excludeRocketLazyLoadScript.php index df8329c75c..499e84ce1c 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/RocketLazyLoad/excludeRocketLazyLoadScript.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/RocketLazyLoad/excludeRocketLazyLoadScript.php @@ -4,7 +4,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\ThirdParty\Plugins\Optimization\RocketLazyLoad::exclude_rocket_lazyload_script + * Test class covering WP_Rocket\ThirdParty\Plugins\Optimization\RocketLazyLoad::exclude_rocket_lazyload_script * * @group RocketLazyLoad */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/WPMeteor/disableDelayJs.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/WPMeteor/disableDelayJs.php index 0de24bcada..f4da69351d 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/WPMeteor/disableDelayJs.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/WPMeteor/disableDelayJs.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\WPMeteor::disable_delay_js + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\WPMeteor::disable_delay_js * * @group WPMeteor * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Optimization/WPMeteor/maybeDisableDelayJsField.php b/tests/Integration/inc/ThirdParty/Plugins/Optimization/WPMeteor/maybeDisableDelayJsField.php index da0f1fa710..439519d03e 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Optimization/WPMeteor/maybeDisableDelayJsField.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Optimization/WPMeteor/maybeDisableDelayJsField.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\WPMeteor::maybe_disable_delay_js_field + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\WPMeteor::maybe_disable_delay_js_field * * @group WPMeteor * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScripts.php b/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScripts.php index 6efb6310e4..0247a5f83c 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScripts.php +++ b/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScripts.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\PDFEmbedder::exclude_pdfembedder_scripts + * Test class covering \WP_Rocket\ThirdParty\Plugins\PDFEmbedder::exclude_pdfembedder_scripts * @group ThirdParty * @group PDFEmbedder */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsPremium.php b/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsPremium.php index 47fd22959a..882e87b723 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsPremium.php +++ b/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsPremium.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\PDFEmbedder::exclude_pdfembedder_scripts + * Test class covering \WP_Rocket\ThirdParty\Plugins\PDFEmbedder::exclude_pdfembedder_scripts * @group ThirdParty * @group PDFEmbedderPremium */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsSecure.php b/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsSecure.php index 9c8a392a8e..82b41a771d 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsSecure.php +++ b/tests/Integration/inc/ThirdParty/Plugins/PDFEmbedder/excludePDFEmbedderScriptsSecure.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\PDFEmbedder::exclude_pdfembedder_scripts + * Test class covering \WP_Rocket\ThirdParty\Plugins\PDFEmbedder::exclude_pdfembedder_scripts * @group ThirdParty * @group PDFEmbedderSecure */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/BeaverBuilder/purgeCache.php b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/BeaverBuilder/purgeCache.php index a8da918b94..1dac0135ff 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/BeaverBuilder/purgeCache.php +++ b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/BeaverBuilder/purgeCache.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers WP_Rocket\ThirdParty\Plugins\PageBuilder\BeaverBuilder::purge_cache + * Test class covering WP_Rocket\ThirdParty\Plugins\PageBuilder\BeaverBuilder::purge_cache * @group BeaverBuilder * @group ThirdParty */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/addFixAnimationsScript.php b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/addFixAnimationsScript.php index e918192350..2273aa5520 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/addFixAnimationsScript.php +++ b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/addFixAnimationsScript.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::add_fix_animation_script + * Test class covering \WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::add_fix_animation_script * @group Elementor * @group ThirdParty */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php index eb9868a304..0257745e71 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php +++ b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::clear_cache + * Test class covering WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::clear_cache * @group Elementor * @group ThirdParty */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php index 1184b4a16b..48c3eb6878 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php +++ b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::exclude_js + * Test class covering \WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::exclude_js * * @group Elementor * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludePostCss.php b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludePostCss.php index aae56cd0e7..5fad61812a 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludePostCss.php +++ b/tests/Integration/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludePostCss.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::exclude_post_css + * Test class covering WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::exclude_post_css * @group Elementor * @group ThirdParty */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/RevolutionSlider/excludeDeferJs.php b/tests/Integration/inc/ThirdParty/Plugins/RevolutionSlider/excludeDeferJs.php index 38d1b077b0..04443de6f1 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/RevolutionSlider/excludeDeferJs.php +++ b/tests/Integration/inc/ThirdParty/Plugins/RevolutionSlider/excludeDeferJs.php @@ -4,7 +4,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\RevolutionSlider::exclude_defer_js + * Test class covering \WP_Rocket\ThirdParty\Plugins\RevolutionSlider::exclude_defer_js * * @group RevolutionSlider * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php b/tests/Integration/inc/ThirdParty/Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php index 90a1a3e1eb..86aeb39fe7 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php +++ b/tests/Integration/inc/ThirdParty/Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SEO\AllInOneSEOPack::add_all_in_one_seo_sitemap + * Test class covering \WP_Rocket\ThirdParty\Plugins\SEO\AllInOneSEOPack::add_all_in_one_seo_sitemap * @group AllInOneSeoPack */ class Test_AddAllInOneSeoSitemap extends TestCase diff --git a/tests/Integration/inc/ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php b/tests/Integration/inc/ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php index 3f8a936492..68b116abad 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php +++ b/tests/Integration/inc/ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SEO\RankMathSEO::rocket_sitemap + * Test class covering \WP_Rocket\ThirdParty\Plugins\SEO\RankMathSEO::rocket_sitemap * * @group RankMathSEO * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php b/tests/Integration/inc/ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php index 6348f2d565..a22ffaa4b4 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php +++ b/tests/Integration/inc/ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SEO\SEOPress::add_seopress_sitemap + * Test class covering \WP_Rocket\ThirdParty\Plugins\SEO\SEOPress::add_seopress_sitemap * * @group SEOPress * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php b/tests/Integration/inc/ThirdParty/Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php index 5cd241babd..00954a9117 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php +++ b/tests/Integration/inc/ThirdParty/Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php @@ -8,7 +8,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SEO\TheSEOFramework::add_tsf_sitemap_to_preload + * Test class covering \WP_Rocket\ThirdParty\Plugins\SEO\TheSEOFramework::add_tsf_sitemap_to_preload * * @group TheSEOFramework * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/popIpFromWhitelist.php b/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/popIpFromWhitelist.php index fded311ceb..7091b9dcfd 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/popIpFromWhitelist.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/popIpFromWhitelist.php @@ -7,7 +7,7 @@ use wfConfig; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::pop_ip_from_whitelist + * Test class covering \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::pop_ip_from_whitelist * * @group WordFence * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php b/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php index 9d599b5f16..dcc294b0b7 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php @@ -7,7 +7,7 @@ use wfConfig; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::pop_old_ip + * Test class covering \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::pop_old_ip * * @group WordFence * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/whitelistIPs.php b/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/whitelistIPs.php index 700660e69a..88d9c5b7f0 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/whitelistIPs.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Security/WordFence/whitelistIPs.php @@ -7,7 +7,7 @@ use wordfence; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::whitelist_wordfence_firewall_ips + * Test class covering \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::whitelist_wordfence_firewall_ips * * @group WordFence * @group ThirdParty diff --git a/tests/Integration/inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php b/tests/Integration/inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php index 1272591cb8..3603fe45b4 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php +++ b/tests/Integration/inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SimpleCustomCss::cache_sccss + * Test class covering \WP_Rocket\ThirdParty\Plugins\SimpleCustomCss::cache_sccss * @group ThirdParty * @group WithSCCSS */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php b/tests/Integration/inc/ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php index 0eb2010698..ee8611cd06 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php +++ b/tests/Integration/inc/ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SimpleCustomCss::update_cache_file + * Test class covering \WP_Rocket\ThirdParty\Plugins\SimpleCustomCss::update_cache_file * @group ThirdParty * @group WithSCCSS */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/Smush/isSmushIframesLazyloadActive.php b/tests/Integration/inc/ThirdParty/Plugins/Smush/isSmushIframesLazyloadActive.php index d4c9ce5452..a57c317dd2 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Smush/isSmushIframesLazyloadActive.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Smush/isSmushIframesLazyloadActive.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\ThirdParty\Plugins\Smush; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Smush::is_smush_iframes_lazyload_active + * Test class covering \WP_Rocket\ThirdParty\Plugins\Smush::is_smush_iframes_lazyload_active * @group ThirdParty * @group Smush * @group WithSmush diff --git a/tests/Integration/inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php b/tests/Integration/inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php index 36ed92d8e2..bfc273b56c 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\ThirdParty\Plugins\Smush; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Smush::is_smush_lazyload_active + * Test class covering \WP_Rocket\ThirdParty\Plugins\Smush::is_smush_lazyload_active * @group ThirdParty * @group Smush * @group WithSmush diff --git a/tests/Integration/inc/ThirdParty/Plugins/Smush/maybeDeactivateRocketLazyload.php b/tests/Integration/inc/ThirdParty/Plugins/Smush/maybeDeactivateRocketLazyload.php index 7007a50f29..326260445a 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/Smush/maybeDeactivateRocketLazyload.php +++ b/tests/Integration/inc/ThirdParty/Plugins/Smush/maybeDeactivateRocketLazyload.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Integration\inc\ThirdParty\Plugins\Smush; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Smush::maybe_deactivate_rocket_lazyload + * Test class covering \WP_Rocket\ThirdParty\Plugins\Smush::maybe_deactivate_rocket_lazyload * @group ThirdParty * @group Smush * @group WithSmush diff --git a/tests/Integration/inc/ThirdParty/Plugins/TheEventsCalendar/excludeFromPreloadCalendars.php b/tests/Integration/inc/ThirdParty/Plugins/TheEventsCalendar/excludeFromPreloadCalendars.php index bb81d27cad..371568354e 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/TheEventsCalendar/excludeFromPreloadCalendars.php +++ b/tests/Integration/inc/ThirdParty/Plugins/TheEventsCalendar/excludeFromPreloadCalendars.php @@ -7,7 +7,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\TheEventsCalendar::exclude_from_preload_calendars + * Test class covering \WP_Rocket\ThirdParty\Plugins\TheEventsCalendar::exclude_from_preload_calendars * @group ThirdParty * @group TheEventsCalendar */ diff --git a/tests/Integration/inc/ThirdParty/Plugins/UnlimitedElements/excludeInlineFromRucss.php b/tests/Integration/inc/ThirdParty/Plugins/UnlimitedElements/excludeInlineFromRucss.php index 27ccf49e37..b478a9d3ff 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/UnlimitedElements/excludeInlineFromRucss.php +++ b/tests/Integration/inc/ThirdParty/Plugins/UnlimitedElements/excludeInlineFromRucss.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Plugins\UnlimitedElements; /** - * @covers \WP_Rocket\ThirdParty\Plugins\UnlimitedElements::exclude_inline_from_rucss + * Test class covering \WP_Rocket\ThirdParty\Plugins\UnlimitedElements::exclude_inline_from_rucss * @group UnlimitedElements */ class Test_ExcludeInlineFromRucss extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php b/tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php index 63412579c0..194720db7a 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php +++ b/tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::add_geot_cookies + * Test class covering \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::add_geot_cookies * @group WPGeotargeting */ class Test_addGeotCookies extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php b/tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php index a2a27d7786..578754392e 100644 --- a/tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php +++ b/tests/Integration/inc/ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::maybe_disable_rules + * Test class covering \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::maybe_disable_rules * @group WPGeotargeting */ class Test_maybeDisableRules extends TestCase { diff --git a/tests/Integration/inc/ThirdParty/Themes/Avada/cleanDomain.php b/tests/Integration/inc/ThirdParty/Themes/Avada/cleanDomain.php index bac62d3627..fe224b0313 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Avada/cleanDomain.php +++ b/tests/Integration/inc/ThirdParty/Themes/Avada/cleanDomain.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Themes\Avada; /** - * @covers \WP_Rocket\ThirdParty\Themes\Avada::clean_domain + * Test class covering \WP_Rocket\ThirdParty\Themes\Avada::clean_domain * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Avada/excludeDeferJs.php b/tests/Integration/inc/ThirdParty/Themes/Avada/excludeDeferJs.php index 1fef8ff2cd..2a91f5881a 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Avada/excludeDeferJs.php +++ b/tests/Integration/inc/ThirdParty/Themes/Avada/excludeDeferJs.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\Avada; /** - * @covers \WP_Rocket\ThirdParty\Themes\Avada::clean_domain + * Test class covering \WP_Rocket\ThirdParty\Themes\Avada::clean_domain * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Avada/excludeDelayJs.php b/tests/Integration/inc/ThirdParty/Themes/Avada/excludeDelayJs.php index b67284a65d..9472828d94 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Avada/excludeDelayJs.php +++ b/tests/Integration/inc/ThirdParty/Themes/Avada/excludeDelayJs.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\Avada; /** - * @covers \WP_Rocket\ThirdParty\Themes\Avada::exclude_delay_js + * Test class covering \WP_Rocket\ThirdParty\Themes\Avada::exclude_delay_js * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Bridge/maybeClearCache.php b/tests/Integration/inc/ThirdParty/Themes/Bridge/maybeClearCache.php index 694bba9ad6..9c01efcc58 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Bridge/maybeClearCache.php +++ b/tests/Integration/inc/ThirdParty/Themes/Bridge/maybeClearCache.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Themes\Bridge; /** - * @covers \WP_Rocket\ThirdParty\Themes\Bridge::maybe_clear_cache + * Test class covering \WP_Rocket\ThirdParty\Themes\Bridge::maybe_clear_cache * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php b/tests/Integration/inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php index 6b85d233dd..cc6f35d16e 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php +++ b/tests/Integration/inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\Divi; /** - * @covers \WP_Rocket\ThirdParty\Divi::disable_divi_jquery_body + * Test class covering \WP_Rocket\ThirdParty\Divi::disable_divi_jquery_body * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php b/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php index d7ea566376..e3a02cea5b 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php +++ b/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Themes\Divi; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::disable_image_dimensions_height_percentage() + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::disable_image_dimensions_height_percentage() * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php b/tests/Integration/inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php index 01eaa22b27..d4895fdc32 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php +++ b/tests/Integration/inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Themes\Divi; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::handle_save_template + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::handle_save_template * * @group Themes * @group AdminOnly diff --git a/tests/Integration/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php b/tests/Integration/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php index 8d3b1c251a..9ef4dd795c 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php +++ b/tests/Integration/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Themes\Divi; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::handle_save_template + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::handle_save_template * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php b/tests/Integration/inc/ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php index 78caa0e1f2..b93b621efc 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php +++ b/tests/Integration/inc/ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Themes\Divi; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::maybe_disable_youtube_preview + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::maybe_disable_youtube_preview * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php b/tests/Integration/inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php index 7946549bd5..a28ca011b3 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php +++ b/tests/Integration/inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Themes\Divi; /** - * @covers \WP_Rocket\ThirdParty\Divi::remove_assets_generated + * Test class covering \WP_Rocket\ThirdParty\Divi::remove_assets_generated * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Flatsome/preservePatterns.php b/tests/Integration/inc/ThirdParty/Themes/Flatsome/preservePatterns.php index 1103363a23..65471c9dec 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Flatsome/preservePatterns.php +++ b/tests/Integration/inc/ThirdParty/Themes/Flatsome/preservePatterns.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\Flatsome; /** - * @covers \WP_Rocket\ThirdParty\Themes\Flatsome::preserve_patterns + * Test class covering \WP_Rocket\ThirdParty\Themes\Flatsome::preserve_patterns * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Jevelin/preservePatterns.php b/tests/Integration/inc/ThirdParty/Themes/Jevelin/preservePatterns.php index 1f63d0de81..e75f3080aa 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Jevelin/preservePatterns.php +++ b/tests/Integration/inc/ThirdParty/Themes/Jevelin/preservePatterns.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\Jevelin; /** - * @covers \WP_Rocket\ThirdParty\Themes\Jevelin::preserve_patterns + * Test class covering \WP_Rocket\ThirdParty\Themes\Jevelin::preserve_patterns * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php b/tests/Integration/inc/ThirdParty/Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php index e732db1ec4..f3e149d9d2 100644 --- a/tests/Integration/inc/ThirdParty/Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php +++ b/tests/Integration/inc/ThirdParty/Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\MinimalistBlogger; /** - * @covers \WP_Rocket\ThirdParty\Themes\MinimalistBlogger::exclude_jquery_from_delay_js + * Test class covering \WP_Rocket\ThirdParty\Themes\MinimalistBlogger::exclude_jquery_from_delay_js * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php b/tests/Integration/inc/ThirdParty/Themes/Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php index 441a1fcf6e..5a20ca42a2 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php +++ b/tests/Integration/inc/ThirdParty/Themes/Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Themes\Shoptimizer; /** - * @covers \WP_Rocket\ThirdParty\Themes\Shoptimizer::exclude_jquery_deferjs_with_cart_drawer + * Test class covering \WP_Rocket\ThirdParty\Themes\Shoptimizer::exclude_jquery_deferjs_with_cart_drawer * * @group Themes */ diff --git a/tests/Integration/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php b/tests/Integration/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php index 11776998d4..f05fd5304d 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php +++ b/tests/Integration/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Themes\Uncode; /** - * @covers \WP_Rocket\ThirdParty\Themes\Uncode::exclude_delay_js + * Test class covering \WP_Rocket\ThirdParty\Themes\Uncode::exclude_delay_js * * @group Uncode * @group Themes diff --git a/tests/Integration/inc/ThirdParty/Themes/Uncode/excludeJs.php b/tests/Integration/inc/ThirdParty/Themes/Uncode/excludeJs.php index 4a091e960c..3f749f4fe9 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Uncode/excludeJs.php +++ b/tests/Integration/inc/ThirdParty/Themes/Uncode/excludeJs.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Themes\Uncode; /** - * @covers \WP_Rocket\ThirdParty\Themes\Uncode::exclude_js + * Test class covering \WP_Rocket\ThirdParty\Themes\Uncode::exclude_js * * @group Uncode * @group Themes diff --git a/tests/Integration/inc/ThirdParty/Themes/Xstore/excludeInlineContent.php b/tests/Integration/inc/ThirdParty/Themes/Xstore/excludeInlineContent.php index e6b0b43d2f..189b8afbe6 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Xstore/excludeInlineContent.php +++ b/tests/Integration/inc/ThirdParty/Themes/Xstore/excludeInlineContent.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\Xstore; /** - * @covers \WP_Rocket\ThirdParty\Themes\Xstore::exclude_inline_content + * Test class covering \WP_Rocket\ThirdParty\Themes\Xstore::exclude_inline_content * * @group Themes */ diff --git a/tests/Integration/inc/admin/rocketAfterSaveOptions.php b/tests/Integration/inc/admin/rocketAfterSaveOptions.php index bf0192be40..a44fabfb11 100644 --- a/tests/Integration/inc/admin/rocketAfterSaveOptions.php +++ b/tests/Integration/inc/admin/rocketAfterSaveOptions.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_after_save_options + * Test class covering ::rocket_after_save_options * @uses ::rocket_clean_domain * @uses ::rocket_clean_minify * @uses ::rocket_generate_advanced_cache_file diff --git a/tests/Integration/inc/admin/rocketFirstInstall.php b/tests/Integration/inc/admin/rocketFirstInstall.php index c652b7aae4..8d2ae0b785 100644 --- a/tests/Integration/inc/admin/rocketFirstInstall.php +++ b/tests/Integration/inc/admin/rocketFirstInstall.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers ::rocket_first_install + * Test class covering ::rocket_first_install * @group admin * @group upgrade * @group AdminOnly diff --git a/tests/Integration/inc/admin/rocketNewUpgrade.php b/tests/Integration/inc/admin/rocketNewUpgrade.php index c856c7689f..897d23addd 100644 --- a/tests/Integration/inc/admin/rocketNewUpgrade.php +++ b/tests/Integration/inc/admin/rocketNewUpgrade.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers ::rocket_new_upgrade + * Test class covering ::rocket_new_upgrade * @group admin * @group upgrade * @group AdminOnly diff --git a/tests/Integration/inc/classes/Buffer/Tests/isSpeedTool.php b/tests/Integration/inc/classes/Buffer/Tests/isSpeedTool.php index 082e1dabcd..c084b9559c 100644 --- a/tests/Integration/inc/classes/Buffer/Tests/isSpeedTool.php +++ b/tests/Integration/inc/classes/Buffer/Tests/isSpeedTool.php @@ -7,7 +7,7 @@ use WP_Rocket\Buffer\Config; /** - * @covers \WP_Rocket\Buffer\Tests::is_speed_tool + * Test class covering \WP_Rocket\Buffer\Tests::is_speed_tool * @uses \WP_Rocket\Buffer\Tests::get_ip * @uses \WP_Rocket\Buffer\Config * @group Buffer diff --git a/tests/Integration/inc/common/doAdminPostRocketPurgeCache.php b/tests/Integration/inc/common/doAdminPostRocketPurgeCache.php index 0c8e419fa4..0fa3a1b48f 100644 --- a/tests/Integration/inc/common/doAdminPostRocketPurgeCache.php +++ b/tests/Integration/inc/common/doAdminPostRocketPurgeCache.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::do_admin_post_rocket_purge_cache + * Test class covering ::do_admin_post_rocket_purge_cache * @uses ::get_rocket_i18n_home_url * @uses ::get_rocket_option * @uses ::get_rocket_parse_url diff --git a/tests/Integration/inc/common/rocketCleanCacheThemeUpdate.php b/tests/Integration/inc/common/rocketCleanCacheThemeUpdate.php index 51b7ba478e..d75f55deac 100644 --- a/tests/Integration/inc/common/rocketCleanCacheThemeUpdate.php +++ b/tests/Integration/inc/common/rocketCleanCacheThemeUpdate.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_clean_cache_theme_update + * Test class covering ::rocket_clean_cache_theme_update * @uses ::rocket_clean_domain * * @group Common diff --git a/tests/Integration/inc/common/rocketCleanPostCacheOnSlugChange.php b/tests/Integration/inc/common/rocketCleanPostCacheOnSlugChange.php index e2f4cfb8a0..4d9884526d 100644 --- a/tests/Integration/inc/common/rocketCleanPostCacheOnSlugChange.php +++ b/tests/Integration/inc/common/rocketCleanPostCacheOnSlugChange.php @@ -7,7 +7,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::rocket_clean_post_cache_on_slug_change + * Test class covering ::rocket_clean_post_cache_on_slug_change * @uses ::rocket_clean_files * @group Purge */ diff --git a/tests/Integration/inc/common/rocketGetPurgeUrls.php b/tests/Integration/inc/common/rocketGetPurgeUrls.php index 24ab125b85..7111f76f87 100644 --- a/tests/Integration/inc/common/rocketGetPurgeUrls.php +++ b/tests/Integration/inc/common/rocketGetPurgeUrls.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers ::rocket_get_purge_urls + * Test class covering ::rocket_get_purge_urls * @uses ::rocket_clean_domain * * @group Common diff --git a/tests/Integration/inc/common/rocketWidgetUpdateCallback.php b/tests/Integration/inc/common/rocketWidgetUpdateCallback.php index 615d6f75ce..0e3de88916 100644 --- a/tests/Integration/inc/common/rocketWidgetUpdateCallback.php +++ b/tests/Integration/inc/common/rocketWidgetUpdateCallback.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_widget_update_callback + * Test class covering ::rocket_widget_update_callback * @uses ::rocket_clean_domain * * @group Common diff --git a/tests/Integration/inc/functions/getRocketCacheRejectUri.php b/tests/Integration/inc/functions/getRocketCacheRejectUri.php index 69f96bac4d..f3f2ba503d 100644 --- a/tests/Integration/inc/functions/getRocketCacheRejectUri.php +++ b/tests/Integration/inc/functions/getRocketCacheRejectUri.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers ::get_rocket_cache_reject_uri + * Test class covering ::get_rocket_cache_reject_uri * @group Functions * @group Options */ diff --git a/tests/Integration/inc/functions/getRocketI18nCode.php b/tests/Integration/inc/functions/getRocketI18nCode.php index b4dcc53054..9542e51874 100644 --- a/tests/Integration/inc/functions/getRocketI18nCode.php +++ b/tests/Integration/inc/functions/getRocketI18nCode.php @@ -7,7 +7,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::get_rocket_i18n_code + * Test class covering ::get_rocket_i18n_code * @uses ::rocket_has_i18n * @group Functions * @group i18n diff --git a/tests/Integration/inc/functions/getRocketI18nHomeUrl.php b/tests/Integration/inc/functions/getRocketI18nHomeUrl.php index 3d2252e919..c448195f3a 100644 --- a/tests/Integration/inc/functions/getRocketI18nHomeUrl.php +++ b/tests/Integration/inc/functions/getRocketI18nHomeUrl.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::get_rocket_i18n_home_url + * Test class covering ::get_rocket_i18n_home_url * @uses ::rocket_has_i18n * * @group Functions diff --git a/tests/Integration/inc/functions/getRocketI18nToPreserve.php b/tests/Integration/inc/functions/getRocketI18nToPreserve.php index dd45ba1855..f42b6262b0 100644 --- a/tests/Integration/inc/functions/getRocketI18nToPreserve.php +++ b/tests/Integration/inc/functions/getRocketI18nToPreserve.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::get_rocket_i18n_to_preserve + * Test class covering ::get_rocket_i18n_to_preserve * @uses ::rocket_has_i18n * @uses ::get_rocket_i18n_code * @uses ::get_rocket_i18n_home_url diff --git a/tests/Integration/inc/functions/getRocketI18nUri.php b/tests/Integration/inc/functions/getRocketI18nUri.php index ac08a39d4e..d671544657 100644 --- a/tests/Integration/inc/functions/getRocketI18nUri.php +++ b/tests/Integration/inc/functions/getRocketI18nUri.php @@ -8,7 +8,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::get_rocket_i18n_uri + * Test class covering ::get_rocket_i18n_uri * @uses ::rocket_has_i18n * @uses ::get_rocket_i18n_code * @group Functions diff --git a/tests/Integration/inc/functions/getRocketOption.php b/tests/Integration/inc/functions/getRocketOption.php index 804a64bc4d..36ffacbefe 100644 --- a/tests/Integration/inc/functions/getRocketOption.php +++ b/tests/Integration/inc/functions/getRocketOption.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers ::get_rocket_option + * Test class covering ::get_rocket_option * @uses \WP_Rocket\Admin\Options * @uses \WP_Rocket\Admin\Options_Data * diff --git a/tests/Integration/inc/functions/getRocketParseUrl.php b/tests/Integration/inc/functions/getRocketParseUrl.php index 1c0f4a2649..04bd7c5ee7 100644 --- a/tests/Integration/inc/functions/getRocketParseUrl.php +++ b/tests/Integration/inc/functions/getRocketParseUrl.php @@ -5,7 +5,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::get_rocket_parse_url + * Test class covering ::get_rocket_parse_url * @group Functions * @group Posts */ diff --git a/tests/Integration/inc/functions/getRocketSamplePermalink.php b/tests/Integration/inc/functions/getRocketSamplePermalink.php index 8b9467bf4e..272614158a 100644 --- a/tests/Integration/inc/functions/getRocketSamplePermalink.php +++ b/tests/Integration/inc/functions/getRocketSamplePermalink.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::get_rocket_sample_permalink + * Test class covering ::get_rocket_sample_permalink * @group Functions * @group Posts */ diff --git a/tests/Integration/inc/functions/isRocketGenerateCachingMobileFiles.php b/tests/Integration/inc/functions/isRocketGenerateCachingMobileFiles.php index 4ef1978940..2e2f3a7da6 100644 --- a/tests/Integration/inc/functions/isRocketGenerateCachingMobileFiles.php +++ b/tests/Integration/inc/functions/isRocketGenerateCachingMobileFiles.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\TestCase; /** - * @covers ::is_rocket_generate_caching_mobile_files + * Test class covering ::is_rocket_generate_caching_mobile_files * @uses ::get_rocket_option * * @group Options diff --git a/tests/Integration/inc/functions/rocketAddUrlProtocol.php b/tests/Integration/inc/functions/rocketAddUrlProtocol.php index 0eedb8957b..c178e5ea66 100644 --- a/tests/Integration/inc/functions/rocketAddUrlProtocol.php +++ b/tests/Integration/inc/functions/rocketAddUrlProtocol.php @@ -5,7 +5,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::rocket_add_url_protocol + * Test class covering ::rocket_add_url_protocol * @group Functions * @group Formatting */ diff --git a/tests/Integration/inc/functions/rocketCleanCacheBusting.php b/tests/Integration/inc/functions/rocketCleanCacheBusting.php index 2dc0ecbabd..3ac6db52b5 100644 --- a/tests/Integration/inc/functions/rocketCleanCacheBusting.php +++ b/tests/Integration/inc/functions/rocketCleanCacheBusting.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_clean_cache_busting + * Test class covering ::rocket_clean_cache_busting * @uses ::rocket_direct_filesystem * * @group Functions diff --git a/tests/Integration/inc/functions/rocketCleanDomain.php b/tests/Integration/inc/functions/rocketCleanDomain.php index a95350bb3a..44d4cff3dc 100644 --- a/tests/Integration/inc/functions/rocketCleanDomain.php +++ b/tests/Integration/inc/functions/rocketCleanDomain.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_clean_domain + * Test class covering ::rocket_clean_domain * @uses ::get_rocket_i18n_home_url * @uses ::get_rocket_i18n_to_preserve * @uses ::get_rocket_i18n_uri diff --git a/tests/Integration/inc/functions/rocketCleanFiles.php b/tests/Integration/inc/functions/rocketCleanFiles.php index a0a28db11a..0fb896cb8d 100644 --- a/tests/Integration/inc/functions/rocketCleanFiles.php +++ b/tests/Integration/inc/functions/rocketCleanFiles.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_clean_files + * Test class covering ::rocket_clean_files * @uses ::rocket_rrmdir * @uses ::_rocket_get_cache_dirs * diff --git a/tests/Integration/inc/functions/rocketCleanMinify.php b/tests/Integration/inc/functions/rocketCleanMinify.php index 6df289ab00..1c7a6db859 100644 --- a/tests/Integration/inc/functions/rocketCleanMinify.php +++ b/tests/Integration/inc/functions/rocketCleanMinify.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_clean_minify + * Test class covering ::rocket_clean_minify * @uses ::rocket_direct_filesystem * * @group Functions diff --git a/tests/Integration/inc/functions/rocketDeleteLicenceDataFile.php b/tests/Integration/inc/functions/rocketDeleteLicenceDataFile.php index f955f83977..a2461557af 100644 --- a/tests/Integration/inc/functions/rocketDeleteLicenceDataFile.php +++ b/tests/Integration/inc/functions/rocketDeleteLicenceDataFile.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_delete_licence_data_file + * Test class covering ::rocket_delete_licence_data_file * @group Functions * @group Options * @group vfs diff --git a/tests/Integration/inc/functions/rocketExtractUrlComponent.php b/tests/Integration/inc/functions/rocketExtractUrlComponent.php index 5d43a1b940..1c0a03a367 100644 --- a/tests/Integration/inc/functions/rocketExtractUrlComponent.php +++ b/tests/Integration/inc/functions/rocketExtractUrlComponent.php @@ -5,7 +5,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::rocket_extract_url_component + * Test class covering ::rocket_extract_url_component * @group Functions */ class Test_RocketExtractUrlComponent extends TestCase { diff --git a/tests/Integration/inc/functions/rocketGenerateAdvancedCacheFile.php b/tests/Integration/inc/functions/rocketGenerateAdvancedCacheFile.php index 09cfcf548f..b5a3c42e01 100644 --- a/tests/Integration/inc/functions/rocketGenerateAdvancedCacheFile.php +++ b/tests/Integration/inc/functions/rocketGenerateAdvancedCacheFile.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_generate_advanced_cache_file + * Test class covering ::rocket_generate_advanced_cache_file * @uses \WP_Rocket\Engine\Cache\AdvancedCache::get_advanced_cache_content * @uses ::is_rocket_generate_caching_mobile_files * @uses ::get_rocket_option diff --git a/tests/Integration/inc/functions/rocketIsLiveSite.php b/tests/Integration/inc/functions/rocketIsLiveSite.php index 6a26745ba0..bca579f468 100644 --- a/tests/Integration/inc/functions/rocketIsLiveSite.php +++ b/tests/Integration/inc/functions/rocketIsLiveSite.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Integration\IsolateHookTrait; /** - * @covers ::rocket_is_live_site + * Test class covering ::rocket_is_live_site * @group Functions * @group API */ diff --git a/tests/Integration/inc/functions/rocketIsPluginActive.php b/tests/Integration/inc/functions/rocketIsPluginActive.php index e7e0ac0aa6..feb5ac7c79 100644 --- a/tests/Integration/inc/functions/rocketIsPluginActive.php +++ b/tests/Integration/inc/functions/rocketIsPluginActive.php @@ -5,7 +5,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::rocket_is_plugin_active + * Test class covering ::rocket_is_plugin_active * @uses ::rocket_is_plugin_active_for_network * @group Options * @group Functions diff --git a/tests/Integration/inc/functions/rocketIsPluginActiveForNetwork.php b/tests/Integration/inc/functions/rocketIsPluginActiveForNetwork.php index 17b594668e..9466996478 100644 --- a/tests/Integration/inc/functions/rocketIsPluginActiveForNetwork.php +++ b/tests/Integration/inc/functions/rocketIsPluginActiveForNetwork.php @@ -5,7 +5,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::rocket_is_plugin_active_for_network + * Test class covering ::rocket_is_plugin_active_for_network * @group Options * @group Functions */ diff --git a/tests/Integration/inc/functions/rocketMkdirP.php b/tests/Integration/inc/functions/rocketMkdirP.php index f1af74a690..62e69d3ecf 100644 --- a/tests/Integration/inc/functions/rocketMkdirP.php +++ b/tests/Integration/inc/functions/rocketMkdirP.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_mkdir_p + * Test class covering ::rocket_mkdir_p * @uses ::rocket_is_stream * @uses ::rocket_direct_filesystem * diff --git a/tests/Integration/inc/functions/rocketPutContent.php b/tests/Integration/inc/functions/rocketPutContent.php index dabb1b1b41..a3fdefd540 100644 --- a/tests/Integration/inc/functions/rocketPutContent.php +++ b/tests/Integration/inc/functions/rocketPutContent.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_put_content + * Test class covering ::rocket_put_content * @uses ::rocket_get_filesystem_perms * @uses ::rocket_direct_filesystem * diff --git a/tests/Integration/inc/functions/rocketRrmdir.php b/tests/Integration/inc/functions/rocketRrmdir.php index 2d0f9c1f0c..57cc8a7834 100644 --- a/tests/Integration/inc/functions/rocketRrmdir.php +++ b/tests/Integration/inc/functions/rocketRrmdir.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Integration\FilesystemTestCase; /** - * @covers ::rocket_rrmdir + * Test class covering ::rocket_rrmdir * @uses ::rocket_direct_filesystem * * @group Functions diff --git a/tests/Integration/inc/rocketActivation.php b/tests/Integration/inc/rocketActivation.php index c79825eb18..d54a6407bd 100644 --- a/tests/Integration/inc/rocketActivation.php +++ b/tests/Integration/inc/rocketActivation.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Integration\TestCase; /** - * @covers ::rocket_activation + * Test class covering ::rocket_activation * * @group Admin_Only * @group Activation diff --git a/tests/Unit/inc/API/bypass.php b/tests/Unit/inc/API/bypass.php index 2878819970..0bff9035d2 100644 --- a/tests/Unit/inc/API/bypass.php +++ b/tests/Unit/inc/API/bypass.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers ::rocket_bypass + * Test class covering ::rocket_bypass * @group API */ class Bypass extends TestCase { diff --git a/tests/Unit/inc/Addon/Cloudflare/API/Client/delete.php b/tests/Unit/inc/Addon/Cloudflare/API/Client/delete.php index cd4a99beaa..c97ccd0dab 100644 --- a/tests/Unit/inc/Addon/Cloudflare/API/Client/delete.php +++ b/tests/Unit/inc/Addon/Cloudflare/API/Client/delete.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\API\Client::delete + * Test class covering WP_Rocket\Addon\Cloudflare\API\Client::delete * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/API/Client/get.php b/tests/Unit/inc/Addon/Cloudflare/API/Client/get.php index b23d0823f2..6b4c9d8908 100644 --- a/tests/Unit/inc/Addon/Cloudflare/API/Client/get.php +++ b/tests/Unit/inc/Addon/Cloudflare/API/Client/get.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\API\Client::get + * Test class covering WP_Rocket\Addon\Cloudflare\API\Client::get * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/API/Client/patch.php b/tests/Unit/inc/Addon/Cloudflare/API/Client/patch.php index e7e6e5bbf9..e8a34fcf3f 100644 --- a/tests/Unit/inc/Addon/Cloudflare/API/Client/patch.php +++ b/tests/Unit/inc/Addon/Cloudflare/API/Client/patch.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\API\Client::patch + * Test class covering WP_Rocket\Addon\Cloudflare\API\Client::patch * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/API/Client/post.php b/tests/Unit/inc/Addon/Cloudflare/API/Client/post.php index 092ac46743..51c39ac40c 100644 --- a/tests/Unit/inc/Addon/Cloudflare/API/Client/post.php +++ b/tests/Unit/inc/Addon/Cloudflare/API/Client/post.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\API\Client::post + * Test class covering WP_Rocket\Addon\Cloudflare\API\Client::post * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php b/tests/Unit/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php index da19dc9a71..e7e88497d7 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php +++ b/tests/Unit/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayPurgeNotice.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Admin\Subscriber::maybe_display_purge_notice + * Test class covering WP_Rocket\Addon\Cloudflare\Admin\Subscriber::maybe_display_purge_notice * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php b/tests/Unit/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php index 7cb76bb685..d364a8bc8b 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php +++ b/tests/Unit/inc/Addon/Cloudflare/Admin/Subscriber/maybeDisplayUpdateSettingsNotice.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Admin\Subscriber::maybe_print_update_settings_notice + * Test class covering WP_Rocket\Addon\Cloudflare\Admin\Subscriber::maybe_print_update_settings_notice * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Auth/APIKey/getHeaders.php b/tests/Unit/inc/Addon/Cloudflare/Auth/APIKey/getHeaders.php index bbfff849c0..b8395eddde 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Auth/APIKey/getHeaders.php +++ b/tests/Unit/inc/Addon/Cloudflare/Auth/APIKey/getHeaders.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Auth\APIKey::get_headers + * Test class covering WP_Rocket\Addon\Cloudflare\Auth\APIKey::get_headers * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Auth/APIKey/isValidCredentials.php b/tests/Unit/inc/Addon/Cloudflare/Auth/APIKey/isValidCredentials.php index f2d1eb7e3c..fd97b8434d 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Auth/APIKey/isValidCredentials.php +++ b/tests/Unit/inc/Addon/Cloudflare/Auth/APIKey/isValidCredentials.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Auth\APIKey::is_valid_credentials + * Test class covering WP_Rocket\Addon\Cloudflare\Auth\APIKey::is_valid_credentials * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php index 5c3e2bb0b8..1c8be8af6c 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/getCloudflareIps.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::get_cloudflare_ips + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::get_cloudflare_ips * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/getSettings.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/getSettings.php index e4a702ff64..eb06382dd5 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/getSettings.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/getSettings.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::get_settings + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::get_settings * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php index b0df9e2885..8820a4e8ab 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/hasPageRule.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::has_page_rule + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::has_page_rule * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php index 94f0b0bf59..49a3e346c3 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/isAuthValid.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::is_auth_valid + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::is_auth_valid * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php index c441774b8b..e86794d53c 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/purgeByUrl.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::purge_by_url + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::purge_by_url * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php index 82aaa66848..11763534a0 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/purgeCloudflare.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::purge_cloudflare + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::purge_cloudflare * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php index 31a317d8b0..662a66562e 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setBrowserCacheTtl.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_browser_cache_ttl + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_browser_cache_ttl * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php index 2f3bbb644a..3e3057d68b 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setCacheLevel.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_cache_level + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_cache_level * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setDevMode.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setDevMode.php index 34dad62981..645c4b82fc 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setDevMode.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setDevMode.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_dev_mode + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_dev_mode * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setMinify.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setMinify.php index af8a7b8e9f..ccf53d312c 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setMinify.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setMinify.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_minify + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_minify * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php index 7a0f5829ec..6d17df63e4 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php +++ b/tests/Unit/inc/Addon/Cloudflare/Cloudflare/setRocketLoader.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Addon\Cloudflare\Cloudflare::set_rocket_loader + * Test class covering WP_Rocket\Addon\Cloudflare\Cloudflare::set_rocket_loader * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php index 6bb5d252d3..e798a3221a 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/addCdnHelperMessage.php @@ -13,7 +13,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Addon\Cloudflare\Subscriber::add_cdn_helper_message + * Test class covering \WP_Rocket\Addon\Cloudflare\Subscriber::add_cdn_helper_message */ class Test_addCdnHelperMessage extends TestCase { diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/autoPurge.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/autoPurge.php index 6bd07f61ae..738536198b 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/autoPurge.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/autoPurge.php @@ -11,7 +11,7 @@ use WPMedia\Cloudflare\Auth\AuthFactoryInterface; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::auto_purge + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::auto_purge * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/autoPurgeByUrl.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/autoPurgeByUrl.php index f6ca67942c..73b994f664 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/autoPurgeByUrl.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/autoPurgeByUrl.php @@ -11,7 +11,7 @@ use WPMedia\Cloudflare\Auth\AuthFactoryInterface; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::auto_purge_by_url + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::auto_purge_by_url * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/deactivateDevmode.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/deactivateDevmode.php index 47a7d1c3f8..ae8e29cf81 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/deactivateDevmode.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/deactivateDevmode.php @@ -10,7 +10,7 @@ use WPMedia\Cloudflare\Auth\AuthFactoryInterface; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::deactivate_devmode + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::deactivate_devmode * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/protocolRewrite.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/protocolRewrite.php index 59b65e02f2..0d2595dc7e 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/protocolRewrite.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/protocolRewrite.php @@ -11,7 +11,7 @@ use WPMedia\Cloudflare\Auth\AuthFactoryInterface; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::protocol_rewrite + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::protocol_rewrite * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php index 37a93c108d..45383fe825 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/protocolRewriteSrcset.php @@ -11,7 +11,7 @@ use WPMedia\Cloudflare\Auth\AuthFactoryInterface; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::protocol_rewrite_srcset + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::protocol_rewrite_srcset * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/purgeCacheNoDie.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/purgeCacheNoDie.php index 8d74d8f8a9..7531926dba 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/purgeCacheNoDie.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/purgeCacheNoDie.php @@ -11,7 +11,7 @@ use WPMedia\Cloudflare\Auth\AuthFactoryInterface; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::purge_cache_no_die + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::purge_cache_no_die * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/saveCloudflareOldSettings.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/saveCloudflareOldSettings.php index 36911aadc3..f528d26acc 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/saveCloudflareOldSettings.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/saveCloudflareOldSettings.php @@ -11,7 +11,7 @@ use WPMedia\Cloudflare\Auth\AuthFactoryInterface; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::save_cloudflare_old_settings + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::save_cloudflare_old_settings * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/saveCloudflareOptions.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/saveCloudflareOptions.php index 79a2e55872..d6910f749d 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/saveCloudflareOptions.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/saveCloudflareOptions.php @@ -11,7 +11,7 @@ use WPMedia\Cloudflare\Auth\AuthFactoryInterface; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::save_cloudflare_options + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::save_cloudflare_options * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php b/tests/Unit/inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php index 7b4ad9bd65..7c6c5864d6 100644 --- a/tests/Unit/inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php +++ b/tests/Unit/inc/Addon/Cloudflare/Subscriber/setVarnishLocalhost.php @@ -11,7 +11,7 @@ use WPMedia\Cloudflare\Auth\AuthFactoryInterface; /** - * @covers WP_Rocket\Addon\Cloudflare\Subscriber::set_varnish_localhost + * Test class covering WP_Rocket\Addon\Cloudflare\Subscriber::set_varnish_localhost * * @group Cloudflare */ diff --git a/tests/Unit/inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php b/tests/Unit/inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php index f073f714f3..d94aa4319a 100644 --- a/tests/Unit/inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php +++ b/tests/Unit/inc/Addon/Sucuri/Subscriber/addCdnHelperMessage.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Addon\Sucuri\Subscriber::add_cdn_helper_message + * Test class covering \WP_Rocket\Addon\Sucuri\Subscriber::add_cdn_helper_message */ class Test_addCdnHelperMessage extends TestCase { diff --git a/tests/Unit/inc/Addon/WebP/AdminSubscriber/maybeDisableSettingField.php b/tests/Unit/inc/Addon/WebP/AdminSubscriber/maybeDisableSettingField.php index 8a8a860399..e3a1365bb0 100644 --- a/tests/Unit/inc/Addon/WebP/AdminSubscriber/maybeDisableSettingField.php +++ b/tests/Unit/inc/Addon/WebP/AdminSubscriber/maybeDisableSettingField.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Addon\Webp\AdminSubscriber::maybe_disable_setting_field + * Test class covering \WP_Rocket\Addon\Webp\AdminSubscriber::maybe_disable_setting_field * @group WebP */ class Test_MaybeDisableSettingField extends TestCase { diff --git a/tests/Unit/inc/Addon/WebP/AdminSubscriber/webpSectionDescription.php b/tests/Unit/inc/Addon/WebP/AdminSubscriber/webpSectionDescription.php index 612891b95e..2ce831c11e 100644 --- a/tests/Unit/inc/Addon/WebP/AdminSubscriber/webpSectionDescription.php +++ b/tests/Unit/inc/Addon/WebP/AdminSubscriber/webpSectionDescription.php @@ -12,7 +12,7 @@ use WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Webp_Interface; /** - * @covers \WP_Rocket\Addon\Webp\AdminSubscriber::webp_section_description + * Test class covering \WP_Rocket\Addon\Webp\AdminSubscriber::webp_section_description * @group WebP */ class Test_WebpSectionDescription extends TestCase { diff --git a/tests/Unit/inc/Addon/WebP/Subscriber/convertToWebp.php b/tests/Unit/inc/Addon/WebP/Subscriber/convertToWebp.php index bc121769f7..323a3ffc62 100644 --- a/tests/Unit/inc/Addon/WebP/Subscriber/convertToWebp.php +++ b/tests/Unit/inc/Addon/WebP/Subscriber/convertToWebp.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Addon\WebP\Subscriber::convert_to_webp + * Test class covering \WP_Rocket\Addon\WebP\Subscriber::convert_to_webp * * @group WebP */ diff --git a/tests/Unit/inc/Addon/WebP/Subscriber/maybeDisableWebpCache.php b/tests/Unit/inc/Addon/WebP/Subscriber/maybeDisableWebpCache.php index 14fb097ed4..927bf49c85 100644 --- a/tests/Unit/inc/Addon/WebP/Subscriber/maybeDisableWebpCache.php +++ b/tests/Unit/inc/Addon/WebP/Subscriber/maybeDisableWebpCache.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Addon\WebP\Subscriber::maybe_disable_webp_cache + * Test class covering \WP_Rocket\Addon\WebP\Subscriber::maybe_disable_webp_cache * * @group WebP */ diff --git a/tests/Unit/inc/Addon/WebP/Subscriber/syncWebpCacheWithThirdPartyPlugins.php b/tests/Unit/inc/Addon/WebP/Subscriber/syncWebpCacheWithThirdPartyPlugins.php index 40f852f992..542cfdcd96 100644 --- a/tests/Unit/inc/Addon/WebP/Subscriber/syncWebpCacheWithThirdPartyPlugins.php +++ b/tests/Unit/inc/Addon/WebP/Subscriber/syncWebpCacheWithThirdPartyPlugins.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Addon\WebP\Subscriber::sync_webp_cache_with_third_party_plugins + * Test class covering \WP_Rocket\Addon\WebP\Subscriber::sync_webp_cache_with_third_party_plugins * * @group WebP */ diff --git a/tests/Unit/inc/Engine/Admin/ActionSchedulerSubscriber/hidePastdueStatusFilter.php b/tests/Unit/inc/Engine/Admin/ActionSchedulerSubscriber/hidePastdueStatusFilter.php index ef5d2daed1..e2710ddd7f 100644 --- a/tests/Unit/inc/Engine/Admin/ActionSchedulerSubscriber/hidePastdueStatusFilter.php +++ b/tests/Unit/inc/Engine/Admin/ActionSchedulerSubscriber/hidePastdueStatusFilter.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\ActionSchedulerSubscriber::hide_pastdue_status_filter + * Test class covering \WP_Rocket\Engine\Admin\ActionSchedulerSubscriber::hide_pastdue_status_filter * @group Beacon */ class Test_HidePastdueStatusFilter extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/Beacon/Beacon/getSuggest.php b/tests/Unit/inc/Engine/Admin/Beacon/Beacon/getSuggest.php index 94830f118d..6b09677bea 100644 --- a/tests/Unit/inc/Engine/Admin/Beacon/Beacon/getSuggest.php +++ b/tests/Unit/inc/Engine/Admin/Beacon/Beacon/getSuggest.php @@ -10,7 +10,7 @@ use WP_Rocket\Engine\Support\Data; /** - * @covers \WP_Rocket\Engine\Admin\Beacon\Beacon::get_suggest + * Test class covering \WP_Rocket\Engine\Admin\Beacon\Beacon::get_suggest * @group Beacon */ class Test_GetSuggest extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/Beacon/Beacon/insertScript.php b/tests/Unit/inc/Engine/Admin/Beacon/Beacon/insertScript.php index 4edf52082e..f1d2e1609d 100644 --- a/tests/Unit/inc/Engine/Admin/Beacon/Beacon/insertScript.php +++ b/tests/Unit/inc/Engine/Admin/Beacon/Beacon/insertScript.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\Beacon\Beacon::insert_script + * Test class covering \WP_Rocket\Engine\Admin\Beacon\Beacon::insert_script * @group Beacon */ class Test_InsertScript extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/activateSafeMode.php b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/activateSafeMode.php index 58400e9305..e79e1c832c 100644 --- a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/activateSafeMode.php +++ b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/activateSafeMode.php @@ -7,7 +7,7 @@ use WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent; /** - * @covers \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::activate_safe_mode + * Test class covering \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::activate_safe_mode * @group DeactivationIntent */ class Test_ActivateSafeMode extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/addDataAttribute.php b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/addDataAttribute.php index 828dde81b8..4a27400c92 100644 --- a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/addDataAttribute.php +++ b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/addDataAttribute.php @@ -7,7 +7,7 @@ use WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent; /** - * @covers \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::add_data_attribute + * Test class covering \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::add_data_attribute * @group DeactivationIntent */ class Test_AddDataAttribute extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/addModalAssets.php b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/addModalAssets.php index c1f4e6c529..722745e870 100644 --- a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/addModalAssets.php +++ b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/addModalAssets.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent; /** - * @covers \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::add_modal_assets + * Test class covering \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::add_modal_assets * @group DeactivationIntent */ class Test_AddModalAssets extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/deactivateAndSnooze.php b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/deactivateAndSnooze.php index 13dccc0b86..2699c73f72 100644 --- a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/deactivateAndSnooze.php +++ b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/deactivateAndSnooze.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent; /** - * @covers \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::deactivate_and_snooze + * Test class covering \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::deactivate_and_snooze * @group DeactivationIntent */ class Test_DeactivateAndSnooze extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/insertDeactivationIntentForm.php b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/insertDeactivationIntentForm.php index 26b6c0ce3b..c0f304c48a 100644 --- a/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/insertDeactivationIntentForm.php +++ b/tests/Unit/inc/Engine/Admin/Deactivation/DeactivationIntent/insertDeactivationIntentForm.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent; /** - * @covers \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::insert_deactivation_intent_form + * Test class covering \WP_Rocket\Engine\Admin\Deactivation\DeactivationIntent::insert_deactivation_intent_form * @group DeactivationIntent */ class Test_InsertDeactivationIntentForm extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/addRegenerateConfigurationAction.php b/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/addRegenerateConfigurationAction.php index 48f446493c..45ff3be79c 100644 --- a/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/addRegenerateConfigurationAction.php +++ b/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/addRegenerateConfigurationAction.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\DomainChange\Subscriber::add_regenerate_configuration_action + * Test class covering \WP_Rocket\Engine\Admin\DomainChange\Subscriber::add_regenerate_configuration_action */ class Test_addRegenerateConfigurationAction extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/maybeCleanCacheDomainChange.php b/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/maybeCleanCacheDomainChange.php index 07be8860fc..36895152bf 100644 --- a/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/maybeCleanCacheDomainChange.php +++ b/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/maybeCleanCacheDomainChange.php @@ -13,7 +13,7 @@ use Brain\Monkey\Functions; use Brain\Monkey\Actions; /** - * @covers \WP_Rocket\Engine\Admin\DomainChange\Subscriber::maybe_clean_cache_domain_change + * Test class covering \WP_Rocket\Engine\Admin\DomainChange\Subscriber::maybe_clean_cache_domain_change */ class Test_maybeCleanCacheDomainChange extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/regenerateConfiguration.php b/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/regenerateConfiguration.php index dcb128f906..b5dc3ea7b5 100644 --- a/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/regenerateConfiguration.php +++ b/tests/Unit/inc/Engine/Admin/DomainChange/Subscriber/regenerateConfiguration.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\DomainChange\Subscriber::regenerate_configuration + * Test class covering \WP_Rocket\Engine\Admin\DomainChange\Subscriber::regenerate_configuration */ class Test_regenerateConfiguration extends TestCase { diff --git a/tests/Unit/inc/Engine/Admin/Settings/Page/asyncWistiaScript.php b/tests/Unit/inc/Engine/Admin/Settings/Page/asyncWistiaScript.php index 53de575947..5e2abe98f8 100644 --- a/tests/Unit/inc/Engine/Admin/Settings/Page/asyncWistiaScript.php +++ b/tests/Unit/inc/Engine/Admin/Settings/Page/asyncWistiaScript.php @@ -12,7 +12,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\Settings\Page::async_wistia_script + * Test class covering \WP_Rocket\Engine\Admin\Settings\Page::async_wistia_script * @group Admin * @group SettingsPage */ diff --git a/tests/Unit/inc/Engine/Admin/Settings/Page/enqueueRocketScripts.php b/tests/Unit/inc/Engine/Admin/Settings/Page/enqueueRocketScripts.php index c57fda1786..aee7523149 100644 --- a/tests/Unit/inc/Engine/Admin/Settings/Page/enqueueRocketScripts.php +++ b/tests/Unit/inc/Engine/Admin/Settings/Page/enqueueRocketScripts.php @@ -13,7 +13,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\Settings\Page::enqueue_rocket_scripts + * Test class covering \WP_Rocket\Engine\Admin\Settings\Page::enqueue_rocket_scripts * @group Admin * @group SettingsPage */ diff --git a/tests/Unit/inc/Engine/Admin/Settings/Settings/sanitizeCallback.php b/tests/Unit/inc/Engine/Admin/Settings/Settings/sanitizeCallback.php index 671598e692..cb8c2b92c9 100644 --- a/tests/Unit/inc/Engine/Admin/Settings/Settings/sanitizeCallback.php +++ b/tests/Unit/inc/Engine/Admin/Settings/Settings/sanitizeCallback.php @@ -10,7 +10,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Admin\Settings\Settings::sanitize_callback + * Test class covering \WP_Rocket\Engine\Admin\Settings\Settings::sanitize_callback * @group Admin * @group Settings */ diff --git a/tests/Unit/inc/Engine/CDN/CDN/rewrite.php b/tests/Unit/inc/Engine/CDN/CDN/rewrite.php index 13449976e9..0f6d13c994 100644 --- a/tests/Unit/inc/Engine/CDN/CDN/rewrite.php +++ b/tests/Unit/inc/Engine/CDN/CDN/rewrite.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\CDN\CDN; /** - * @covers \WP_Rocket\Engine\CDN\CDN::rewrite + * Test class covering \WP_Rocket\Engine\CDN\CDN::rewrite * @group CDN */ class Test_Rewrite extends TestCase { diff --git a/tests/Unit/inc/Engine/CDN/CDN/rewriteCSSProperties.php b/tests/Unit/inc/Engine/CDN/CDN/rewriteCSSProperties.php index b471296035..8fabd55860 100644 --- a/tests/Unit/inc/Engine/CDN/CDN/rewriteCSSProperties.php +++ b/tests/Unit/inc/Engine/CDN/CDN/rewriteCSSProperties.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\CDN\CDN; /** - * @covers \WP_Rocket\Engine\CDN\CDN::rewrite_css_properties + * Test class covering \WP_Rocket\Engine\CDN\CDN::rewrite_css_properties * @group CDN */ class TestRewriteCSSProperties extends TestCase { diff --git a/tests/Unit/inc/Engine/CDN/CDN/rewriteSrcset.php b/tests/Unit/inc/Engine/CDN/CDN/rewriteSrcset.php index 29498a1511..a606562705 100644 --- a/tests/Unit/inc/Engine/CDN/CDN/rewriteSrcset.php +++ b/tests/Unit/inc/Engine/CDN/CDN/rewriteSrcset.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\CDN\CDN; /** - * @covers \WP_Rocket\Engine\CDN\CDN::rewrite_srcset + * Test class covering \WP_Rocket\Engine\CDN\CDN::rewrite_srcset * @group CDN */ class Test_RewriteSrcset extends TestCase { diff --git a/tests/Unit/inc/Engine/CDN/CDN/rewriteURL.php b/tests/Unit/inc/Engine/CDN/CDN/rewriteURL.php index 357533db79..be9f08692f 100644 --- a/tests/Unit/inc/Engine/CDN/CDN/rewriteURL.php +++ b/tests/Unit/inc/Engine/CDN/CDN/rewriteURL.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\CDN\CDN; /** - * @covers \WP_Rocket\Engine\CDN\CDN::rewrite_url + * Test class covering \WP_Rocket\Engine\CDN\CDN::rewrite_url * @group CDN */ class Test_RewriteURL extends TestCase { diff --git a/tests/Unit/inc/Engine/CDN/Subscriber/getCdnHosts.php b/tests/Unit/inc/Engine/CDN/Subscriber/getCdnHosts.php index a3d840a18c..a1db5c040f 100644 --- a/tests/Unit/inc/Engine/CDN/Subscriber/getCdnHosts.php +++ b/tests/Unit/inc/Engine/CDN/Subscriber/getCdnHosts.php @@ -10,7 +10,7 @@ use WP_Rocket\Engine\CDN\Subscriber; /** - * @covers \WP_Rocket\Engine\CDN\Subscriber::get_cdn_hosts + * Test class covering \WP_Rocket\Engine\CDN\Subscriber::get_cdn_hosts * @group CDN */ class Test_GetCdnHosts extends TestCase { diff --git a/tests/Unit/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php b/tests/Unit/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php index d381fae57d..e4d4e60ed2 100644 --- a/tests/Unit/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php +++ b/tests/Unit/inc/Engine/CDN/Subscriber/maybeReplaceUrl.php @@ -10,7 +10,7 @@ use WP_Rocket\Engine\CDN\Subscriber; /** - * @covers \WP_Rocket\Engine\CDN\Subscriber::maybe_replace_url + * Test class covering \WP_Rocket\Engine\CDN\Subscriber::maybe_replace_url * @group CDN */ class Test_MaybeReplaceUrl extends TestCase { diff --git a/tests/Unit/inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php b/tests/Unit/inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php index 79246b0660..f4e3fe9bfd 100644 --- a/tests/Unit/inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php +++ b/tests/Unit/inc/Engine/Cache/AdminSubscriber/addPurgeTermLink.php @@ -11,7 +11,7 @@ use WP_Rocket\Engine\Cache\WPCache; /** - * @covers WP_Rocket\Engine\Cache\AdminSubscriber::add_purge_term_link + * Test class covering WP_Rocket\Engine\Cache\AdminSubscriber::add_purge_term_link * * @group Cache */ diff --git a/tests/Unit/inc/Engine/Cache/AdminSubscriber/onUpdate.php b/tests/Unit/inc/Engine/Cache/AdminSubscriber/onUpdate.php index 9891474dc6..ecac329145 100644 --- a/tests/Unit/inc/Engine/Cache/AdminSubscriber/onUpdate.php +++ b/tests/Unit/inc/Engine/Cache/AdminSubscriber/onUpdate.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Engine\Cache\AdminSubscriber::on_update + * Test class covering WP_Rocket\Engine\Cache\AdminSubscriber::on_update */ class Test_onUpdate extends TestCase { private $subscriber; diff --git a/tests/Unit/inc/Engine/Cache/AdminSubscriber/registerTermsRowAction.php b/tests/Unit/inc/Engine/Cache/AdminSubscriber/registerTermsRowAction.php index 881df1eb70..e9f7e43e04 100644 --- a/tests/Unit/inc/Engine/Cache/AdminSubscriber/registerTermsRowAction.php +++ b/tests/Unit/inc/Engine/Cache/AdminSubscriber/registerTermsRowAction.php @@ -11,7 +11,7 @@ use WP_Rocket\Engine\Cache\WPCache; use WP_Rocket\Event_Management\Event_Manager; /** - * @covers WP_Rocket\Engine\Cache\AdminSubscriber::register_terms_row_action + * Test class covering WP_Rocket\Engine\Cache\AdminSubscriber::register_terms_row_action * * @group Cache */ diff --git a/tests/Unit/inc/Engine/Cache/AdvancedCache/getAdvancedCacheContent.php b/tests/Unit/inc/Engine/Cache/AdvancedCache/getAdvancedCacheContent.php index c6619ac92a..28d7fc85d5 100644 --- a/tests/Unit/inc/Engine/Cache/AdvancedCache/getAdvancedCacheContent.php +++ b/tests/Unit/inc/Engine/Cache/AdvancedCache/getAdvancedCacheContent.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::get_advanced_cache_content + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::get_advanced_cache_content * @uses ::is_rocket_generate_caching_mobile_files * @uses ::rocket_get_constant * diff --git a/tests/Unit/inc/Engine/Cache/AdvancedCache/noticePermissions.php b/tests/Unit/inc/Engine/Cache/AdvancedCache/noticePermissions.php index 8722484463..7d386218d2 100644 --- a/tests/Unit/inc/Engine/Cache/AdvancedCache/noticePermissions.php +++ b/tests/Unit/inc/Engine/Cache/AdvancedCache/noticePermissions.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::notice_permissions + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::notice_permissions * @uses ::rocket_get_constant * @uses ::rocket_notice_html * diff --git a/tests/Unit/inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php b/tests/Unit/inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php index d481e5b804..a657c3e6d1 100644 --- a/tests/Unit/inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php +++ b/tests/Unit/inc/Engine/Cache/AdvancedCache/updateAdvancedCache.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\AdvancedCache::update_advanced_cache + * Test class covering \WP_Rocket\Engine\Cache\AdvancedCache::update_advanced_cache * @uses ::rocket_get_filesystem_perms * * @group AdvancedCache diff --git a/tests/Unit/inc/Engine/Cache/Config/ConfigSubscriber/changeCacheRejectUriWithPermalink.php b/tests/Unit/inc/Engine/Cache/Config/ConfigSubscriber/changeCacheRejectUriWithPermalink.php index 1af8233f99..8e0a2ea54b 100644 --- a/tests/Unit/inc/Engine/Cache/Config/ConfigSubscriber/changeCacheRejectUriWithPermalink.php +++ b/tests/Unit/inc/Engine/Cache/Config/ConfigSubscriber/changeCacheRejectUriWithPermalink.php @@ -10,7 +10,7 @@ use WP_Rocket\Engine\Cache\Config\ConfigSubscriber; /** - * @covers \WP_Rocket\Engine\Cache\Config\ConfigSubscriber::change_cache_reject_uri_with_permalink + * Test class covering \WP_Rocket\Engine\Cache\Config\ConfigSubscriber::change_cache_reject_uri_with_permalink */ class Test_ChangeCacheRejectUriWithPermalink extends TestCase { private $config_subscriber; diff --git a/tests/Unit/inc/Engine/Cache/Purge/purgeCacheRejectUriPartially.php b/tests/Unit/inc/Engine/Cache/Purge/purgeCacheRejectUriPartially.php index 818eae60a3..6127f8bd58 100644 --- a/tests/Unit/inc/Engine/Cache/Purge/purgeCacheRejectUriPartially.php +++ b/tests/Unit/inc/Engine/Cache/Purge/purgeCacheRejectUriPartially.php @@ -9,7 +9,7 @@ use WP_Rocket\Logger\Logger; /** - * @covers \WP_Rocket\Engine\Cache\Purge::purge_cache_reject_uri_partially + * Test class covering \WP_Rocket\Engine\Cache\Purge::purge_cache_reject_uri_partially * * @group purge_actions */ diff --git a/tests/Unit/inc/Engine/Cache/Purge/purgeDatesArchives.php b/tests/Unit/inc/Engine/Cache/Purge/purgeDatesArchives.php index 4ec1369bed..f9634c7e03 100644 --- a/tests/Unit/inc/Engine/Cache/Purge/purgeDatesArchives.php +++ b/tests/Unit/inc/Engine/Cache/Purge/purgeDatesArchives.php @@ -9,7 +9,7 @@ use WP_Rocket\Engine\Preload\Database\Queries\Cache; /** - * @covers \WP_Rocket\Engine\Cache\Purge::purge_dates_archives + * Test class covering \WP_Rocket\Engine\Cache\Purge::purge_dates_archives * @group purge_actions */ class Test_PurgeDatesArchives extends FilesystemTestCase { diff --git a/tests/Unit/inc/Engine/Cache/Purge/purgePostTermsUrls.php b/tests/Unit/inc/Engine/Cache/Purge/purgePostTermsUrls.php index cd5e93c387..708d21bceb 100644 --- a/tests/Unit/inc/Engine/Cache/Purge/purgePostTermsUrls.php +++ b/tests/Unit/inc/Engine/Cache/Purge/purgePostTermsUrls.php @@ -12,7 +12,7 @@ use WP_Term; /** - * @covers \WP_Rocket\Engine\Cache\Purge::purge_post_terms_urls + * Test class covering \WP_Rocket\Engine\Cache\Purge::purge_post_terms_urls * @group Purge * @group purge_actions */ diff --git a/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php b/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php index 5313ef51fb..16eb8672d0 100644 --- a/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php +++ b/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/maybePurgeCacheOnTermChange.php @@ -10,7 +10,7 @@ use WP_Rocket\Engine\Cache\PurgeActionsSubscriber; /** - * @covers \WP_Rocket\Engine\Cache\PurgeActionsSubscriber::maybe_purge_cache_on_term_change + * Test class covering \WP_Rocket\Engine\Cache\PurgeActionsSubscriber::maybe_purge_cache_on_term_change * * @group purge_actions */ diff --git a/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/onUpdate.php b/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/onUpdate.php index 1e7d05cb05..5958a4d65e 100644 --- a/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/onUpdate.php +++ b/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/onUpdate.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Engine\Cache\PurgeActionsSubscriber::on_update + * Test class covering WP_Rocket\Engine\Cache\PurgeActionsSubscriber::on_update */ class Test_onUpdate extends TestCase { private $subscriber; diff --git a/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php b/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php index a66f8ac0a6..6c11a170af 100644 --- a/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php +++ b/tests/Unit/inc/Engine/Cache/PurgeActionsSubscriber/purgeUserCache.php @@ -11,7 +11,7 @@ use WP_Rocket\Engine\Cache\PurgeActionsSubscriber; /** - * @covers \WP_Rocket\Engine\Cache\PurgeActionsSubscriber::purge_user_cache + * Test class covering \WP_Rocket\Engine\Cache\PurgeActionsSubscriber::purge_user_cache * @group purge_actions */ class Test_PurgeUserCache extends TestCase { diff --git a/tests/Unit/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php b/tests/Unit/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php index 50857d38de..a1a60174c1 100644 --- a/tests/Unit/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php +++ b/tests/Unit/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/purgeExpiredFiles.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\PurgeExpired\PurgeExpiredCache::purge_expired_files + * Test class covering \WP_Rocket\Engine\Cache\PurgeExpired\PurgeExpiredCache::purge_expired_files * @uses \WP_Rocket\Buffer\Cache::can_generate_caching_files * @group Cache * @group vfs diff --git a/tests/Unit/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/updateLifespanValue.php b/tests/Unit/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/updateLifespanValue.php index f539e6cc81..bb429989ae 100644 --- a/tests/Unit/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/updateLifespanValue.php +++ b/tests/Unit/inc/Engine/Cache/PurgeExpired/PurgeExpiredCache/updateLifespanValue.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Cache\PurgeExpired\PurgeExpiredCache::update_lifespan_value + * Test class covering \WP_Rocket\Engine\Cache\PurgeExpired\PurgeExpiredCache::update_lifespan_value * @group Cache */ class Test_UpdateLifespanValue extends TestCase { diff --git a/tests/Unit/inc/Engine/Cache/WPCache/addWpCacheStatusTest.php b/tests/Unit/inc/Engine/Cache/WPCache/addWpCacheStatusTest.php index b2dd8b3acf..971ef4a6e3 100644 --- a/tests/Unit/inc/Engine/Cache/WPCache/addWpCacheStatusTest.php +++ b/tests/Unit/inc/Engine/Cache/WPCache/addWpCacheStatusTest.php @@ -8,7 +8,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::add_wp_cache_status_test + * Test class covering \WP_Rocket\Engine\Cache\WPCache::add_wp_cache_status_test * * @group WPCache */ diff --git a/tests/Unit/inc/Engine/Cache/WPCache/checkWpCacheValue.php b/tests/Unit/inc/Engine/Cache/WPCache/checkWpCacheValue.php index 56745c16c1..fa6c963947 100644 --- a/tests/Unit/inc/Engine/Cache/WPCache/checkWpCacheValue.php +++ b/tests/Unit/inc/Engine/Cache/WPCache/checkWpCacheValue.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::check_wp_cache_value + * Test class covering \WP_Rocket\Engine\Cache\WPCache::check_wp_cache_value * * @group WPCache */ diff --git a/tests/Unit/inc/Engine/Cache/WPCache/maybePreventDeactivation.php b/tests/Unit/inc/Engine/Cache/WPCache/maybePreventDeactivation.php index 29e3e3c99c..cbb88b2379 100644 --- a/tests/Unit/inc/Engine/Cache/WPCache/maybePreventDeactivation.php +++ b/tests/Unit/inc/Engine/Cache/WPCache/maybePreventDeactivation.php @@ -6,7 +6,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::maybe_prevent_deactivation + * Test class covering \WP_Rocket\Engine\Cache\WPCache::maybe_prevent_deactivation * * @group WPCache */ diff --git a/tests/Unit/inc/Engine/Cache/WPCache/maybeSetWpCache.php b/tests/Unit/inc/Engine/Cache/WPCache/maybeSetWpCache.php index a72f8cd8d5..00cf704b5f 100644 --- a/tests/Unit/inc/Engine/Cache/WPCache/maybeSetWpCache.php +++ b/tests/Unit/inc/Engine/Cache/WPCache/maybeSetWpCache.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::maybe_set_wp_cache + * Test class covering \WP_Rocket\Engine\Cache\WPCache::maybe_set_wp_cache * * @group WPCache * @group vfs diff --git a/tests/Unit/inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php b/tests/Unit/inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php index 507b557d0e..592260cd15 100644 --- a/tests/Unit/inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php +++ b/tests/Unit/inc/Engine/Cache/WPCache/noticeWpConfigPermissions.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::notice_wp_config_permissions + * Test class covering \WP_Rocket\Engine\Cache\WPCache::notice_wp_config_permissions * @uses ::rocket_get_constant * @uses ::rocket_notice_html * diff --git a/tests/Unit/inc/Engine/Cache/WPCache/setWpCacheConstant.php b/tests/Unit/inc/Engine/Cache/WPCache/setWpCacheConstant.php index 4043c0ed3b..135a1f213f 100644 --- a/tests/Unit/inc/Engine/Cache/WPCache/setWpCacheConstant.php +++ b/tests/Unit/inc/Engine/Cache/WPCache/setWpCacheConstant.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::set_wp_cache_constant + * Test class covering \WP_Rocket\Engine\Cache\WPCache::set_wp_cache_constant * @uses ::rocket_valid_key * * @group WPCache diff --git a/tests/Unit/inc/Engine/Cache/WPCache/updateWPCache.php b/tests/Unit/inc/Engine/Cache/WPCache/updateWPCache.php index 02538118cf..ac720430b8 100644 --- a/tests/Unit/inc/Engine/Cache/WPCache/updateWPCache.php +++ b/tests/Unit/inc/Engine/Cache/WPCache/updateWPCache.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Cache\WPCache::update_wp_cache + * Test class covering \WP_Rocket\Engine\Cache\WPCache::update_wp_cache * @uses \rocket_valid_key() * @uses \WP_Rocket\Engine\Cache\WPCache::set_wp_cache_constant * diff --git a/tests/Unit/inc/Engine/Common/Ajax/AjaxHandler/redirect.php b/tests/Unit/inc/Engine/Common/Ajax/AjaxHandler/redirect.php index 78ffd78cef..ddecca65dd 100644 --- a/tests/Unit/inc/Engine/Common/Ajax/AjaxHandler/redirect.php +++ b/tests/Unit/inc/Engine/Common/Ajax/AjaxHandler/redirect.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Common\Ajax\AjaxHandler::redirect + * Test class covering \WP_Rocket\Engine\Common\Ajax\AjaxHandler::redirect */ class Test_redirect extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Ajax/AjaxHandler/validateReferer.php b/tests/Unit/inc/Engine/Common/Ajax/AjaxHandler/validateReferer.php index ae074c90c0..7bfa3fa01f 100644 --- a/tests/Unit/inc/Engine/Common/Ajax/AjaxHandler/validateReferer.php +++ b/tests/Unit/inc/Engine/Common/Ajax/AjaxHandler/validateReferer.php @@ -10,7 +10,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Common\Ajax\AjaxHandler::validate_referer + * Test class covering \WP_Rocket\Engine\Common\Ajax\AjaxHandler::validate_referer */ class Test_validateReferer extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/clear.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/clear.php index 9b29d4ef2d..f0d25822bc 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/clear.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/clear.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::clear + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::clear */ class Test_clear extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/delete.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/delete.php index fb392431e1..6ce8581bab 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/delete.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/delete.php @@ -10,7 +10,7 @@ /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::delete + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::delete */ class Test_delete extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/deleteMultiple.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/deleteMultiple.php index 481ddce81b..2776908171 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/deleteMultiple.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/deleteMultiple.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::deleteMultiple + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::deleteMultiple */ class Test_deleteMultiple extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/generateUrl.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/generateUrl.php index 2a11a491ca..404627f54b 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/generateUrl.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/generateUrl.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::generate_url + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::generate_url */ class Test_generateUrl extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/get.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/get.php index d32143f2f3..c5596f6dd4 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/get.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/get.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::get + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::get */ class Test_get extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/getMultiple.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/getMultiple.php index 575000a5ca..164adf8770 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/getMultiple.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/getMultiple.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::getMultiple + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::getMultiple */ class Test_getMultiple extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/getRootPath.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/getRootPath.php index 88df437d6d..ae8ceffb11 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/getRootPath.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/getRootPath.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::get_root_path + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::get_root_path */ class Test_getRootPath extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/has.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/has.php index c04a3d25dd..21792cb1e2 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/has.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/has.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::has + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::has */ class Test_has extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/isAccessible.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/isAccessible.php index d4b20f60a3..efb438b5de 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/isAccessible.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/isAccessible.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::is_accessible + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::is_accessible */ class Test_isAccessible extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/set.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/set.php index 308912931e..9d226a09c2 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/set.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/set.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::set + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::set */ class Test_set extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/setMultiple.php b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/setMultiple.php index 9cb34bf362..160ceb0722 100644 --- a/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/setMultiple.php +++ b/tests/Unit/inc/Engine/Common/Cache/FilesystemCache/setMultiple.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\Cache\FilesystemCache::setMultiple + * Test class covering \WP_Rocket\Engine\Common\Cache\FilesystemCache::setMultiple */ class Test_setMultiple extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/ExtractCSS/Subscriber/extractCssFilesFromHtml.php b/tests/Unit/inc/Engine/Common/ExtractCSS/Subscriber/extractCssFilesFromHtml.php index c839b64568..3deaf4b88f 100644 --- a/tests/Unit/inc/Engine/Common/ExtractCSS/Subscriber/extractCssFilesFromHtml.php +++ b/tests/Unit/inc/Engine/Common/ExtractCSS/Subscriber/extractCssFilesFromHtml.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\ExtractCSS\Subscriber::extract_css_files_from_html + * Test class covering \WP_Rocket\Engine\Common\ExtractCSS\Subscriber::extract_css_files_from_html */ class Test_extractCssFilesFromHtml extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/ExtractCSS/Subscriber/extractInlineCssFromHtml.php b/tests/Unit/inc/Engine/Common/ExtractCSS/Subscriber/extractInlineCssFromHtml.php index 18e2de757d..a2f8c047e4 100644 --- a/tests/Unit/inc/Engine/Common/ExtractCSS/Subscriber/extractInlineCssFromHtml.php +++ b/tests/Unit/inc/Engine/Common/ExtractCSS/Subscriber/extractInlineCssFromHtml.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\ExtractCSS\Subscriber::extract_inline_css_from_html + * Test class covering \WP_Rocket\Engine\Common\ExtractCSS\Subscriber::extract_inline_css_from_html */ class Test_extractInlineCssFromHtml extends TestCase { use HasLoggerTrait; diff --git a/tests/Unit/inc/Engine/Common/JobManager/APIHandler/APIClient/addToQueue.php b/tests/Unit/inc/Engine/Common/JobManager/APIHandler/APIClient/addToQueue.php index e57e216277..0f88e0f50a 100644 --- a/tests/Unit/inc/Engine/Common/JobManager/APIHandler/APIClient/addToQueue.php +++ b/tests/Unit/inc/Engine/Common/JobManager/APIHandler/APIClient/addToQueue.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\HasLoggerTrait; /** - * @covers \WP_Rocket\Engine\Common\JobManager\APIHandler\APIClient::add_to_queue + * Test class covering \WP_Rocket\Engine\Common\JobManager\APIHandler\APIClient::add_to_queue * * @group SaaS */ diff --git a/tests/Unit/inc/Engine/Common/JobManager/APIHandler/APIClient/getQueueJobStatus.php b/tests/Unit/inc/Engine/Common/JobManager/APIHandler/APIClient/getQueueJobStatus.php index a5fbca7759..951846a4ea 100644 --- a/tests/Unit/inc/Engine/Common/JobManager/APIHandler/APIClient/getQueueJobStatus.php +++ b/tests/Unit/inc/Engine/Common/JobManager/APIHandler/APIClient/getQueueJobStatus.php @@ -8,7 +8,7 @@ use Brain\Monkey\Functions; /** - * @covers WP_Rocket\Engine\Common\JobManager\APIHandler\APIClient::get_queue_job_status + * Test class covering WP_Rocket\Engine\Common\JobManager\APIHandler\APIClient::get_queue_job_status * * @group SaaS */ diff --git a/tests/Unit/inc/Engine/Common/JobManager/Cron/Subscriber/cronCleanRows.php b/tests/Unit/inc/Engine/Common/JobManager/Cron/Subscriber/cronCleanRows.php index 99a9bffacf..0ba3c955db 100644 --- a/tests/Unit/inc/Engine/Common/JobManager/Cron/Subscriber/cronCleanRows.php +++ b/tests/Unit/inc/Engine/Common/JobManager/Cron/Subscriber/cronCleanRows.php @@ -13,7 +13,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::cron_clean_rows + * Test class covering \WP_Rocket\Engine\Common\JobManager\Cron\Subscriber::cron_clean_rows * */ class Test_CronCleanRows extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/JobManager/Strategy/Context/RetryContext/setStrategy.php b/tests/Unit/inc/Engine/Common/JobManager/Strategy/Context/RetryContext/setStrategy.php index 7876caa03e..2448260738 100644 --- a/tests/Unit/inc/Engine/Common/JobManager/Strategy/Context/RetryContext/setStrategy.php +++ b/tests/Unit/inc/Engine/Common/JobManager/Strategy/Context/RetryContext/setStrategy.php @@ -5,7 +5,7 @@ /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Strategy\Context\RetryContext::set_strategy + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Strategy\Context\RetryContext::set_strategy * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/DefaultProcess/execute.php b/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/DefaultProcess/execute.php index c63d15d30c..81ae9ac776 100644 --- a/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/DefaultProcess/execute.php +++ b/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/DefaultProcess/execute.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Strategy\Strategies\DefaultProcess::execute + * Test class covering \WP_Rocket\Engine\Common\JobManager\Strategy\Strategies\DefaultProcess::execute */ class Test_Execute extends TestCase { protected $used_css_query; diff --git a/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/JobSetFail/execute.php b/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/JobSetFail/execute.php index a7222df525..6f4f6862c0 100644 --- a/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/JobSetFail/execute.php +++ b/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/JobSetFail/execute.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Fixtures\inc\Engine\Common\JobManager\Manager; /** - * @covers \WP_Rocket\Engine\Common\JobManager\Strategy\Strategies\JobSetFail::execute + * Test class covering \WP_Rocket\Engine\Common\JobManager\Strategy\Strategies\JobSetFail::execute */ class Test_JobSetFail_Execute extends TestCase { diff --git a/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/ResetRetryProcess/execute.php b/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/ResetRetryProcess/execute.php index b13173c50e..24b1a36f7a 100644 --- a/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/ResetRetryProcess/execute.php +++ b/tests/Unit/inc/Engine/Common/JobManager/Strategy/Strategies/ResetRetryProcess/execute.php @@ -7,7 +7,7 @@ /** - * @covers \WP_Rocket\Engine\Common\JobManager\Strategy\Strategies\ResetRetryProcess::execute + * Test class covering \WP_Rocket\Engine\Common\JobManager\Strategy\Strategies\ResetRetryProcess::execute */ class Test_ResetRetryProcess_Execute extends TestCase { protected $used_css_query; diff --git a/tests/Unit/inc/Engine/CriticalPath/APIClient/getJobDetails.php b/tests/Unit/inc/Engine/CriticalPath/APIClient/getJobDetails.php index 8395e8e993..cb43cbbfc8 100644 --- a/tests/Unit/inc/Engine/CriticalPath/APIClient/getJobDetails.php +++ b/tests/Unit/inc/Engine/CriticalPath/APIClient/getJobDetails.php @@ -8,7 +8,7 @@ use WP_Error; /** - * @covers \WP_Rocket\Engine\CriticalPath\APIClient::get_job_details + * Test class covering \WP_Rocket\Engine\CriticalPath\APIClient::get_job_details * * @group CriticalPath */ diff --git a/tests/Unit/inc/Engine/CriticalPath/APIClient/sendGenerationRequest.php b/tests/Unit/inc/Engine/CriticalPath/APIClient/sendGenerationRequest.php index f4e941dc61..75a6ad9ed9 100644 --- a/tests/Unit/inc/Engine/CriticalPath/APIClient/sendGenerationRequest.php +++ b/tests/Unit/inc/Engine/CriticalPath/APIClient/sendGenerationRequest.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\APIClient::send_generation_request + * Test class covering \WP_Rocket\Engine\CriticalPath\APIClient::send_generation_request * @group CriticalPath */ class Test_SendGenerationRequest extends TestCase { diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/addRegenerateMenuItem.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/addRegenerateMenuItem.php index 2e3f547994..fd6c928067 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/addRegenerateMenuItem.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/addRegenerateMenuItem.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Admin::add_regenerate_menu_item + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Admin::add_regenerate_menu_item * * @group CriticalPath * @group CriticalPathAdmin diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/cpcssHeartbeat.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/cpcssHeartbeat.php index 1bf12967fe..f02dbc3737 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/cpcssHeartbeat.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/cpcssHeartbeat.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Admin::cpcss_heartbeat + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Admin::cpcss_heartbeat * * @group CriticalPath * @group CriticalPathAdmin diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/enqueueAdminCpcssHeartbeatScript.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/enqueueAdminCpcssHeartbeatScript.php index c2749d3135..1872e70a61 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/enqueueAdminCpcssHeartbeatScript.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Admin/enqueueAdminCpcssHeartbeatScript.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Admin::enqueue_admin_cpcss_heartbeat_script + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Admin::enqueue_admin_cpcss_heartbeat_script * @uses ::rocket_get_constant * * @group CriticalPath diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Post/cpcssActions.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Post/cpcssActions.php index 6690a9a9d7..cabddc7073 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Post/cpcssActions.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Post/cpcssActions.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Post::cpcss_actions + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Post::cpcss_actions * @uses ::rocket_direct_filesystem * * @group CriticalPath diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Post/cpcssSection.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Post/cpcssSection.php index 49932e98a2..4d47f9c230 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Post/cpcssSection.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Post/cpcssSection.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Post::cpcss_section + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Post::cpcss_section * * @group CriticalPath * @group CriticalPathPost diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Post/enqueueAdminEditScript.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Post/enqueueAdminEditScript.php index 420ff6fcf8..3857330865 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Post/enqueueAdminEditScript.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Post/enqueueAdminEditScript.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Post::enqueue_admin_edit_script + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Post::enqueue_admin_edit_script * @uses ::rocket_get_constant * * @group CriticalPath diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/addAsyncCssMobileOption.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/addAsyncCssMobileOption.php index 04bcc755ce..dc848a498c 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/addAsyncCssMobileOption.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/addAsyncCssMobileOption.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Settings::add_async_css_mobile_option + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Settings::add_async_css_mobile_option * * @group CriticalPath * @group CriticalPathSettings diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/addHiddenAsyncCssMobile.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/addHiddenAsyncCssMobile.php index 5711c9c345..04ca7d0fa8 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/addHiddenAsyncCssMobile.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/addHiddenAsyncCssMobile.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Settings::add_hidden_async_css_mobile + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Settings::add_hidden_async_css_mobile * * @group CriticalPath * @group CriticalPathSettings diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/displayCpcssMobileSection.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/displayCpcssMobileSection.php index c2a0bc96c1..8fa3f9ae60 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/displayCpcssMobileSection.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/displayCpcssMobileSection.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::cpcss_section + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Subscriber::cpcss_section * * @group CriticalPath */ diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/enableMobileCpcss.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/enableMobileCpcss.php index 5f27921f95..a9f0dc3f5f 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/enableMobileCpcss.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/enableMobileCpcss.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Settings::enable_mobile_cpcss + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Settings::enable_mobile_cpcss * @uses ::rocket_get_constant * * @group CriticalPath diff --git a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/setAsyncCssMobileDefaultValue.php b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/setAsyncCssMobileDefaultValue.php index 7bdc7404f3..8e8a20a825 100644 --- a/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/setAsyncCssMobileDefaultValue.php +++ b/tests/Unit/inc/Engine/CriticalPath/Admin/Settings/setAsyncCssMobileDefaultValue.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\CriticalPath\Admin\AdminTrait; /** - * @covers \WP_Rocket\Engine\CriticalPath\Admin\Settings::set_async_css_mobile_default_value + * Test class covering \WP_Rocket\Engine\CriticalPath\Admin\Settings::set_async_css_mobile_default_value * * @group CriticalPath * @group CriticalPathSettings diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php index 1d62424222..a53352612b 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/cleanCriticalCss.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::clean_critical_css + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::clean_critical_css * * @group CriticalPath */ diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getCriticalCssContent.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getCriticalCssContent.php index 820da8fd93..0bac4f34aa 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getCriticalCssContent.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getCriticalCssContent.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_critical_css_content + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_critical_css_content * * @group CriticalPath * @group vfs diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php index 7d9307b214..e69d7c4dcd 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getCurrentPageCriticalCss.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_current_page_critical_css + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_current_page_critical_css * * @group CriticalPath * @group vfs diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php index 4424bfdaeb..79c1ad1d9c 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/getExcludeAsyncCss.php @@ -11,7 +11,7 @@ use Mockery; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_exclude_async_css + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::get_exclude_async_css * * @group CriticalPath */ diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/processHandler.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/processHandler.php index 965e6109a7..b35c353271 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/processHandler.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSS/processHandler.php @@ -12,7 +12,7 @@ use wpdb; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSS::process_handler + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSS::process_handler * * @group CriticalCss * @group CriticalPath diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSGeneration/task.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSGeneration/task.php index 53dfed63c8..3467c97fa7 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSGeneration/task.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSGeneration/task.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::task + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::task * * @group CriticalPath */ diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/deleteCpcss.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/deleteCpcss.php index cce527d1a3..12243530bc 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/deleteCpcss.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/deleteCpcss.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::delete_cpcss + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::delete_cpcss * * @group Subscribers * @group CriticalPath diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php index 497e0bfc03..d556f7e7c0 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/excludeInlineJs.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::exclude_inline_js + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::exclude_inline_js * * @group Subscribers * @group CriticalPath diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/generateCriticalCssOnActivation.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/generateCriticalCssOnActivation.php index ab02ba353d..100fee421a 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/generateCriticalCssOnActivation.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/generateCriticalCssOnActivation.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::generate_critical_css_on_activation + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::generate_critical_css_on_activation * @uses \WP_Rocket\Engine\CriticalPath\CriticalCss::get_critical_css_path * @uses \WP_Rocket\Engine\CriticalPath\CriticalCss::process_handler * @uses \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::cancel_process diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/initCriticalCssGeneration.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/initCriticalCssGeneration.php index 4a92f9760a..c95b75443a 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/initCriticalCssGeneration.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/initCriticalCssGeneration.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::init_critical_css_generation + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::init_critical_css_generation * @uses \WP_Rocket\Engine\CriticalPath\CriticalCss::process_handler * @uses \WP_Rocket\Engine\CriticalPath\CriticalCSSGeneration::cancel_process * @uses ::rocket_get_constant diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/insertCriticalCssBuffer.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/insertCriticalCssBuffer.php index 1cc561eeee..648919b6b4 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/insertCriticalCssBuffer.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/insertCriticalCssBuffer.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::insert_critical_css_buffer + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::insert_critical_css_buffer * @uses ::rocket_get_constant * @uses ::is_rocket_post_excluded_option * @uses \WP_Rocket\Engine\CriticalPath\CriticalCss::get_critical_css_content diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/maybeGenerateCpcssMobile.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/maybeGenerateCpcssMobile.php index a51a475535..c5bba524d2 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/maybeGenerateCpcssMobile.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/maybeGenerateCpcssMobile.php @@ -14,7 +14,7 @@ use WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::maybe_generate_cpcss_mobile + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::maybe_generate_cpcss_mobile * * @group Subscribers * @group CriticalPath diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucss.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucss.php index 37d9600125..6594dd0a8d 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucss.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucss.php @@ -15,7 +15,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::switch_to_rucss + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::switch_to_rucss */ class Test_switchToRucss extends TestCase { diff --git a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucssNotice.php b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucssNotice.php index 3547ec161f..74565302e9 100644 --- a/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucssNotice.php +++ b/tests/Unit/inc/Engine/CriticalPath/CriticalCSSSubscriber/switchToRucssNotice.php @@ -15,7 +15,7 @@ use Brain\Monkey\Functions; use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::switch_to_rucss_notice + * Test class covering \WP_Rocket\Engine\CriticalPath\CriticalCSSSubscriber::switch_to_rucss_notice */ class Test_switchToRucssNotice extends TestCase { diff --git a/tests/Unit/inc/Engine/CriticalPath/DataManager/deleteCPCSS.php b/tests/Unit/inc/Engine/CriticalPath/DataManager/deleteCPCSS.php index 6e9cb095f8..137f4a3287 100644 --- a/tests/Unit/inc/Engine/CriticalPath/DataManager/deleteCPCSS.php +++ b/tests/Unit/inc/Engine/CriticalPath/DataManager/deleteCPCSS.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::delete_cpcss + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::delete_cpcss * @uses ::rocket_direct_filesystem * * @group CriticalPath diff --git a/tests/Unit/inc/Engine/CriticalPath/DataManager/deleteCacheJobId.php b/tests/Unit/inc/Engine/CriticalPath/DataManager/deleteCacheJobId.php index 917892ecd7..4ad1fdacd7 100644 --- a/tests/Unit/inc/Engine/CriticalPath/DataManager/deleteCacheJobId.php +++ b/tests/Unit/inc/Engine/CriticalPath/DataManager/deleteCacheJobId.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::delete_cache_job_id + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::delete_cache_job_id * * @group CriticalPath * @group vfs diff --git a/tests/Unit/inc/Engine/CriticalPath/DataManager/getCacheJobId.php b/tests/Unit/inc/Engine/CriticalPath/DataManager/getCacheJobId.php index aa29f3e3f6..4cfeb3cbe2 100644 --- a/tests/Unit/inc/Engine/CriticalPath/DataManager/getCacheJobId.php +++ b/tests/Unit/inc/Engine/CriticalPath/DataManager/getCacheJobId.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::get_cache_job_id + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::get_cache_job_id * * @group CriticalPath */ diff --git a/tests/Unit/inc/Engine/CriticalPath/DataManager/saveCPCSS.php b/tests/Unit/inc/Engine/CriticalPath/DataManager/saveCPCSS.php index c8465193e9..af01afb4f5 100644 --- a/tests/Unit/inc/Engine/CriticalPath/DataManager/saveCPCSS.php +++ b/tests/Unit/inc/Engine/CriticalPath/DataManager/saveCPCSS.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::save_cpcss + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::save_cpcss * * @group CriticalPath * @group vfs diff --git a/tests/Unit/inc/Engine/CriticalPath/DataManager/setCacheJobId.php b/tests/Unit/inc/Engine/CriticalPath/DataManager/setCacheJobId.php index 18adfffd2a..4587b00880 100644 --- a/tests/Unit/inc/Engine/CriticalPath/DataManager/setCacheJobId.php +++ b/tests/Unit/inc/Engine/CriticalPath/DataManager/setCacheJobId.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\CriticalPath\DataManager::set_cache_job_id + * Test class covering \WP_Rocket\Engine\CriticalPath\DataManager::set_cache_job_id * * @group CriticalPath */ diff --git a/tests/Unit/inc/Engine/CriticalPath/ProcessorService/processGenerate.php b/tests/Unit/inc/Engine/CriticalPath/ProcessorService/processGenerate.php index 344aec9498..12b393deb3 100644 --- a/tests/Unit/inc/Engine/CriticalPath/ProcessorService/processGenerate.php +++ b/tests/Unit/inc/Engine/CriticalPath/ProcessorService/processGenerate.php @@ -11,7 +11,7 @@ use WP_Rocket\Engine\CriticalPath\DataManager; /** - * @covers \WP_Rocket\Engine\CriticalPath\ProcessorService::process_generate + * Test class covering \WP_Rocket\Engine\CriticalPath\ProcessorService::process_generate * * @group CriticalPath */ diff --git a/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/delete.php b/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/delete.php index 175ed0c329..4649812de2 100644 --- a/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/delete.php +++ b/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/delete.php @@ -14,7 +14,7 @@ use Mockery; /** - * @covers \WP_Rocket\Engine\CriticalPath\RESTWPPost::delete + * Test class covering \WP_Rocket\Engine\CriticalPath\RESTWPPost::delete * @uses \WP_Rocket\Engine\CriticalPath\ProcessorService::process_delete * @uses \WP_Rocket\Admin\Options_Data::get * diff --git a/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/generate.php b/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/generate.php index 9411e57c57..e9558ef765 100644 --- a/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/generate.php +++ b/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/generate.php @@ -14,7 +14,7 @@ use Mockery; /** - * @covers \WP_Rocket\Engine\CriticalPath\RESTWPPost::generate + * Test class covering \WP_Rocket\Engine\CriticalPath\RESTWPPost::generate * * @group CriticalPath * @group vfs diff --git a/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php b/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php index ecb7c9a732..8339147ea6 100644 --- a/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php +++ b/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/registerDeleteRoute.php @@ -12,7 +12,7 @@ use Mockery; /** - * @covers \WP_Rocket\Engine\CriticalPath\RESTWPPost::register_delete_route + * Test class covering \WP_Rocket\Engine\CriticalPath\RESTWPPost::register_delete_route * @group CriticalPath */ class Test_RegisterDeleteRoute extends TestCase { diff --git a/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/registerGenerateRoute.php b/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/registerGenerateRoute.php index 89a8914e50..1241ff1078 100644 --- a/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/registerGenerateRoute.php +++ b/tests/Unit/inc/Engine/CriticalPath/RESTWPPost/registerGenerateRoute.php @@ -12,7 +12,7 @@ use Mockery; /** - * @covers \WP_Rocket\Engine\CriticalPath\RESTWPPost::register_generate_route + * Test class covering \WP_Rocket\Engine\CriticalPath\RESTWPPost::register_generate_route * * @group CriticalPath */ diff --git a/tests/Unit/inc/Engine/Debug/Resolver/getServices.php b/tests/Unit/inc/Engine/Debug/Resolver/getServices.php index 4af329b8bd..b3065a174d 100644 --- a/tests/Unit/inc/Engine/Debug/Resolver/getServices.php +++ b/tests/Unit/inc/Engine/Debug/Resolver/getServices.php @@ -9,7 +9,7 @@ use WP_Rocket\Engine\Debug\Resolver; /** - * @covers \WP_Rocket\Engine\Debug\Resolver::get_services + * Test class covering \WP_Rocket\Engine\Debug\Resolver::get_services */ class Test_GetServices extends TestCase { /** diff --git a/tests/Unit/inc/Engine/HealthCheck/ActionSchedulerCheck/checkOnUpdateOptions.php b/tests/Unit/inc/Engine/HealthCheck/ActionSchedulerCheck/checkOnUpdateOptions.php index 17b9c20bf2..2e6850f258 100644 --- a/tests/Unit/inc/Engine/HealthCheck/ActionSchedulerCheck/checkOnUpdateOptions.php +++ b/tests/Unit/inc/Engine/HealthCheck/ActionSchedulerCheck/checkOnUpdateOptions.php @@ -8,7 +8,7 @@ use wpdb; /** - * @covers \WP_Rocket\Engine\HealthCheck\ActionSchedulerCheck::check_on_update_options + * Test class covering \WP_Rocket\Engine\HealthCheck\ActionSchedulerCheck::check_on_update_options * @group HealthCheck */ class Test_CheckOnUpdateOptions extends TestCase { diff --git a/tests/Unit/inc/Engine/HealthCheck/ActionSchedulerCheck/maybeRecreateAsTables.php b/tests/Unit/inc/Engine/HealthCheck/ActionSchedulerCheck/maybeRecreateAsTables.php index 1068aeb7ca..55e0a57db4 100644 --- a/tests/Unit/inc/Engine/HealthCheck/ActionSchedulerCheck/maybeRecreateAsTables.php +++ b/tests/Unit/inc/Engine/HealthCheck/ActionSchedulerCheck/maybeRecreateAsTables.php @@ -8,7 +8,7 @@ use wpdb; /** - * @covers \WP_Rocket\Engine\HealthCheck\ActionSchedulerCheck::maybe_recreate_as_tables + * Test class covering \WP_Rocket\Engine\HealthCheck\ActionSchedulerCheck::maybe_recreate_as_tables * @group HealthCheck */ class Test_MaybeRecreateAsTables extends TestCase { diff --git a/tests/Unit/inc/Engine/HealthCheck/HealthCheck/missedCron.php b/tests/Unit/inc/Engine/HealthCheck/HealthCheck/missedCron.php index a1bfcafe94..38d3620e83 100644 --- a/tests/Unit/inc/Engine/HealthCheck/HealthCheck/missedCron.php +++ b/tests/Unit/inc/Engine/HealthCheck/HealthCheck/missedCron.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\HealthCheck\HealthCheck::missed_cron + * Test class covering \WP_Rocket\Engine\HealthCheck\HealthCheck::missed_cron * * @group HealthCheck */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getInfinitePricing.php b/tests/Unit/inc/Engine/License/API/Pricing/getInfinitePricing.php index 10a0f34615..10c2ab2005 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getInfinitePricing.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getInfinitePricing.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_infinite_pricing + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_infinite_pricing * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getInfiniteWebsitesCount.php b/tests/Unit/inc/Engine/License/API/Pricing/getInfiniteWebsitesCount.php index d6d869e6da..6b960dbad0 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getInfiniteWebsitesCount.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getInfiniteWebsitesCount.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_infinite_websites_count + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_infinite_websites_count * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getPlusPricing.php b/tests/Unit/inc/Engine/License/API/Pricing/getPlusPricing.php index 7b07081996..5091e81714 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getPlusPricing.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getPlusPricing.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_plus_pricing + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_plus_pricing * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getPlusToInfinitePrice.php b/tests/Unit/inc/Engine/License/API/Pricing/getPlusToInfinitePrice.php index b19c8dfeca..bcacba0522 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getPlusToInfinitePrice.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getPlusToInfinitePrice.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_plus_to_infinite_price + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_plus_to_infinite_price * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getPlusWebsitesCount.php b/tests/Unit/inc/Engine/License/API/Pricing/getPlusWebsitesCount.php index 4c90467ad1..1e76b8a68d 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getPlusWebsitesCount.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getPlusWebsitesCount.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_plus_websites_count + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_plus_websites_count * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getPromoData.php b/tests/Unit/inc/Engine/License/API/Pricing/getPromoData.php index af60329232..8bc58c7a5c 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getPromoData.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getPromoData.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_promo_data + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_promo_data * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getPromoEnd.php b/tests/Unit/inc/Engine/License/API/Pricing/getPromoEnd.php index abd5acc7f3..aef1f66135 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getPromoEnd.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getPromoEnd.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_promo_end + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_promo_end * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getRegularPlusToInfinitePrice.php b/tests/Unit/inc/Engine/License/API/Pricing/getRegularPlusToInfinitePrice.php index 34b060adc9..99b18927c2 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getRegularPlusToInfinitePrice.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getRegularPlusToInfinitePrice.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_regular_plus_to_infinite_price + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_regular_plus_to_infinite_price * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getRegularSingleToInfinitePrice.php b/tests/Unit/inc/Engine/License/API/Pricing/getRegularSingleToInfinitePrice.php index 3f07cedd54..2f0d11749b 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getRegularSingleToInfinitePrice.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getRegularSingleToInfinitePrice.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_regular_single_to_infinite_price + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_regular_single_to_infinite_price * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getRegularSingleToPlusPrice.php b/tests/Unit/inc/Engine/License/API/Pricing/getRegularSingleToPlusPrice.php index 2c83de538b..2028f18f83 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getRegularSingleToPlusPrice.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getRegularSingleToPlusPrice.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_regular_single_to_plus_price + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_regular_single_to_plus_price * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getRenewalsData.php b/tests/Unit/inc/Engine/License/API/Pricing/getRenewalsData.php index 528b761260..afdc28f686 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getRenewalsData.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getRenewalsData.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_renewals_data + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_renewals_data * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getSinglePricing.php b/tests/Unit/inc/Engine/License/API/Pricing/getSinglePricing.php index 56e501d9b0..b7483fef09 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getSinglePricing.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getSinglePricing.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_single_pricing + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_single_pricing * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getSingleToInfinitePrice.php b/tests/Unit/inc/Engine/License/API/Pricing/getSingleToInfinitePrice.php index 0381863385..23b714cc89 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getSingleToInfinitePrice.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getSingleToInfinitePrice.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_single_to_infinite_price + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_single_to_infinite_price * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getSingleToPlusPrice.php b/tests/Unit/inc/Engine/License/API/Pricing/getSingleToPlusPrice.php index 7f5727d3bc..a5d35f93c7 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getSingleToPlusPrice.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getSingleToPlusPrice.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_single_to_plus_price + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_single_to_plus_price * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/getSingleWebsitesCount.php b/tests/Unit/inc/Engine/License/API/Pricing/getSingleWebsitesCount.php index 240e2f8813..a3b5c959a8 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/getSingleWebsitesCount.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/getSingleWebsitesCount.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::get_single_websites_count + * Test class covering \WP_Rocket\Engine\License\API\Pricing::get_single_websites_count * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/Pricing/isPromoActive.php b/tests/Unit/inc/Engine/License/API/Pricing/isPromoActive.php index 3de68ba3a4..c30a15dfc6 100644 --- a/tests/Unit/inc/Engine/License/API/Pricing/isPromoActive.php +++ b/tests/Unit/inc/Engine/License/API/Pricing/isPromoActive.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\Pricing::is_promo_active + * Test class covering \WP_Rocket\Engine\License\API\Pricing::is_promo_active * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/PricingClient/getPricingData.php b/tests/Unit/inc/Engine/License/API/PricingClient/getPricingData.php index d9bddd6eaa..72595b52de 100644 --- a/tests/Unit/inc/Engine/License/API/PricingClient/getPricingData.php +++ b/tests/Unit/inc/Engine/License/API/PricingClient/getPricingData.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\PricingClient::get_pricing_data + * Test class covering \WP_Rocket\Engine\License\API\PricingClient::get_pricing_data * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/User/IsLicenseExpiredGracePeriod.php b/tests/Unit/inc/Engine/License/API/User/IsLicenseExpiredGracePeriod.php index 5b75b801e8..9c50db9c78 100644 --- a/tests/Unit/inc/Engine/License/API/User/IsLicenseExpiredGracePeriod.php +++ b/tests/Unit/inc/Engine/License/API/User/IsLicenseExpiredGracePeriod.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\User::is_license_expired_grace_period + * Test class covering \WP_Rocket\Engine\License\API\User::is_license_expired_grace_period * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/User/getCreationDate.php b/tests/Unit/inc/Engine/License/API/User/getCreationDate.php index 9d10669bfb..77dc4f9556 100644 --- a/tests/Unit/inc/Engine/License/API/User/getCreationDate.php +++ b/tests/Unit/inc/Engine/License/API/User/getCreationDate.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\User::get_creation_date + * Test class covering \WP_Rocket\Engine\License\API\User::get_creation_date * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/User/getLicenseExpiration.php b/tests/Unit/inc/Engine/License/API/User/getLicenseExpiration.php index 8bc14f425b..1b8b9f4ca9 100644 --- a/tests/Unit/inc/Engine/License/API/User/getLicenseExpiration.php +++ b/tests/Unit/inc/Engine/License/API/User/getLicenseExpiration.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\User::get_license_expiration + * Test class covering \WP_Rocket\Engine\License\API\User::get_license_expiration * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/User/getLicenseType.php b/tests/Unit/inc/Engine/License/API/User/getLicenseType.php index 6b311022e2..5cd6411e47 100644 --- a/tests/Unit/inc/Engine/License/API/User/getLicenseType.php +++ b/tests/Unit/inc/Engine/License/API/User/getLicenseType.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\User::get_license_type + * Test class covering \WP_Rocket\Engine\License\API\User::get_license_type * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/User/getUpgradeInfiniteUrl.php b/tests/Unit/inc/Engine/License/API/User/getUpgradeInfiniteUrl.php index 275acdbc95..19a756c63a 100644 --- a/tests/Unit/inc/Engine/License/API/User/getUpgradeInfiniteUrl.php +++ b/tests/Unit/inc/Engine/License/API/User/getUpgradeInfiniteUrl.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\User::get_upgrade_infinite_url + * Test class covering \WP_Rocket\Engine\License\API\User::get_upgrade_infinite_url * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/User/getUpgradePlusUrl.php b/tests/Unit/inc/Engine/License/API/User/getUpgradePlusUrl.php index 690ccae045..e1d510e8fe 100644 --- a/tests/Unit/inc/Engine/License/API/User/getUpgradePlusUrl.php +++ b/tests/Unit/inc/Engine/License/API/User/getUpgradePlusUrl.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\User::get_upgrade_plus_url + * Test class covering \WP_Rocket\Engine\License\API\User::get_upgrade_plus_url * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/User/isAutoRenew.php b/tests/Unit/inc/Engine/License/API/User/isAutoRenew.php index 55ba08f7c2..b0f841cf17 100644 --- a/tests/Unit/inc/Engine/License/API/User/isAutoRenew.php +++ b/tests/Unit/inc/Engine/License/API/User/isAutoRenew.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\User::is_auto_renew + * Test class covering \WP_Rocket\Engine\License\API\User::is_auto_renew * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/User/isLicenseExpired.php b/tests/Unit/inc/Engine/License/API/User/isLicenseExpired.php index 180c820c56..761e9c4fbc 100644 --- a/tests/Unit/inc/Engine/License/API/User/isLicenseExpired.php +++ b/tests/Unit/inc/Engine/License/API/User/isLicenseExpired.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\User::is_license_expired + * Test class covering \WP_Rocket\Engine\License\API\User::is_license_expired * * @group License */ diff --git a/tests/Unit/inc/Engine/License/API/UserClient/getUserData.php b/tests/Unit/inc/Engine/License/API/UserClient/getUserData.php index 9c04fce53d..d9e471aae5 100644 --- a/tests/Unit/inc/Engine/License/API/UserClient/getUserData.php +++ b/tests/Unit/inc/Engine/License/API/UserClient/getUserData.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\API\UserClient::get_user_data + * Test class covering \WP_Rocket\Engine\License\API\UserClient::get_user_data * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Renewal/addExpiredBubble.php b/tests/Unit/inc/Engine/License/Renewal/addExpiredBubble.php index 1e58159518..c625380ea6 100644 --- a/tests/Unit/inc/Engine/License/Renewal/addExpiredBubble.php +++ b/tests/Unit/inc/Engine/License/Renewal/addExpiredBubble.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Renewal::add_expired_bubble + * Test class covering \WP_Rocket\Engine\License\Renewal::add_expired_bubble * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Renewal/addLicenseExpireWarning.php b/tests/Unit/inc/Engine/License/Renewal/addLicenseExpireWarning.php index 7b00851a82..a80e5d7433 100644 --- a/tests/Unit/inc/Engine/License/Renewal/addLicenseExpireWarning.php +++ b/tests/Unit/inc/Engine/License/Renewal/addLicenseExpireWarning.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Renewal::add_license_expire_warning + * Test class covering \WP_Rocket\Engine\License\Renewal::add_license_expire_warning * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Renewal/addLocalizeScriptData.php b/tests/Unit/inc/Engine/License/Renewal/addLocalizeScriptData.php index f8499f746e..3eecc33a08 100644 --- a/tests/Unit/inc/Engine/License/Renewal/addLocalizeScriptData.php +++ b/tests/Unit/inc/Engine/License/Renewal/addLocalizeScriptData.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Renewal::add_localize_script_data + * Test class covering \WP_Rocket\Engine\License\Renewal::add_localize_script_data * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Renewal/dismissRenewalExpiredBanner.php b/tests/Unit/inc/Engine/License/Renewal/dismissRenewalExpiredBanner.php index 58b808f5ca..0e4d08debc 100644 --- a/tests/Unit/inc/Engine/License/Renewal/dismissRenewalExpiredBanner.php +++ b/tests/Unit/inc/Engine/License/Renewal/dismissRenewalExpiredBanner.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Renewal::dismiss_renewal_expired_banner + * Test class covering \WP_Rocket\Engine\License\Renewal::dismiss_renewal_expired_banner * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Renewal/displayRenewalExpiredBanner.php b/tests/Unit/inc/Engine/License/Renewal/displayRenewalExpiredBanner.php index 2045bfb07c..cbd1c42b3e 100644 --- a/tests/Unit/inc/Engine/License/Renewal/displayRenewalExpiredBanner.php +++ b/tests/Unit/inc/Engine/License/Renewal/displayRenewalExpiredBanner.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Renewal::display_renewal_expired_banner + * Test class covering \WP_Rocket\Engine\License\Renewal::display_renewal_expired_banner * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Renewal/displayRenewalSoonBanner.php b/tests/Unit/inc/Engine/License/Renewal/displayRenewalSoonBanner.php index 3bdd530873..9001e28807 100644 --- a/tests/Unit/inc/Engine/License/Renewal/displayRenewalSoonBanner.php +++ b/tests/Unit/inc/Engine/License/Renewal/displayRenewalSoonBanner.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Renewal::display_renewal_soon_banner + * Test class covering \WP_Rocket\Engine\License\Renewal::display_renewal_soon_banner * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Renewal/maybeDisableOcd.php b/tests/Unit/inc/Engine/License/Renewal/maybeDisableOcd.php index 3474ff48db..8f0e607570 100644 --- a/tests/Unit/inc/Engine/License/Renewal/maybeDisableOcd.php +++ b/tests/Unit/inc/Engine/License/Renewal/maybeDisableOcd.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Renewal::maybe_disable_ocd + * Test class covering \WP_Rocket\Engine\License\Renewal::maybe_disable_ocd * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Renewal/setDashboardSeenTransient.php b/tests/Unit/inc/Engine/License/Renewal/setDashboardSeenTransient.php index 71124b9240..9836d33cc7 100644 --- a/tests/Unit/inc/Engine/License/Renewal/setDashboardSeenTransient.php +++ b/tests/Unit/inc/Engine/License/Renewal/setDashboardSeenTransient.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Renewal::set_dashboard_seen_transient + * Test class covering \WP_Rocket\Engine\License\Renewal::set_dashboard_seen_transient * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Upgrade/addLocalizeScriptData.php b/tests/Unit/inc/Engine/License/Upgrade/addLocalizeScriptData.php index a9cb5a5229..0b3b25199d 100644 --- a/tests/Unit/inc/Engine/License/Upgrade/addLocalizeScriptData.php +++ b/tests/Unit/inc/Engine/License/Upgrade/addLocalizeScriptData.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Upgrade::add_localize_script_data + * Test class covering \WP_Rocket\Engine\License\Upgrade::add_localize_script_data * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Upgrade/addNotificationBubble.php b/tests/Unit/inc/Engine/License/Upgrade/addNotificationBubble.php index 9c4a2c1c12..7661653d67 100644 --- a/tests/Unit/inc/Engine/License/Upgrade/addNotificationBubble.php +++ b/tests/Unit/inc/Engine/License/Upgrade/addNotificationBubble.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Upgrade::add_notification_bubble + * Test class covering \WP_Rocket\Engine\License\Upgrade::add_notification_bubble * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Upgrade/dismissNotificationBubble.php b/tests/Unit/inc/Engine/License/Upgrade/dismissNotificationBubble.php index 61014cb3af..668d7f62d7 100644 --- a/tests/Unit/inc/Engine/License/Upgrade/dismissNotificationBubble.php +++ b/tests/Unit/inc/Engine/License/Upgrade/dismissNotificationBubble.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Upgrade::dismiss_notification_bubble + * Test class covering \WP_Rocket\Engine\License\Upgrade::dismiss_notification_bubble * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Upgrade/dismissPromoBanner.php b/tests/Unit/inc/Engine/License/Upgrade/dismissPromoBanner.php index b81fc1ab53..60ad7c5a79 100644 --- a/tests/Unit/inc/Engine/License/Upgrade/dismissPromoBanner.php +++ b/tests/Unit/inc/Engine/License/Upgrade/dismissPromoBanner.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Upgrade::dismiss_promo_banner + * Test class covering \WP_Rocket\Engine\License\Upgrade::dismiss_promo_banner * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Upgrade/displayPromoBanner.php b/tests/Unit/inc/Engine/License/Upgrade/displayPromoBanner.php index c6c098da87..820c8214e7 100644 --- a/tests/Unit/inc/Engine/License/Upgrade/displayPromoBanner.php +++ b/tests/Unit/inc/Engine/License/Upgrade/displayPromoBanner.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Upgrade::display_promo_banner + * Test class covering \WP_Rocket\Engine\License\Upgrade::display_promo_banner * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Upgrade/displayUpgradePopin.php b/tests/Unit/inc/Engine/License/Upgrade/displayUpgradePopin.php index 6357edeb8a..fc75bd367a 100644 --- a/tests/Unit/inc/Engine/License/Upgrade/displayUpgradePopin.php +++ b/tests/Unit/inc/Engine/License/Upgrade/displayUpgradePopin.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Upgrade::display_upgrade_popin + * Test class covering \WP_Rocket\Engine\License\Upgrade::display_upgrade_popin * * @group License */ diff --git a/tests/Unit/inc/Engine/License/Upgrade/displayUpgradeSection.php b/tests/Unit/inc/Engine/License/Upgrade/displayUpgradeSection.php index 31bc750947..63cf4de554 100644 --- a/tests/Unit/inc/Engine/License/Upgrade/displayUpgradeSection.php +++ b/tests/Unit/inc/Engine/License/Upgrade/displayUpgradeSection.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\License\Upgrade::display_upgrade_section + * Test class covering \WP_Rocket\Engine\License\Upgrade::display_upgrade_section * * @group License */ diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php b/tests/Unit/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php index 2c929221e1..e5801adbfd 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Engine\Media\AboveTheFold\AJAX\Controller::add_lcp_data + * Test class covering WP_Rocket\Engine\Media\AboveTheFold\AJAX\Controller::add_lcp_data * * @group AboveTheFold */ diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php index 2661170fc5..b694e2da65 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deletePostAtf.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Engine\Media\AboveTheFold\Admin\Controller::delete_post_atf + * Test class covering WP_Rocket\Engine\Media\AboveTheFold\Admin\Controller::delete_post_atf * * @group ATF */ diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php index 063f470b2f..981e6bc130 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/deleteTermAtf.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Engine\Media\AboveTheFold\Admin\Controller::delete_term_atf + * Test class covering WP_Rocket\Engine\Media\AboveTheFold\Admin\Controller::delete_term_atf * * @group ATF */ diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php index 31c8ea0455..261b687299 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Admin/Controller/truncateAtf.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Engine\Media\AboveTheFold\Admin\Controller::truncate_atf + * Test class covering WP_Rocket\Engine\Media\AboveTheFold\Admin\Controller::truncate_atf * * @group ATF */ diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php index d4de402130..0c4a767168 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php @@ -13,7 +13,7 @@ use WP_Rocket\Tests\Fixtures\inc\Engine\Common\JobManager\Manager; /** - * @covers \WP_Rocket\Engine\Media\AboveTheFold\Frontend\Controller::add_exclusions + * Test class covering \WP_Rocket\Engine\Media\AboveTheFold\Frontend\Controller::add_exclusions * * @group Media * @group AboveTheFold diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php index 5f3d24e13e..ffa443d705 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\AboveTheFold\WarmUp\Controller::fetch_links + * Test class covering \WP_Rocket\Engine\Media\AboveTheFold\WarmUp\Controller::fetch_links * * @group Media * @group AboveTheFold diff --git a/tests/Unit/inc/Engine/Media/ImageDimensions/ImageDimensions/addOption.php b/tests/Unit/inc/Engine/Media/ImageDimensions/ImageDimensions/addOption.php index 3c6a9df7d4..8f08c5e91d 100644 --- a/tests/Unit/inc/Engine/Media/ImageDimensions/ImageDimensions/addOption.php +++ b/tests/Unit/inc/Engine/Media/ImageDimensions/ImageDimensions/addOption.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Media\ImageDimensions\ImageDimensions::add_option + * Test class covering \WP_Rocket\Engine\Media\ImageDimensions\ImageDimensions::add_option * * @group ImageDimensions * @group Media diff --git a/tests/Unit/inc/Engine/Media/ImageDimensions/ImageDimensions/specifyImageDimensions.php b/tests/Unit/inc/Engine/Media/ImageDimensions/ImageDimensions/specifyImageDimensions.php index 0975505017..9741c10a22 100644 --- a/tests/Unit/inc/Engine/Media/ImageDimensions/ImageDimensions/specifyImageDimensions.php +++ b/tests/Unit/inc/Engine/Media/ImageDimensions/ImageDimensions/specifyImageDimensions.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Media\ImageDimensions\ImageDimensions::specify_image_dimensions + * Test class covering \WP_Rocket\Engine\Media\ImageDimensions\ImageDimensions::specify_image_dimensions * @group ImageDimensions * @group Media */ diff --git a/tests/Unit/inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php b/tests/Unit/inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php index 15c47dbc3b..2466ceb3f5 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/AdminSubscriber/addOption.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\AdminSubscriber::add_option + * Test class covering \WP_Rocket\Engine\Media\Lazyload\AdminSubscriber::add_option * * @group Media * @group Lazyload diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php index 631c8adf12..27e85e210d 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addMetaBox.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::add_meta_box + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::add_meta_box */ class Test_AddMetaBox extends TestCase { /** diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php index ecd6ad0d77..f3ff0a9752 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/addOptionSafemode.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::add_option_safemode + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::add_option_safemode */ class Test_addOptionSafemode extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php index 235f2e59cd..9de66590d2 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Admin/Subscriber/maybeAddErrorNotice.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::maybe_add_error_notice + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Admin\Subscriber::maybe_add_error_notice */ class Test_maybeAddErrorNotice extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/ContentFetcher/fetch.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/ContentFetcher/fetch.php index c3b5319aa1..20506a43be 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/ContentFetcher/fetch.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/ContentFetcher/fetch.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Front\ContentFetcher::fetch + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Front\ContentFetcher::fetch */ class Test_fetch extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/Extractor/extract.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/Extractor/extract.php index 267ed7b229..dcf65d1a5e 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/Extractor/extract.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/Extractor/extract.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Front\Extractor::extract + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Front\Extractor::extract */ class Test_extract extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/FileResolver/resolve.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/FileResolver/resolve.php index 9fe798e5f0..6aea7c0489 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/FileResolver/resolve.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/FileResolver/resolve.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Front\FileResolver::resolve + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Front\FileResolver::resolve */ class Test_resolve extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/MappingFormatter/format.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/MappingFormatter/format.php index 3139e38ba0..a60cabd5ab 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/MappingFormatter/format.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/MappingFormatter/format.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Front\MappingFormatter::format + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Front\MappingFormatter::format */ class Test_format extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/RuleFormatter/format.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/RuleFormatter/format.php index 5e380f3665..708cd43005 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/RuleFormatter/format.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/RuleFormatter/format.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Front\RuleFormatter::format + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Front\RuleFormatter::format */ class Test_format extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/TagGenerator/generate.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/TagGenerator/generate.php index 081b794f3a..82619926fb 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/TagGenerator/generate.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Front/TagGenerator/generate.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Front\TagGenerator::generate + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Front\TagGenerator::generate */ class Test_generate extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/addLazyTag.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/addLazyTag.php index 20bd327f05..d657274fb4 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/addLazyTag.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/addLazyTag.php @@ -20,7 +20,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::add_lazy_tag + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::add_lazy_tag */ class Test_addLazyTag extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/clearGeneratedCss.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/clearGeneratedCss.php index a95546a461..2c75b8211d 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/clearGeneratedCss.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/clearGeneratedCss.php @@ -20,7 +20,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::clear_generated_css + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::clear_generated_css */ class Test_clearGeneratedCss extends TestCase { use SubscriberTrait; diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/createLazyCssFiles.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/createLazyCssFiles.php index a65c7bccf7..1e4180f8b5 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/createLazyCssFiles.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/createLazyCssFiles.php @@ -7,7 +7,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::create_lazy_css_files + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::create_lazy_css_files */ class Test_createLazyCssFiles extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/createLazyInlineCss.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/createLazyInlineCss.php index abaaee3f56..ae665a472d 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/createLazyInlineCss.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/createLazyInlineCss.php @@ -7,7 +7,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::create_lazy_inline_css + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::create_lazy_inline_css */ class Test_createLazyInlineCss extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php index b5531c759d..1b37466f52 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/excludeRocketLazyloadExcludedSrc.php @@ -19,7 +19,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::exclude_rocket_lazyload_excluded_src + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::exclude_rocket_lazyload_excluded_src */ class Test_excludeRocketLazyloadExcludedSrc extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/insertLazyloadScript.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/insertLazyloadScript.php index 552c52454c..1acb65a3bf 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/insertLazyloadScript.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/insertLazyloadScript.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::insert_lazyload_script + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::insert_lazyload_script */ class Test_insertLazyloadScript extends TestCase { diff --git a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php index 2f28ae7668..6567c22b92 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/CSS/Subscriber/maybeReplaceCssImages.php @@ -7,7 +7,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::maybe_replace_css_images + * Test class covering \WP_Rocket\Engine\Media\Lazyload\CSS\Subscriber::maybe_replace_css_images */ class Test_maybeReplaceCssImages extends TestCase { use SubscriberTrait; diff --git a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/addExclusions.php b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/addExclusions.php index 78cc6863ab..ad371b8466 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/addExclusions.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/addExclusions.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::add_exclusions + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::add_exclusions * * @group Media * @group Lazyload diff --git a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/insertLazyloadScript.php b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/insertLazyloadScript.php index be00345319..32d5c14aa2 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/insertLazyloadScript.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/insertLazyloadScript.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::insert_lazyload_script + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::insert_lazyload_script * * @group Media * @group Lazyload diff --git a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/lazyload.php b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/lazyload.php index ffda00eca9..eac7099537 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/lazyload.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/lazyload.php @@ -13,7 +13,7 @@ use WP_Rocket\Engine\Media\Lazyload\Subscriber; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::lazyload + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::lazyload * * @group Media * @group Lazyload diff --git a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php index d2237de0e9..0047afd47e 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/lazyloadResponsive.php @@ -12,7 +12,7 @@ use WP_Rocket\Engine\Media\Lazyload\Subscriber; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::lazyload_responsive + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::lazyload_responsive * * @group Media * @group Lazyload diff --git a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php index eb5b98dd63..62f29f88b7 100644 --- a/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php +++ b/tests/Unit/inc/Engine/Media/Lazyload/Subscriber/maybeDisableCoreLazyload.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Media\Lazyload\Subscriber::maybe_disable_core_lazyload + * Test class covering \WP_Rocket\Engine\Media\Lazyload\Subscriber::maybe_disable_core_lazyload * * @group Media * @group Lazyload diff --git a/tests/Unit/inc/Engine/Optimization/AssetsLocalCache/getContent.php b/tests/Unit/inc/Engine/Optimization/AssetsLocalCache/getContent.php index 8168ff9597..7d7419e22a 100644 --- a/tests/Unit/inc/Engine/Optimization/AssetsLocalCache/getContent.php +++ b/tests/Unit/inc/Engine/Optimization/AssetsLocalCache/getContent.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\AssetsLocalCache::get_content + * Test class covering \WP_Rocket\Engine\Optimization\AssetsLocalCache::get_content * @group Optimize * @group AssetsLocalCache */ diff --git a/tests/Unit/inc/Engine/Optimization/AssetsLocalCache/validateIntegrity.php b/tests/Unit/inc/Engine/Optimization/AssetsLocalCache/validateIntegrity.php index 36193aad5a..89595a8d60 100644 --- a/tests/Unit/inc/Engine/Optimization/AssetsLocalCache/validateIntegrity.php +++ b/tests/Unit/inc/Engine/Optimization/AssetsLocalCache/validateIntegrity.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\AssetsLocalCache::validate_integrity + * Test class covering \WP_Rocket\Engine\Optimization\AssetsLocalCache::validate_integrity * @group Optimize * @group AssetsLocalCache */ diff --git a/tests/Unit/inc/Engine/Optimization/CSSTraitApplyFontDisplaySwap.php b/tests/Unit/inc/Engine/Optimization/CSSTraitApplyFontDisplaySwap.php index 150ecffaae..6d5015f308 100644 --- a/tests/Unit/inc/Engine/Optimization/CSSTraitApplyFontDisplaySwap.php +++ b/tests/Unit/inc/Engine/Optimization/CSSTraitApplyFontDisplaySwap.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\CSSTrait::apply_font_display_swap + * Test class covering \WP_Rocket\Engine\Optimization\CSSTrait::apply_font_display_swap * * @group Optimize * @group CSSTrait diff --git a/tests/Unit/inc/Engine/Optimization/CacheDynamicResource/isExcludedFile.php b/tests/Unit/inc/Engine/Optimization/CacheDynamicResource/isExcludedFile.php index 5445b860e5..9cd7ca3892 100644 --- a/tests/Unit/inc/Engine/Optimization/CacheDynamicResource/isExcludedFile.php +++ b/tests/Unit/inc/Engine/Optimization/CacheDynamicResource/isExcludedFile.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\Optimization\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\CacheDynamicResource::is_excluded_file + * Test class covering \WP_Rocket\Engine\Optimization\CacheDynamicResource::is_excluded_file * @group Optimize * @group CacheDynamicResource */ diff --git a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/addOption.php b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/addOption.php index 7fef813b48..6a9bca8c3e 100644 --- a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/addOption.php +++ b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/addOption.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::add_option + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::add_option * * @group DeferJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/deferInlineJs.php b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/deferInlineJs.php index 41dd738104..2b972b2d96 100644 --- a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/deferInlineJs.php +++ b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/deferInlineJs.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::defer_inline_js + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::defer_inline_js * * @group DeferJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/deferJs.php b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/deferJs.php index 985cf32439..c750e80edc 100644 --- a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/deferJs.php +++ b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/deferJs.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::defer_js + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::defer_js * * @group DeferJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/excludeJqueryCombine.php b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/excludeJqueryCombine.php index c4c09a27ec..4fbe200147 100644 --- a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/excludeJqueryCombine.php +++ b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/excludeJqueryCombine.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::exclude_jquery_combine + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::exclude_jquery_combine * * @group DeferJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/excludeJqueryUpgrade.php b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/excludeJqueryUpgrade.php index fd87596980..874d2144d4 100644 --- a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/excludeJqueryUpgrade.php +++ b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/excludeJqueryUpgrade.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::exclude_jquery_upgrade + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::exclude_jquery_upgrade * * @group DeferJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/getExcluded.php b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/getExcluded.php index f095c3bf2e..18eb5fed68 100644 --- a/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/getExcluded.php +++ b/tests/Unit/inc/Engine/Optimization/DeferJS/DeferJS/getExcluded.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::get_excluded + * Test class covering \WP_Rocket\Engine\Optimization\DeferJS\DeferJS::get_excluded * * @group DeferJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/addOptions.php b/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/addOptions.php index e423504346..2adad8e45e 100644 --- a/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/addOptions.php +++ b/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/addOptions.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Admin\Settings::add_options + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Admin\Settings::add_options * * @group DelayJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/maybeDisableCombineJs.php b/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/maybeDisableCombineJs.php index b0faa6cd6a..f7f3acdb43 100644 --- a/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/maybeDisableCombineJs.php +++ b/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/maybeDisableCombineJs.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Admin\Settings::maybe_disable_combine_js + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Admin\Settings::maybe_disable_combine_js * * @group DelayJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/sanitizeOptions.php b/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/sanitizeOptions.php index 605624efb4..19aaa9e2d1 100644 --- a/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/sanitizeOptions.php +++ b/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/sanitizeOptions.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Admin\Settings::sanitize_options + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Admin\Settings::sanitize_options * * @group DelayJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/setOptionOnUpdate.php b/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/setOptionOnUpdate.php index 6204a8383e..96e6498954 100644 --- a/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/setOptionOnUpdate.php +++ b/tests/Unit/inc/Engine/Optimization/DelayJS/Admin/Settings/setOptionOnUpdate.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\Admin\Settings::set_option_on_update + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\Admin\Settings::set_option_on_update * * @group DelayJS */ diff --git a/tests/Unit/inc/Engine/Optimization/DelayJS/HTML/delayJs.php b/tests/Unit/inc/Engine/Optimization/DelayJS/HTML/delayJs.php index da44c1bb8a..c94000547c 100644 --- a/tests/Unit/inc/Engine/Optimization/DelayJS/HTML/delayJs.php +++ b/tests/Unit/inc/Engine/Optimization/DelayJS/HTML/delayJs.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DelayJS\HTML::delay_js + * Test class covering \WP_Rocket\Engine\Optimization\DelayJS\HTML::delay_js * @group Optimize * @group DelayJS * diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/getLists.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/getLists.php index 60563bf76e..47e0dcad2e 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/getLists.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/getLists.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\DataManager::get_lists + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\DataManager::get_lists * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/getListsHash.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/getListsHash.php index 7f042d5ff0..db338e9eda 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/getListsHash.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/getListsHash.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\DataManager::get_lists_hash + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\DataManager::get_lists_hash * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/saveDynamicLists.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/saveDynamicLists.php index 261dac8a1c..6f77c6770a 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/saveDynamicLists.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DataManager/saveDynamicLists.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\DataManager::save_dynamic_lists + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\DataManager::save_dynamic_lists * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/clearScheduleListsUpdate.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/clearScheduleListsUpdate.php index 801190099a..7340f09dc4 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/clearScheduleListsUpdate.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/clearScheduleListsUpdate.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::clear_schedule_lists_update + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::clear_schedule_lists_update * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getCacheIgnoredParameters.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getCacheIgnoredParameters.php index 89af53859b..d1f26bbbb0 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getCacheIgnoredParameters.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getCacheIgnoredParameters.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::get_cache_ignored_parameters + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::get_cache_ignored_parameters * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getCombineJsExcludedInline.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getCombineJsExcludedInline.php index 09ce00ba6c..2b992cbfe6 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getCombineJsExcludedInline.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getCombineJsExcludedInline.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::get_combine_js_excluded_inline + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::get_combine_js_excluded_inline * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getIncompatiblePlugins.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getIncompatiblePlugins.php index 69ee14014b..e78c2e5f09 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getIncompatiblePlugins.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getIncompatiblePlugins.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::getIncompatiblePlugins + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::getIncompatiblePlugins * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsExcludeFiles.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsExcludeFiles.php index 786fd65096..8275862f4d 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsExcludeFiles.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsExcludeFiles.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::get_js_exclude_files + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::get_js_exclude_files * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsMinifyExcludedExternal.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsMinifyExcludedExternal.php index 2ac3904bae..bcfe7705ad 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsMinifyExcludedExternal.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsMinifyExcludedExternal.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::get_js_minify_excluded_external + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::get_js_minify_excluded_external * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsMoveAfterCombine.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsMoveAfterCombine.php index b337489f74..a2f9144d6a 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsMoveAfterCombine.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getJsMoveAfterCombine.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::get_js_move_after_combine + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::get_js_move_after_combine * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getPreloadExclusions.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getPreloadExclusions.php index 08f6142fe5..237302fb56 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getPreloadExclusions.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getPreloadExclusions.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::get_preload_exclusions + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::get_preload_exclusions * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getStagings.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getStagings.php index 1edf627eac..cfa2cbe973 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getStagings.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/getStagings.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::get_stagings + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::get_stagings * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/registerRestRoute.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/registerRestRoute.php index 4b47b7902f..6b94ef04a4 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/registerRestRoute.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/registerRestRoute.php @@ -12,7 +12,7 @@ use WP_Rocket\Engine\Admin\Beacon\Beacon; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::register_rest_route + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::register_rest_route * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/restUpdateResponse.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/restUpdateResponse.php index 17a42ba3eb..f0228a2456 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/restUpdateResponse.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/restUpdateResponse.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\DynamicLists::rest_update_response + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\DynamicLists::rest_update_response * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/scheduleListsUpdate.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/scheduleListsUpdate.php index 6de600c702..a404b400c6 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/scheduleListsUpdate.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/scheduleListsUpdate.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::schedule_lists_update + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::schedule_lists_update * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/updateListsFromRemote.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/updateListsFromRemote.php index e3f024cf12..54dc098f94 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/updateListsFromRemote.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/DynamicLists/updateListsFromRemote.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists::update_lists_from_remote + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists::update_lists_from_remote * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/IncompatiblePluginsLists/DataManager/getPluginsList.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/IncompatiblePluginsLists/DataManager/getPluginsList.php index b43b9afdbb..f513f3ee72 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/IncompatiblePluginsLists/DataManager/getPluginsList.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/IncompatiblePluginsLists/DataManager/getPluginsList.php @@ -9,7 +9,7 @@ use WP_Rocket\Admin\Options_Data; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\DataManager::get_lists + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\DataManager::get_lists * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/DynamicLists/Subscriber/addDynamicListsScript.php b/tests/Unit/inc/Engine/Optimization/DynamicLists/Subscriber/addDynamicListsScript.php index 5838a03858..01c4e7dda7 100644 --- a/tests/Unit/inc/Engine/Optimization/DynamicLists/Subscriber/addDynamicListsScript.php +++ b/tests/Unit/inc/Engine/Optimization/DynamicLists/Subscriber/addDynamicListsScript.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_dynamic_lists_script + * Test class covering \WP_Rocket\Engine\Optimization\DynamicLists\Subscriber::add_dynamic_lists_script * * @group DynamicLists */ diff --git a/tests/Unit/inc/Engine/Optimization/GoogleFonts/Admin/Settings/displayGoogleFontsEnabler.php b/tests/Unit/inc/Engine/Optimization/GoogleFonts/Admin/Settings/displayGoogleFontsEnabler.php index 6400fb749f..2b62cc3753 100644 --- a/tests/Unit/inc/Engine/Optimization/GoogleFonts/Admin/Settings/displayGoogleFontsEnabler.php +++ b/tests/Unit/inc/Engine/Optimization/GoogleFonts/Admin/Settings/displayGoogleFontsEnabler.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Settings::enable_google_fonts() + * Test class covering \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Settings::enable_google_fonts() * * @group GoogleFontsAdmin */ diff --git a/tests/Unit/inc/Engine/Optimization/GoogleFonts/Admin/Settings/enableGoogleFonts.php b/tests/Unit/inc/Engine/Optimization/GoogleFonts/Admin/Settings/enableGoogleFonts.php index 633de08691..bcd34cd330 100644 --- a/tests/Unit/inc/Engine/Optimization/GoogleFonts/Admin/Settings/enableGoogleFonts.php +++ b/tests/Unit/inc/Engine/Optimization/GoogleFonts/Admin/Settings/enableGoogleFonts.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Settings::enable_google_fonts() + * Test class covering \WP_Rocket\Engine\Optimization\GoogleFonts\Admin\Settings::enable_google_fonts() * * @group GoogleFontsAdmin */ diff --git a/tests/Unit/inc/Engine/Optimization/GoogleFonts/Combine/optimize.php b/tests/Unit/inc/Engine/Optimization/GoogleFonts/Combine/optimize.php index 677e423ee9..b2c8e05ff4 100644 --- a/tests/Unit/inc/Engine/Optimization/GoogleFonts/Combine/optimize.php +++ b/tests/Unit/inc/Engine/Optimization/GoogleFonts/Combine/optimize.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\GoogleFonts\Combine::optimize + * Test class covering \WP_Rocket\Engine\Optimization\GoogleFonts\Combine::optimize * * @uses \WP_Rocket\Logger\Logger::info * @uses \WP_Rocket\Logger\Logger::debug diff --git a/tests/Unit/inc/Engine/Optimization/GoogleFonts/CombineV2/optimize.php b/tests/Unit/inc/Engine/Optimization/GoogleFonts/CombineV2/optimize.php index e34e172163..5fda6ddfc4 100644 --- a/tests/Unit/inc/Engine/Optimization/GoogleFonts/CombineV2/optimize.php +++ b/tests/Unit/inc/Engine/Optimization/GoogleFonts/CombineV2/optimize.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\GoogleFonts\CombineV2::optimize + * Test class covering \WP_Rocket\Engine\Optimization\GoogleFonts\CombineV2::optimize * * @uses \WP_Rocket\Logger\Logger::info * @uses \WP_Rocket\Logger\Logger::debug diff --git a/tests/Unit/inc/Engine/Optimization/GoogleFonts/Subscriber/preconnect.php b/tests/Unit/inc/Engine/Optimization/GoogleFonts/Subscriber/preconnect.php index 5bedd0bbd2..c4ea54015b 100644 --- a/tests/Unit/inc/Engine/Optimization/GoogleFonts/Subscriber/preconnect.php +++ b/tests/Unit/inc/Engine/Optimization/GoogleFonts/Subscriber/preconnect.php @@ -11,7 +11,7 @@ use WP_Rocket\Engine\Optimization\GoogleFonts\Subscriber; /** - * @covers \WP_Rocket\Engine\Optimization\GoogleFonts\Subscriber::preconnect + * Test class covering \WP_Rocket\Engine\Optimization\GoogleFonts\Subscriber::preconnect * @group GoogleFonts */ class Test_Preconnect extends TestCase { diff --git a/tests/Unit/inc/Engine/Optimization/IEConditionalSubscriber/extractIeConditionals.php b/tests/Unit/inc/Engine/Optimization/IEConditionalSubscriber/extractIeConditionals.php index 6c3e43637f..5deb7f0337 100644 --- a/tests/Unit/inc/Engine/Optimization/IEConditionalSubscriber/extractIeConditionals.php +++ b/tests/Unit/inc/Engine/Optimization/IEConditionalSubscriber/extractIeConditionals.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Unit\inc\Engine\Optimization\IEConditionalSubscriber; /** - * @covers \WP_Rocket\Engine\Optimization\IEConditionalSubscriber::extract_ie_conditionals + * Test class covering \WP_Rocket\Engine\Optimization\IEConditionalSubscriber::extract_ie_conditionals * * @group IE * @group Optimization diff --git a/tests/Unit/inc/Engine/Optimization/IEConditionalSubscriber/injectIeConditionals.php b/tests/Unit/inc/Engine/Optimization/IEConditionalSubscriber/injectIeConditionals.php index fb3a76bb62..171cdf1393 100644 --- a/tests/Unit/inc/Engine/Optimization/IEConditionalSubscriber/injectIeConditionals.php +++ b/tests/Unit/inc/Engine/Optimization/IEConditionalSubscriber/injectIeConditionals.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Unit\inc\Engine\Optimization\IEConditionalSubscriber; /** - * @covers \WP_Rocket\Engine\Optimization\IEConditionalSubscriber::inject_ie_conditionals + * Test class covering \WP_Rocket\Engine\Optimization\IEConditionalSubscriber::inject_ie_conditionals * * @group IE * @group Optimization diff --git a/tests/Unit/inc/Engine/Optimization/Minify/AdminSubscriber/cleanMinifyAll.php b/tests/Unit/inc/Engine/Optimization/Minify/AdminSubscriber/cleanMinifyAll.php index 068037d176..d3ef79b8a3 100644 --- a/tests/Unit/inc/Engine/Optimization/Minify/AdminSubscriber/cleanMinifyAll.php +++ b/tests/Unit/inc/Engine/Optimization/Minify/AdminSubscriber/cleanMinifyAll.php @@ -9,7 +9,7 @@ use WP_Rocket\Admin\Options_Data; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\AdminSubscriber::clean_minify_all + * Test class covering \WP_Rocket\Engine\Optimization\Minify\AdminSubscriber::clean_minify_all * @uses ::rocket_clean_minify * @uses ::rocket_direct_filesystem * diff --git a/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php index 1bdb4e7c6f..ec3abb7e65 100644 --- a/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php +++ b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/cleanMinify.php @@ -7,7 +7,7 @@ use WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::clean_minify + * Test class covering \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::clean_minify * @uses ::rocket_clean_minify * @uses ::rocket_direct_filesystem * diff --git a/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/onUpdate.php b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/onUpdate.php index 5b8015fd23..a9cf7679ec 100644 --- a/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/onUpdate.php +++ b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/onUpdate.php @@ -13,7 +13,7 @@ /** - * @covers \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::on_update + * Test class covering \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::on_update */ class Test_onUpdate extends TestCase { diff --git a/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php index 1b82979a8b..e3951dc0c3 100644 --- a/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php +++ b/tests/Unit/inc/Engine/Optimization/Minify/CSS/AdminSubscriber/regenerateMinifyCssKey.php @@ -7,7 +7,7 @@ use WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::regenerate_minify_css_key + * Test class covering \WP_Rocket\Engine\Optimization\Minify\CSS\AdminSubscriber::regenerate_minify_css_key * * @group Optimize * @group Minify diff --git a/tests/Unit/inc/Engine/Optimization/Minify/CSS/Minify/optimize.php b/tests/Unit/inc/Engine/Optimization/Minify/CSS/Minify/optimize.php index f9159549ef..f5baf92726 100644 --- a/tests/Unit/inc/Engine/Optimization/Minify/CSS/Minify/optimize.php +++ b/tests/Unit/inc/Engine/Optimization/Minify/CSS/Minify/optimize.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\Optimization\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\CSS\Minify::optimize + * Test class covering \WP_Rocket\Engine\Optimization\Minify\CSS\Minify::optimize * * @uses \WP_Rocket\Logger\Logger::info() * @uses \WP_Rocket\Logger\Logger::debug() diff --git a/tests/Unit/inc/Engine/Optimization/Minify/JS/Combine/optimize.php b/tests/Unit/inc/Engine/Optimization/Minify/JS/Combine/optimize.php index de9f2b81d5..b9e6c4d65c 100644 --- a/tests/Unit/inc/Engine/Optimization/Minify/JS/Combine/optimize.php +++ b/tests/Unit/inc/Engine/Optimization/Minify/JS/Combine/optimize.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\Optimization\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\JS\Combine::optimize + * Test class covering \WP_Rocket\Engine\Optimization\Minify\JS\Combine::optimize * * @group Optimize * @group CombineJS diff --git a/tests/Unit/inc/Engine/Optimization/Minify/JS/Minify/optimize.php b/tests/Unit/inc/Engine/Optimization/Minify/JS/Minify/optimize.php index 0695770b9e..e66f9e4df1 100644 --- a/tests/Unit/inc/Engine/Optimization/Minify/JS/Minify/optimize.php +++ b/tests/Unit/inc/Engine/Optimization/Minify/JS/Minify/optimize.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\inc\Engine\Optimization\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\Minify\JS\Minify::optimize + * Test class covering \WP_Rocket\Engine\Optimization\Minify\JS\Minify::optimize * * @group Optimize * @group MinifyJS diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php index 1570001f27..aaf3d3794c 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/deleteOldUsedCss.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\Optimization\RUCSS\Database\Tables\UsedCSS; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::delete_old_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::delete_old_used_css * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/dropResourcesTable.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/dropResourcesTable.php index 758cacf5a0..549c3cc052 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/dropResourcesTable.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/dropResourcesTable.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::drop_resources_table + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::drop_resources_table * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/dropRucssDatabaseTables.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/dropRucssDatabaseTables.php index bdc02ee5dd..6d70b8cc0c 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/dropRucssDatabaseTables.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/dropRucssDatabaseTables.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\Optimization\RUCSS\Database\Tables\UsedCSS; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::drop_rucss_database_tables + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::drop_rucss_database_tables * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/truncateUsedCssTable.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/truncateUsedCssTable.php index 8754c8e310..d136bbeb06 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/truncateUsedCssTable.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Database/truncateUsedCssTable.php @@ -8,7 +8,7 @@ use WP_Rocket\Engine\Optimization\RUCSS\Database\Tables\UsedCSS; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::truncate_used_css_table + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Database::truncate_used_css_table * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/addOptions.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/addOptions.php index 5fec1b4b8c..f0bc202ca9 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/addOptions.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/addOptions.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Settings::add_options + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Settings::add_options * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/displayNoTableNotice.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/displayNoTableNotice.php index de5843e07f..6d03a0e4d7 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/displayNoTableNotice.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/displayNoTableNotice.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Settings::display_no_table_notice + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Settings::display_no_table_notice * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/sanitizeOptions.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/sanitizeOptions.php index 5f5753a60b..e37c7289a0 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/sanitizeOptions.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/sanitizeOptions.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Settings::sanitize_options + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Settings::sanitize_options * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/updateSafelistItems.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/updateSafelistItems.php index 2f29d60465..5bb4dc1fb8 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/updateSafelistItems.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Settings/updateSafelistItems.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Settings::update_safelist_items + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Settings::update_safelist_items * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php index bafe333d9e..d02ecb2cc1 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/cleanUsedCssAndCache.php @@ -13,7 +13,7 @@ use WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::clean_used_css_and_cache + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::clean_used_css_and_cache * * @uses ::rocket_clean_domain * diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteTermUsedCss.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteTermUsedCss.php index 5382608380..1623618bdc 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteTermUsedCss.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteTermUsedCss.php @@ -13,7 +13,7 @@ use WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::delete_term_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::delete_term_used_css * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php index 995285b137..35fb9e9727 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/deleteUsedCssOnUpdateOrDelete.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::delete_used_css_on_update_or_delete + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::delete_used_css_on_update_or_delete * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeDeleteTransient.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeDeleteTransient.php index 7ec31577ad..813fd3977c 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeDeleteTransient.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeDeleteTransient.php @@ -14,7 +14,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::maybe_delete_transient + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::maybe_delete_transient */ class Test_maybeDeleteTransient extends TestCase { diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php index 267be24e96..a44bf1760f 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/maybeSetProcessingTransient.php @@ -14,7 +14,7 @@ use WPDieException; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::maybe_set_processing_transient + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::maybe_set_processing_transient * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/spawnCron.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/spawnCron.php index c5ef8bcbb3..3f99c359f9 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/spawnCron.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/spawnCron.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::spawn_cron + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::spawn_cron * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php index 0ade815351..c9868aa2f1 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Admin/Subscriber/truncateUsedCss.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::truncate_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Admin\Subscriber::truncate_used_css * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/deleteAllUsedCss.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/deleteAllUsedCss.php index 28fd6c39fc..421ea4aa4f 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/deleteAllUsedCss.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/deleteAllUsedCss.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Controller\Filesystem::delete_all_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Controller\Filesystem::delete_all_used_css * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/deleteUsedCss.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/deleteUsedCss.php index 5befaf013b..c33ac4e385 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/deleteUsedCss.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/deleteUsedCss.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Controller\Filesystem::delete_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Controller\Filesystem::delete_used_css * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/getUsedCss.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/getUsedCss.php index 6a0fc20d32..3b0c9eb933 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/getUsedCss.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/getUsedCss.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Controller\Filesystem::get_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Controller\Filesystem::get_used_css * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/writeUsedCss.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/writeUsedCss.php index 94924a5420..4da13baf57 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/writeUsedCss.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/Filesystem/writeUsedCss.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Controller\Filesystem::write_used_css + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Controller\Filesystem::write_used_css * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/UsedCSS/treeshake.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/UsedCSS/treeshake.php index 89b7a50024..074d6f600a 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/UsedCSS/treeshake.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Controller/UsedCSS/treeshake.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Fixtures\inc\Engine\Common\JobManager\Manager; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS::treeshake + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Controller\UsedCSS::treeshake * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS/createNewJob.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS/createNewJob.php index 286e0d71d6..18430a5a37 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS/createNewJob.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS/createNewJob.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Database\Queries\UsedCSS::create_new_job + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Database\Queries\UsedCSS::create_new_job */ class Test_createNewJob extends TestCase { diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS/resetJob.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS/resetJob.php index a704f67cd2..166b4b05f7 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS/resetJob.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Database/Queries/UsedCSS/resetJob.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Database\Queries\UsedCSS::reset_job + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Database\Queries\UsedCSS::reset_job */ class Test_resetJob extends TestCase { diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onInstall.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onInstall.php index eeb0929ed2..e052712b31 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onInstall.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onInstall.php @@ -12,7 +12,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::on_install + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::on_install */ class Test_onInstall extends TestCase { diff --git a/tests/Unit/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onUpdate.php b/tests/Unit/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onUpdate.php index fdc917c681..7afa21f8ff 100644 --- a/tests/Unit/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onUpdate.php +++ b/tests/Unit/inc/Engine/Optimization/RUCSS/Frontend/Subscriber/onUpdate.php @@ -12,7 +12,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::on_update + * Test class covering \WP_Rocket\Engine\Optimization\RUCSS\Frontend\Subscriber::on_update */ class Test_onUpdate extends TestCase { diff --git a/tests/Unit/inc/Engine/Plugin/InformationSubscriber/addPluginsToResult.php b/tests/Unit/inc/Engine/Plugin/InformationSubscriber/addPluginsToResult.php index bd1baf27c0..24eb36b5fe 100644 --- a/tests/Unit/inc/Engine/Plugin/InformationSubscriber/addPluginsToResult.php +++ b/tests/Unit/inc/Engine/Plugin/InformationSubscriber/addPluginsToResult.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\Engine\Plugin\InformationSubscriber::add_plugins_to_result + * Test class covering WP_Rocket\Engine\Plugin\InformationSubscriber::add_plugins_to_result * * @group PluginUpdate */ diff --git a/tests/Unit/inc/Engine/Plugin/RenewalNotice/renewalNotice.php b/tests/Unit/inc/Engine/Plugin/RenewalNotice/renewalNotice.php index 59c68bf3ff..723671bd37 100644 --- a/tests/Unit/inc/Engine/Plugin/RenewalNotice/renewalNotice.php +++ b/tests/Unit/inc/Engine/Plugin/RenewalNotice/renewalNotice.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Plugin\RenewalNotice::renewal_notice + * Test class covering \WP_Rocket\Engine\Plugin\RenewalNotice::renewal_notice * * @group Plugin */ diff --git a/tests/Unit/inc/Engine/Preload/Admin/Settings/maybeDisplayPreloadNotice.php b/tests/Unit/inc/Engine/Preload/Admin/Settings/maybeDisplayPreloadNotice.php index ae77321dca..b35a436d34 100644 --- a/tests/Unit/inc/Engine/Preload/Admin/Settings/maybeDisplayPreloadNotice.php +++ b/tests/Unit/inc/Engine/Preload/Admin/Settings/maybeDisplayPreloadNotice.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Admin\Settings::maybe_display_preload_notice + * Test class covering \WP_Rocket\Engine\Preload\Admin\Settings::maybe_display_preload_notice * @group Preload */ class Test_MaybeDisplayPreloadNotice extends TestCase { diff --git a/tests/Unit/inc/Engine/Preload/Controller/CheckFinished/checkFinished.php b/tests/Unit/inc/Engine/Preload/Controller/CheckFinished/checkFinished.php index d0d870c063..922fd2f63b 100644 --- a/tests/Unit/inc/Engine/Preload/Controller/CheckFinished/checkFinished.php +++ b/tests/Unit/inc/Engine/Preload/Controller/CheckFinished/checkFinished.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Preload\Controller\CheckFinished::check_finished + * Test class covering \WP_Rocket\Engine\Preload\Controller\CheckFinished::check_finished * @group Preload */ class Test_CheckFinished extends TestCase diff --git a/tests/Unit/inc/Engine/Preload/Controller/ClearCache/fullClean.php b/tests/Unit/inc/Engine/Preload/Controller/ClearCache/fullClean.php index ddf780e059..d565aa0a42 100644 --- a/tests/Unit/inc/Engine/Preload/Controller/ClearCache/fullClean.php +++ b/tests/Unit/inc/Engine/Preload/Controller/ClearCache/fullClean.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Controller\ClearCache::full_clean + * Test class covering \WP_Rocket\Engine\Preload\Controller\ClearCache::full_clean * @group Preload */ class Test_FullClean extends TestCase diff --git a/tests/Unit/inc/Engine/Preload/Controller/ClearCache/partialClean.php b/tests/Unit/inc/Engine/Preload/Controller/ClearCache/partialClean.php index 839a8ba478..30f5bf6968 100644 --- a/tests/Unit/inc/Engine/Preload/Controller/ClearCache/partialClean.php +++ b/tests/Unit/inc/Engine/Preload/Controller/ClearCache/partialClean.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Controller\ClearCache::partial_clean + * Test class covering \WP_Rocket\Engine\Preload\Controller\ClearCache::partial_clean * @group Preload */ class Test_PartialClean extends TestCase diff --git a/tests/Unit/inc/Engine/Preload/Controller/LoadInitialSitemap/cancelPreload.php b/tests/Unit/inc/Engine/Preload/Controller/LoadInitialSitemap/cancelPreload.php index e350509539..30eba361de 100755 --- a/tests/Unit/inc/Engine/Preload/Controller/LoadInitialSitemap/cancelPreload.php +++ b/tests/Unit/inc/Engine/Preload/Controller/LoadInitialSitemap/cancelPreload.php @@ -11,7 +11,7 @@ use WP_Sitemaps; /** - * @covers \WP_Rocket\Engine\Preload\Controller\LoadInitialSitemap::cancel_preload + * Test class covering \WP_Rocket\Engine\Preload\Controller\LoadInitialSitemap::cancel_preload * @group Preload */ class Test_CancelPreload extends TestCase diff --git a/tests/Unit/inc/Engine/Preload/Controller/LoadInitialSitemap/loadInitialSitemap.php b/tests/Unit/inc/Engine/Preload/Controller/LoadInitialSitemap/loadInitialSitemap.php index 3c86106652..924a54084d 100755 --- a/tests/Unit/inc/Engine/Preload/Controller/LoadInitialSitemap/loadInitialSitemap.php +++ b/tests/Unit/inc/Engine/Preload/Controller/LoadInitialSitemap/loadInitialSitemap.php @@ -14,7 +14,7 @@ use WP_Sitemaps_Index; /** - * @covers \WP_Rocket\Engine\Preload\Controller\LoadInitialSitemap::load_initial_sitemap + * Test class covering \WP_Rocket\Engine\Preload\Controller\LoadInitialSitemap::load_initial_sitemap * @group Preload */ class Test_LoadInitialSitemap extends TestCase { diff --git a/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/getMobileUserAgentPrefix.php b/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/getMobileUserAgentPrefix.php index a4fdc9a393..6e41ade0aa 100644 --- a/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/getMobileUserAgentPrefix.php +++ b/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/getMobileUserAgentPrefix.php @@ -13,7 +13,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\Preload\Controller\PreloadUrl::get_mobile_user_agent_prefix + * Test class covering \WP_Rocket\Engine\Preload\Controller\PreloadUrl::get_mobile_user_agent_prefix * @group Preload */ class Test_getMobileUserAgentPrefix extends TestCase diff --git a/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/isAlreadyCached.php b/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/isAlreadyCached.php index 91f572290e..4f8b5f8a15 100644 --- a/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/isAlreadyCached.php +++ b/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/isAlreadyCached.php @@ -12,7 +12,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Preload\Controller\PreloadUrl::is_already_cached + * Test class covering \WP_Rocket\Engine\Preload\Controller\PreloadUrl::is_already_cached * @group Preload */ class Test_IsAlreadyCached extends TestCase diff --git a/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/preloadUrl.php b/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/preloadUrl.php index ffdef2f31a..abc2eee2bf 100644 --- a/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/preloadUrl.php +++ b/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/preloadUrl.php @@ -14,7 +14,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\Preload\Controller\PreloadUrl::preload_url + * Test class covering \WP_Rocket\Engine\Preload\Controller\PreloadUrl::preload_url * @group Preload */ class Test_PreloadUrl extends TestCase diff --git a/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/processPendingJobs.php b/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/processPendingJobs.php index 68fbf0791e..80601709f8 100644 --- a/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/processPendingJobs.php +++ b/tests/Unit/inc/Engine/Preload/Controller/PreloadUrl/processPendingJobs.php @@ -13,7 +13,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\Preload\Controller\PreloadUrl::process_pending_jobs + * Test class covering \WP_Rocket\Engine\Preload\Controller\PreloadUrl::process_pending_jobs * @group Preload */ class Test_processPendingJobs extends TestCase diff --git a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/addInterval.php b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/addInterval.php index 552199e2c4..f522b207bf 100644 --- a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/addInterval.php +++ b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/addInterval.php @@ -12,7 +12,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\Preload\Cron\Subscriber::add_interval + * Test class covering \WP_Rocket\Engine\Preload\Cron\Subscriber::add_interval * * @group Cron * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/addRevertOldFailedInterval.php b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/addRevertOldFailedInterval.php index 138030463d..336a8a8d73 100644 --- a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/addRevertOldFailedInterval.php +++ b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/addRevertOldFailedInterval.php @@ -11,7 +11,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\Preload\Cron\Subscriber::add_revert_old_failed_interval + * Test class covering \WP_Rocket\Engine\Preload\Cron\Subscriber::add_revert_old_failed_interval * * @group Cron * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php index 74be77551f..571d0af111 100644 --- a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php +++ b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/scheduleCleanNotCommonlyUsedRows.php @@ -12,7 +12,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Cron\Subscriber::schedule_clean_not_commonly_used_rows + * Test class covering \WP_Rocket\Engine\Preload\Cron\Subscriber::schedule_clean_not_commonly_used_rows * * @group Cron * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/schedulePendingJobs.php b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/schedulePendingJobs.php index 78106919d8..cd2ab626f8 100644 --- a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/schedulePendingJobs.php +++ b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/schedulePendingJobs.php @@ -12,7 +12,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Preload\Cron\Subscriber::schedule_pending_jobs + * Test class covering \WP_Rocket\Engine\Preload\Cron\Subscriber::schedule_pending_jobs * * @group Cron * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/scheduleRevertOldFailedRows.php b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/scheduleRevertOldFailedRows.php index 03708d618b..6aa240013c 100644 --- a/tests/Unit/inc/Engine/Preload/Cron/Subscriber/scheduleRevertOldFailedRows.php +++ b/tests/Unit/inc/Engine/Preload/Cron/Subscriber/scheduleRevertOldFailedRows.php @@ -12,7 +12,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Preload\Cron\Subscriber::schedule_revert_old_in_progress_rows + * Test class covering \WP_Rocket\Engine\Preload\Cron\Subscriber::schedule_revert_old_in_progress_rows * * @group Cron * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/createOrNothing.php b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/createOrNothing.php index c818d46299..b04f8aa9de 100644 --- a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/createOrNothing.php +++ b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/createOrNothing.php @@ -10,7 +10,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Preload\Database\Queries\Cache::create_or_nothing + * Test class covering \WP_Rocket\Engine\Preload\Database\Queries\Cache::create_or_nothing * * @group Database * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/createOrUpdate.php b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/createOrUpdate.php index b5ba7e3c38..b90373dfdf 100644 --- a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/createOrUpdate.php +++ b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/createOrUpdate.php @@ -10,7 +10,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Preload\Database\Queries\Cache::create_or_update + * Test class covering \WP_Rocket\Engine\Preload\Database\Queries\Cache::create_or_update * * @group Database * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/deleteByUrl.php b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/deleteByUrl.php index c083ead875..250ca64d82 100644 --- a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/deleteByUrl.php +++ b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/deleteByUrl.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Database\Queries\Cache::delete_by_url + * Test class covering \WP_Rocket\Engine\Preload\Database\Queries\Cache::delete_by_url * * @group Database * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/getPendingJobs.php b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/getPendingJobs.php index 11ccf2c23f..2f8d8ca170 100644 --- a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/getPendingJobs.php +++ b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/getPendingJobs.php @@ -6,7 +6,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\Engine\Preload\Database\Queries\RocketCache::get_pending_jobs + * Test class covering \WP_Rocket\Engine\Preload\Database\Queries\RocketCache::get_pending_jobs * * @group Database * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/getRowsByUrl.php b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/getRowsByUrl.php index 4d86a4bbdc..58d2b42407 100644 --- a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/getRowsByUrl.php +++ b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/getRowsByUrl.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Database\Queries\Cache::get_rows_by_url + * Test class covering \WP_Rocket\Engine\Preload\Database\Queries\Cache::get_rows_by_url * * @group Database * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/isPreloaded.php b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/isPreloaded.php index bdbe4a97a6..c1ca771c4a 100644 --- a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/isPreloaded.php +++ b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/isPreloaded.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Database\Queries\Cache::is_preloaded + * Test class covering \WP_Rocket\Engine\Preload\Database\Queries\Cache::is_preloaded * * @group Database * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/makeStatusComplete.php b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/makeStatusComplete.php index 17b0749d13..ef2142097a 100644 --- a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/makeStatusComplete.php +++ b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/makeStatusComplete.php @@ -7,7 +7,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Preload\Database\Queries\Cache::make_status_complete + * Test class covering \WP_Rocket\Engine\Preload\Database\Queries\Cache::make_status_complete * @uses \WP_Rocket\Engine\Preload\Database\Queries\CacheRow * * @group Database diff --git a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/removeAllNotAccessedRows.php b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/removeAllNotAccessedRows.php index 1a1c5144ff..be6533027e 100644 --- a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/removeAllNotAccessedRows.php +++ b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/removeAllNotAccessedRows.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Database\Queries\Cache::remove_all_not_accessed_rows + * Test class covering \WP_Rocket\Engine\Preload\Database\Queries\Cache::remove_all_not_accessed_rows * * @group Database * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/revertInProgress.php b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/revertInProgress.php index e504fe25fb..bb876b7967 100644 --- a/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/revertInProgress.php +++ b/tests/Unit/inc/Engine/Preload/Database/Queries/Cache/revertInProgress.php @@ -7,7 +7,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Preload\Database\Queries\Cache::revert_in_progress + * Test class covering \WP_Rocket\Engine\Preload\Database\Queries\Cache::revert_in_progress * * @group Database * @group Preload diff --git a/tests/Unit/inc/Engine/Preload/Fonts/preloadFonts.php b/tests/Unit/inc/Engine/Preload/Fonts/preloadFonts.php index 779d0a909b..9da31b847d 100644 --- a/tests/Unit/inc/Engine/Preload/Fonts/preloadFonts.php +++ b/tests/Unit/inc/Engine/Preload/Fonts/preloadFonts.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Fonts::preload_fonts + * Test class covering \WP_Rocket\Engine\Preload\Fonts::preload_fonts * @group Preload * @group PreloadFonts */ diff --git a/tests/Unit/inc/Engine/Preload/Frontend/FetchSitemap/parseSitemap.php b/tests/Unit/inc/Engine/Preload/Frontend/FetchSitemap/parseSitemap.php index e13314061d..93180e387d 100644 --- a/tests/Unit/inc/Engine/Preload/Frontend/FetchSitemap/parseSitemap.php +++ b/tests/Unit/inc/Engine/Preload/Frontend/FetchSitemap/parseSitemap.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Frontend\FetchSitemap::parse_sitemap + * Test class covering \WP_Rocket\Engine\Preload\Frontend\FetchSitemap::parse_sitemap * @group Preload */ class Test_ParseSitemap extends TestCase { diff --git a/tests/Unit/inc/Engine/Preload/Frontend/SitemapParser/getLinks.php b/tests/Unit/inc/Engine/Preload/Frontend/SitemapParser/getLinks.php index 9a3ae8aca2..b260361521 100644 --- a/tests/Unit/inc/Engine/Preload/Frontend/SitemapParser/getLinks.php +++ b/tests/Unit/inc/Engine/Preload/Frontend/SitemapParser/getLinks.php @@ -4,7 +4,7 @@ use WP_Rocket\Engine\Preload\Frontend\SitemapParser; use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Frontend\SitemapParser::parse_sitemap + * Test class covering \WP_Rocket\Engine\Preload\Frontend\SitemapParser::parse_sitemap * @group Preload */ class Test_GetLinks extends TestCase { diff --git a/tests/Unit/inc/Engine/Preload/Links/AdminSubscriber/addIncompatiblePlugins.php b/tests/Unit/inc/Engine/Preload/Links/AdminSubscriber/addIncompatiblePlugins.php index 46966337b2..c75ece8a18 100644 --- a/tests/Unit/inc/Engine/Preload/Links/AdminSubscriber/addIncompatiblePlugins.php +++ b/tests/Unit/inc/Engine/Preload/Links/AdminSubscriber/addIncompatiblePlugins.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Links\AdminSubscriber::add_incompatible_plugins + * Test class covering \WP_Rocket\Engine\Preload\Links\AdminSubscriber::add_incompatible_plugins * * @group PreloadLinks */ diff --git a/tests/Unit/inc/Engine/Preload/Links/AdminSubscriber/addOption.php b/tests/Unit/inc/Engine/Preload/Links/AdminSubscriber/addOption.php index 4b0c087db3..9992df2ff1 100644 --- a/tests/Unit/inc/Engine/Preload/Links/AdminSubscriber/addOption.php +++ b/tests/Unit/inc/Engine/Preload/Links/AdminSubscriber/addOption.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Preload\Links\AdminSubscriber::add_option + * Test class covering \WP_Rocket\Engine\Preload\Links\AdminSubscriber::add_option * * @group PreloadLinks */ diff --git a/tests/Unit/inc/Engine/Preload/Subscriber/excludePrivatePostUri.php b/tests/Unit/inc/Engine/Preload/Subscriber/excludePrivatePostUri.php index 4744024dd9..b1531f9e38 100644 --- a/tests/Unit/inc/Engine/Preload/Subscriber/excludePrivatePostUri.php +++ b/tests/Unit/inc/Engine/Preload/Subscriber/excludePrivatePostUri.php @@ -15,7 +15,7 @@ use WP_Query; /** - * @covers \WP_Rocket\Engine\Preload\Subscriber::exclude_private_post_uri + * Test class covering \WP_Rocket\Engine\Preload\Subscriber::exclude_private_post_uri * * @group Preload */ diff --git a/tests/Unit/inc/Engine/Preload/Subscriber/formatPreloadUrl.php b/tests/Unit/inc/Engine/Preload/Subscriber/formatPreloadUrl.php index 2f54fdeea9..b908afcb1f 100644 --- a/tests/Unit/inc/Engine/Preload/Subscriber/formatPreloadUrl.php +++ b/tests/Unit/inc/Engine/Preload/Subscriber/formatPreloadUrl.php @@ -14,7 +14,7 @@ use WP_Rocket_Mobile_Detect; /** - * @covers \WP_Rocket\Engine\Preload\Subscriber::format_preload_url + * Test class covering \WP_Rocket\Engine\Preload\Subscriber::format_preload_url * * @group Preload */ diff --git a/tests/Unit/inc/Engine/Saas/Admin/Notices/addLocalizeScriptData.php b/tests/Unit/inc/Engine/Saas/Admin/Notices/addLocalizeScriptData.php index 3d1fd985b0..a4fb8d4b8b 100644 --- a/tests/Unit/inc/Engine/Saas/Admin/Notices/addLocalizeScriptData.php +++ b/tests/Unit/inc/Engine/Saas/Admin/Notices/addLocalizeScriptData.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Saas\Admin\Notices::add_localize_script_data + * Test class covering \WP_Rocket\Engine\Saas\Admin\Notices::add_localize_script_data * * @group Saas */ diff --git a/tests/Unit/inc/Engine/Saas/Admin/Notices/displayProcessingNotice.php b/tests/Unit/inc/Engine/Saas/Admin/Notices/displayProcessingNotice.php index 2adac39530..8fae182cbd 100644 --- a/tests/Unit/inc/Engine/Saas/Admin/Notices/displayProcessingNotice.php +++ b/tests/Unit/inc/Engine/Saas/Admin/Notices/displayProcessingNotice.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Saas\Admin\Notices::display_processing_notice + * Test class covering \WP_Rocket\Engine\Saas\Admin\Notices::display_processing_notice * * @group SaaS */ diff --git a/tests/Unit/inc/Engine/Saas/Admin/Notices/displaySaasErrorNotice.php b/tests/Unit/inc/Engine/Saas/Admin/Notices/displaySaasErrorNotice.php index e636441740..8f6919f775 100644 --- a/tests/Unit/inc/Engine/Saas/Admin/Notices/displaySaasErrorNotice.php +++ b/tests/Unit/inc/Engine/Saas/Admin/Notices/displaySaasErrorNotice.php @@ -12,7 +12,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\Engine\Saas\Admin\Notices::display_saas_error_notice + * Test class covering \WP_Rocket\Engine\Saas\Admin\Notices::display_saas_error_notice * * @group Saas */ diff --git a/tests/Unit/inc/Engine/Saas/Admin/Notices/displaySuccessNotice.php b/tests/Unit/inc/Engine/Saas/Admin/Notices/displaySuccessNotice.php index 6a740313fa..07c5820f97 100644 --- a/tests/Unit/inc/Engine/Saas/Admin/Notices/displaySuccessNotice.php +++ b/tests/Unit/inc/Engine/Saas/Admin/Notices/displaySuccessNotice.php @@ -11,7 +11,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\Engine\Saas\Admin\Notices::display_success_notice + * Test class covering \WP_Rocket\Engine\Saas\Admin\Notices::display_success_notice * * @group RUCSS */ diff --git a/tests/Unit/inc/Engine/Support/Data/getSupportData.php b/tests/Unit/inc/Engine/Support/Data/getSupportData.php index 95a5a58971..6e74398a25 100644 --- a/tests/Unit/inc/Engine/Support/Data/getSupportData.php +++ b/tests/Unit/inc/Engine/Support/Data/getSupportData.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Support\Data::get_support_data + * Test class covering \WP_Rocket\Engine\Support\Data::get_support_data * * @group Support */ diff --git a/tests/Unit/inc/Engine/Support/Rest/getSupportData.php b/tests/Unit/inc/Engine/Support/Rest/getSupportData.php index 536db1dd4e..bb1db7c797 100644 --- a/tests/Unit/inc/Engine/Support/Rest/getSupportData.php +++ b/tests/Unit/inc/Engine/Support/Rest/getSupportData.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Engine\Support\Rest::get_support_data + * Test class covering \WP_Rocket\Engine\Support\Rest::get_support_data * * @group Support */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php b/tests/Unit/inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php index 9ab0b08f7b..6437e16b5c 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Cloudways/varnishAddonTitle.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Cloudways::varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\Cloudways::varnish_addon_title * @group Cloudways * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/Cloudways/varnishIP.php b/tests/Unit/inc/ThirdParty/Hostings/Cloudways/varnishIP.php index 2d6431160e..783a61c341 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Cloudways/varnishIP.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Cloudways/varnishIP.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Cloudways::varnish_ip + * Test class covering \WP_Rocket\ThirdParty\Hostings\Cloudways::varnish_ip * @group Cloudways * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/Dreampress/removeHtaccessHtmlExpire.php b/tests/Unit/inc/ThirdParty/Hostings/Dreampress/removeHtaccessHtmlExpire.php index 0e1a8c9738..baca624242 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Dreampress/removeHtaccessHtmlExpire.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Dreampress/removeHtaccessHtmlExpire.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Hostings\Dreampress; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Dreampress::remove_htaccess_html_expire + * Test class covering \WP_Rocket\ThirdParty\Hostings\Dreampress::remove_htaccess_html_expire * * @group Dreampress * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php b/tests/Unit/inc/ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php index c35c5e20c4..39f4399e52 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Dreampress/setVarnishAddonTitle.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Hostings\Dreampress; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Dreampress::set_varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\Dreampress::set_varnish_addon_title * * @group Dreampress * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php b/tests/Unit/inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php index 2287975508..ef3699d938 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Dreampress/setVarnishHost.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\Dreampress; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Dreampress::set_varnish_host + * Test class covering \WP_Rocket\ThirdParty\Hostings\Dreampress::set_varnish_host * * @group Dreampress * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanDomain.php b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanDomain.php index 50f7f65671..899163bdaf 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanDomain.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanDomain.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\Godaddy; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_domain + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_domain * * @group Godaddy * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanFile.php b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanFile.php index b41c465ab3..5eed3525b7 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanFile.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanFile.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\Godaddy; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_file + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_file * * @group Godaddy * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanHome.php b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanHome.php index 9836a85519..10f3b18c77 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanHome.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/cleanHome.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\Godaddy; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_home + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::clean_home * * @group Godaddy * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php index fa2feffefc..39931ed96f 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/removeHtmlExpire.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\Godaddy; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::remove_html_expire + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::remove_html_expire * * @group Godaddy * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/varnishField.php b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/varnishField.php index 251cc10573..5c4e7027ca 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Godaddy/varnishField.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Godaddy/varnishField.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\Godaddy; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Godaddy::varnish_field + * Test class covering \WP_Rocket\ThirdParty\Hostings\Godaddy::varnish_field * * @group Godaddy * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/HostResolver/getHostService.php b/tests/Unit/inc/ThirdParty/Hostings/HostResolver/getHostService.php index 16c3b35783..b02157198d 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/HostResolver/getHostService.php +++ b/tests/Unit/inc/ThirdParty/Hostings/HostResolver/getHostService.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\HostResolver::get_host_service + * Test class covering \WP_Rocket\ThirdParty\Hostings\HostResolver::get_host_service * @uses ::rocket_get_constant * * @group Hostings diff --git a/tests/Unit/inc/ThirdParty/Hostings/HostSubscriberFactory/getSubscriber.php b/tests/Unit/inc/ThirdParty/Hostings/HostSubscriberFactory/getSubscriber.php index b0bcebe28b..06b9b82df1 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/HostSubscriberFactory/getSubscriber.php +++ b/tests/Unit/inc/ThirdParty/Hostings/HostSubscriberFactory/getSubscriber.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\HostSubscriberFactory::get_subscriber + * Test class covering \WP_Rocket\ThirdParty\Hostings\HostSubscriberFactory::get_subscriber * * @group Hostings * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php index 0d9b610ec7..7241d02fed 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCache.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Hostings\Kinsta; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache * * @group Kinsta * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php index b771481d43..a47e5f6934 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheHome.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Hostings\Kinsta; use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache_home + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache_home * * @group Kinsta * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php index 3ad897ee03..afd655c4bb 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaCacheUrl.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Hostings\Kinsta; use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache_url + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_cache_url * * @group Kinsta * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php index 5bd5e3187b..041c2ac4b4 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/cleanKinstaPostCache.php @@ -8,7 +8,7 @@ use WP_Rocket\ThirdParty\Hostings\Kinsta; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_post_cache + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::clean_kinsta_post_cache * * @group Kinsta * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/displayErrorNotice.php b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/displayErrorNotice.php index 963e0fa9e8..2a0a9ba95f 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/displayErrorNotice.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/displayErrorNotice.php @@ -10,7 +10,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::display_error_notice + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::display_error_notice * * @group Kinsta * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php index 8d3588f883..6768acc70f 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Kinsta/removePartialPurgeHooks.php @@ -11,7 +11,7 @@ use Brain\Monkey\Actions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Kinsta::remove_partial_purge_hooks + * Test class covering \WP_Rocket\ThirdParty\Hostings\Kinsta::remove_partial_purge_hooks * * @group Kinsta * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php b/tests/Unit/inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php index 5eb8eb7a0c..3098fe1dae 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php +++ b/tests/Unit/inc/ThirdParty/Hostings/O2Switch/addPurgeHeaders.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Hostings\O2Switch; /** - * @covers \WP_Rocket\ThirdParty\Hostings\O2Switch::add_purge_headers + * Test class covering \WP_Rocket\ThirdParty\Hostings\O2Switch::add_purge_headers * * @group O2Switch * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/O2Switch/removeHtaccessHtmlExpire.php b/tests/Unit/inc/ThirdParty/Hostings/O2Switch/removeHtaccessHtmlExpire.php index 13cae4e2b7..df0dbb8793 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/O2Switch/removeHtaccessHtmlExpire.php +++ b/tests/Unit/inc/ThirdParty/Hostings/O2Switch/removeHtaccessHtmlExpire.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Hostings\O2Switch; /** - * @covers \WP_Rocket\ThirdParty\Hostings\O2Switch::remove_htaccess_html_expire + * Test class covering \WP_Rocket\ThirdParty\Hostings\O2Switch::remove_htaccess_html_expire * * @group O2Switch * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/O2Switch/removeRegexFromPurgeUrl.php b/tests/Unit/inc/ThirdParty/Hostings/O2Switch/removeRegexFromPurgeUrl.php index 8899ed3bbe..c8e0256234 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/O2Switch/removeRegexFromPurgeUrl.php +++ b/tests/Unit/inc/ThirdParty/Hostings/O2Switch/removeRegexFromPurgeUrl.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Hostings\O2Switch; /** - * @covers \WP_Rocket\ThirdParty\Hostings\O2Switch::remove_regex_from_purge_url + * Test class covering \WP_Rocket\ThirdParty\Hostings\O2Switch::remove_regex_from_purge_url * * @group O2Switch * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php b/tests/Unit/inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php index e1afb52d6f..a4271caff1 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php +++ b/tests/Unit/inc/ThirdParty/Hostings/O2Switch/varnishAddonTitle.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Hostings\O2Switch; /** - * @covers \WP_Rocket\ThirdParty\Hostings\O2Switch::varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\O2Switch::varnish_addon_title * * @group O2Switch * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/OneCom/disableCDNChange.php b/tests/Unit/inc/ThirdParty/Hostings/OneCom/disableCDNChange.php index 8a54c1e551..ee9972e632 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/OneCom/disableCDNChange.php +++ b/tests/Unit/inc/ThirdParty/Hostings/OneCom/disableCDNChange.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::disable_cdn_change + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::disable_cdn_change * @group OneCom * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php b/tests/Unit/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php index c56c34f4a9..4c8b5494aa 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php +++ b/tests/Unit/inc/ThirdParty/Hostings/OneCom/excludeFromCDN.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::exclude_from_cdn + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::exclude_from_cdn * @group OneCom * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeEnableCDNOption.php b/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeEnableCDNOption.php index b0e3a9e60d..d86a674fc3 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeEnableCDNOption.php +++ b/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeEnableCDNOption.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option * @group OneCom * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeSetVarnishAddonTitle.php b/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeSetVarnishAddonTitle.php index 0fb9b554c7..ace11760a3 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeSetVarnishAddonTitle.php +++ b/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeSetVarnishAddonTitle.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_set_varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_set_varnish_addon_title * @group OneCom * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php b/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php index b680fe4131..d40210a70e 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php +++ b/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNCname.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option * @group OneCom * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php b/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php index ad6f01899a..fc54c0f804 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php +++ b/tests/Unit/inc/ThirdParty/Hostings/OneCom/maybeUpdateCDNZone.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option + * Test class covering \WP_Rocket\ThirdParty\Hostings\OneCom::maybe_enable_cdn_option * @group OneCom * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/cleanPost.php b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/cleanPost.php index 95627ef145..00467f3168 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/cleanPost.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/cleanPost.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Pressidium::clean_post + * Test class covering \WP_Rocket\ThirdParty\Hostings\Pressidium::clean_post * */ class Test_cleanPost extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/cleanPressidium.php b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/cleanPressidium.php index 22d8bbc845..79be852227 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/cleanPressidium.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/cleanPressidium.php @@ -8,7 +8,7 @@ use WP_Rocket\ThirdParty\Hostings\Pressidium; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Pressidium::clean_pressidium + * Test class covering \WP_Rocket\ThirdParty\Hostings\Pressidium::clean_pressidium * */ class Test_cleanPressidium extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/clearCacheAfterPressidium.php b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/clearCacheAfterPressidium.php index fb4c84ebf1..ad9166cf4d 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/clearCacheAfterPressidium.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/clearCacheAfterPressidium.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\Pressidium; use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Pressidium::clear_cache_after_pressidium + * Test class covering \WP_Rocket\ThirdParty\Hostings\Pressidium::clear_cache_after_pressidium * */ class Test_clearCacheAfterPressidium extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/pressidiumVarnishField.php b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/pressidiumVarnishField.php index 0c5ec64f68..03d9a69bb8 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/pressidiumVarnishField.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/pressidiumVarnishField.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\Pressidium; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Pressidium::pressidium_varnish_field + * Test class covering \WP_Rocket\ThirdParty\Hostings\Pressidium::pressidium_varnish_field * */ class Test_pressidiumVarnishField extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/purgeUrl.php b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/purgeUrl.php index c946f46ca0..5674f4ae2c 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Pressidium/purgeUrl.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Pressidium/purgeUrl.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Pressidium::purge_url + * Test class covering \WP_Rocket\ThirdParty\Hostings\Pressidium::purge_url * */ class Test_purgeUrl extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Hostings/ProIsp/maybeSetVarnishAddonTitle.php b/tests/Unit/inc/ThirdParty/Hostings/ProIsp/maybeSetVarnishAddonTitle.php index 262a65ebce..caaed46c7b 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/ProIsp/maybeSetVarnishAddonTitle.php +++ b/tests/Unit/inc/ThirdParty/Hostings/ProIsp/maybeSetVarnishAddonTitle.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\ProIsp::maybe_set_varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\ProIsp::maybe_set_varnish_addon_title * @group ProIsp * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/Savvii/clearCacheAfterSavvii.php b/tests/Unit/inc/ThirdParty/Hostings/Savvii/clearCacheAfterSavvii.php index 1e72fd4782..5c1f43ace6 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Savvii/clearCacheAfterSavvii.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Savvii/clearCacheAfterSavvii.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Savvii::clear_cache_after_savvii + * Test class covering \WP_Rocket\ThirdParty\Hostings\Savvii::clear_cache_after_savvii * @group Savvii * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/Savvii/varnishAddonTitle.php b/tests/Unit/inc/ThirdParty/Hostings/Savvii/varnishAddonTitle.php index d21851809d..147a640edf 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/Savvii/varnishAddonTitle.php +++ b/tests/Unit/inc/ThirdParty/Hostings/Savvii/varnishAddonTitle.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\Savvii::varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\Savvii::varnish_addon_title * @group Savvii * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php b/tests/Unit/inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php index c038ebb8c6..465f3f6338 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php +++ b/tests/Unit/inc/ThirdParty/Hostings/SpinUpWP/purgeSite.php @@ -6,7 +6,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\SpinUpWP::purge_site + * Test class covering \WP_Rocket\ThirdParty\Hostings\SpinUpWP::purge_site * * @group SpinUpWP * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/SpinUpWP/removeActions.php b/tests/Unit/inc/ThirdParty/Hostings/SpinUpWP/removeActions.php index 27396533be..3150386c90 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/SpinUpWP/removeActions.php +++ b/tests/Unit/inc/ThirdParty/Hostings/SpinUpWP/removeActions.php @@ -6,7 +6,7 @@ use Brain\Monkey\Actions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\SpinUpWP::remove_actions + * Test class covering \WP_Rocket\ThirdParty\Hostings\SpinUpWP::remove_actions * * @group SpinUpWP * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/WPEngine/addFootprint.php b/tests/Unit/inc/ThirdParty/Hostings/WPEngine/addFootprint.php index e9d076f650..5b60663109 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/WPEngine/addFootprint.php +++ b/tests/Unit/inc/ThirdParty/Hostings/WPEngine/addFootprint.php @@ -3,7 +3,7 @@ namespace WP_Rocket\Tests\Unit\inc\ThirdParty\Hostings\WPEngine; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPEngine::add_footprint + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPEngine::add_footprint * @uses ::rocket_get_constant * * @group WPEngine diff --git a/tests/Unit/inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php b/tests/Unit/inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php index de622c9970..106ebacf1e 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php +++ b/tests/Unit/inc/ThirdParty/Hostings/WPEngine/cleanWPEngine.php @@ -5,7 +5,7 @@ use WpeCommon; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPEngine::clean_wpengine + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPEngine::clean_wpengine * * @group WPEngine * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/WPEngine/runRocketBotAfterWPEngine.php b/tests/Unit/inc/ThirdParty/Hostings/WPEngine/runRocketBotAfterWPEngine.php index cc0b637d41..ce710bfb77 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/WPEngine/runRocketBotAfterWPEngine.php +++ b/tests/Unit/inc/ThirdParty/Hostings/WPEngine/runRocketBotAfterWPEngine.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Hostings\WPEngine; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPEngine::run_rocket_bot_after_wpengine + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPEngine::run_rocket_bot_after_wpengine * @uses ::rocket_has_constant * @uses ::rocket_get_constant * @uses ::run_rocket_bot diff --git a/tests/Unit/inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php b/tests/Unit/inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php index 7397ba370c..6ce49bcc57 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php +++ b/tests/Unit/inc/ThirdParty/Hostings/WPEngine/varnishAddonTitle.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPEngine::varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPEngine::varnish_addon_title * * @group WPEngine * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/appendCacheControlHeader.php b/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/appendCacheControlHeader.php index 1957dc960a..dd7ecb1e91 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/appendCacheControlHeader.php +++ b/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/appendCacheControlHeader.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Hostings\WPXCloud; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPXCloud::append_cache_control_header + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPXCloud::append_cache_control_header * * @group WPXCloud */ diff --git a/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php b/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php index 55804bcd99..c82c2157b7 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php +++ b/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/varnishAddonTitle.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPXCloud::varnish_addon_title + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPXCloud::varnish_addon_title * @group WPXCloud */ class Test_VarnishAddonTitle extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php b/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php index 4a90239f98..a0d4c83077 100644 --- a/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php +++ b/tests/Unit/inc/ThirdParty/Hostings/WPXCloud/varnishIP.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Hostings\WPXCloud::varnish_ip + * Test class covering \WP_Rocket\ThirdParty\Hostings\WPXCloud::varnish_ip * @group WPXCloud */ class Test_VarnishIP extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php b/tests/Unit/inc/ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php index 7b068b3a2d..d3f1185349 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Ads/Adthrive/addDelayJsExclusion.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ads\Adthrive::add_delay_js_exclusion + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ads\Adthrive::add_delay_js_exclusion * * @group Adthrive * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php b/tests/Unit/inc/ThirdParty/Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php index ae369b7d75..4be62007d6 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Ads/Adthrive/maybeAddDelayJsExclusion.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ads\Adthrive::maybe_add_delay_js_exclusion + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ads\Adthrive::maybe_add_delay_js_exclusion * * @group Adthrive * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/addCdnHelperMessage.php b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/addCdnHelperMessage.php index 031f05583a..3c71e6d6a3 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/addCdnHelperMessage.php +++ b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/addCdnHelperMessage.php @@ -13,7 +13,7 @@ use WP_Rocket\ThirdParty\Plugins\CDN\CloudflareFacade; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::add_cdn_helper_message + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::add_cdn_helper_message */ class Test_addCdnHelperMessage extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/disableCloudflareOption.php b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/disableCloudflareOption.php index 7d7b8a861a..552ddf3acb 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/disableCloudflareOption.php +++ b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/disableCloudflareOption.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::disable_cloudflare_option + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::disable_cloudflare_option * * @group ThirdParty * @group CloudflarePlugin diff --git a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCacheNotice.php b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCacheNotice.php index 4fc980c13b..da9e3b0738 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCacheNotice.php +++ b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCacheNotice.php @@ -11,7 +11,7 @@ use WP_Rocket\ThirdParty\Plugins\CDN\{Cloudflare,CloudflareFacade}; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_apo_cache_notice + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_apo_cache_notice * * @group ThirdParty * @group CloudflarePlugin diff --git a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCookiesNotice.php b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCookiesNotice.php index b305568441..39dcf20c42 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCookiesNotice.php +++ b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayApoCookiesNotice.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_apo_cookies_notice + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_apo_cookies_notice * * @group ThirdParty * @group CloudflarePlugin diff --git a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayServerPushingModeNotice.php b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayServerPushingModeNotice.php index d51cacc129..9c31759b02 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayServerPushingModeNotice.php +++ b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/displayServerPushingModeNotice.php @@ -11,7 +11,7 @@ use WP_Rocket\ThirdParty\Plugins\CDN\{Cloudflare,CloudflareFacade}; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_server_pushing_mode_notice + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::display_server_pushing_mode_notice * * @group ThirdParty * @group CloudflarePlugin diff --git a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php index c84247fac1..e29cd8e2b5 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php +++ b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/hideAddonRadio.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::hide_addon_radio + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::hide_addon_radio * * @group ThirdParty * @group CloudflarePlugin diff --git a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php index bc7f2062b2..aff7a0e44e 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php +++ b/tests/Unit/inc/ThirdParty/Plugins/CDN/Cloudflare/updateAddonField.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::update_addon_field + * Test class covering \WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::update_addon_field * * @group ThirdParty * @group CloudflarePlugin diff --git a/tests/Unit/inc/ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php b/tests/Unit/inc/ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php index 1c3a0c8bcf..097f522f74 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php +++ b/tests/Unit/inc/ThirdParty/Plugins/ConvertPlug/excludedFromRucss.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Plugins\ConvertPlug; /** - * @covers \WP_Rocket\ThirdParty\Plugins\ConvertPlug::excluded_from_rucss + * Test class covering \WP_Rocket\ThirdParty\Plugins\ConvertPlug::excluded_from_rucss * @group ConvertPlug * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/cacheEmptyCart.php b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/cacheEmptyCart.php index 9568328a2a..c6118165a6 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/cacheEmptyCart.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/cacheEmptyCart.php @@ -8,7 +8,7 @@ use Mockery; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::cache_empty_cart + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::cache_empty_cart * @group WooCommerce * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/excludePages.php b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/excludePages.php index 04c7bf449f..8f2d353e4e 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/excludePages.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/excludePages.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::exclude_pages + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::exclude_pages */ class Test_excludePages extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/reformatShopUrlForPreload.php b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/reformatShopUrlForPreload.php index dd38841e8d..97c71643ce 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/reformatShopUrlForPreload.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/reformatShopUrlForPreload.php @@ -8,7 +8,7 @@ use WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber; use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::reformat_shop_url_for_preload + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::reformat_shop_url_for_preload * @group WooCommerce * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/serveCacheEmptyCart.php b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/serveCacheEmptyCart.php index 406c7b4a0a..525e1dda52 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/serveCacheEmptyCart.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/serveCacheEmptyCart.php @@ -8,7 +8,7 @@ use Mockery; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::serve_cache_empty_cart + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::serve_cache_empty_cart * @group WooCommerce * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showEmptyProductGalleryWithDelayJS.php b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showEmptyProductGalleryWithDelayJS.php index 1415cb5016..9a20db647f 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showEmptyProductGalleryWithDelayJS.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showEmptyProductGalleryWithDelayJS.php @@ -8,7 +8,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::show_empty_product_gallery_with_delayJS + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::show_empty_product_gallery_with_delayJS * @group WooCommerce * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showNotemptyProductGalleryWithDelayJS.php b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showNotemptyProductGalleryWithDelayJS.php index 6a070e1dac..73c934fd57 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showNotemptyProductGalleryWithDelayJS.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Ecommerce/WooCommerceSubscriber/showNotemptyProductGalleryWithDelayJS.php @@ -8,7 +8,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::show_notempty_product_gallery_with_delayJS + * Test class covering \WP_Rocket\ThirdParty\Plugins\Ecommerce\WooCommerceSubscriber::show_notempty_product_gallery_with_delayJS * @group WooCommerce * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/addLangsToAdminBar.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/addLangsToAdminBar.php index 5340627caf..c550a3b4ec 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/addLangsToAdminBar.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/addLangsToAdminBar.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::add_langs_to_admin_bar + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::add_langs_to_admin_bar * @group TranslatePress */ class Test_AddLangsToAdminBar extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/detectHomepage.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/detectHomepage.php index f28d7b1d05..663517eda0 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/detectHomepage.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/detectHomepage.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::detect_homepage + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::detect_homepage * @group TranslatePress */ class Test_detectHomepage extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getActiveLanguagesCodes.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getActiveLanguagesCodes.php index 032279187f..c594666b70 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getActiveLanguagesCodes.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getActiveLanguagesCodes.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::get_active_languages_codes + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::get_active_languages_codes * @group TranslatePress */ class Test_GetActiveLanguagesCodes extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getActiveLanguagesUri.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getActiveLanguagesUri.php index 45b621dc06..824df38907 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getActiveLanguagesUri.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getActiveLanguagesUri.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::get_active_languages_uri + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::get_active_languages_uri * @group TranslatePress */ class Test_GetActiveLanguagesUri extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getHomeUrlForLang.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getHomeUrlForLang.php index 059c712da2..6f5f154d40 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getHomeUrlForLang.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getHomeUrlForLang.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::get_home_url_for_lang + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::get_home_url_for_lang * @group TranslatePress */ class Test_GetHomeUrlForLang extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getTranslatedPostUrls.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getTranslatedPostUrls.php index 40b3184928..1145f59618 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getTranslatedPostUrls.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/getTranslatedPostUrls.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::get_translated_post_urls + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::get_translated_post_urls * @group TranslatePress */ class Test_GetTranslatedPostUrls extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/isTranslatepress.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/isTranslatepress.php index 22ed3cf38b..ec42c2c94d 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/isTranslatepress.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/isTranslatepress.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::is_translatepress + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::is_translatepress * @group TranslatePress */ class Test_IsTranslatepress extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/setCurrentLanguage.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/setCurrentLanguage.php index 6bd1ac4cfb..4a08641eb2 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/setCurrentLanguage.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/TranslatePress/setCurrentLanguage.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::set_current_language + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\TranslatePress::set_current_language * @group TranslatePress */ class Test_SetCurrentLanguage extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/WPML/onChangeDirectoryForDefaultLanguageCleanCache.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/WPML/onChangeDirectoryForDefaultLanguageCleanCache.php index 4173b7dd5e..2cb7381b38 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/WPML/onChangeDirectoryForDefaultLanguageCleanCache.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/WPML/onChangeDirectoryForDefaultLanguageCleanCache.php @@ -11,7 +11,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\WPML::on_change_directory_for_default_language_clean_cache + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\WPML::on_change_directory_for_default_language_clean_cache */ class Test_onChangeDirectoryForDefaultLanguageCleanCache extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php b/tests/Unit/inc/ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php index 16c0c69a50..2a3d80c2ac 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php +++ b/tests/Unit/inc/ThirdParty/Plugins/I18n/Weglot/addLangsToReferer.php @@ -7,7 +7,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\I18n\Weglot::add_langs_to_referer + * Test class covering \WP_Rocket\ThirdParty\Plugins\I18n\Weglot::add_langs_to_referer */ class Test_AddLangsToReferer extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/InlineRelatedPosts/excludeInlineFromRucss.php b/tests/Unit/inc/ThirdParty/Plugins/InlineRelatedPosts/excludeInlineFromRucss.php index a47149ad8a..906860acb7 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/InlineRelatedPosts/excludeInlineFromRucss.php +++ b/tests/Unit/inc/ThirdParty/Plugins/InlineRelatedPosts/excludeInlineFromRucss.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Plugins\InlineRelatedPosts; /** - * @covers \WP_Rocket\ThirdParty\Plugins\InlineRelatedPosts::exclude_inline_from_rucss + * Test class covering \WP_Rocket\ThirdParty\Plugins\InlineRelatedPosts::exclude_inline_from_rucss * @group InlineRelatedPosts * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php b/tests/Unit/inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php index 3ce56a06f7..b983bb1b71 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Jetpack/addJetpackSitemap.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Jetpack::add_jetpack_sitemap + * Test class covering \WP_Rocket\ThirdParty\Plugins\Jetpack::add_jetpack_sitemap * @group Jetpack * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php b/tests/Unit/inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php index 93e189371f..e256b0e94c 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php +++ b/tests/Unit/inc/ThirdParty/Plugins/ModPagespeed/showAdminNotice.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Plugins\ModPagespeed; /** - * @covers \WP_Rocket\ThirdParty\Plugins\ModPagespeed::show_admin_notice + * Test class covering \WP_Rocket\ThirdParty\Plugins\ModPagespeed::show_admin_notice * @group mod_pagespeed * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmp.php b/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmp.php index a668a25ea9..c822fa3071 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmp.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/disableOptionsOnAmp.php @@ -11,7 +11,7 @@ use WP_Rocket\ThirdParty\Plugins\Optimization\AMP; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::disable_options_on_amp + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::disable_options_on_amp * @group ThirdParty * @group WithAmp */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php b/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php index a1a641f15b..cf4be63745 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/excludeScriptFromDelayJs.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::exclude_script_from_delay_js + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::exclude_script_from_delay_js * @group ThirdParty * @group WithAmp */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/isAmpCompatibleCallback.php b/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/isAmpCompatibleCallback.php index 746fe3a03a..3a81bc1bcb 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/isAmpCompatibleCallback.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Optimization/AMP/isAmpCompatibleCallback.php @@ -10,7 +10,7 @@ use WP_Rocket\ThirdParty\Plugins\Optimization\AMP; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::is_amp_compatible_callback + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\AMP::is_amp_compatible_callback * @group ThirdParty * @group WithAmp */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Optimization/Perfmatters/disableRucssSetting.php b/tests/Unit/inc/ThirdParty/Plugins/Optimization/Perfmatters/disableRucssSetting.php index b25eaa5ff9..c32a852bc7 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Optimization/Perfmatters/disableRucssSetting.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Optimization/Perfmatters/disableRucssSetting.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Plugins\Optimization\Perfmatters; /** - * @covers WP_Rocket\ThirdParty\Plugins\Optimization\Perfmatters::disable_rucss_setting + * Test class covering WP_Rocket\ThirdParty\Plugins\Optimization\Perfmatters::disable_rucss_setting */ class Test_DisableRucssOptionPerfmatters extends TestCase { protected $subscriber; diff --git a/tests/Unit/inc/ThirdParty/Plugins/Optimization/RapidLoad/disableRucssSetting.php b/tests/Unit/inc/ThirdParty/Plugins/Optimization/RapidLoad/disableRucssSetting.php index 361477ab37..6ac0212816 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Optimization/RapidLoad/disableRucssSetting.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Optimization/RapidLoad/disableRucssSetting.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Plugins\Optimization\RapidLoad; /** - * @covers WP_Rocket\ThirdParty\Plugins\Optimization\RapidLoad::disable_rucss_setting + * Test class covering WP_Rocket\ThirdParty\Plugins\Optimization\RapidLoad::disable_rucss_setting */ class Test_DisableRucssOptionRapidLoad extends TestCase { protected $subscriber; diff --git a/tests/Unit/inc/ThirdParty/Plugins/Optimization/RapidLoad/rocketCleanCacheOnDeactivation.php b/tests/Unit/inc/ThirdParty/Plugins/Optimization/RapidLoad/rocketCleanCacheOnDeactivation.php index 87e1a92321..d6fb83d961 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Optimization/RapidLoad/rocketCleanCacheOnDeactivation.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Optimization/RapidLoad/rocketCleanCacheOnDeactivation.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Plugins\Optimization\RapidLoad; /** - * @covers WP_Rocket\ThirdParty\Plugins\Optimization\RapidLoad::rocket_clean_cache_on_deactivation + * Test class covering WP_Rocket\ThirdParty\Plugins\Optimization\RapidLoad::rocket_clean_cache_on_deactivation */ class Test_RocketCleanCacheOnDeactivation extends TestCase { protected $subscriber; diff --git a/tests/Unit/inc/ThirdParty/Plugins/Optimization/RocketLazyLoad/excludeRocketLazyLoadScript.php b/tests/Unit/inc/ThirdParty/Plugins/Optimization/RocketLazyLoad/excludeRocketLazyLoadScript.php index 7ad0d25930..d3a9d0a674 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Optimization/RocketLazyLoad/excludeRocketLazyLoadScript.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Optimization/RocketLazyLoad/excludeRocketLazyLoadScript.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Plugins\Optimization\RocketLazyLoad; /** - * @covers WP_Rocket\ThirdParty\Plugins\Optimization\RocketLazyLoad::exclude_rocket_lazyload_script + * Test class covering WP_Rocket\ThirdParty\Plugins\Optimization\RocketLazyLoad::exclude_rocket_lazyload_script */ class Test_ExcludeRocketLazyLoadScript extends TestCase { protected $subscriber; diff --git a/tests/Unit/inc/ThirdParty/Plugins/Optimization/WPMeteor/disableDelayJs.php b/tests/Unit/inc/ThirdParty/Plugins/Optimization/WPMeteor/disableDelayJs.php index 2d53f4b59b..3817e7aa0b 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Optimization/WPMeteor/disableDelayJs.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Optimization/WPMeteor/disableDelayJs.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\WPMeteor::disable_delay_js + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\WPMeteor::disable_delay_js * * @group WPMeteor * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/Optimization/WPMeteor/maybeDisableDelayJsField.php b/tests/Unit/inc/ThirdParty/Plugins/Optimization/WPMeteor/maybeDisableDelayJsField.php index 2f1875d0cd..1c01e028e9 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Optimization/WPMeteor/maybeDisableDelayJsField.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Optimization/WPMeteor/maybeDisableDelayJsField.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Optimization\WPMeteor::maybe_disable_delay_js_field + * Test class covering \WP_Rocket\ThirdParty\Plugins\Optimization\WPMeteor::maybe_disable_delay_js_field * * @group WPMeteor * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/PWA/excludeServiceWorker.php b/tests/Unit/inc/ThirdParty/Plugins/PWA/excludeServiceWorker.php index c836fcddd1..e5a54cf593 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/PWA/excludeServiceWorker.php +++ b/tests/Unit/inc/ThirdParty/Plugins/PWA/excludeServiceWorker.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Plugins\PWA; /** - * @covers \WP_Rocket\ThirdParty\Plugins\PWA::exclude_service_worker + * Test class covering \WP_Rocket\ThirdParty\Plugins\PWA::exclude_service_worker * * @group PWA * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/BeaverBuilder/purgeCache.php b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/BeaverBuilder/purgeCache.php index 86d8738a4f..a2f1fdc7db 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/BeaverBuilder/purgeCache.php +++ b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/BeaverBuilder/purgeCache.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Plugins\PageBuilder\BeaverBuilder; /** - * @covers WP_Rocket\ThirdParty\Plugins\PageBuilder\BeaverBuilder::purge_cache + * Test class covering WP_Rocket\ThirdParty\Plugins\PageBuilder\BeaverBuilder::purge_cache * @group BeaverBuilder * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/addFixAnimationsScript.php b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/addFixAnimationsScript.php index 8a87ab4cfb..39c866e435 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/addFixAnimationsScript.php +++ b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/addFixAnimationsScript.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers \WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::add_fix_animation_script + * Test class covering \WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::add_fix_animation_script * @group Elementor * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php index ecb1484086..2e3088c156 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php +++ b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/clearCache.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor; /** - * @covers WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::clear_cache + * Test class covering WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::clear_cache * @group Elementor * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php index 8b1160d048..9deda9fd84 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php +++ b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludeJs.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor; /** - * @covers WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::exclude_js + * Test class covering WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::exclude_js * * @group Elementor * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludePostCss.php b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludePostCss.php index e4ee4b1c1c..dac74029e0 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludePostCss.php +++ b/tests/Unit/inc/ThirdParty/Plugins/PageBuilder/Elementor/excludePostCss.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::exclude_post_css + * Test class covering WP_Rocket\ThirdParty\Plugins\PageBuilder\Elementor::exclude_post_css * @group Elementor * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php b/tests/Unit/inc/ThirdParty/Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php index fd5ca25cdf..27ead9b51f 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php +++ b/tests/Unit/inc/ThirdParty/Plugins/SEO/AllInOneSEOPack/addAllInOneSeoSitemap.php @@ -10,7 +10,7 @@ use WP_Rocket\ThirdParty\Plugins\SEO\AllInOneSEOPack; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SEO\AllInOneSEOPack::add_all_in_one_seo_sitemap + * Test class covering \WP_Rocket\ThirdParty\Plugins\SEO\AllInOneSEOPack::add_all_in_one_seo_sitemap * * @group AllInOneSEOPack * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php b/tests/Unit/inc/ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php index 2dba071ad2..a34d8fab8a 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php +++ b/tests/Unit/inc/ThirdParty/Plugins/SEO/RankMathSEO/rocketSitemap.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Plugins\SEO\RankMathSEO; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SEO\RankMathSEO::rocket_sitemap + * Test class covering \WP_Rocket\ThirdParty\Plugins\SEO\RankMathSEO::rocket_sitemap * * @group AllInOneSEOPack * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php b/tests/Unit/inc/ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php index 6ea1b3cc33..d57576c3e2 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php +++ b/tests/Unit/inc/ThirdParty/Plugins/SEO/SEOPress/addSeopressSitemap.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SEO\SEOPress::add_seopress_sitemap + * Test class covering \WP_Rocket\ThirdParty\Plugins\SEO\SEOPress::add_seopress_sitemap * * @group SEOPress * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php b/tests/Unit/inc/ThirdParty/Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php index 8f117740e7..8506467a7c 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php +++ b/tests/Unit/inc/ThirdParty/Plugins/SEO/TheSEOFramework/addTsfSitemapToPreload.php @@ -10,7 +10,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SEO\TheSEOFramework::add_tsf_sitemap_to_preload + * Test class covering \WP_Rocket\ThirdParty\Plugins\SEO\TheSEOFramework::add_tsf_sitemap_to_preload * * @group TheSEOFramework * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/popIpFromWhitelist.php b/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/popIpFromWhitelist.php index fdedd5816b..8d37a307bb 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/popIpFromWhitelist.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/popIpFromWhitelist.php @@ -7,7 +7,7 @@ use wfConfig; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::pop_ip_from_whitelist + * Test class covering \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::pop_ip_from_whitelist * * @group WordFence * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php b/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php index df50c854c6..cdec3ab005 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/popOldIp.php @@ -7,7 +7,7 @@ use wfConfig; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::pop_old_ip + * Test class covering \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::pop_old_ip * * @group WordFence * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/whitelistIPs.php b/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/whitelistIPs.php index 9eaf63197f..260e7eb556 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/whitelistIPs.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Security/WordFence/whitelistIPs.php @@ -8,7 +8,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::whitelist_wordfence_firewall_ips + * Test class covering \WP_Rocket\ThirdParty\Plugins\Security\WordFenceCompatibility::whitelist_wordfence_firewall_ips * * @group WordFence * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php b/tests/Unit/inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php index 37964fd8f8..82ca32f1e1 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php +++ b/tests/Unit/inc/ThirdParty/Plugins/SimpleCustomCss/cacheSccss.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Plugins\SimpleCustomCss; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SimpleCustomCss::cache_sccss + * Test class covering \WP_Rocket\ThirdParty\Plugins\SimpleCustomCss::cache_sccss * * @group ThirdParty * @group WithSCCSS diff --git a/tests/Unit/inc/ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php b/tests/Unit/inc/ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php index f96d7f1430..72fcd64b2e 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php +++ b/tests/Unit/inc/ThirdParty/Plugins/SimpleCustomCss/updateCacheFile.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Plugins\SimpleCustomCss; /** - * @covers \WP_Rocket\ThirdParty\Plugins\SimpleCustomCss::update_cache_file + * Test class covering \WP_Rocket\ThirdParty\Plugins\SimpleCustomCss::update_cache_file * * @group ThirdParty * @group WithSCCSS diff --git a/tests/Unit/inc/ThirdParty/Plugins/Smush/isSmushIframesLazyloadActive.php b/tests/Unit/inc/ThirdParty/Plugins/Smush/isSmushIframesLazyloadActive.php index b0d7b8433b..4675129366 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Smush/isSmushIframesLazyloadActive.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Smush/isSmushIframesLazyloadActive.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Plugins\Smush; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Smush::is_smush_iframes_lazyload_active + * Test class covering \WP_Rocket\ThirdParty\Plugins\Smush::is_smush_iframes_lazyload_active * @group ThirdParty * @group Smush */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php b/tests/Unit/inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php index 98bc47b996..75f14b16d4 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Smush/isSmushLazyloadActive.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Plugins\Smush; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Smush::is_smush_lazyload_active + * Test class covering \WP_Rocket\ThirdParty\Plugins\Smush::is_smush_lazyload_active * @group ThirdParty * @group Smush */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/Smush/maybeDeactivateRocketLazyload.php b/tests/Unit/inc/ThirdParty/Plugins/Smush/maybeDeactivateRocketLazyload.php index b9a02de541..c4305f34ee 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/Smush/maybeDeactivateRocketLazyload.php +++ b/tests/Unit/inc/ThirdParty/Plugins/Smush/maybeDeactivateRocketLazyload.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Plugins\Smush; /** - * @covers \WP_Rocket\ThirdParty\Plugins\Smush::maybe_deactivate_rocket_lazyload + * Test class covering \WP_Rocket\ThirdParty\Plugins\Smush::maybe_deactivate_rocket_lazyload * @group ThirdParty * @group Smush */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/ThirstyAffiliates/excludeLinkPrefix.php b/tests/Unit/inc/ThirdParty/Plugins/ThirstyAffiliates/excludeLinkPrefix.php index 2a783cf7f0..8fd1c02160 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/ThirstyAffiliates/excludeLinkPrefix.php +++ b/tests/Unit/inc/ThirdParty/Plugins/ThirstyAffiliates/excludeLinkPrefix.php @@ -7,7 +7,7 @@ use WP_Rocket\ThirdParty\Plugins\ThirstyAffiliates; /** - * @covers \WP_Rocket\ThirdParty\Plugins\ThirstyAffiliates::exclude_link_prefix + * Test class covering \WP_Rocket\ThirdParty\Plugins\ThirstyAffiliates::exclude_link_prefix * * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/UnlimitedElements/excludeInlineFromRucss.php b/tests/Unit/inc/ThirdParty/Plugins/UnlimitedElements/excludeInlineFromRucss.php index c7c383d4a7..3346e676ba 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/UnlimitedElements/excludeInlineFromRucss.php +++ b/tests/Unit/inc/ThirdParty/Plugins/UnlimitedElements/excludeInlineFromRucss.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Plugins\UnlimitedElements; /** - * @covers \WP_Rocket\ThirdParty\Plugins\UnlimitedElements::exclude_inline_from_rucss + * Test class covering \WP_Rocket\ThirdParty\Plugins\UnlimitedElements::exclude_inline_from_rucss * @group UnlimitedElements * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/activateGeotargetingwp.php b/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/activateGeotargetingwp.php index 5eb4a34641..0d305ba418 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/activateGeotargetingwp.php +++ b/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/activateGeotargetingwp.php @@ -10,7 +10,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::activate_geotargetingwp + * Test class covering \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::activate_geotargetingwp */ class Test_activateGeotargetingwp extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php b/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php index 67d37498f0..5d12f77946 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php +++ b/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/addGeotCookies.php @@ -9,7 +9,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::add_geot_cookies + * Test class covering \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::add_geot_cookies */ class Test_addGeotCookies extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/deactivateGeotargetingwp.php b/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/deactivateGeotargetingwp.php index 380f12d7f0..c8abd37071 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/deactivateGeotargetingwp.php +++ b/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/deactivateGeotargetingwp.php @@ -10,7 +10,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::deactivate_geotargetingwp + * Test class covering \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::deactivate_geotargetingwp */ class Test_deactivateGeotargetingwp extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php b/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php index 0c1220a78d..fa45382152 100644 --- a/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php +++ b/tests/Unit/inc/ThirdParty/Plugins/WPGeotargeting/maybeDisableRules.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::maybe_disable_rules + * Test class covering \WP_Rocket\ThirdParty\Plugins\WPGeotargeting::maybe_disable_rules */ class Test_maybeDisableRules extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Themes/Avada/disableCompilers.php b/tests/Unit/inc/ThirdParty/Themes/Avada/disableCompilers.php index 042bd10c75..c07fe0c35d 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Avada/disableCompilers.php +++ b/tests/Unit/inc/ThirdParty/Themes/Avada/disableCompilers.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Avada::disable_compilers + * Test class covering \WP_Rocket\ThirdParty\Avada::disable_compilers * * @group AvadaTheme * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Themes/Avada/fixRegexLazyloadBgImages.php b/tests/Unit/inc/ThirdParty/Themes/Avada/fixRegexLazyloadBgImages.php index 0033c3c09e..8caabfa74f 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Avada/fixRegexLazyloadBgImages.php +++ b/tests/Unit/inc/ThirdParty/Themes/Avada/fixRegexLazyloadBgImages.php @@ -8,7 +8,7 @@ use WP_Rocket\ThirdParty\Themes\Avada; /** - * @covers \WP_Rocket\ThirdParty\Avada::fix_regex_lazyload_bg_images + * Test class covering \WP_Rocket\ThirdParty\Avada::fix_regex_lazyload_bg_images * * @group AvadaTheme * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Themes/Divi/addDiviToDescription.php b/tests/Unit/inc/ThirdParty/Themes/Divi/addDiviToDescription.php index bdb94dcaf2..666365c908 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Divi/addDiviToDescription.php +++ b/tests/Unit/inc/ThirdParty/Themes/Divi/addDiviToDescription.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Themes\Divi; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::add_divi_to_description + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::add_divi_to_description * @uses \WP_Rocket\ThirdParty\Themes\Divi::is_divi * * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php b/tests/Unit/inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php index f81264dba0..ccdf6f2e08 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php +++ b/tests/Unit/inc/ThirdParty/Themes/Divi/disableDiviJqueryBody.php @@ -10,7 +10,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::disable_divi_jquery_body + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::disable_divi_jquery_body * @uses \WP_Rocket\ThirdParty\Themes\Divi::is_divi * * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Themes/Divi/disableDynamicCssOnRucss.php b/tests/Unit/inc/ThirdParty/Themes/Divi/disableDynamicCssOnRucss.php index 851776dfd2..4dac79c85e 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Divi/disableDynamicCssOnRucss.php +++ b/tests/Unit/inc/ThirdParty/Themes/Divi/disableDynamicCssOnRucss.php @@ -13,7 +13,7 @@ use WP_Theme; /** - * @covers \WP_Rocket\ThirdParty\Divi::disable_dynamic_css_on_rucss + * Test class covering \WP_Rocket\ThirdParty\Divi::disable_dynamic_css_on_rucss * * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php b/tests/Unit/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php index b7fdcd6cfa..6321da9150 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php +++ b/tests/Unit/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php @@ -12,7 +12,7 @@ use WP_Theme; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::disable_image_dimensions_height_percentage + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::disable_image_dimensions_height_percentage * @uses \WP_Rocket\ThirdParty\Themes\Divi::is_divi * * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Themes/Divi/excludeJS.php b/tests/Unit/inc/ThirdParty/Themes/Divi/excludeJS.php index d9a2508562..fcc602d60e 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Divi/excludeJS.php +++ b/tests/Unit/inc/ThirdParty/Themes/Divi/excludeJS.php @@ -8,7 +8,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::exclude_js + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::exclude_js * @uses ::rocket_get_constant() * * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php b/tests/Unit/inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php index 58a2c91885..4fa76b0306 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php +++ b/tests/Unit/inc/ThirdParty/Themes/Divi/handleDiviAdminNotice.php @@ -8,7 +8,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::handle_divi_admin_notice + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::handle_divi_admin_notice * * @group ThirdParty * @group Divi diff --git a/tests/Unit/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php b/tests/Unit/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php index d47f6fc9f3..87ecc8ea6d 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php +++ b/tests/Unit/inc/ThirdParty/Themes/Divi/handleSaveTemplate.php @@ -10,7 +10,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::handle_save_template + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::handle_save_template * * @group ThirdParty * @group Divi diff --git a/tests/Unit/inc/ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php b/tests/Unit/inc/ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php index 9840c3b164..b6786789df 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php +++ b/tests/Unit/inc/ThirdParty/Themes/Divi/maybeDisableYoutubePreview.php @@ -9,7 +9,7 @@ use WP_Rocket\ThirdParty\Themes\Divi; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::maybe_disable_youtube_preview + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::maybe_disable_youtube_preview * * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php b/tests/Unit/inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php index 2f5e0e8a5b..e891f92c7f 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php +++ b/tests/Unit/inc/ThirdParty/Themes/Divi/removeAssetsGenerated.php @@ -13,7 +13,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Themes\Divi::remove_assets_generated + * Test class covering \WP_Rocket\ThirdParty\Themes\Divi::remove_assets_generated * @uses \WP_Rocket\ThirdParty\Themes\Divi::is_divi * * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Themes/Flatsome/preservePatterns.php b/tests/Unit/inc/ThirdParty/Themes/Flatsome/preservePatterns.php index 741edb398f..b57789d591 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Flatsome/preservePatterns.php +++ b/tests/Unit/inc/ThirdParty/Themes/Flatsome/preservePatterns.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\Flatsome; /** - * @covers \WP_Rocket\ThirdParty\Themes\Flatsome::preserve_patterns + * Test class covering \WP_Rocket\ThirdParty\Themes\Flatsome::preserve_patterns * @group ThirdParty */ class Test_PreservePatterns extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Themes/Jevelin/preservePatterns.php b/tests/Unit/inc/ThirdParty/Themes/Jevelin/preservePatterns.php index e1c9c181b5..b94fba11e1 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Jevelin/preservePatterns.php +++ b/tests/Unit/inc/ThirdParty/Themes/Jevelin/preservePatterns.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\Jevelin; /** - * @covers \WP_Rocket\ThirdParty\Themes\Jevelin::preserve_patterns + * Test class covering \WP_Rocket\ThirdParty\Themes\Jevelin::preserve_patterns * @group Jevelin * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php b/tests/Unit/inc/ThirdParty/Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php index 57ebd6ba0a..c44d6f45ba 100644 --- a/tests/Unit/inc/ThirdParty/Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php +++ b/tests/Unit/inc/ThirdParty/Themes/MinimalistBlogger/excludeJqueryFromDelayJs.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\MinimalistBlogger; /** - * @covers \WP_Rocket\ThirdParty\Themes\MinimalistBlogger::exclude_jquery_from_delay_js + * Test class covering \WP_Rocket\ThirdParty\Themes\MinimalistBlogger::exclude_jquery_from_delay_js * * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Themes/Polygon/addRucssContentExcluded.php b/tests/Unit/inc/ThirdParty/Themes/Polygon/addRucssContentExcluded.php index b663ed0bd8..30367967a8 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Polygon/addRucssContentExcluded.php +++ b/tests/Unit/inc/ThirdParty/Themes/Polygon/addRucssContentExcluded.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Themes\Polygon; /** - * @covers \WP_Rocket\ThirdParty\Themes\Polygon::add_rucss_content_excluded + * Test class covering \WP_Rocket\ThirdParty\Themes\Polygon::add_rucss_content_excluded * * @group ThirdParty */ diff --git a/tests/Unit/inc/ThirdParty/Themes/Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php b/tests/Unit/inc/ThirdParty/Themes/Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php index 10de529c72..f338ca21c7 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php +++ b/tests/Unit/inc/ThirdParty/Themes/Shoptimizer/excludeJqueryDeferjsWithCartDrawer.php @@ -9,7 +9,7 @@ use Brain\Monkey\Functions; /** - * @covers \WP_Rocket\ThirdParty\Themes\Shoptimizer::exclude_jquery_deferjs_with_cart_drawer + * Test class covering \WP_Rocket\ThirdParty\Themes\Shoptimizer::exclude_jquery_deferjs_with_cart_drawer */ class Test_excludeJqueryDeferjsWithCartDrawer extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Themes/Themify/disableConcatOnSavingData.php b/tests/Unit/inc/ThirdParty/Themes/Themify/disableConcatOnSavingData.php index f3e657c91a..ccca81d9f8 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Themify/disableConcatOnSavingData.php +++ b/tests/Unit/inc/ThirdParty/Themes/Themify/disableConcatOnSavingData.php @@ -11,7 +11,7 @@ use Brain\Monkey\Filters; /** - * @covers \WP_Rocket\ThirdParty\Themes\Themify::disable_concat_on_saving_data + * Test class covering \WP_Rocket\ThirdParty\Themes\Themify::disable_concat_on_saving_data */ class Test_disableConcatOnSavingData extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Themes/Themify/disablingConcatOnRucss.php b/tests/Unit/inc/ThirdParty/Themes/Themify/disablingConcatOnRucss.php index 58706a5aa3..fa7c1c99e1 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Themify/disablingConcatOnRucss.php +++ b/tests/Unit/inc/ThirdParty/Themes/Themify/disablingConcatOnRucss.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Themes\Themify::disabling_concat_on_rucss + * Test class covering \WP_Rocket\ThirdParty\Themes\Themify::disabling_concat_on_rucss */ class Test_disablingConcatOnRucss extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Themes/Themify/maybeEnableDevMode.php b/tests/Unit/inc/ThirdParty/Themes/Themify/maybeEnableDevMode.php index 26cea9450d..e647c0ddc0 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Themify/maybeEnableDevMode.php +++ b/tests/Unit/inc/ThirdParty/Themes/Themify/maybeEnableDevMode.php @@ -10,7 +10,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\ThirdParty\Themes\Themify::maybe_enable_dev_mode + * Test class covering \WP_Rocket\ThirdParty\Themes\Themify::maybe_enable_dev_mode */ class Test_maybeEnableDevMode extends TestCase { diff --git a/tests/Unit/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php b/tests/Unit/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php index 0da0352ded..1fe0f4025d 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php +++ b/tests/Unit/inc/ThirdParty/Themes/Uncode/excludeDelayJs.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Themes\Uncode; /** - * @covers \WP_Rocket\ThirdParty\Themes\Uncode::exclude_delay_js + * Test class covering \WP_Rocket\ThirdParty\Themes\Uncode::exclude_delay_js * * @group Uncode * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Themes/Uncode/excludeJs.php b/tests/Unit/inc/ThirdParty/Themes/Uncode/excludeJs.php index 50d4023b40..2c8731d6d5 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Uncode/excludeJs.php +++ b/tests/Unit/inc/ThirdParty/Themes/Uncode/excludeJs.php @@ -6,7 +6,7 @@ use WP_Rocket\ThirdParty\Themes\Uncode; /** - * @covers \WP_Rocket\ThirdParty\Themes\Uncode::exclude_js + * Test class covering \WP_Rocket\ThirdParty\Themes\Uncode::exclude_js * * @group Uncode * @group ThirdParty diff --git a/tests/Unit/inc/ThirdParty/Themes/Xstore/excludeInlineContent.php b/tests/Unit/inc/ThirdParty/Themes/Xstore/excludeInlineContent.php index d5848e6795..b7816156f9 100644 --- a/tests/Unit/inc/ThirdParty/Themes/Xstore/excludeInlineContent.php +++ b/tests/Unit/inc/ThirdParty/Themes/Xstore/excludeInlineContent.php @@ -5,7 +5,7 @@ use WP_Rocket\ThirdParty\Themes\Xstore; /** - * @covers \WP_Rocket\ThirdParty\Themes\Xstore::exclude_inline_content + * Test class covering \WP_Rocket\ThirdParty\Themes\Xstore::exclude_inline_content * @group ThirdParty */ class Test_ExcludeInlineContent extends TestCase { diff --git a/tests/Unit/inc/admin/rocketAfterSaveOptions.php b/tests/Unit/inc/admin/rocketAfterSaveOptions.php index 1ce9f9e1f1..262c57e9d6 100644 --- a/tests/Unit/inc/admin/rocketAfterSaveOptions.php +++ b/tests/Unit/inc/admin/rocketAfterSaveOptions.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_after_save_options + * Test class covering ::rocket_after_save_options * * @group admin * @group Options diff --git a/tests/Unit/inc/admin/rocketFirstInstall.php b/tests/Unit/inc/admin/rocketFirstInstall.php index ea3cdc18f0..42bd26df9e 100644 --- a/tests/Unit/inc/admin/rocketFirstInstall.php +++ b/tests/Unit/inc/admin/rocketFirstInstall.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers ::rocket_first_install + * Test class covering ::rocket_first_install * @group admin * @group upgrade * @group AdminOnly diff --git a/tests/Unit/inc/admin/rocketNewUpgrade.php b/tests/Unit/inc/admin/rocketNewUpgrade.php index 03d265e3bd..d87348fc43 100644 --- a/tests/Unit/inc/admin/rocketNewUpgrade.php +++ b/tests/Unit/inc/admin/rocketNewUpgrade.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers ::rocket_new_upgrade + * Test class covering ::rocket_new_upgrade * @group admin * @group upgrade */ diff --git a/tests/Unit/inc/classes/Buffer/Tests/canProcessBuffer.php b/tests/Unit/inc/classes/Buffer/Tests/canProcessBuffer.php index 34bdcff7fd..21d08a5c65 100644 --- a/tests/Unit/inc/classes/Buffer/Tests/canProcessBuffer.php +++ b/tests/Unit/inc/classes/Buffer/Tests/canProcessBuffer.php @@ -9,7 +9,7 @@ use Mockery; /** - * @covers \WP_Rocket\Buffer\Tests::can_process_buffer + * Test class covering \WP_Rocket\Buffer\Tests::can_process_buffer * * @group Buffer */ diff --git a/tests/Unit/inc/classes/Buffer/Tests/isFeedUri.php b/tests/Unit/inc/classes/Buffer/Tests/isFeedUri.php index 0c7f9c118c..14fe4f27cb 100644 --- a/tests/Unit/inc/classes/Buffer/Tests/isFeedUri.php +++ b/tests/Unit/inc/classes/Buffer/Tests/isFeedUri.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Buffer\Tests::is_feed_uri + * Test class covering \WP_Rocket\Buffer\Tests::is_feed_uri * * @group Buffer */ diff --git a/tests/Unit/inc/classes/Buffer/Tests/isSpeedTool.php b/tests/Unit/inc/classes/Buffer/Tests/isSpeedTool.php index cf9360ef33..c8ade4bbf3 100644 --- a/tests/Unit/inc/classes/Buffer/Tests/isSpeedTool.php +++ b/tests/Unit/inc/classes/Buffer/Tests/isSpeedTool.php @@ -8,7 +8,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Buffer\Tests::is_speed_tool + * Test class covering \WP_Rocket\Buffer\Tests::is_speed_tool * @uses \WP_Rocket\Buffer\Tests::get_ip * @group Buffer */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/getBasename.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/getBasename.php index e756d2932c..933fc99711 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/getBasename.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/getBasename.php @@ -9,7 +9,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::get_basename + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::get_basename * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isConvertingToWebp.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isConvertingToWebp.php index 41674904dd..3bda9fe9ed 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isConvertingToWebp.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isConvertingToWebp.php @@ -9,7 +9,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::is_converting_to_webp + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::is_converting_to_webp * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isServingWebp.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isServingWebp.php index 5f6adce38b..7497210383 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isServingWebp.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isServingWebp.php @@ -10,7 +10,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::is_serving_webp + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::is_serving_webp * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isServingWebpCompatibleWithCdn.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isServingWebpCompatibleWithCdn.php index 30c90ec7a2..f484583be3 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isServingWebpCompatibleWithCdn.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/isServingWebpCompatibleWithCdn.php @@ -9,7 +9,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::is_serving_webp_compatible_with_cdn + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::is_serving_webp_compatible_with_cdn * @group ThirdParty */ class Test_IsServingWebpCompatibleWithCdn extends TestCase { diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/loadHooks.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/loadHooks.php index c7c498c5af..23b8885778 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/loadHooks.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/loadHooks.php @@ -9,7 +9,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::load_hooks + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::load_hooks * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/maybeRemoveImagesCnames.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/maybeRemoveImagesCnames.php index 334ab805d6..8ee766d9d1 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/maybeRemoveImagesCnames.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/maybeRemoveImagesCnames.php @@ -10,7 +10,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::maybe_remove_images_cnames + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::maybe_remove_images_cnames * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/maybeRemoveImagesFromCdnDropdown.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/maybeRemoveImagesFromCdnDropdown.php index 78d25808b0..31d5c6fe1b 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/maybeRemoveImagesFromCdnDropdown.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/EWWW_Subscriber/maybeRemoveImagesFromCdnDropdown.php @@ -9,7 +9,7 @@ use WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::maybe_remove_images_from_cdn_dropdown + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\EWWW_Subscriber::maybe_remove_images_from_cdn_dropdown * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/getBasename.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/getBasename.php index 9fa6936aa8..2a8836290b 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/getBasename.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/getBasename.php @@ -9,7 +9,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::get_basename + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::get_basename * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isConvertingToWebp.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isConvertingToWebp.php index 7598138b51..3ac7c11bac 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isConvertingToWebp.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isConvertingToWebp.php @@ -9,7 +9,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::is_converting_to_webp + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::is_converting_to_webp * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isServingWebp.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isServingWebp.php index c29078768b..d9e3612d0e 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isServingWebp.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isServingWebp.php @@ -9,7 +9,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::is_serving_webp + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::is_serving_webp * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isServingWebpCompatibleWithCdn.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isServingWebpCompatibleWithCdn.php index 7ffe71fb7c..51a0f659bb 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isServingWebpCompatibleWithCdn.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/isServingWebpCompatibleWithCdn.php @@ -9,7 +9,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::is_serving_webp_compatible_with_cdn + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::is_serving_webp_compatible_with_cdn * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/loadHooks.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/loadHooks.php index cb2a90461a..5c39a4ed3c 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/loadHooks.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/loadHooks.php @@ -11,7 +11,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::load_hooks + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::load_hooks * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionAdd.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionAdd.php index 570d99e066..ea24ca2466 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionAdd.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionAdd.php @@ -10,7 +10,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_network_option_add + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_network_option_add * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionDelete.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionDelete.php index 693ac15121..84be1bd201 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionDelete.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionDelete.php @@ -10,7 +10,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_network_option_delete + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_network_option_delete * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionUpdate.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionUpdate.php index f7422458e8..5fe9c9f7ab 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionUpdate.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnNetworkOptionUpdate.php @@ -10,7 +10,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_network_option_update + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_network_option_update * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionAdd.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionAdd.php index 1de0e531bc..b470ca2901 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionAdd.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionAdd.php @@ -10,7 +10,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_option_add + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_option_add * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionDelete.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionDelete.php index a0659c9d6c..59d46b4c7c 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionDelete.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionDelete.php @@ -10,7 +10,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_option_delete + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_option_delete * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionUpdate.php b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionUpdate.php index ce30784ae0..88f1200679 100644 --- a/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionUpdate.php +++ b/tests/Unit/inc/classes/third-party/plugins/Images/Webp/Imagify_Subscriber/syncOnOptionUpdate.php @@ -9,7 +9,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_option_update + * Test class covering \WP_Rocket\Subscriber\Third_Party\Plugins\Images\Webp\Imagify_Subscriber::sync_on_option_update * @group ThirdParty * @group Webp */ diff --git a/tests/Unit/inc/common/doAdminPostRocketPurgeCache.php b/tests/Unit/inc/common/doAdminPostRocketPurgeCache.php index c6093ae11d..a65a56eb0e 100644 --- a/tests/Unit/inc/common/doAdminPostRocketPurgeCache.php +++ b/tests/Unit/inc/common/doAdminPostRocketPurgeCache.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::do_admin_post_rocket_purge_cache + * Test class covering ::do_admin_post_rocket_purge_cache * @group Common * @group vfs */ diff --git a/tests/Unit/inc/common/rocketCleanCacheThemeUpdate.php b/tests/Unit/inc/common/rocketCleanCacheThemeUpdate.php index a744173158..39d0db5962 100644 --- a/tests/Unit/inc/common/rocketCleanCacheThemeUpdate.php +++ b/tests/Unit/inc/common/rocketCleanCacheThemeUpdate.php @@ -6,7 +6,7 @@ use WP_Theme; /** - * @covers ::rocket_clean_cache_theme_update + * Test class covering ::rocket_clean_cache_theme_update * @uses ::rocket_clean_domain * * @group Common diff --git a/tests/Unit/inc/common/rocketCleanPostCacheOnSlugChange.php b/tests/Unit/inc/common/rocketCleanPostCacheOnSlugChange.php index c80656ea6a..fd735a56bc 100644 --- a/tests/Unit/inc/common/rocketCleanPostCacheOnSlugChange.php +++ b/tests/Unit/inc/common/rocketCleanPostCacheOnSlugChange.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers ::rocket_clean_post_cache_on_slug_change + * Test class covering ::rocket_clean_post_cache_on_slug_change * @uses ::rocket_clean_files * * @group Common diff --git a/tests/Unit/inc/common/rocketGetPurgeUrls.php b/tests/Unit/inc/common/rocketGetPurgeUrls.php index 8af3d86abe..117a18b231 100644 --- a/tests/Unit/inc/common/rocketGetPurgeUrls.php +++ b/tests/Unit/inc/common/rocketGetPurgeUrls.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers ::rocket_clean_cache_theme_update + * Test class covering ::rocket_clean_cache_theme_update * @uses ::rocket_clean_domain * * @group Common diff --git a/tests/Unit/inc/common/rocketWidgetUpdateCallback.php b/tests/Unit/inc/common/rocketWidgetUpdateCallback.php index 70496f2e6e..3fd899075f 100644 --- a/tests/Unit/inc/common/rocketWidgetUpdateCallback.php +++ b/tests/Unit/inc/common/rocketWidgetUpdateCallback.php @@ -5,7 +5,7 @@ use Brain\Monkey\Functions; /** - * @covers ::rocket_widget_update_callback + * Test class covering ::rocket_widget_update_callback * @uses ::rocket_clean_domain * * @group Common diff --git a/tests/Unit/inc/functions/_rocketGetCacheDirs.php b/tests/Unit/inc/functions/_rocketGetCacheDirs.php index 210e9ee674..c5766207bf 100644 --- a/tests/Unit/inc/functions/_rocketGetCacheDirs.php +++ b/tests/Unit/inc/functions/_rocketGetCacheDirs.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::_rocket_get_cache_dirs + * Test class covering ::_rocket_get_cache_dirs * * @group Files * @group vfs diff --git a/tests/Unit/inc/functions/_rocketGetDirFilesByRegex.php b/tests/Unit/inc/functions/_rocketGetDirFilesByRegex.php index 8d9997c7cb..2b081d9cfa 100644 --- a/tests/Unit/inc/functions/_rocketGetDirFilesByRegex.php +++ b/tests/Unit/inc/functions/_rocketGetDirFilesByRegex.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::_rocket_get_dir_files_by_regex() + * Test class covering ::_rocket_get_dir_files_by_regex() * * @group Functions */ diff --git a/tests/Unit/inc/functions/_rocketGetRecursiveDirFilesByRegex.php b/tests/Unit/inc/functions/_rocketGetRecursiveDirFilesByRegex.php index 67154b4e5e..48882525d7 100644 --- a/tests/Unit/inc/functions/_rocketGetRecursiveDirFilesByRegex.php +++ b/tests/Unit/inc/functions/_rocketGetRecursiveDirFilesByRegex.php @@ -4,7 +4,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::_rocket_get_cache_dirs + * Test class covering ::_rocket_get_cache_dirs * * @group Files * @group vfs diff --git a/tests/Unit/inc/functions/_rocketNormalizePath.php b/tests/Unit/inc/functions/_rocketNormalizePath.php index fc199034b0..dd8ada3c04 100644 --- a/tests/Unit/inc/functions/_rocketNormalizePath.php +++ b/tests/Unit/inc/functions/_rocketNormalizePath.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::_rocket_normalize_path + * Test class covering ::_rocket_normalize_path * @uses ::_rocket_is_windows_fs * * @group Files diff --git a/tests/Unit/inc/functions/getRocketCacheRejectUri.php b/tests/Unit/inc/functions/getRocketCacheRejectUri.php index a4ffcaed44..deb96affd2 100644 --- a/tests/Unit/inc/functions/getRocketCacheRejectUri.php +++ b/tests/Unit/inc/functions/getRocketCacheRejectUri.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers ::get_rocket_cache_reject_uri + * Test class covering ::get_rocket_cache_reject_uri * @group Functions * @group Options */ diff --git a/tests/Unit/inc/functions/getRocketI18nCode.php b/tests/Unit/inc/functions/getRocketI18nCode.php index 941ab42449..67c19294f2 100644 --- a/tests/Unit/inc/functions/getRocketI18nCode.php +++ b/tests/Unit/inc/functions/getRocketI18nCode.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers ::get_rocket_i18n_code + * Test class covering ::get_rocket_i18n_code * @uses ::rocket_has_i18n * @group Functions * @group i18n diff --git a/tests/Unit/inc/functions/getRocketI18nHomeUrl.php b/tests/Unit/inc/functions/getRocketI18nHomeUrl.php index a693fc4978..2d993453d6 100644 --- a/tests/Unit/inc/functions/getRocketI18nHomeUrl.php +++ b/tests/Unit/inc/functions/getRocketI18nHomeUrl.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers ::get_rocket_i18n_home_url + * Test class covering ::get_rocket_i18n_home_url * @uses ::rocket_has_i18n * * @group Functions diff --git a/tests/Unit/inc/functions/getRocketI18nToPreserve.php b/tests/Unit/inc/functions/getRocketI18nToPreserve.php index 04cbe17c79..b730bf1478 100644 --- a/tests/Unit/inc/functions/getRocketI18nToPreserve.php +++ b/tests/Unit/inc/functions/getRocketI18nToPreserve.php @@ -7,7 +7,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::get_rocket_i18n_to_preserve + * Test class covering ::get_rocket_i18n_to_preserve * @uses ::rocket_has_i18n * @uses ::get_rocket_i18n_code * @uses ::get_rocket_i18n_home_url diff --git a/tests/Unit/inc/functions/getRocketI18nUri.php b/tests/Unit/inc/functions/getRocketI18nUri.php index 59d82ee218..94844b2ffc 100644 --- a/tests/Unit/inc/functions/getRocketI18nUri.php +++ b/tests/Unit/inc/functions/getRocketI18nUri.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers ::get_rocket_i18n_uri + * Test class covering ::get_rocket_i18n_uri * @uses ::rocket_has_i18n * @uses ::get_rocket_i18n_code * diff --git a/tests/Unit/inc/functions/getRocketParseUrl.php b/tests/Unit/inc/functions/getRocketParseUrl.php index 0ba46b7cf4..794308be43 100644 --- a/tests/Unit/inc/functions/getRocketParseUrl.php +++ b/tests/Unit/inc/functions/getRocketParseUrl.php @@ -7,7 +7,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::get_rocket_parse_url + * Test class covering ::get_rocket_parse_url * @group Functions * @group Posts */ diff --git a/tests/Unit/inc/functions/getRocketSamplePermalink.php b/tests/Unit/inc/functions/getRocketSamplePermalink.php index 015e86a31f..b23bda6da9 100644 --- a/tests/Unit/inc/functions/getRocketSamplePermalink.php +++ b/tests/Unit/inc/functions/getRocketSamplePermalink.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::get_rocket_sample_permalink + * Test class covering ::get_rocket_sample_permalink * @group Functions * @group Posts */ diff --git a/tests/Unit/inc/functions/isRocketGenerateCachingMobileFiles.php b/tests/Unit/inc/functions/isRocketGenerateCachingMobileFiles.php index b0d2a0d627..3f88e47378 100644 --- a/tests/Unit/inc/functions/isRocketGenerateCachingMobileFiles.php +++ b/tests/Unit/inc/functions/isRocketGenerateCachingMobileFiles.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::is_rocket_generate_caching_mobile_files + * Test class covering ::is_rocket_generate_caching_mobile_files * @uses ::get_rocket_option * * @group Options diff --git a/tests/Unit/inc/functions/rocketAddUrlProtocol.php b/tests/Unit/inc/functions/rocketAddUrlProtocol.php index 40af3b875b..66f4bbd8da 100644 --- a/tests/Unit/inc/functions/rocketAddUrlProtocol.php +++ b/tests/Unit/inc/functions/rocketAddUrlProtocol.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::rocket_add_url_protocol + * Test class covering ::rocket_add_url_protocol * @group Functions * @group Formatting */ diff --git a/tests/Unit/inc/functions/rocketCheckKey.php b/tests/Unit/inc/functions/rocketCheckKey.php index 6c81eb9170..efc7a39dac 100644 --- a/tests/Unit/inc/functions/rocketCheckKey.php +++ b/tests/Unit/inc/functions/rocketCheckKey.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::rocket_check_key + * Test class covering ::rocket_check_key * @group Functions * @group Options */ diff --git a/tests/Unit/inc/functions/rocketCleanCacheBusting.php b/tests/Unit/inc/functions/rocketCleanCacheBusting.php index d7101fb690..81dd88784a 100644 --- a/tests/Unit/inc/functions/rocketCleanCacheBusting.php +++ b/tests/Unit/inc/functions/rocketCleanCacheBusting.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_clean_cache_busting + * Test class covering ::rocket_clean_cache_busting * @uses ::rocket_direct_filesystem * * @group Functions diff --git a/tests/Unit/inc/functions/rocketCleanDomain.php b/tests/Unit/inc/functions/rocketCleanDomain.php index b1ba9cdfd3..d0f7549c01 100644 --- a/tests/Unit/inc/functions/rocketCleanDomain.php +++ b/tests/Unit/inc/functions/rocketCleanDomain.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_clean_domain + * Test class covering ::rocket_clean_domain * @uses ::get_rocket_i18n_home_url * @uses ::get_rocket_i18n_to_preserve * @uses ::get_rocket_i18n_uri diff --git a/tests/Unit/inc/functions/rocketCleanFiles.php b/tests/Unit/inc/functions/rocketCleanFiles.php index 0a89cb1f83..c6b6c180e6 100644 --- a/tests/Unit/inc/functions/rocketCleanFiles.php +++ b/tests/Unit/inc/functions/rocketCleanFiles.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_clean_files + * Test class covering ::rocket_clean_files * @uses ::_rocket_get_wp_rocket_cache_path * @uses ::rocket_get_constant * @uses ::rocket_rrmdir diff --git a/tests/Unit/inc/functions/rocketCleanHomeFeeds.php b/tests/Unit/inc/functions/rocketCleanHomeFeeds.php index 2a7f06e16b..737057b957 100644 --- a/tests/Unit/inc/functions/rocketCleanHomeFeeds.php +++ b/tests/Unit/inc/functions/rocketCleanHomeFeeds.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_clean_home_feeds + * Test class covering ::rocket_clean_home_feeds * @uses ::rocket_direct_filesystem * * @group Functions diff --git a/tests/Unit/inc/functions/rocketCleanMinify.php b/tests/Unit/inc/functions/rocketCleanMinify.php index 75e9488f5d..2fb078b51c 100644 --- a/tests/Unit/inc/functions/rocketCleanMinify.php +++ b/tests/Unit/inc/functions/rocketCleanMinify.php @@ -7,7 +7,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_clean_minify + * Test class covering ::rocket_clean_minify * @uses ::rocket_direct_filesystem * * @group Functions diff --git a/tests/Unit/inc/functions/rocketDeleteLicenceDataFile.php b/tests/Unit/inc/functions/rocketDeleteLicenceDataFile.php index b85e3a7875..2a2e2e4f7f 100644 --- a/tests/Unit/inc/functions/rocketDeleteLicenceDataFile.php +++ b/tests/Unit/inc/functions/rocketDeleteLicenceDataFile.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_delete_licence_data_file + * Test class covering ::rocket_delete_licence_data_file * @group Functions * @group Options * @group vfs diff --git a/tests/Unit/inc/functions/rocketExtractUrlComponent.php b/tests/Unit/inc/functions/rocketExtractUrlComponent.php index 3adda0884e..fa7c2412fa 100644 --- a/tests/Unit/inc/functions/rocketExtractUrlComponent.php +++ b/tests/Unit/inc/functions/rocketExtractUrlComponent.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::rocket_extract_url_component + * Test class covering ::rocket_extract_url_component * @group Functions */ class Test_RocketExtractUrlComponent extends TestCase { diff --git a/tests/Unit/inc/functions/rocketGenerateAdvancedCacheFile.php b/tests/Unit/inc/functions/rocketGenerateAdvancedCacheFile.php index 6ff3a835c5..abaf61b73b 100644 --- a/tests/Unit/inc/functions/rocketGenerateAdvancedCacheFile.php +++ b/tests/Unit/inc/functions/rocketGenerateAdvancedCacheFile.php @@ -8,7 +8,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_generate_advanced_cache_file + * Test class covering ::rocket_generate_advanced_cache_file * @uses WP_Rocket\Engine\Cache\AdvancedCache::get_advanced_cache_content * @uses ::rocket_put_content * @uses ::rocket_get_constant diff --git a/tests/Unit/inc/functions/rocketGetFilesystemPerms.php b/tests/Unit/inc/functions/rocketGetFilesystemPerms.php index fdaa700118..467fc22378 100644 --- a/tests/Unit/inc/functions/rocketGetFilesystemPerms.php +++ b/tests/Unit/inc/functions/rocketGetFilesystemPerms.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_get_filesystem_perms + * Test class covering ::rocket_get_filesystem_perms * * @group Files * @group Functions diff --git a/tests/Unit/inc/functions/rocketGetPHPFilesInDir.php b/tests/Unit/inc/functions/rocketGetPHPFilesInDir.php index 0f70d05520..09d8a230f9 100644 --- a/tests/Unit/inc/functions/rocketGetPHPFilesInDir.php +++ b/tests/Unit/inc/functions/rocketGetPHPFilesInDir.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::_rocket_get_php_files_in_dir() + * Test class covering ::_rocket_get_php_files_in_dir() * * @group Functions */ diff --git a/tests/Unit/inc/functions/rocketHasI18n.php b/tests/Unit/inc/functions/rocketHasI18n.php index cd3a32c82f..2354db4589 100644 --- a/tests/Unit/inc/functions/rocketHasI18n.php +++ b/tests/Unit/inc/functions/rocketHasI18n.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers ::rocket_has_i18n + * Test class covering ::rocket_has_i18n * @group Functions * @group i18n */ diff --git a/tests/Unit/inc/functions/rocketIsLiveSite.php b/tests/Unit/inc/functions/rocketIsLiveSite.php index 8ab5eb2936..c6e452454a 100644 --- a/tests/Unit/inc/functions/rocketIsLiveSite.php +++ b/tests/Unit/inc/functions/rocketIsLiveSite.php @@ -7,7 +7,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::rocket_is_live_site + * Test class covering ::rocket_is_live_site * @group Functions * @group API */ diff --git a/tests/Unit/inc/functions/rocketIsPluginActive.php b/tests/Unit/inc/functions/rocketIsPluginActive.php index a2d5abbf48..56e11c87d7 100644 --- a/tests/Unit/inc/functions/rocketIsPluginActive.php +++ b/tests/Unit/inc/functions/rocketIsPluginActive.php @@ -7,7 +7,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::rocket_is_plugin_active + * Test class covering ::rocket_is_plugin_active * @group Options * @group Functions */ diff --git a/tests/Unit/inc/functions/rocketIsPluginActiveForNetwork.php b/tests/Unit/inc/functions/rocketIsPluginActiveForNetwork.php index 4bb90afa0e..1af1face73 100644 --- a/tests/Unit/inc/functions/rocketIsPluginActiveForNetwork.php +++ b/tests/Unit/inc/functions/rocketIsPluginActiveForNetwork.php @@ -7,7 +7,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::rocket_is_plugin_active_for_network + * Test class covering ::rocket_is_plugin_active_for_network * @group Options * @group Functions */ diff --git a/tests/Unit/inc/functions/rocketIsStream.php b/tests/Unit/inc/functions/rocketIsStream.php index dd9564be8a..70bb65e46c 100644 --- a/tests/Unit/inc/functions/rocketIsStream.php +++ b/tests/Unit/inc/functions/rocketIsStream.php @@ -5,7 +5,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_is_stream + * Test class covering ::rocket_is_stream * @group Functions * @group Files * @group vfs diff --git a/tests/Unit/inc/functions/rocketMkdirP.php b/tests/Unit/inc/functions/rocketMkdirP.php index 502259504a..dd994ffb17 100644 --- a/tests/Unit/inc/functions/rocketMkdirP.php +++ b/tests/Unit/inc/functions/rocketMkdirP.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_mkdir_p + * Test class covering ::rocket_mkdir_p * @uses ::rocket_is_stream * @uses ::rocket_direct_filesystem * diff --git a/tests/Unit/inc/functions/rocketPutContent.php b/tests/Unit/inc/functions/rocketPutContent.php index 12542dd552..fe93e1d801 100644 --- a/tests/Unit/inc/functions/rocketPutContent.php +++ b/tests/Unit/inc/functions/rocketPutContent.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_put_content + * Test class covering ::rocket_put_content * @uses ::rocket_get_filesystem_perms * @uses ::rocket_direct_filesystem * diff --git a/tests/Unit/inc/functions/rocketRrmdir.php b/tests/Unit/inc/functions/rocketRrmdir.php index 4bfe79e26b..dc88aea255 100644 --- a/tests/Unit/inc/functions/rocketRrmdir.php +++ b/tests/Unit/inc/functions/rocketRrmdir.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\FilesystemTestCase; /** - * @covers ::rocket_rrmdir + * Test class covering ::rocket_rrmdir * @uses ::rocket_direct_filesystem * * @group Functions diff --git a/tests/Unit/inc/functions/rocketValidateCss.php b/tests/Unit/inc/functions/rocketValidateCss.php index 315f2dec79..b10b67f713 100644 --- a/tests/Unit/inc/functions/rocketValidateCss.php +++ b/tests/Unit/inc/functions/rocketValidateCss.php @@ -6,7 +6,7 @@ use WP_Rocket\Tests\Unit\TestCase; /** - * @covers ::rocket_validate_css + * Test class covering ::rocket_validate_css * * @group Functions * @group Formatting diff --git a/tests/Unit/inc/rocketGetConstant.php b/tests/Unit/inc/rocketGetConstant.php index ff38f81a5c..88d8d5053a 100644 --- a/tests/Unit/inc/rocketGetConstant.php +++ b/tests/Unit/inc/rocketGetConstant.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::rocket_has_constant + * Test class covering ::rocket_has_constant * @uses ::rocket_get_constant * @group Init * @group Constants diff --git a/tests/Unit/inc/rocketHasConstant.php b/tests/Unit/inc/rocketHasConstant.php index 9424959198..1a34177a67 100644 --- a/tests/Unit/inc/rocketHasConstant.php +++ b/tests/Unit/inc/rocketHasConstant.php @@ -6,7 +6,7 @@ use WPMedia\PHPUnit\Unit\TestCase; /** - * @covers ::rocket_has_constant + * Test class covering ::rocket_has_constant * @group Init * @group Constants */ From 6cdbb853d33dfe37afcccc0e7fc3e2754a197e3f Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Tue, 23 Apr 2024 12:39:22 +0200 Subject: [PATCH 106/167] escape url when saving lcp into the database and when putting the data into the page. --- inc/Engine/Media/AboveTheFold/AJAX/Controller.php | 4 ++-- inc/Engine/Media/AboveTheFold/Frontend/Controller.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index 20aeb05663..34d5e178e9 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -56,12 +56,12 @@ public function add_lcp_data() { // We should only get one LCP from the beacon. $lcp = (object) [ 'type' => 'img', - 'src' => $image->src, + 'src' => esc_url_raw( $image->src ), ]; } elseif ( 'above-the-fold' === $image->label ) { $viewport[] = (object) [ 'type' => 'img', - 'src' => $image->src, + 'src' => esc_url_raw( $image->src ), ]; } } diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index a113963ab2..c1744b99b8 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -250,11 +250,11 @@ private function generate_lcp_link_tag_with_sources( $lcp ): array { switch ( $lcp->type ) { case 'img': $sources[] = $lcp->src; - $tag .= $start_tag . 'href="' . $lcp->src . '"' . $end_tag; + $tag .= $start_tag . 'href="' . esc_url( $lcp->src ) . '"' . $end_tag; break; case 'img-srcset': $sources[] = $lcp->src; - $tag .= $start_tag . 'href="' . $lcp->src . '" imagesrcset="' . $lcp->srcset . '" imagesizes="' . $lcp->sizes . '"' . $end_tag; + $tag .= $start_tag . 'href="' . esc_url( $lcp->src ) . '" imagesrcset="' . $lcp->srcset . '" imagesizes="' . $lcp->sizes . '"' . $end_tag; break; case 'bg-img-set': foreach ( $lcp->bg_set as $set ) { From 1fe5e808a4f811ebed01e46d6d0eff39c504fdbc Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Tue, 23 Apr 2024 14:18:41 +0100 Subject: [PATCH 107/167] Remove rss feed links and rest api links from warm up links --- inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 7f463e3177..1d2372f3fb 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -120,10 +120,12 @@ function ( $link ) { $links ); + $reject_uri_pattern = get_rocket_cache_reject_uri(); + // Filter links. $links = array_filter( $links, - function ( $link ) use ( $home_url ) { + function ( $link ) use ( $home_url, $reject_uri_pattern ) { $link_host = wp_parse_url( $link ); $site_host = wp_parse_url( $home_url ); /** @@ -134,8 +136,9 @@ function ( $link ) use ( $home_url ) { $is_valid_url = wp_http_validate_url( $link ); $is_same_host = isset( $link_host['host'] ) ? $link_host['host'] === $site_host['host'] : false; $is_not_home = ! Utils::is_home( $link ); + $is_not_excluded_uri = ! (bool) preg_match( '#^(' . $reject_uri_pattern . ')$#i', $link ); - return $is_valid_url && $is_same_host && $is_not_home; + return $is_valid_url && $is_same_host && $is_not_home && $is_not_excluded_uri; } ); From 97f519c89db388b41c545936c77f5fc35294c459 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Tue, 23 Apr 2024 14:19:35 +0100 Subject: [PATCH 108/167] Updated tests --- .../WarmUp/Controller/fetchLinks.php | 28 +++++++++++++++++++ .../WarmUp/Controller/fetchLinks.php | 3 ++ 2 files changed, 31 insertions(+) diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php index 0a2211646e..688991bd83 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php @@ -7,6 +7,7 @@ $html_links_without_duplicate = 'Hello WorldAnother DayRich Dad Poor DadHello WorldAnother DayRich Dad Poor DadBuy (He came to set the captives free) - Rebecca Brown'; $html_links_with_relative_url = 'Hello WorldAnother DayRich Dad Poor DadBuy (He came to set the captives free) - Rebecca Brown'; $html_with_ten_links_and_home = 'Hello World 2Hello World 3Hello World 4Hello World 5Hello World 6Hello World 7Hello World 8Hello World 9Rich Dad Poor DadBuy (He came to set the captives free) - Rebecca BrownHome'; +$html_with_rss_feed_rest_api = 'RSS FeedRest APIHello World 4Hello World 5Hello World 6Hello World 7Hello World 8Hello World 9Rich Dad Poor DadBuy (He came to set the captives free) - Rebecca BrownHome'; return [ 'shouldReturnEmptyWhenLicenseExpired' => [ @@ -213,4 +214,31 @@ 'https://example.org', ], ], + 'shouldReturnLinksWithoutRSSAndRestAPILink' => [ + 'config' => [ + 'license_expired' => false, + 'headers' => [ + 'user-agent' => 'WP Rocket/Pre-fetch Home Links', + 'timeout' => 60, + ], + 'found_link' => true, + 'response' => [ + 'body' => $html_with_rss_feed_rest_api, + 'response' => [ + 'code' => 200, + ], + ], + ], + 'expected' => [ + 'https://example.org/hello-world-4', + 'https://example.org/hello-world-5', + 'https://example.org/hello-world-6', + 'https://example.org/hello-world-7', + 'https://example.org/hello-world-8', + 'https://example.org/hello-world-9', + 'https://example.org/rich-dad-poor-dad', + 'https://example.org/rebecca-brown-he-came-to-set-the-captives-free', + 'https://example.org', + ], + ], ]; diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php index 5f3d24e13e..1eaa4ddb09 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php @@ -66,6 +66,9 @@ public function testShouldReturnExpected( $config, $expected ) { ->andReturn( $config['response']['body'] ); } + $cache_reject_uri = '/(?:.+/)?feed(?:/(?:.+/?)?)?$|/(?:.+/)?embed/|/wc-api/v(.*)|/(index.php/)?(.*)wp-json(/.*|$)'; + Functions\when( 'get_rocket_cache_reject_uri' )->justReturn( $cache_reject_uri ); + if ( isset( $config['found_link'] ) && $config['found_link'] ) { $this->stubWpParseUrl(); From c846b0050c784780e12a1b32b785f724e0df28a4 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Tue, 23 Apr 2024 14:25:16 +0100 Subject: [PATCH 109/167] phpcs fix --- inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 1d2372f3fb..c43f391d3d 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -120,7 +120,7 @@ function ( $link ) { $links ); - $reject_uri_pattern = get_rocket_cache_reject_uri(); + $reject_uri_pattern = get_rocket_cache_reject_uri(); // Filter links. $links = array_filter( @@ -133,9 +133,9 @@ function ( $link ) use ( $home_url, $reject_uri_pattern ) { * Check that no external link. * Check that it's not home. */ - $is_valid_url = wp_http_validate_url( $link ); - $is_same_host = isset( $link_host['host'] ) ? $link_host['host'] === $site_host['host'] : false; - $is_not_home = ! Utils::is_home( $link ); + $is_valid_url = wp_http_validate_url( $link ); + $is_same_host = isset( $link_host['host'] ) ? $link_host['host'] === $site_host['host'] : false; + $is_not_home = ! Utils::is_home( $link ); $is_not_excluded_uri = ! (bool) preg_match( '#^(' . $reject_uri_pattern . ')$#i', $link ); return $is_valid_url && $is_same_host && $is_not_home && $is_not_excluded_uri; From e78014ff7b854b2194dbf772870b34437749ceee Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Tue, 23 Apr 2024 18:03:55 +0100 Subject: [PATCH 110/167] Add new method to handle image dimension :close: #6569 --- .../Common/JobManager/APIHandler/APIClient.php | 18 +++++++++++------- .../Media/AboveTheFold/WarmUp/Controller.php | 5 +++++ .../Media/AboveTheFold/WarmUp/Subscriber.php | 9 +++++++-- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/inc/Engine/Common/JobManager/APIHandler/APIClient.php b/inc/Engine/Common/JobManager/APIHandler/APIClient.php index 3e8f4e85b1..d15c9f9958 100644 --- a/inc/Engine/Common/JobManager/APIHandler/APIClient.php +++ b/inc/Engine/Common/JobManager/APIHandler/APIClient.php @@ -32,15 +32,19 @@ class APIClient extends AbstractAPIClient implements LoggerAwareInterface { * @return array */ public function add_to_queue( string $url, array $options ): array { + $url = add_query_arg( + [ + 'nowprocket' => 1, + 'no_optimize' => 1, + ], + user_trailingslashit( $url ) + ); + + $url = apply_filters( 'rocket_saas_api_queued_url', $url ); + $args = [ 'body' => [ - 'url' => add_query_arg( - [ - 'nowprocket' => 1, - 'no_optimize' => 1, - ], - user_trailingslashit( $url ) - ), + 'url' => $url, 'config' => $options, ], 'timeout' => 5, diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 7f463e3177..32107bd2d3 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -181,4 +181,9 @@ private function send_to_saas( $links ) { usleep( $delay_between ); } } + + public function add_wpr_imagedimensions_query_arg() + { + + } } diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php b/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php index c80f838676..23f3e24820 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php @@ -29,8 +29,9 @@ public function __construct( Controller $controller ) { */ public static function get_subscribed_events(): array { return [ - 'wp_rocket_upgrade' => [ 'warm_up_on_update', 10, 2 ], - 'rocket_after_clear_atf' => 'warm_up', + 'wp_rocket_upgrade' => [ 'warm_up_on_update', 10, 2 ], + 'rocket_after_clear_atf' => 'warm_up', + 'rocket_saas_api_queued_url' => 'add_wpr_imagedimensions_query_arg' ]; } @@ -57,4 +58,8 @@ public function warm_up_on_update( $new_version, $old_version ) { } $this->controller->warm_up(); } + + public function add_wpr_imagedimensions_query_arg() { + return $this->controller->add_wpr_imagedimensions_query_arg(); + } } From b13ad6ef15892914c705557125b51b7ddeb23801 Mon Sep 17 00:00:00 2001 From: Michael Lee <38788055+jeawhanlee@users.noreply.github.com> Date: Tue, 23 Apr 2024 18:58:47 +0100 Subject: [PATCH 111/167] Updated test data to cover scenario (#6585) --- .../WarmUp/Controller/fetchLinks.php | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php index 0a2211646e..817a11076c 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php @@ -7,6 +7,7 @@ $html_links_without_duplicate = 'Hello WorldAnother DayRich Dad Poor DadHello WorldAnother DayRich Dad Poor DadBuy (He came to set the captives free) - Rebecca Brown'; $html_links_with_relative_url = 'Hello WorldAnother DayRich Dad Poor DadBuy (He came to set the captives free) - Rebecca Brown'; $html_with_ten_links_and_home = 'Hello World 2Hello World 3Hello World 4Hello World 5Hello World 6Hello World 7Hello World 8Hello World 9Rich Dad Poor DadBuy (He came to set the captives free) - Rebecca BrownHome'; +$html_with_external_links_before_internal = ''; return [ 'shouldReturnEmptyWhenLicenseExpired' => [ @@ -213,4 +214,33 @@ 'https://example.org', ], ], -]; + 'shouldReturnTenLinksWithExternalLinksBeforeInternal' => [ + 'config' => [ + 'license_expired' => false, + 'headers' => [ + 'user-agent' => 'WP Rocket/Pre-fetch Home Links', + 'timeout' => 60, + ], + 'found_link' => true, + 'response' => [ + 'body' => $html_with_external_links_before_internal, + 'response' => [ + 'code' => 200, + ], + ], + ], + 'expected' => [ + 'https://example.org/delay-js-script-add-to-any', + 'https://example.org/accordion-toggle', + 'https://example.org/cover-galleries', + 'https://example.org/countdown-timer', + 'https://example.org/cover-galleries-2', + 'https://example.org/cover-galleries-3', + 'https://example.org/cover-galleries-4', + 'https://example.org/cover-galleries-5', + 'https://example.org/cover-galleries-6', + 'https://example.org/cover-galleries-7', + 'https://example.org', + ], + ], +]; \ No newline at end of file From 3d450797e9b6615cfd65c38b8b07b8766e466b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Tue, 23 Apr 2024 16:07:12 -0400 Subject: [PATCH 112/167] fix typo --- inc/Engine/Saas/Admin/AdminBar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Saas/Admin/AdminBar.php b/inc/Engine/Saas/Admin/AdminBar.php index 4305816fc1..cc513e67e2 100644 --- a/inc/Engine/Saas/Admin/AdminBar.php +++ b/inc/Engine/Saas/Admin/AdminBar.php @@ -166,7 +166,7 @@ public function add_clean_url_menu_item( WP_Admin_Bar $wp_admin_bar ) { $wp_admin_bar->add_menu( [ 'parent' => 'wp-rocket', - 'id' => 'clear-saaas-url', + 'id' => 'clear-saas-url', 'title' => $title, 'href' => wp_nonce_url( admin_url( 'admin-post.php?action=' . $action . $referer ), $action ), ] From 8e2ba0a88d65ea967be78704bd8dd7b8a7d7c81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Tue, 23 Apr 2024 16:07:26 -0400 Subject: [PATCH 113/167] add unit tests for add_clean_url_menu_item --- .../Admin/AdminBar/addCleanUrlMenuItem.php | 94 ++++++++++++++++++ .../Admin/AdminBar/addCleanUrlMenuItem.php | 99 +++++++++++++++++++ 2 files changed, 193 insertions(+) create mode 100644 tests/Fixtures/inc/Engine/Saas/Admin/AdminBar/addCleanUrlMenuItem.php create mode 100644 tests/Unit/inc/Engine/Saas/Admin/AdminBar/addCleanUrlMenuItem.php diff --git a/tests/Fixtures/inc/Engine/Saas/Admin/AdminBar/addCleanUrlMenuItem.php b/tests/Fixtures/inc/Engine/Saas/Admin/AdminBar/addCleanUrlMenuItem.php new file mode 100644 index 0000000000..985a06b1a3 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Saas/Admin/AdminBar/addCleanUrlMenuItem.php @@ -0,0 +1,94 @@ + [ + 'config' => [ + 'environment' => 'local', + 'is_admin' => false, + 'post' => (object) [ + 'post_type' => 'post', + 'post_status' => 'publish', + ], + 'can_display_options' => true, + 'atf_context' => true, + 'rucss_context' => true, + ], + 'expected' => null, + ], + 'testShouldReturnNullWhenAdmin' => [ + 'config' => [ + 'environment' => 'production', + 'is_admin' => true, + 'post' => (object) [ + 'post_type' => 'post', + 'post_status' => 'publish', + ], + 'can_display_options' => true, + 'atf_context' => true, + 'rucss_context' => true, + ], + 'expected' => null, + ], + 'testShouldReturnNullWhenOptionsNotDisplayed' => [ + 'config' => [ + 'environment' => 'production', + 'is_admin' => false, + 'post' => (object) [ + 'post_type' => 'post', + 'post_status' => 'draft', + ], + 'can_display_options' => false, + 'atf_context' => true, + 'rucss_context' => true, + ], + 'expected' => null, + ], + 'testShouldReturnNullWhenNotAllowed' => [ + 'config' => [ + 'environment' => 'production', + 'is_admin' => false, + 'post' => (object) [ + 'post_type' => 'post', + 'post_status' => 'publish', + ], + 'can_display_options' => true, + 'atf_context' => false, + 'rucss_context' => false, + ], + 'expected' => null, + ], + 'testShouldAddItemWithDefaultTitle' => [ + 'config' => [ + 'environment' => 'production', + 'is_admin' => false, + 'post' => (object) [ + 'post_type' => 'post', + 'post_status' => 'publish', + ], + 'can_display_options' => true, + 'atf_context' => true, + 'rucss_context' => false, + ], + 'expected' => [ + 'id' => 'clear-saas-url', + 'title' => 'Clear Critical Images of this URL', + ], + ], + 'testShouldAddItemWithRUCSSTitle' => [ + 'config' => [ + 'environment' => 'production', + 'is_admin' => false, + 'post' => (object) [ + 'post_type' => 'post', + 'post_status' => 'publish', + ], + 'can_display_options' => true, + 'atf_context' => true, + 'rucss_context' => true, + ], + 'expected' => [ + 'id' => 'clear-saas-url', + 'title' => 'Clear Used CSS of this URL', + ], + ], +]; diff --git a/tests/Unit/inc/Engine/Saas/Admin/AdminBar/addCleanUrlMenuItem.php b/tests/Unit/inc/Engine/Saas/Admin/AdminBar/addCleanUrlMenuItem.php new file mode 100644 index 0000000000..557e1f39dc --- /dev/null +++ b/tests/Unit/inc/Engine/Saas/Admin/AdminBar/addCleanUrlMenuItem.php @@ -0,0 +1,99 @@ +options = Mockery::mock( Options_Data::class ); + $this->atf_context = Mockery::mock( ContextInterface::class ); + $this->rucss_url_context = Mockery::mock( ContextInterface::class ); + $this->admin_bar = new AdminBar( $this->options, $this->atf_context, $this->rucss_url_context, '' ); + $this->wp_admin_bar = new WP_Admin_Bar(); + + $this->stubTranslationFunctions(); + } + + protected function tearDown(): void { + unset( $GLOBALS['post'] ); + + parent::tearDown(); + } + + /** + * @dataProvider configTestData + */ + public function testShouldDoExpected( $config, $expected ) { + Functions\when( 'wp_get_environment_type' ) + ->justReturn( $config['environment'] ); + Functions\when( 'is_admin' ) + ->justReturn( $config['is_admin'] ); + + $GLOBALS['post'] = $config['post']; + + Functions\when( 'rocket_can_display_options' ) + ->justReturn( $config['can_display_options'] ); + + $this->atf_context->shouldReceive( 'is_allowed' ) + ->andReturn( $config['atf_context'] ); + + $this->rucss_url_context->shouldReceive( 'is_allowed' ) + ->andReturn( $config['rucss_context'] ); + + Functions\when( 'wp_nonce_url' )->alias( + function ( $url ) { + return str_replace( '&', '&', "{$url}&_wpnonce=123456" ); + } + ); + + Functions\when( 'admin_url' )->alias( + function ( $path ) { + return "http://example.org/wp-admin/{$path}"; + } + ); + + $this->admin_bar->add_clean_url_menu_item( $this->wp_admin_bar ); + + $node = $this->wp_admin_bar->get_node( 'clear-saas-url' ); + + if ( null === $expected ) { + $this->assertNull( $node ); + return; + } + + $this->assertSame( + $expected['id'], + $node->id + ); + + $this->assertSame( + $expected['title'], + $node->title + ); + } +} From 66efbf9e4fcf25ff7e3c3668267c7621892e69bf Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Wed, 24 Apr 2024 11:37:05 +0200 Subject: [PATCH 114/167] stub esc functions --- .../Media/AboveTheFold/Frontend/Controller/addExclusions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php b/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php index 0c4a767168..fbb5f97b14 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/Frontend/Controller/addExclusions.php @@ -46,6 +46,8 @@ protected function tearDown(): void { * @dataProvider configTestData */ public function testShouldReturnExpected( $config, $exclusions, $expected ) { + $this->stubEscapeFunctions(); + $this->context->shouldReceive( 'is_allowed' ) ->atMost() ->once() From 3db779b766dfccd695026f7ae6ad75af2989010a Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Wed, 24 Apr 2024 11:36:21 +0100 Subject: [PATCH 115/167] Removed treeshake parameter and inidicate start and end process on log --- inc/Engine/Common/JobManager/JobProcessor.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/Engine/Common/JobManager/JobProcessor.php b/inc/Engine/Common/JobManager/JobProcessor.php index 3f6faade30..b21166f880 100644 --- a/inc/Engine/Common/JobManager/JobProcessor.php +++ b/inc/Engine/Common/JobManager/JobProcessor.php @@ -206,6 +206,8 @@ public function check_job_status( string $url, bool $is_mobile, string $optimiza * @return void */ public function process_on_submit_jobs() { + $this->logger::debug( 'Start processing on submit jobs for adding jobs to queue.' ); + /** * Fires at the start of the process on submit jobs. * @@ -264,6 +266,7 @@ public function process_on_submit_jobs() { ); } + $this->logger::debug( 'End processing on submit jobs for adding jobs to queue.' ); /** * Fires at the end of the process pending jobs. * @@ -282,7 +285,6 @@ public function process_on_submit_jobs() { */ protected function send_api( string $url, bool $is_mobile, string $optimization_type ) { $config = [ - 'treeshake' => 1, 'is_mobile' => $is_mobile, 'is_home' => Utils::is_home( $url ), ]; From a4020985584bc5d88f762745e61a8022a3db2748 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Wed, 24 Apr 2024 11:43:16 +0100 Subject: [PATCH 116/167] Updated tests --- .../Engine/Common/JobManager/APIHandler/APIClient/optimize.php | 3 --- .../Engine/Optimization/RUCSS/Controller/UsedCSS/treeshake.php | 1 - 2 files changed, 4 deletions(-) diff --git a/tests/Fixtures/inc/Engine/Common/JobManager/APIHandler/APIClient/optimize.php b/tests/Fixtures/inc/Engine/Common/JobManager/APIHandler/APIClient/optimize.php index 4a4ce2f82c..a7910026e8 100644 --- a/tests/Fixtures/inc/Engine/Common/JobManager/APIHandler/APIClient/optimize.php +++ b/tests/Fixtures/inc/Engine/Common/JobManager/APIHandler/APIClient/optimize.php @@ -7,7 +7,6 @@ 'html' => 'some html', 'url' => 'http://example.com/path/to/style.css', 'options' => [ - 'treeshake' => 1, 'wpr_email' => 'rocketeer@wp-rocket.me', 'wpr_key' => 'SuperSecretRocketeerKey', 'rucss_safelist' => [ 'http://example.com/my/safe/css.css' ], @@ -52,7 +51,6 @@ 'html' => 'some html', 'url' => 'http://example.com/path/to/style.css', 'options' => [ - 'treeshake' => 1, 'wpr_email' => 'rocketeer@wp-rocket.me', 'wpr_key' => 'SuperSecretRocketeerKey', 'rucss_safelist' => [ 'http://example.com/my/safe/css.css' ], @@ -93,7 +91,6 @@ 'html' => 'some html', 'url' => 'http://example.com/path/to/style.css', 'options' => [ - 'treeshake' => 1, 'wpr_email' => 'rocketeer@wp-rocket.me', 'wpr_key' => 'SuperSecretRocketeerKey', 'rucss_safelist' => [ 'http://example.com/my/safe/css.css' ], diff --git a/tests/Fixtures/inc/Engine/Optimization/RUCSS/Controller/UsedCSS/treeshake.php b/tests/Fixtures/inc/Engine/Optimization/RUCSS/Controller/UsedCSS/treeshake.php index 2c97586d38..95f7bc4b93 100644 --- a/tests/Fixtures/inc/Engine/Optimization/RUCSS/Controller/UsedCSS/treeshake.php +++ b/tests/Fixtures/inc/Engine/Optimization/RUCSS/Controller/UsedCSS/treeshake.php @@ -28,7 +28,6 @@ 'safelist' => [], 'skipped_attr' => [], 'config' => [ - 'treeshake' => 1, 'rucss_safelist' => [], 'skip_attr' => [], 'is_mobile' => false, From aee078d1314ee0432be9705adbec46d8c24ceb00 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Wed, 24 Apr 2024 11:53:14 +0100 Subject: [PATCH 117/167] phpcs fix --- inc/Engine/Common/JobManager/JobProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Common/JobManager/JobProcessor.php b/inc/Engine/Common/JobManager/JobProcessor.php index b21166f880..02eabf23e0 100644 --- a/inc/Engine/Common/JobManager/JobProcessor.php +++ b/inc/Engine/Common/JobManager/JobProcessor.php @@ -207,7 +207,7 @@ public function check_job_status( string $url, bool $is_mobile, string $optimiza */ public function process_on_submit_jobs() { $this->logger::debug( 'Start processing on submit jobs for adding jobs to queue.' ); - + /** * Fires at the start of the process on submit jobs. * From 5ffdbb24b68e595f4449edb430b1bb9678813daf Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Wed, 24 Apr 2024 12:17:03 +0100 Subject: [PATCH 118/167] add error log --- inc/Engine/Common/JobManager/APIHandler/APIClient.php | 1 + inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/Engine/Common/JobManager/APIHandler/APIClient.php b/inc/Engine/Common/JobManager/APIHandler/APIClient.php index d15c9f9958..6c1a987b1b 100644 --- a/inc/Engine/Common/JobManager/APIHandler/APIClient.php +++ b/inc/Engine/Common/JobManager/APIHandler/APIClient.php @@ -39,6 +39,7 @@ public function add_to_queue( string $url, array $options ): array { ], user_trailingslashit( $url ) ); + error_log( 'url' . print_r($url, true)); $url = apply_filters( 'rocket_saas_api_queued_url', $url ); diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 32107bd2d3..1346ffb6e8 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -184,6 +184,6 @@ private function send_to_saas( $links ) { public function add_wpr_imagedimensions_query_arg() { - + error_log('filter option here'); } } From ddb54f0904b67072b16d7dd2ee3209964d4f52c8 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Wed, 24 Apr 2024 12:42:47 +0100 Subject: [PATCH 119/167] add filter for image dimension --- inc/Engine/Common/JobManager/APIHandler/APIClient.php | 3 +-- inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/inc/Engine/Common/JobManager/APIHandler/APIClient.php b/inc/Engine/Common/JobManager/APIHandler/APIClient.php index 6c1a987b1b..2c6f586794 100644 --- a/inc/Engine/Common/JobManager/APIHandler/APIClient.php +++ b/inc/Engine/Common/JobManager/APIHandler/APIClient.php @@ -39,10 +39,9 @@ public function add_to_queue( string $url, array $options ): array { ], user_trailingslashit( $url ) ); - error_log( 'url' . print_r($url, true)); $url = apply_filters( 'rocket_saas_api_queued_url', $url ); - + error_log( 'url' . print_r($url, true)); $args = [ 'body' => [ 'url' => $url, diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 1346ffb6e8..81e1f75c4f 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -182,8 +182,13 @@ private function send_to_saas( $links ) { } } - public function add_wpr_imagedimensions_query_arg() + public function add_wpr_imagedimensions_query_arg(): string { - error_log('filter option here'); + return add_query_arg( + [ + 'wpr_imagedimensions' => 1, + 'test_parameter' => 1 + ], + ); } } From 0f815b72940548c1b63d8950d943337dfbb02170 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Wed, 24 Apr 2024 13:05:32 +0100 Subject: [PATCH 120/167] Add context check for imagedimension method --- inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 81e1f75c4f..2b8c0c73f4 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -184,10 +184,14 @@ private function send_to_saas( $links ) { public function add_wpr_imagedimensions_query_arg(): string { + if ( ! $this->context->is_allowed() ) { + return ''; + } + + error_log( 'log here before adding arg'); return add_query_arg( [ 'wpr_imagedimensions' => 1, - 'test_parameter' => 1 ], ); } From 707a402ae00f38f37d84cc41a5cc897323f7d8b6 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Wed, 24 Apr 2024 14:09:44 +0100 Subject: [PATCH 121/167] Fixed lint, remove test data --- .../Common/JobManager/APIHandler/APIClient.php | 2 +- inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 9 ++++++--- inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php | 13 +++++++++---- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/inc/Engine/Common/JobManager/APIHandler/APIClient.php b/inc/Engine/Common/JobManager/APIHandler/APIClient.php index 2c6f586794..d15c9f9958 100644 --- a/inc/Engine/Common/JobManager/APIHandler/APIClient.php +++ b/inc/Engine/Common/JobManager/APIHandler/APIClient.php @@ -41,7 +41,7 @@ public function add_to_queue( string $url, array $options ): array { ); $url = apply_filters( 'rocket_saas_api_queued_url', $url ); - error_log( 'url' . print_r($url, true)); + $args = [ 'body' => [ 'url' => $url, diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 2b8c0c73f4..eddb908a5e 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -182,13 +182,16 @@ private function send_to_saas( $links ) { } } - public function add_wpr_imagedimensions_query_arg(): string - { + /** + * Add wpr_imagedimensions to URL query + * + * @return string + */ + public function add_wpr_imagedimensions_query_arg(): string { if ( ! $this->context->is_allowed() ) { return ''; } - error_log( 'log here before adding arg'); return add_query_arg( [ 'wpr_imagedimensions' => 1, diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php b/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php index 23f3e24820..6995d85461 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php @@ -29,9 +29,9 @@ public function __construct( Controller $controller ) { */ public static function get_subscribed_events(): array { return [ - 'wp_rocket_upgrade' => [ 'warm_up_on_update', 10, 2 ], - 'rocket_after_clear_atf' => 'warm_up', - 'rocket_saas_api_queued_url' => 'add_wpr_imagedimensions_query_arg' + 'wp_rocket_upgrade' => [ 'warm_up_on_update', 10, 2 ], + 'rocket_after_clear_atf' => 'warm_up', + 'rocket_saas_api_queued_url' => 'add_wpr_imagedimensions_query_arg', ]; } @@ -59,7 +59,12 @@ public function warm_up_on_update( $new_version, $old_version ) { $this->controller->warm_up(); } - public function add_wpr_imagedimensions_query_arg() { + /** + * Add image dimensions query parameter to URL. + * + * @return string + */ + public function add_wpr_imagedimensions_query_arg(): string { return $this->controller->add_wpr_imagedimensions_query_arg(); } } From 063c7d90d43d3b5a36bfb6912436a9f433a807de Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Wed, 24 Apr 2024 18:56:23 +0100 Subject: [PATCH 122/167] Add test --- .../addWPRImageDimensionQueryArg.php | 16 ++++++ .../addWPRImageDimensionQueryArg.php | 52 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php create mode 100644 tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php new file mode 100644 index 0000000000..4771cef875 --- /dev/null +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php @@ -0,0 +1,16 @@ + [ + 'config' => [ + 'filter' => false, + ], + 'expected' => "", + ], + 'testShoulDoReturnArgument' => [ + 'config' => [ + 'filter' => true, + ], + 'expected' => "/?wpr_imagedimensions=1", + ], +]; diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php new file mode 100644 index 0000000000..d5f051af87 --- /dev/null +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php @@ -0,0 +1,52 @@ +context = Mockery::mock( ContextInterface::class ); + $options = Mockery::mock( Options_Data::class ); + $api_client = Mockery::mock( APIClient::class ); + $this->user = Mockery::mock( User::class ); + $this->controller = new Controller( $this->context, $options, $api_client, $this->user ); + } + + /** + * @dataProvider configTestData + */ + public function testShouldReturnExpected( $config, $expected ) { + $this->context->shouldReceive( 'is_allowed' ) + ->atMost() + ->once() + ->andReturn( $config['filter'] ); + + Functions\expect('add_query_arg')->with([ 'wpr_imagedimensions' => 1 ])->andReturn($expected); + + $this->assertSame( + $expected, + $this->controller->add_wpr_imagedimensions_query_arg() + ); + } + +} From 172c5bab0b5929dd8a2e91d447f0c3369e644bfe Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Wed, 24 Apr 2024 23:36:29 +0100 Subject: [PATCH 123/167] Updated REGEX --- inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index c43f391d3d..c43e170095 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -136,7 +136,7 @@ function ( $link ) use ( $home_url, $reject_uri_pattern ) { $is_valid_url = wp_http_validate_url( $link ); $is_same_host = isset( $link_host['host'] ) ? $link_host['host'] === $site_host['host'] : false; $is_not_home = ! Utils::is_home( $link ); - $is_not_excluded_uri = ! (bool) preg_match( '#^(' . $reject_uri_pattern . ')$#i', $link ); + $is_not_excluded_uri = ! (bool) preg_match( '#' . $reject_uri_pattern . '#i', $link ); return $is_valid_url && $is_same_host && $is_not_home && $is_not_excluded_uri; } From 87146827223cfa586f6afd896a7b1fec9f9bd7a2 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Wed, 24 Apr 2024 23:36:58 +0100 Subject: [PATCH 124/167] Updated test data --- .../Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php index 688991bd83..ca6cfd7d00 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php @@ -7,7 +7,7 @@ $html_links_without_duplicate = 'Hello WorldAnother DayRich Dad Poor DadHello WorldAnother DayRich Dad Poor DadBuy (He came to set the captives free) - Rebecca Brown'; $html_links_with_relative_url = 'Hello WorldAnother DayRich Dad Poor DadBuy (He came to set the captives free) - Rebecca Brown'; $html_with_ten_links_and_home = 'Hello World 2Hello World 3Hello World 4Hello World 5Hello World 6Hello World 7Hello World 8Hello World 9Rich Dad Poor DadBuy (He came to set the captives free) - Rebecca BrownHome'; -$html_with_rss_feed_rest_api = 'RSS FeedRest APIHello World 4Hello World 5Hello World 6Hello World 7Hello World 8Hello World 9Rich Dad Poor DadBuy (He came to set the captives free) - Rebecca BrownHome'; +$html_with_rss_feed_rest_api = 'RSS FeedRest APIHello World 4Hello World 5Hello World 6Hello World 7Hello World 8Hello World 9Rich Dad Poor DadBuy (He came to set the captives free) - Rebecca BrownHome'; return [ 'shouldReturnEmptyWhenLicenseExpired' => [ From b174327e0688b4112697702855636288c94b3b58 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 04:19:30 +0200 Subject: [PATCH 125/167] Update lcp-beacon.min.js --- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index e9c7dd776a..69ee8df1f0 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:c(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function c(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo);t?o=[{...t.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),e.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=c(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,o)&&o.push({...e,label:\"above-the-fold\"})});t=JSON.stringify(o);window.performance_images_json=t;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const r=new FormData;r.append(\"action\",\"rocket_lcp\"),r.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),r.append(\"url\",rocket_lcp_data.url),r.append(\"is_mobile\",rocket_lcp_data.is_mobile),r.append(\"images\",t),r.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:r}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(i,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(i,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append(\"action\",\"rocket_lcp\"),o.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),o.append(\"url\",rocket_lcp_data.url),o.append(\"is_mobile\",rocket_lcp_data.is_mobile),o.append(\"images\",r),o.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index cc53d770e6..b8313af89b 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:c(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function c(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo);t?o=[{...t.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),e.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=c(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,o)&&o.push({...e,label:"above-the-fold"})});t=JSON.stringify(o);window.performance_images_json=t;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const r=new FormData;r.append("action","rocket_lcp"),r.append("rocket_lcp_nonce",rocket_lcp_data.nonce),r.append("url",rocket_lcp_data.url),r.append("is_mobile",rocket_lcp_data.is_mobile),r.append("images",t),r.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:r}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}"loading"!==document.readyState?(console.time("extract"),setTimeout(i,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(i,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:"above-the-fold"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append("action","rocket_lcp"),o.append("rocket_lcp_nonce",rocket_lcp_data.nonce),o.append("url",rocket_lcp_data.url),o.append("is_mobile",rocket_lcp_data.is_mobile),o.append("images",r),o.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From bad9d46c97731367ebd9774df1dc79e12c793aa9 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 04:22:21 +0200 Subject: [PATCH 126/167] Fix linter --- .../Media/AboveTheFold/Frontend/Controller.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 9326f99f77..0a7bed1a8f 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -372,13 +372,13 @@ public function inject_beacon( $html, $url, $is_mobile ): string { $height_threshold = apply_filters( 'rocket_lcp_height_threshold', ( $is_mobile ? 830 : 1080 ), $is_mobile, $url ); $data = [ - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'nonce' => wp_create_nonce( 'rocket_lcp' ), - 'url' => $url, - 'is_mobile' => $is_mobile, - 'elements' => $this->lcp_atf_elements(), - 'width_threshold' => $width_threshold, - 'height_threshold' => $height_threshold, + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'nonce' => wp_create_nonce( 'rocket_lcp' ), + 'url' => $url, + 'is_mobile' => $is_mobile, + 'elements' => $this->lcp_atf_elements(), + 'width_threshold' => $width_threshold, + 'height_threshold' => $height_threshold, ]; $inline_script = ''; From d7836388ec00cf3a421be9e2bdef545ba819a8a3 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 05:13:58 +0200 Subject: [PATCH 127/167] Fix linter --- inc/functions/htaccess.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/functions/htaccess.php b/inc/functions/htaccess.php index cc502c0370..79953e4f49 100755 --- a/inc/functions/htaccess.php +++ b/inc/functions/htaccess.php @@ -38,11 +38,11 @@ function flush_rocket_htaccess( $remove_rules = false ) { // phpcs:ignore WordPr } if ( ! file_exists( $filename ) ) { - if ( ! is_writable( dirname( $filename ) ) ) { + if ( ! is_writable( dirname( $filename ) ) ) { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_is_writable return false; } - if ( ! touch( $filename ) ) { + if ( ! touch( $filename ) ) { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_touch return false; } @@ -50,9 +50,9 @@ function flush_rocket_htaccess( $remove_rules = false ) { // phpcs:ignore WordPr $perms = fileperms( $filename ); if ( $perms ) { - chmod( $filename, $perms | 0644 ); + chmod( $filename, $perms | 0644 ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_chmod } - } elseif ( ! is_writable( $filename ) ) { + } elseif ( ! is_writable( $filename ) ) { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_is_writable return false; } @@ -63,7 +63,7 @@ function flush_rocket_htaccess( $remove_rules = false ) { // phpcs:ignore WordPr $start_marker = '# BEGIN WP Rocket'; $end_marker = '# END WP Rocket'; - $pointer = fopen( $filename, 'r+' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fopen + $pointer = fopen( $filename, 'r+' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fopen if ( ! $pointer ) { return false; @@ -106,7 +106,7 @@ function flush_rocket_htaccess( $remove_rules = false ) { // phpcs:ignore WordPr // Check to see if there was a change. if ( $existing_lines === $insertion ) { flock( $pointer, LOCK_UN ); - fclose( $pointer ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose + fclose( $pointer ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose return true; } @@ -148,7 +148,7 @@ function flush_rocket_htaccess( $remove_rules = false ) { // phpcs:ignore WordPr // Write to the start of the file, and truncate it to that length. fseek( $pointer, 0 ); - $bytes = fwrite( $pointer, $new_file_data ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fwrite + $bytes = fwrite( $pointer, $new_file_data ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fwrite if ( $bytes ) { ftruncate( $pointer, ftell( $pointer ) ); @@ -156,7 +156,7 @@ function flush_rocket_htaccess( $remove_rules = false ) { // phpcs:ignore WordPr fflush( $pointer ); flock( $pointer, LOCK_UN ); - fclose( $pointer ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose + fclose( $pointer ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose return (bool) $bytes; } From 60405622266450bb217ebf226d41445a914c1a3b Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 06:58:53 +0200 Subject: [PATCH 128/167] Fix bail out --- assets/js/lcp-beacon.js | 5 +++-- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index 56122c9e05..5216ade11f 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -160,13 +160,13 @@ function main() { data_check.append('url', rocket_lcp_data.url); data_check.append('is_mobile', rocket_lcp_data.is_mobile); - const response = fetch(rocket_lcp_data.ajax_url, { + const lcp_data_response = fetch(rocket_lcp_data.ajax_url, { method: "POST", credentials: 'same-origin', body: data_check }); - if ( true === lcp_data.success ) { + if ( true === lcp_data_response.success ) { console.log('Bailing out because data is already available'); return; } @@ -174,6 +174,7 @@ function main() { // Check screen size const screenWidth = window.innerWidth || document.documentElement.clientWidth; const screenHeight = window.innerHeight || document.documentElement.clientHeight; + if ( ( rocket_lcp_data.is_mobile && ( screenWidth > rocket_lcp_data.width_threshold || screenHeight > rocket_lcp_data.height_threshold ) ) || ( ! rocket_lcp_data.is_mobile && ( screenWidth < rocket_lcp_data.width_threshold || screenHeight < rocket_lcp_data.height_threshold ) ) ) { diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 69ee8df1f0..920b8f7659 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append(\"action\",\"rocket_lcp\"),o.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),o.append(\"url\",rocket_lcp_data.url),o.append(\"is_mobile\",rocket_lcp_data.is_mobile),o.append(\"images\",r),o.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append(\"action\",\"rocket_lcp\"),o.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),o.append(\"url\",rocket_lcp_data.url),o.append(\"is_mobile\",rocket_lcp_data.is_mobile),o.append(\"images\",r),o.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index b8313af89b..f62aa2ac27 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:"above-the-fold"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append("action","rocket_lcp"),o.append("rocket_lcp_nonce",rocket_lcp_data.nonce),o.append("url",rocket_lcp_data.url),o.append("is_mobile",rocket_lcp_data.is_mobile),o.append("images",r),o.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:"above-the-fold"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append("action","rocket_lcp"),o.append("rocket_lcp_nonce",rocket_lcp_data.nonce),o.append("url",rocket_lcp_data.url),o.append("is_mobile",rocket_lcp_data.is_mobile),o.append("images",r),o.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From 6748e41e2c52f45ff5d6e632a8ad4206b3d5eca6 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Thu, 25 Apr 2024 10:01:13 +0100 Subject: [PATCH 129/167] fixed integration test typo --- .../inc/Engine/Optimization/Minify/JS/Subscriber/process.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php index e8c9dbd81a..25143cb8b5 100644 --- a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php @@ -288,8 +288,8 @@ - - + + ', 'files' => [ From 9a7ff946e9a47950e1193e229eacb885e61154df Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Thu, 25 Apr 2024 11:05:11 +0100 Subject: [PATCH 130/167] Use reject uri pattern directly for cases when helper function is used --- inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index 64d5d60742..ec926d2ef3 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -120,7 +120,7 @@ function ( $link ) { $links ); - $reject_uri_pattern = get_rocket_cache_reject_uri(); + $reject_uri_pattern = '/(?:.+/)?feed(?:/(?:.+/?)?)?$|/(?:.+/)?embed/|/wc-api/v(.*)|/(index.php/)?(.*)wp-json(/.*|$)'; // Filter links. $links = array_filter( From bb87e92407beff28743bd73ec8226d75af81ae33 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Thu, 25 Apr 2024 11:05:30 +0100 Subject: [PATCH 131/167] Updated test --- .../Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php index 905d56558f..ffa443d705 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/fetchLinks.php @@ -66,9 +66,6 @@ public function testShouldReturnExpected( $config, $expected ) { ->andReturn( $config['response']['body'] ); } - $cache_reject_uri = '/(?:.+/)?feed(?:/(?:.+/?)?)?$|/(?:.+/)?embed/|/wc-api/v(.*)|/(index.php/)?(.*)wp-json(/.*|$)'; - Functions\when( 'get_rocket_cache_reject_uri' )->justReturn( $cache_reject_uri ); - if ( isset( $config['found_link'] ) && $config['found_link'] ) { $this->stubWpParseUrl(); From cb0e327cf89ebaed553cba04e8bdb87611751c9d Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Thu, 25 Apr 2024 13:13:27 +0200 Subject: [PATCH 132/167] add some unit tests and limit the atf image numbers --- .../Media/AboveTheFold/AJAX/Controller.php | 18 ++- .../AJAX/Controller/addLcpData.php | 111 ++++++++++++++++++ .../AJAX/Controller/addLcpData.php | 28 +++-- 3 files changed, 148 insertions(+), 9 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index 34d5e178e9..c44f641aa8 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -47,10 +47,22 @@ public function add_lcp_data() { $url = isset( $_POST['url'] ) ? untrailingslashit( esc_url_raw( wp_unslash( $_POST['url'] ) ) ) : ''; $is_mobile = isset( $_POST['is_mobile'] ) ? filter_var( wp_unslash( $_POST['is_mobile'] ), FILTER_VALIDATE_BOOLEAN ) : false; - $images = isset( $_POST['images'] ) ? json_decode( sanitize_text_field( wp_unslash( $_POST['images'] ) ) ) : ''; + $images = isset( $_POST['images'] ) ? json_decode( sanitize_text_field( wp_unslash( $_POST['images'] ) ) ) : []; $lcp = 'not found'; $viewport = []; + /** + * Filters the maximum number of ATF images being saved into the database. + * + * @param int $max_number Maximum number to allow. + * @param string $url Current page url. + * @param string[]|array $images Current list of ATF images. + */ + $max_atf_images_number = (int) apply_filters( 'rocket_atf_images_number', 20, $url, $images ); + if ( 0 >= $max_atf_images_number ) { + $max_atf_images_number = 1; + } + foreach ( $images as $image ) { if ( 'lcp' === $image->label && 'not found' === $lcp ) { // We should only get one LCP from the beacon. @@ -59,10 +71,14 @@ public function add_lcp_data() { 'src' => esc_url_raw( $image->src ), ]; } elseif ( 'above-the-fold' === $image->label ) { + if ( 0 === $max_atf_images_number ) { + continue; + } $viewport[] = (object) [ 'type' => 'img', 'src' => esc_url_raw( $image->src ), ]; + $max_atf_images_number--; } } diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php index c6b34efb89..c29b97e08b 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php @@ -1,5 +1,28 @@ 'lcp', + 'src' => 'http://example.org/lcp.jpg', + ], +]; +$long_array_2 = [ + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/lcp.jpg', + ], +]; +for ( $i = 1; $i <= 50; $i++ ) { + $long_array[] = (object) [ + 'label' => 'above-the-fold', + 'src' => 'http://example.org/above-the-fold-' . $i . '.jpg', + ]; + $long_array_2[] = (object) [ + 'type' => 'img', + 'src' => 'http://example.org/above-the-fold-' . $i . '.jpg', + ]; +} + return [ 'testShouldBailWhenNotAllowed' => [ 'config' => [ @@ -180,4 +203,92 @@ ], ], ], + 'testShouldSanitizeLCPAndATF' => [ + 'config' => [ + 'filter' => true, + 'url' => 'http://example.org', + 'is_mobile' => false, + 'images' => json_encode( + [ + (object) [ + 'label' => 'lcp', + 'src' => 'http://example.org/lcp.jpg', + ], + (object) [ + 'label' => 'above-the-fold', + 'src' => 'http://example.org/above-the-fold.jpg', + ], + ] + ), + ], + 'expected' => [ + 'item' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => json_encode( + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/lcp.jpgalert("Test XSS");', + ], + ), + 'viewport' => json_encode( [ + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/above-the-fold.jpgalert("Test XSS");', + ], + ] ), + 'last_accessed' => '2024-01-01 00:00:00', + ], + 'result' => true, + 'message' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => json_encode( + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/lcp.jpgalert("Test XSS");', + ], + ), + 'viewport' => json_encode( [ + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/above-the-fold.jpgalert("Test XSS");', + ], + ] ), + 'last_accessed' => '2024-01-01 00:00:00', + ], + ], + ], + + 'testShouldAddLongItemToDB' => [ + 'config' => [ + 'filter' => true, + 'url' => 'http://example.org', + 'is_mobile' => false, + 'images' => json_encode( + $long_array + ), + ], + 'expected' => [ + 'item' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => json_encode( $long_array_2[0] ), + 'viewport' => json_encode( array_slice( $long_array_2, 1, 20 ) ), + 'last_accessed' => '2024-01-01 00:00:00', + ], + 'result' => true, + 'message' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => json_encode( $long_array_2[0] ), + 'viewport' => json_encode( array_slice( $long_array_2, 1, 20 ) ), + 'last_accessed' => '2024-01-01 00:00:00', + ], + ], + ], ]; diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php b/tests/Unit/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php index e5801adbfd..ec38f33ab0 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php @@ -19,6 +19,8 @@ class Test_AddLcpData extends TestCase { private $controller; private $context; + private $temp_post = []; + protected function setUp(): void { parent::setUp(); @@ -27,10 +29,12 @@ protected function setUp(): void { $this->query = $this->createPartialMock( AboveTheFold::class, [ 'add_item' ] ); $this->context = Mockery::mock( Context::class ); $this->controller = new Controller( $this->query, $this->context ); + $this->temp_post = $_POST; } protected function tearDown(): void { unset( $_POST ); + $_POST = $this->temp_post; parent::tearDown(); } @@ -39,10 +43,12 @@ protected function tearDown(): void { * @dataProvider configTestData */ public function testShouldReturnExpected( $config, $expected ) { + $this->stubEscapeFunctions(); + $_POST = [ - 'url' => $config['url'], - 'is_mobile' => $config['is_mobile'], - 'images' => $config['images'], + 'url' => addslashes( $config['url'] ), + 'is_mobile' => addslashes( $config['is_mobile'] ), + 'images' => addslashes( $config['images'] ), ]; Functions\expect( 'check_ajax_referer' ) @@ -55,11 +61,17 @@ public function testShouldReturnExpected( $config, $expected ) { ->once() ->andReturn( $config['filter'] ); - Functions\when( 'wp_unslash' ) - ->returnArg(); - - Functions\when( 'sanitize_text_field' ) - ->returnArg(); + Functions\when( 'wp_unslash' )->alias( + function ( $value ) { + return is_string( $value ) ? stripslashes( $value ) : $value; + } + ); + + Functions\when( 'sanitize_text_field' )->alias( + function ( $value ) { + return is_string( $value ) ? strip_tags( $value ) : $value; + } + ); Functions\when( 'current_time' ) ->justReturn( $expected['item']['last_accessed'] ); From 13a59eada37140524d15813a6a7c48a219799b4a Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Thu, 25 Apr 2024 13:14:48 +0200 Subject: [PATCH 133/167] fix phpcs --- inc/Engine/Media/AboveTheFold/AJAX/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index c44f641aa8..1e156ab759 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -78,7 +78,7 @@ public function add_lcp_data() { 'type' => 'img', 'src' => esc_url_raw( $image->src ), ]; - $max_atf_images_number--; + --$max_atf_images_number; } } From fabcefabd9937df80183fd7a1aba39e3808c7b36 Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Thu, 25 Apr 2024 13:54:53 +0200 Subject: [PATCH 134/167] fix after merge --- .../Media/AboveTheFold/AJAX/Controller.php | 10 +++---- .../AJAX/Controller/addLcpData.php | 29 ++++++++++++++++++- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index 63f6bc529f..8b07d9c25f 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -65,7 +65,7 @@ public function add_lcp_data() { $keys = [ 'bg_set', 'src' ]; - foreach ( $images as $image ) { + foreach ( (array) $images as $image ) { $image_object = $this->create_object( $image, $keys ); if ( 'lcp' === $image->label && 'not found' === $lcp ) { $lcp = $image_object; @@ -116,17 +116,17 @@ public function add_lcp_data() { */ private function create_object( $image, $keys ) { $object = new \stdClass(); - $object->type = $image->type; + $object->type = $image->type ?? 'img'; - switch ( $image->type ) { + switch ( $object->type ) { case 'img-srcset': // If the type is 'img-srcset', add all the required parameters to the object. - $object->src = $image->src; + $object->src = esc_url_raw( $image->src ); $object->srcset = $image->srcset; $object->sizes = $image->sizes; break; case 'picture': - $object->src = $image->src; + $object->src = esc_url_raw( $image->src ); $object->sources = $image->sources; break; default: diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php index d25db15b6d..3d263dde03 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php @@ -2,6 +2,7 @@ $long_array = [ (object) [ + 'type' => 'img', 'label' => 'lcp', 'src' => 'http://example.org/lcp.jpg', ], @@ -267,7 +268,6 @@ ], ], ], - 'testShouldAddLongItemToDB' => [ 'config' => [ 'filter' => true, @@ -297,4 +297,31 @@ ], ], ], + 'testShouldNotAddItemToDBWhenNoData' => [ + 'config' => [ + 'filter' => true, + 'url' => 'http://example.org', + 'is_mobile' => false, + 'images' => '', + ], + 'expected' => [ + 'item' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => '"not found"', + 'viewport' => '[]', + 'last_accessed' => '2024-01-01 00:00:00', + ], + 'result' => true, + 'message' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => '"not found"', + 'viewport' => '[]', + 'last_accessed' => '2024-01-01 00:00:00', + ], + ], + ], ]; From 457721049e6e4b40fa9c5987becde9d34eab101b Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Thu, 25 Apr 2024 13:57:36 +0200 Subject: [PATCH 135/167] guard against not valid lcp --- inc/Engine/Media/AboveTheFold/Frontend/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 97a1ba1a47..54b19649bf 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -140,7 +140,7 @@ private function set_fetchpriority( $lcp, string $html ): string { 'picture', ]; - if ( ! in_array( $lcp->type, $allowed_types, true ) ) { + if ( empty( $lcp ) || empty( $lcp->type ) || ! in_array( $lcp->type, $allowed_types, true ) ) { return $html; } From 15fa8302981c2b7ed7701da8ca69b77446a3921c Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Thu, 25 Apr 2024 14:22:50 +0200 Subject: [PATCH 136/167] add a check if the url is relative url so use sanitize_text_field because esc_url_raw is adding the http:// to the url and we shouldn't do that --- inc/Engine/Media/AboveTheFold/AJAX/Controller.php | 7 +++++-- inc/Engine/Media/Lazyload/CSS/Front/Extractor.php | 12 ++---------- inc/Engine/Optimization/UrlTrait.php | 10 ++++++++++ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index 8b07d9c25f..9940ec7260 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -5,8 +5,11 @@ use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; use WP_Rocket\Engine\Common\Context\ContextInterface; +use WP_Rocket\Engine\Optimization\UrlTrait; class Controller { + use UrlTrait; + /** * ATFQuery instance * @@ -121,12 +124,12 @@ private function create_object( $image, $keys ) { switch ( $object->type ) { case 'img-srcset': // If the type is 'img-srcset', add all the required parameters to the object. - $object->src = esc_url_raw( $image->src ); + $object->src = $this->is_relative( $image->src ) ? sanitize_text_field( $image->src ) : esc_url_raw( $image->src ); $object->srcset = $image->srcset; $object->sizes = $image->sizes; break; case 'picture': - $object->src = esc_url_raw( $image->src ); + $object->src = $this->is_relative( $image->src ) ? sanitize_text_field( $image->src ) : esc_url_raw( $image->src ); $object->sources = $image->sources; break; default: diff --git a/inc/Engine/Media/Lazyload/CSS/Front/Extractor.php b/inc/Engine/Media/Lazyload/CSS/Front/Extractor.php index 565eec52a6..15c1ae8d8b 100644 --- a/inc/Engine/Media/Lazyload/CSS/Front/Extractor.php +++ b/inc/Engine/Media/Lazyload/CSS/Front/Extractor.php @@ -3,10 +3,12 @@ namespace WP_Rocket\Engine\Media\Lazyload\CSS\Front; use WP_Rocket\Engine\Optimization\RegexTrait; +use WP_Rocket\Engine\Optimization\UrlTrait; class Extractor { use RegexTrait; + use UrlTrait; /** * Comment mapping. @@ -342,14 +344,4 @@ protected function is_url_external( string $url ): bool { return $host !== $home_host; } - - /** - * Check if the URL is relative. - * - * @param string $url URL to check. - * @return bool - */ - protected function is_relative( string $url ): bool { - return preg_match( '/^\./', $url ); - } } diff --git a/inc/Engine/Optimization/UrlTrait.php b/inc/Engine/Optimization/UrlTrait.php index efb5e1e6ef..545ab15ec7 100644 --- a/inc/Engine/Optimization/UrlTrait.php +++ b/inc/Engine/Optimization/UrlTrait.php @@ -127,4 +127,14 @@ protected function get_file_content( $file ) { } return rocket_direct_filesystem()->get_contents( $file ); } + + /** + * Check if the URL is relative. + * + * @param string $url URL to check. + * @return bool + */ + protected function is_relative( string $url ): bool { + return preg_match( '/^\./', $url ); + } } From 3fef09ca7a41f29ca761bfa2796b13278a4d301c Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Thu, 25 Apr 2024 14:28:32 +0200 Subject: [PATCH 137/167] fix phpcs and adjust is_relative method --- inc/Engine/Media/AboveTheFold/AJAX/Controller.php | 2 +- inc/Engine/Optimization/UrlTrait.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index 9940ec7260..759005ca54 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -129,7 +129,7 @@ private function create_object( $image, $keys ) { $object->sizes = $image->sizes; break; case 'picture': - $object->src = $this->is_relative( $image->src ) ? sanitize_text_field( $image->src ) : esc_url_raw( $image->src ); + $object->src = $this->is_relative( $image->src ) ? sanitize_text_field( $image->src ) : esc_url_raw( $image->src ); $object->sources = $image->sources; break; default: diff --git a/inc/Engine/Optimization/UrlTrait.php b/inc/Engine/Optimization/UrlTrait.php index 545ab15ec7..f1ec342a41 100644 --- a/inc/Engine/Optimization/UrlTrait.php +++ b/inc/Engine/Optimization/UrlTrait.php @@ -135,6 +135,6 @@ protected function get_file_content( $file ) { * @return bool */ protected function is_relative( string $url ): bool { - return preg_match( '/^\./', $url ); + return ! empty( preg_match( '/^\./', $url ) ); } } From 038365699ef2dc75473cbe02e2a959ccd2954fd7 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 15:04:28 +0200 Subject: [PATCH 138/167] Fix LCP result when no LCP on page --- assets/js/lcp-beacon.js | 12 ------------ assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index 5216ade11f..aefe9c0852 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -182,18 +182,6 @@ function main() { return; } - // Filter the array based on the condition imageURL is not null - const filteredArray = LCPCandidates(1) - if (filteredArray.length !== 0) { - console.log("Estimated LCP element:", filteredArray); - performance_images = filteredArray.map((item) => ({ - src: item.imageURL, - label: "lcp", - })); - } else { - console.log("No LCP candidate found."); - } - // Use LCPCandidates function to get all the elements in the viewport const above_the_fold_images = LCPCandidates(Infinity); diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 920b8f7659..e7c6ca632d 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append(\"action\",\"rocket_lcp\"),o.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),o.append(\"url\",rocket_lcp_data.url),o.append(\"is_mobile\",rocket_lcp_data.is_mobile),o.append(\"images\",r),o.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),n.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const c=new FormData;c.append(\"action\",\"rocket_lcp\"),c.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),c.append(\"url\",rocket_lcp_data.url),c.append(\"is_mobile\",rocket_lcp_data.is_mobile),c.append(\"images\",r),c.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:c}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index f62aa2ac27..f4337e8a1f 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:"above-the-fold"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append("action","rocket_lcp"),o.append("rocket_lcp_nonce",rocket_lcp_data.nonce),o.append("url",rocket_lcp_data.url),o.append("is_mobile",rocket_lcp_data.is_mobile),o.append("images",r),o.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),n.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:"above-the-fold"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const c=new FormData;c.append("action","rocket_lcp"),c.append("rocket_lcp_nonce",rocket_lcp_data.nonce),c.append("url",rocket_lcp_data.url),c.append("is_mobile",rocket_lcp_data.is_mobile),c.append("images",r),c.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:c}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From efab65e643cc645b9e6d075af92a4eab07898144 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 15:09:43 +0200 Subject: [PATCH 139/167] Fix conflicts --- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 18646a0d6e..3cebb05a57 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var a=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const a=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?a=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(a);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append(\"action\",\"rocket_lcp\"),o.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),o.append(\"url\",rocket_lcp_data.url),o.append(\"is_mobile\",rocket_lcp_data.is_mobile),o.append(\"images\",r),o.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:o,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function c(n,o,i){function s(t,e){if(!o[t]){if(!n[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var a=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var c=e.querySelector(\"source\");r.src=e.poster||(c?c.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const a=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append(\"action\",\"rocket_lcp\"),n.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),n.append(\"url\",rocket_lcp_data.url),n.append(\"is_mobile\",rocket_lcp_data.is_mobile),n.append(\"images\",r),n.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:n,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(c,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(c,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index a6bfb422f9..9caff4c4eb 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var a="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const a=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?a=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:"above-the-fold"})});r=JSON.stringify(a);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append("action","rocket_lcp"),o.append("rocket_lcp_nonce",rocket_lcp_data.nonce),o.append("url",rocket_lcp_data.url),o.append("is_mobile",rocket_lcp_data.is_mobile),o.append("images",r),o.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:o,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); +!function c(n,o,i){function s(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var a="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var c=e.querySelector("source");r.src=e.poster||(c?c.src:""),r.current_src=r.src}else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const a=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:"above-the-fold"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append("action","rocket_lcp"),n.append("rocket_lcp_nonce",rocket_lcp_data.nonce),n.append("url",rocket_lcp_data.url),n.append("is_mobile",rocket_lcp_data.is_mobile),n.append("images",r),n.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:n,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(c,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(c,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From e33c61407d0cc713b2e849cf332c387b87c01fe2 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 15:20:07 +0200 Subject: [PATCH 140/167] Fix lcp-beacon --- assets/js/lcp-beacon.js | 12 ------------ .../Media/AboveTheFold/Frontend/Controller.php | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index 56122c9e05..916b7c42ce 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -181,18 +181,6 @@ function main() { return; } - // Filter the array based on the condition imageURL is not null - const filteredArray = LCPCandidates(1) - if (filteredArray.length !== 0) { - console.log("Estimated LCP element:", filteredArray); - performance_images = filteredArray.map((item) => ({ - src: item.imageURL, - label: "lcp", - })); - } else { - console.log("No LCP candidate found."); - } - // Use LCPCandidates function to get all the elements in the viewport const above_the_fold_images = LCPCandidates(Infinity); diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 0a7bed1a8f..384ab770ca 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -358,7 +358,7 @@ public function inject_beacon( $html, $url, $is_mobile ): string { * * @return int The filtered width threshold. */ - $width_threshold = apply_filters( 'rocket_lcp_width_threshold', ( $is_mobile ? 393 : 1920 ), $is_mobile, $url ); + $width_threshold = absint( apply_filters( 'rocket_lcp_width_threshold', ( $is_mobile ? 393 : 1920 ), $is_mobile, $url ) ); /** * Filters the height threshold for the LCP beacon. @@ -369,7 +369,7 @@ public function inject_beacon( $html, $url, $is_mobile ): string { * * @return int The filtered height threshold. */ - $height_threshold = apply_filters( 'rocket_lcp_height_threshold', ( $is_mobile ? 830 : 1080 ), $is_mobile, $url ); + $height_threshold = absint( apply_filters( 'rocket_lcp_height_threshold', ( $is_mobile ? 830 : 1080 ), $is_mobile, $url ) ); $data = [ 'ajax_url' => admin_url( 'admin-ajax.php' ), From 01c26645bffc9ec1ea3d6ce0af22e9068c268a2c Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Thu, 25 Apr 2024 15:24:53 +0200 Subject: [PATCH 141/167] adjust is_relative conditions --- inc/Engine/Media/AboveTheFold/Frontend/Controller.php | 10 ++++++---- inc/Engine/Optimization/UrlTrait.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 54b19649bf..f90b6eded9 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -8,9 +8,11 @@ use WP_Rocket\Engine\Media\AboveTheFold\Database\Queries\AboveTheFold as ATFQuery; use WP_Rocket\Engine\Media\AboveTheFold\Context\Context; use WP_Rocket\Engine\Optimization\RegexTrait; +use WP_Rocket\Engine\Optimization\UrlTrait; class Controller { use RegexTrait; + use UrlTrait; /** * Options instance @@ -250,24 +252,24 @@ private function generate_lcp_link_tag_with_sources( $lcp ): array { switch ( $lcp->type ) { case 'img': $sources[] = $lcp->src; - $tag .= $start_tag . 'href="' . esc_url( $lcp->src ) . '"' . $end_tag; + $tag .= $start_tag . 'href="' . ( $this->is_relative( $lcp->src ) ? esc_attr( $lcp->src ) : esc_url( $lcp->src ) ) . '"' . $end_tag; break; case 'img-srcset': $sources[] = $lcp->src; - $tag .= $start_tag . 'href="' . esc_url( $lcp->src ) . '" imagesrcset="' . $lcp->srcset . '" imagesizes="' . $lcp->sizes . '"' . $end_tag; + $tag .= $start_tag . 'href="' . ( $this->is_relative( $lcp->src ) ? esc_attr( $lcp->src ) : esc_url( $lcp->src ) ) . '" imagesrcset="' . esc_attr( $lcp->srcset ) . '" imagesizes="' . esc_attr( $lcp->sizes ) . '"' . $end_tag; break; case 'bg-img-set': foreach ( $lcp->bg_set as $set ) { $sources[] = $set->src; } - $tag .= $start_tag . 'imagesrcset="' . implode( ',', $sources ) . '"' . $end_tag; + $tag .= $start_tag . 'imagesrcset="' . esc_attr( implode( ',', $sources ) ) . '"' . $end_tag; break; case 'bg-img': foreach ( $lcp->bg_set as $set ) { $sources[] = $set->src; - $tag .= $start_tag . 'href="' . $set->src . '"' . $end_tag; + $tag .= $start_tag . 'href="' . $this->is_relative( $set->src ) ? esc_attr( $set->src ) : esc_url( $set->src ) . '"' . $end_tag; } break; case 'picture': diff --git a/inc/Engine/Optimization/UrlTrait.php b/inc/Engine/Optimization/UrlTrait.php index f1ec342a41..07e5b08c30 100644 --- a/inc/Engine/Optimization/UrlTrait.php +++ b/inc/Engine/Optimization/UrlTrait.php @@ -135,6 +135,6 @@ protected function get_file_content( $file ) { * @return bool */ protected function is_relative( string $url ): bool { - return ! empty( preg_match( '/^\./', $url ) ); + return ! empty( preg_match( '/^\./', $url ) ) || empty( wp_parse_url( $url, PHP_URL_HOST ) ); } } From 6367399ab72c6eecc64f6ac6a62e928016ede1e3 Mon Sep 17 00:00:00 2001 From: WordPressFan Date: Thu, 25 Apr 2024 15:31:17 +0200 Subject: [PATCH 142/167] fix tests, hopefully --- inc/Engine/Media/AboveTheFold/Frontend/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index f90b6eded9..9b731ca033 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -269,7 +269,7 @@ private function generate_lcp_link_tag_with_sources( $lcp ): array { foreach ( $lcp->bg_set as $set ) { $sources[] = $set->src; - $tag .= $start_tag . 'href="' . $this->is_relative( $set->src ) ? esc_attr( $set->src ) : esc_url( $set->src ) . '"' . $end_tag; + $tag .= $start_tag . 'href="' . ( $this->is_relative( $set->src ) ? esc_attr( $set->src ) : esc_url( $set->src ) ) . '"' . $end_tag; } break; case 'picture': From fc062c3e54fa8574d24ea572a2be17b00bb599df Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 16:03:36 +0200 Subject: [PATCH 143/167] Change values of threshold + safeguard --- assets/js/lcp-beacon.js | 4 ++-- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- .../Media/AboveTheFold/Frontend/Controller.php | 14 ++++++++++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index 916b7c42ce..37fda9a334 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -160,13 +160,13 @@ function main() { data_check.append('url', rocket_lcp_data.url); data_check.append('is_mobile', rocket_lcp_data.is_mobile); - const response = fetch(rocket_lcp_data.ajax_url, { + const lcp_data_response = fetch(rocket_lcp_data.ajax_url, { method: "POST", credentials: 'same-origin', body: data_check }); - if ( true === lcp_data.success ) { + if ( true === lcp_data_response.success ) { console.log('Bailing out because data is already available'); return; } diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 69ee8df1f0..e7c6ca632d 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append(\"action\",\"rocket_lcp\"),o.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),o.append(\"url\",rocket_lcp_data.url),o.append(\"is_mobile\",rocket_lcp_data.is_mobile),o.append(\"images\",r),o.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const l=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),n.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const c=new FormData;c.append(\"action\",\"rocket_lcp\"),c.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),c.append(\"url\",rocket_lcp_data.url),c.append(\"is_mobile\",rocket_lcp_data.is_mobile),c.append(\"images\",r),c.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:c}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index b8313af89b..f4337e8a1f 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?l=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,l)&&l.push({...e,label:"above-the-fold"})});r=JSON.stringify(l);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append("action","rocket_lcp"),o.append("rocket_lcp_nonce",rocket_lcp_data.nonce),o.append("url",rocket_lcp_data.url),o.append("is_mobile",rocket_lcp_data.is_mobile),o.append("images",r),o.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:o}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); +!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const l=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=l.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=l.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),n.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:"above-the-fold"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const c=new FormData;c.append("action","rocket_lcp"),c.append("rocket_lcp_nonce",rocket_lcp_data.nonce),c.append("url",rocket_lcp_data.url),c.append("is_mobile",rocket_lcp_data.is_mobile),c.append("images",r),c.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:c}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 384ab770ca..0693fac100 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -349,6 +349,8 @@ public function inject_beacon( $html, $url, $is_mobile ): string { return $html; } + $default_width_threshold = $is_mobile ? 393 : 1600; + $default_height_threshold = $is_mobile ? 830 : 700; /** * Filters the width threshold for the LCP beacon. * @@ -358,7 +360,7 @@ public function inject_beacon( $html, $url, $is_mobile ): string { * * @return int The filtered width threshold. */ - $width_threshold = absint( apply_filters( 'rocket_lcp_width_threshold', ( $is_mobile ? 393 : 1920 ), $is_mobile, $url ) ); + $width_threshold = apply_filters( 'rocket_lcp_width_threshold', $default_width_threshold, $is_mobile, $url ); /** * Filters the height threshold for the LCP beacon. @@ -369,7 +371,15 @@ public function inject_beacon( $html, $url, $is_mobile ): string { * * @return int The filtered height threshold. */ - $height_threshold = absint( apply_filters( 'rocket_lcp_height_threshold', ( $is_mobile ? 830 : 1080 ), $is_mobile, $url ) ); + $height_threshold = apply_filters( 'rocket_lcp_height_threshold', $default_height_threshold, $is_mobile, $url ); + + if ( ! is_int( $width_threshold ) ) { + $width_threshold = $default_width_threshold; + } + + if ( ! is_int( $height_threshold ) ) { + $height_threshold = $default_height_threshold; + } $data = [ 'ajax_url' => admin_url( 'admin-ajax.php' ), From 8901e29d8ae4896cacced7b28b1fb403e8eb80de Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 16:07:42 +0200 Subject: [PATCH 144/167] Fix beacon min + map --- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 18646a0d6e..3cebb05a57 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var a=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var n=e.querySelector(\"source\");r.src=e.poster||(n?n.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const c=e.querySelector(\"image\");c&&(r.type=\"img\",r.src=c.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const a=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:\"lcp\"}))):console.log(\"No LCP candidate found.\");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?a=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(a);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append(\"action\",\"rocket_lcp\"),o.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),o.append(\"url\",rocket_lcp_data.url),o.append(\"is_mobile\",rocket_lcp_data.is_mobile),o.append(\"images\",r),o.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:o,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(n,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function c(n,o,i){function s(t,e){if(!o[t]){if(!n[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var a=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var c=e.querySelector(\"source\");r.src=e.poster||(c?c.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const a=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append(\"action\",\"rocket_lcp\"),n.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),n.append(\"url\",rocket_lcp_data.url),n.append(\"is_mobile\",rocket_lcp_data.is_mobile),n.append(\"images\",r),n.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:n,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(c,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(c,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index a6bfb422f9..9caff4c4eb 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function n(c,o,i){function s(t,e){if(!o[t]){if(!c[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},c[t][0].call(r.exports,function(e){return s(c[t][1][e]||e)},r,r.exports,n,c,o,i)}return o[t].exports}for(var a="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:s(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function s(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var n=e.querySelector("source");r.src=e.poster||(n?n.src:""),r.current_src=r.src}else if("svg"===t){const c=e.querySelector("image");c&&(r.type="img",r.src=c.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const a=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(t({src:e.imageURL,label:"lcp"}))):console.log("No LCP candidate found.");const c=i(1/0);r=c.find(e=>null!==e.elementInfo);r?a=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=s(e);if(null===r)return!1;var n="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(n||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:"above-the-fold"})});r=JSON.stringify(a);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const o=new FormData;o.append("action","rocket_lcp"),o.append("rocket_lcp_nonce",rocket_lcp_data.nonce),o.append("url",rocket_lcp_data.url),o.append("is_mobile",rocket_lcp_data.is_mobile),o.append("images",r),o.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:o,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(n,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(n,500),console.timeEnd("extract")})},{}]},{},[1]); +!function c(n,o,i){function s(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var a="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var c=e.querySelector("source");r.src=e.poster||(c?c.src:""),r.current_src=r.src}else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const a=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:"above-the-fold"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append("action","rocket_lcp"),n.append("rocket_lcp_nonce",rocket_lcp_data.nonce),n.append("url",rocket_lcp_data.url),n.append("is_mobile",rocket_lcp_data.is_mobile),n.append("images",r),n.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:n,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(c,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(c,500),console.timeEnd("extract")})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From d288c853232ad1e43d2c46497d0c84c234c6e4b5 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Thu, 25 Apr 2024 16:14:58 +0200 Subject: [PATCH 145/167] Fix integrations tests --- .../CDN/Subscriber/HTML/siteURL/rewrite.php | 2 +- .../HTML/siteURLWithPath/rewrite.php | 2 +- .../Subscriber/HTML/output_w_beacon.html | 2 +- .../Minify/CSS/Subscriber/process.php | 12 ++++---- .../Minify/JS/Subscriber/process.php | 28 +++++++++---------- .../Hostings/WPEngine/Int/addFootprint.php | 6 ++-- ...disableImageDimensionsHeightPercentage.php | 4 +-- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php index 534b2f381f..0cee85dccf 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php @@ -1033,7 +1033,7 @@ class="logoSite show-for-large" - + diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php index 7aab947bb2..3ac4a5dec4 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php @@ -718,7 +718,7 @@ - + diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html index ea8f597a3c..e11991cdf4 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html @@ -3,5 +3,5 @@ Test - + diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php index d81e32cc90..2b57e86a80 100644 --- a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php @@ -38,7 +38,7 @@ - + ', @@ -84,7 +84,7 @@ - + ', @@ -128,7 +128,7 @@ - + ', @@ -175,7 +175,7 @@ - + ', @@ -224,7 +224,7 @@ - + ', @@ -270,7 +270,7 @@ - + ', diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php index 25143cb8b5..35c2fb35df 100644 --- a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php @@ -43,7 +43,7 @@ - + ', @@ -88,7 +88,7 @@ - + ', @@ -125,7 +125,7 @@ - + ', @@ -160,7 +160,7 @@ - + ', @@ -201,7 +201,7 @@ - + ', @@ -241,7 +241,7 @@ - + ', @@ -287,7 +287,7 @@ - + @@ -333,7 +333,7 @@ - + @@ -381,7 +381,7 @@ - + @@ -431,7 +431,7 @@ - + @@ -479,7 +479,7 @@ - + @@ -529,7 +529,7 @@ - + @@ -576,7 +576,7 @@ - + @@ -624,7 +624,7 @@ - + diff --git a/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php b/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php index e4cfbdf045..2137354490 100644 --- a/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php +++ b/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php @@ -7,7 +7,7 @@ '', 'expected' => 'Sample Page' . '' . - '' . + '' . "\n" . '', ], 'testWPEngineAddFootprintWithWhitelabel' => [ @@ -16,7 +16,7 @@ '', 'expected' => 'Sample Page' . '' . - '' . + '' . "\n" . '', ], 'testWPEngineAddFootprintNoHtmlShouldBailOut' => [ @@ -24,6 +24,6 @@ 'html' => 'Sample Page' . '', 'expected' => 'Sample Page' . - '', + '', ], ]; diff --git a/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php b/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php index 51e66e087c..c4a232e351 100644 --- a/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php +++ b/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php @@ -20,7 +20,7 @@ - + @@ -96,7 +96,7 @@ ], 'html' => [ 'original' => '', - 'expected' => '', + 'expected' => '', ], ], ], From ccb07c78ef8ce48a1c39f1c1c17314a57c9a17b4 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Thu, 25 Apr 2024 16:16:43 +0100 Subject: [PATCH 146/167] Fixed reviews --- inc/Engine/Saas/Admin/Notices.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/Engine/Saas/Admin/Notices.php b/inc/Engine/Saas/Admin/Notices.php index baf4c6e40f..023f248ddb 100644 --- a/inc/Engine/Saas/Admin/Notices.php +++ b/inc/Engine/Saas/Admin/Notices.php @@ -101,7 +101,7 @@ public function display_processing_notice() { $message = sprintf( // translators: %1$s = plugin name, %2$s = number of seconds. - __( '%1$s: Please wait %2$s seconds. The Remove Unused CSS service is processing your pages, the plugin is optimizing LCP and the images above the fold..', 'rocket' ), + __( '%1$s: Please wait %2$s seconds. The Remove Unused CSS service is processing your pages, the plugin is optimizing LCP and the images above the fold.', 'rocket' ), 'WP Rocket', '' . $remaining . '' ); @@ -138,7 +138,7 @@ public function display_success_notice() { $transient = get_transient( 'rocket_saas_processing' ); $class = ''; - if ( false !== $transient ) { + if ( false !== $transient || ( ! $this->options->get( 'remove_unused_css', 0 ) ) ) { $class = 'hidden'; } From 6af90773842f118f73f781498857169a7dee3021 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Thu, 25 Apr 2024 16:21:54 +0100 Subject: [PATCH 147/167] Fix lint error --- inc/Engine/Saas/Admin/Notices.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Saas/Admin/Notices.php b/inc/Engine/Saas/Admin/Notices.php index 023f248ddb..6edd0ea095 100644 --- a/inc/Engine/Saas/Admin/Notices.php +++ b/inc/Engine/Saas/Admin/Notices.php @@ -138,7 +138,7 @@ public function display_success_notice() { $transient = get_transient( 'rocket_saas_processing' ); $class = ''; - if ( false !== $transient || ( ! $this->options->get( 'remove_unused_css', 0 ) ) ) { + if ( false !== $transient || ( ! $this->options->get( 'remove_unused_css', 0 ) ) ) { $class = 'hidden'; } From 8836a193b0ad14cd02cb7c8a4303d08261f7dabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 25 Apr 2024 12:06:08 -0400 Subject: [PATCH 148/167] add debug value to data --- inc/Engine/Media/AboveTheFold/Frontend/Controller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 249fbaa49a..b4e1b19540 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -389,6 +389,7 @@ public function inject_beacon( $html, $url, $is_mobile ): string { 'elements' => $this->lcp_atf_elements(), 'width_threshold' => $width_threshold, 'height_threshold' => $height_threshold, + 'debug' => rocket_get_constant( 'WP_ROCKET_DEBUG' ), ]; $inline_script = ''; From 730a33fbeaeb454aea7c11529d93a6756347bc72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 25 Apr 2024 12:06:13 -0400 Subject: [PATCH 149/167] update test case --- .../AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html index e11991cdf4..3efc371d25 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html @@ -3,5 +3,5 @@ Test - + From 407ca9f85ccb1fa7be41475487a9b32e31b9ddc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 25 Apr 2024 12:06:19 -0400 Subject: [PATCH 150/167] use debug value --- assets/js/lcp-beacon.js | 27 ++++++++++++++++++--------- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index c26a9eba76..e006e6feff 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -167,7 +167,10 @@ function main() { }); if ( true === lcp_data_response.success ) { - console.log('Bailing out because data is already available'); + if (rocket_lcp_data.debug) { + console.log('Bailing out because data is already available'); + } + return; } @@ -178,7 +181,10 @@ function main() { if ( ( rocket_lcp_data.is_mobile && ( screenWidth > rocket_lcp_data.width_threshold || screenHeight > rocket_lcp_data.height_threshold ) ) || ( ! rocket_lcp_data.is_mobile && ( screenWidth < rocket_lcp_data.width_threshold || screenHeight < rocket_lcp_data.height_threshold ) ) ) { - console.log('Bailing out because screen size is not acceptable'); + if (rocket_lcp_data.debug) { + console.log('Bailing out because screen size is not acceptable'); + } + return; } @@ -193,7 +199,9 @@ function main() { label: "lcp", }]; } else { - console.log("No LCP candidate found."); + if (rocket_lcp_data.debug) { + console.log("No LCP candidate found."); + } } above_the_fold_images.forEach(({ element, elementInfo }) => { @@ -235,21 +243,22 @@ function main() { .then((data) => { const beaconscript = document.querySelector('[data-name="wpr-lcp-beacon"]'); beaconscript.setAttribute('beacon-completed', 'true'); - console.log(data); + + if (rocket_lcp_data.debug) { + console.log(data); + } }) .catch((error) => { - console.error(error); + if (rocket_lcp_data.debug) { + console.error(error); + } }); } if (document.readyState !== 'loading') { - console.time("extract"); setTimeout(main, 500); - console.timeEnd("extract"); } else { document.addEventListener("DOMContentLoaded", function () { - console.time("extract"); setTimeout(main, 500); - console.timeEnd("extract"); }); } \ No newline at end of file diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 3cebb05a57..fdfd107c03 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function c(n,o,i){function s(t,e){if(!o[t]){if(!n[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var a=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var c=e.querySelector(\"source\");r.src=e.poster||(c?c.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const a=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append(\"action\",\"rocket_lcp\"),n.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),n.append(\"url\",rocket_lcp_data.url),n.append(\"is_mobile\",rocket_lcp_data.is_mobile),n.append(\"images\",r),n.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:n,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(c,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(c,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var c=e.querySelector(\"source\");r.src=e.poster||(c?c.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],a=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",a.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!a||\"\"===a)return null;const s=[...a.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:\"lcp\"}]:rocket_lcp_data.debug&&console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(a);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append(\"action\",\"rocket_lcp\"),n.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),n.append(\"url\",rocket_lcp_data.url),n.append(\"is_mobile\",rocket_lcp_data.is_mobile),n.append(\"images\",r),n.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:n,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?setTimeout(c,500):document.addEventListener(\"DOMContentLoaded\",function(){setTimeout(c,500)})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index 9caff4c4eb..8bc5b89c13 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function c(n,o,i){function s(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var a="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var c=e.querySelector("source");r.src=e.poster||(c?c.src:""),r.current_src=r.src}else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const a=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:"above-the-fold"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append("action","rocket_lcp"),n.append("rocket_lcp_nonce",rocket_lcp_data.nonce),n.append("url",rocket_lcp_data.url),n.append("is_mobile",rocket_lcp_data.is_mobile),n.append("images",r),n.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:n,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(c,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(c,500),console.timeEnd("extract")})},{}]},{},[1]); +!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var c=e.querySelector("source");r.src=e.poster||(c?c.src:""),r.current_src=r.src}else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],a=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",a.includes("image-set(")&&(r.type="bg-img-set"),!a||""===a)return null;const s=[...a.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:"lcp"}]:rocket_lcp_data.debug&&console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:"above-the-fold"})});r=JSON.stringify(a);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append("action","rocket_lcp"),n.append("rocket_lcp_nonce",rocket_lcp_data.nonce),n.append("url",rocket_lcp_data.url),n.append("is_mobile",rocket_lcp_data.is_mobile),n.append("images",r),n.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:n,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log("Bailing out because data is already available")}"loading"!==document.readyState?setTimeout(c,500):document.addEventListener("DOMContentLoaded",function(){setTimeout(c,500)})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From 02ff403f91fa4e629f2c1287979f45c00d079502 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Thu, 25 Apr 2024 17:24:33 +0100 Subject: [PATCH 151/167] :feat: PR review modifications --- inc/Engine/Common/JobManager/APIHandler/APIClient.php | 5 +++++ inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 9 ++++++--- inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php | 5 +++-- .../WarmUp/Controller/addWPRImageDimensionQueryArg.php | 6 ++++-- .../WarmUp/Controller/addWPRImageDimensionQueryArg.php | 2 +- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/inc/Engine/Common/JobManager/APIHandler/APIClient.php b/inc/Engine/Common/JobManager/APIHandler/APIClient.php index d15c9f9958..afcfdaff97 100644 --- a/inc/Engine/Common/JobManager/APIHandler/APIClient.php +++ b/inc/Engine/Common/JobManager/APIHandler/APIClient.php @@ -40,6 +40,11 @@ public function add_to_queue( string $url, array $options ): array { user_trailingslashit( $url ) ); + /** + * Filter the url that is sent to Saas when RUCSS and LCP/ATF is on. + * + * @param string $url contains the URL that is sent to Saas. + */ $url = apply_filters( 'rocket_saas_api_queued_url', $url ); $args = [ diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index eddb908a5e..c1278377ef 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -183,19 +183,22 @@ private function send_to_saas( $links ) { } /** - * Add wpr_imagedimensions to URL query + * Add wpr_imagedimensions to URL query. + * + * @param string $url * * @return string */ - public function add_wpr_imagedimensions_query_arg(): string { + public function add_wpr_imagedimensions_query_arg( string $url ): string { if ( ! $this->context->is_allowed() ) { - return ''; + return $url; } return add_query_arg( [ 'wpr_imagedimensions' => 1, ], + $url ); } } diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php b/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php index 6995d85461..660e51133a 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php @@ -61,10 +61,11 @@ public function warm_up_on_update( $new_version, $old_version ) { /** * Add image dimensions query parameter to URL. + * @param string $url * * @return string */ - public function add_wpr_imagedimensions_query_arg(): string { - return $this->controller->add_wpr_imagedimensions_query_arg(); + public function add_wpr_imagedimensions_query_arg( string $url ): string { + return $this->controller->add_wpr_imagedimensions_query_arg( $url ); } } diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php index 4771cef875..7722da99e4 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php @@ -4,13 +4,15 @@ 'testShoulDoNothingWhenDisabled' => [ 'config' => [ 'filter' => false, + 'url' => 'http://example.com' ], - 'expected' => "", + 'expected' => 'http://example.com', ], 'testShoulDoReturnArgument' => [ 'config' => [ 'filter' => true, + 'url' => 'http://example.com' ], - 'expected' => "/?wpr_imagedimensions=1", + 'expected' => 'http://example.com/?wpr_imagedimensions=1', ], ]; diff --git a/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php index d5f051af87..9887c7a29a 100644 --- a/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php +++ b/tests/Unit/inc/Engine/Media/AboveTheFold/WarmUp/Controller/addWPRImageDimensionQueryArg.php @@ -45,7 +45,7 @@ public function testShouldReturnExpected( $config, $expected ) { $this->assertSame( $expected, - $this->controller->add_wpr_imagedimensions_query_arg() + $this->controller->add_wpr_imagedimensions_query_arg( $config['url'] ) ); } From dff7e74c7d766df8b269b3d02e11234528415c19 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Thu, 25 Apr 2024 17:34:57 +0100 Subject: [PATCH 152/167] fix lint error :sparkles: --- inc/Engine/Media/AboveTheFold/WarmUp/Controller.php | 2 +- inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php index c1278377ef..531fcc1223 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Controller.php @@ -185,7 +185,7 @@ private function send_to_saas( $links ) { /** * Add wpr_imagedimensions to URL query. * - * @param string $url + * @param string $url URL to be sent. * * @return string */ diff --git a/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php b/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php index 660e51133a..b7c26d3dd5 100644 --- a/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php +++ b/inc/Engine/Media/AboveTheFold/WarmUp/Subscriber.php @@ -61,7 +61,8 @@ public function warm_up_on_update( $new_version, $old_version ) { /** * Add image dimensions query parameter to URL. - * @param string $url + * + * @param string $url URL to be sent. * * @return string */ From 48cf8240f43305d0dd5cf3eadd87f936818fa307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 25 Apr 2024 14:42:54 -0400 Subject: [PATCH 153/167] remove unused variable --- assets/js/lcp-beacon.js | 8 -------- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index e006e6feff..a4fdff351d 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -214,14 +214,6 @@ function main() { let performance_images_json = JSON.stringify(performance_images); window.performance_images_json = performance_images_json; - const payload = { - action: 'rocket_lcp', - rocket_lcp_nonce: rocket_lcp_data.nonce, - url: rocket_lcp_data.url, - is_mobile: rocket_lcp_data.is_mobile, - images: performance_images_json, - status: 'success' - }; const data = new FormData(); data.append('action', 'rocket_lcp'); diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index fdfd107c03..d231d96bf5 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var c=e.querySelector(\"source\");r.src=e.poster||(c?c.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],a=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",a.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!a||\"\"===a)return null;const s=[...a.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:\"lcp\"}]:rocket_lcp_data.debug&&console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(a);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append(\"action\",\"rocket_lcp\"),n.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),n.append(\"url\",rocket_lcp_data.url),n.append(\"is_mobile\",rocket_lcp_data.is_mobile),n.append(\"images\",r),n.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:n,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?setTimeout(c,500):document.addEventListener(\"DOMContentLoaded\",function(){setTimeout(c,500)})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var c=e.querySelector(\"source\");r.src=e.poster||(c?c.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],a=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",a.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!a||\"\"===a)return null;const s=[...a.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:\"lcp\"}]:rocket_lcp_data.debug&&console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(a);window.performance_images_json=r;const n=new FormData;n.append(\"action\",\"rocket_lcp\"),n.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),n.append(\"url\",rocket_lcp_data.url),n.append(\"is_mobile\",rocket_lcp_data.is_mobile),n.append(\"images\",r),n.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:n,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?setTimeout(c,500):document.addEventListener(\"DOMContentLoaded\",function(){setTimeout(c,500)})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index 8bc5b89c13..b92f1be6ed 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var c=e.querySelector("source");r.src=e.poster||(c?c.src:""),r.current_src=r.src}else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],a=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",a.includes("image-set(")&&(r.type="bg-img-set"),!a||""===a)return null;const s=[...a.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:"lcp"}]:rocket_lcp_data.debug&&console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:"above-the-fold"})});r=JSON.stringify(a);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append("action","rocket_lcp"),n.append("rocket_lcp_nonce",rocket_lcp_data.nonce),n.append("url",rocket_lcp_data.url),n.append("is_mobile",rocket_lcp_data.is_mobile),n.append("images",r),n.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:n,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log("Bailing out because data is already available")}"loading"!==document.readyState?setTimeout(c,500):document.addEventListener("DOMContentLoaded",function(){setTimeout(c,500)})},{}]},{},[1]); +!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var c=e.querySelector("source");r.src=e.poster||(c?c.src:""),r.current_src=r.src}else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],a=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",a.includes("image-set(")&&(r.type="bg-img-set"),!a||""===a)return null;const s=[...a.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:"lcp"}]:rocket_lcp_data.debug&&console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:"above-the-fold"})});r=JSON.stringify(a);window.performance_images_json=r;const n=new FormData;n.append("action","rocket_lcp"),n.append("rocket_lcp_nonce",rocket_lcp_data.nonce),n.append("url",rocket_lcp_data.url),n.append("is_mobile",rocket_lcp_data.is_mobile),n.append("images",r),n.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:n,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log("Bailing out because data is already available")}"loading"!==document.readyState?setTimeout(c,500):document.addEventListener("DOMContentLoaded",function(){setTimeout(c,500)})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map From 6cdc57b2b3b6673a5a23113c8f7b17f1c3af0703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 25 Apr 2024 16:03:36 -0400 Subject: [PATCH 154/167] update tests --- .../CDN/Subscriber/HTML/siteURL/rewrite.php | 8 +-- .../HTML/siteURLWithPath/rewrite.php | 3 - .../Minify/CSS/Subscriber/process.php | 14 +---- .../Minify/JS/Subscriber/process.php | 60 +++++-------------- ...disableImageDimensionsHeightPercentage.php | 4 +- ...disableImageDimensionsHeightPercentage.php | 3 +- .../inc/Engine/CDN/Subscriber/rewrite.php | 30 ++++++---- .../Minify/CSS/Subscriber/process.php | 4 ++ .../Minify/JS/Subscriber/process.php | 8 +++ ...disableImageDimensionsHeightPercentage.php | 6 +- 10 files changed, 56 insertions(+), 84 deletions(-) diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php index 0cee85dccf..c6fb4607ef 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php @@ -783,14 +783,14 @@ function _isWebView_Android(options) {

In just a bit here, you should see the text start to wrap below the right aligned image and settle in nicely. There should still be plenty of room and everything should be sitting pretty. Yeah… Just like that. It never felt so good to be right.

And that’s a wrap, yo! You survived the tumultuous waters of alignment. Image alignment achievement unlocked!

- +
- +
- + - - diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php index 3ac4a5dec4..fb00ad8b31 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php @@ -718,8 +718,5 @@ - - - diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php index 2b57e86a80..87f0c0f7fd 100644 --- a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php @@ -38,8 +38,6 @@ - - ', 'files' => [ @@ -84,8 +82,6 @@ - - ', 'files' => [ @@ -128,8 +124,6 @@ - - ', 'files' => [ @@ -170,13 +164,11 @@ Sample Page - + - - ', 'files' => [ @@ -224,8 +216,6 @@ - - ', 'files' => [ @@ -270,8 +260,6 @@ - - ', 'files' => [ diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php index 35c2fb35df..03c664b0e6 100644 --- a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php @@ -43,8 +43,6 @@ - - ', 'files' => [ @@ -88,8 +86,6 @@ - - ', 'files' => [ @@ -125,8 +121,6 @@ - - ', 'files' => [], @@ -157,11 +151,9 @@ Sample Page - + - - ', 'files' => [ @@ -201,8 +193,6 @@ - - ', 'files' => [ @@ -238,11 +228,9 @@ Sample Page - + - - ', 'files' => [ @@ -287,9 +275,7 @@ - - - + ', 'files' => [ @@ -333,9 +319,7 @@ - - - + ', 'files' => [ @@ -375,15 +359,13 @@ 'html' => ' Sample Page - + - - - + ', 'files' => [ @@ -424,16 +406,14 @@ 'html' => ' Sample Page - - + + - - - + ', 'files' => [ @@ -473,15 +453,13 @@ 'html' => ' Sample Page - + - - - + ', 'files' => [ @@ -522,16 +500,14 @@ 'html' => ' Sample Page - - + + - - - + ', 'files' => [ @@ -576,9 +552,7 @@ - - - + ', 'files' => [ @@ -624,9 +598,7 @@ - - - + ', 'files' => [ diff --git a/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php b/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php index c4a232e351..df47d5c52c 100644 --- a/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php +++ b/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php @@ -20,8 +20,6 @@ - - EXPECTEDHTML; @@ -96,7 +94,7 @@ ], 'html' => [ 'original' => '', - 'expected' => '', + 'expected' => '', ], ], ], diff --git a/tests/Fixtures/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php b/tests/Fixtures/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php index 888ca3169b..3e157e5632 100644 --- a/tests/Fixtures/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php +++ b/tests/Fixtures/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php @@ -18,7 +18,6 @@ - EXPECTEDHTML; @@ -93,7 +92,7 @@ ], 'html' => [ 'original' => '', - 'expected' => '', + 'expected' => '', ], ], ], diff --git a/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php b/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php index 4aeaa633a5..b5c3a7224c 100644 --- a/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php +++ b/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php @@ -4,30 +4,38 @@ /** * Test class covering \WP_Rocket\Engine\CDN\Subscriber::rewrite - * @uses \WP_Rocket\Engine\CDN\CDN::rewrite - * @group CDN - * @group rewrite + * + * @uses \WP_Rocket\Engine\CDN\CDN::rewrite + * @group CDN */ class Test_Rewrite extends TestCase { + public function set_up() { + parent::set_up(); + + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'rewrite', 20 ); + } + public function tear_down() { remove_filter( 'content_url', [ $this, 'setContentURL' ] ); remove_filter( 'includes_url', [ $this, 'setIncludesURL' ] ); + $this->restoreWpHook( 'rocket_buffer' ); + parent::tear_down(); } /** - * @dataProvider providerTestData + * @dataProvider configTestData */ public function testShouldRewriteURL( $home_url, $original, $expected ) { - $this->cnames = [ + $this->cnames = [ 'cdn.example.org', ]; - $this->cdn_zone = [ - 'all' + $this->cdn_zone = [ + 'all', ]; - $this->home_url = $home_url; - $this->content_url = "{$home_url}/wp-content/"; + $this->home_url = $home_url; + $this->content_url = "{$home_url}/wp-content/"; $this->includes_url = "{$home_url}/wp-includes/"; add_filter( 'pre_get_rocket_option_cdn', [ $this, 'return_true' ] ); @@ -42,8 +50,4 @@ public function testShouldRewriteURL( $home_url, $original, $expected ) { $this->format_the_html( apply_filters( 'rocket_buffer', $original ) ) ); } - - public function providerTestData() { - return $this->getTestData( __DIR__, 'rewrite' ); - } } diff --git a/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php b/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php index 0fea8ec354..7bb6b1c722 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php @@ -26,6 +26,8 @@ class Test_Process extends TestCase { public function set_up() { parent::set_up(); + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'process', 16 ); + add_filter( 'pre_get_rocket_option_minify_css', [ $this, 'return_true' ] ); add_filter( 'pre_get_rocket_option_minify_css_key', [ $this, 'return_key' ] ); } @@ -33,6 +35,8 @@ public function set_up() { public function tear_down() { parent::tear_down(); + $this->restoreWpHook( 'rocket_buffer' ); + remove_filter( 'pre_get_rocket_option_minify_css', [ $this, 'return_true' ] ); remove_filter( 'pre_get_rocket_option_minify_css_key', [ $this, 'return_key' ] ); diff --git a/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php b/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php index c183d02acc..1a261a9e92 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php @@ -24,9 +24,17 @@ class Test_Process extends TestCase { protected $path_to_test_data = '/inc/Engine/Optimization/Minify/JS/Subscriber/process.php'; + public function set_up() { + parent::set_up(); + + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'process', 22 ); + } + public function tear_down() { parent::tear_down(); + $this->restoreWpHook( 'rocket_buffer' ); + remove_filter( 'pre_get_rocket_option_minify_js', [ $this, 'return_true' ] ); remove_filter( 'pre_get_rocket_option_minify_js_key', [ $this, 'return_key' ] ); remove_filter( 'pre_get_rocket_option_defer_all_js', [ $this, 'return_defer_all_js' ] ); diff --git a/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php b/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php index e3a02cea5b..bfc3d6252b 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php +++ b/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php @@ -14,7 +14,7 @@ class Test_DisableImageDimensionsHeightPercentage extends WPThemeTestcase { use DBTrait; protected $path_to_test_data = '/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php'; - + private $container; private $event; private $subscriber; @@ -36,12 +36,16 @@ public function set_up() { $this->container = apply_filters( 'rocket_container', '' ); $this->event = $this->container->get( 'event_manager' ); + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'specify_image_dimensions', 17 ); + add_filter( 'rocket_specify_image_dimensions', '__return_true' ); } public function tear_down() { $this->event->remove_subscriber( $this->subscriber ); + $this->restoreWpHook( 'rocket_buffer' ); + remove_filter( 'rocket_specify_image_dimensions', '__return_true' ); unset( $GLOBALS['wp'] ); From bf54b6025ce3c47b1aea5f2bc14b70d1e7ed2cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 25 Apr 2024 16:11:24 -0400 Subject: [PATCH 155/167] fix tests --- .../HTML/siteURL/{rewrite.php => expected.html} | 0 .../siteURLWithPath/{rewrite.php => expected.html} | 0 tests/Fixtures/inc/Engine/CDN/Subscriber/rewrite.php | 11 ++--------- .../Integration/inc/Engine/CDN/Subscriber/rewrite.php | 6 +++++- 4 files changed, 7 insertions(+), 10 deletions(-) rename tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/{rewrite.php => expected.html} (100%) rename tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/{rewrite.php => expected.html} (100%) diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/expected.html similarity index 100% rename from tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php rename to tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/expected.html diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/expected.html similarity index 100% rename from tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php rename to tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/expected.html diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/rewrite.php index b68d87a278..840743afa9 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/rewrite.php @@ -1,21 +1,14 @@ [ 'site_url' => 'http://example.org', 'original' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/CDN/Subscriber/HTML/siteURL/original.html' ), - 'expected' => $default_site_url_expected, + 'expected' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/CDN/Subscriber/HTML/siteURL/expected.html' ), ], 'testSiteURLWithPath' => [ 'site_url' => 'http://example.org/blog', 'original' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/original.html' ), - 'expected' => $default_site_url_with_path_expected, + 'expected' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/expected.html' ), ], ]; diff --git a/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php b/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php index b5c3a7224c..053fe89328 100644 --- a/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php +++ b/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php @@ -25,7 +25,7 @@ public function tear_down() { } /** - * @dataProvider configTestData + * @dataProvider providerTestData */ public function testShouldRewriteURL( $home_url, $original, $expected ) { $this->cnames = [ @@ -50,4 +50,8 @@ public function testShouldRewriteURL( $home_url, $original, $expected ) { $this->format_the_html( apply_filters( 'rocket_buffer', $original ) ) ); } + + public function providerTestData() { + return $this->getTestData( __DIR__, 'rewrite' ); + } } From 73040782862f567bb6507c8b759df639f11623b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 25 Apr 2024 16:19:52 -0400 Subject: [PATCH 156/167] fix tests --- .../ThirdParty/Hostings/WPEngine/Int/addFootprint.php | 4 +--- .../inc/ThirdParty/Hostings/WPEngine/addFootprint.php | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php b/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php index 2137354490..4a22538be3 100644 --- a/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php +++ b/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php @@ -7,7 +7,6 @@ '', 'expected' => 'Sample Page' . '' . - '' . "\n" . '', ], 'testWPEngineAddFootprintWithWhitelabel' => [ @@ -16,7 +15,6 @@ '', 'expected' => 'Sample Page' . '' . - '' . "\n" . '', ], 'testWPEngineAddFootprintNoHtmlShouldBailOut' => [ @@ -24,6 +22,6 @@ 'html' => 'Sample Page' . '', 'expected' => 'Sample Page' . - '', + '', ], ]; diff --git a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php index 25cce78b20..a23ded55a2 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php @@ -12,6 +12,17 @@ * @group ThirdParty */ class Test_AddFootprint extends TestCase { + public function set_up() { + parent::set_up(); + + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'add_footprint', 50 ); + } + + public function tear_down() { + $this->restoreWpHook( 'rocket_buffer' ); + + parent::tear_down(); + } /** * @dataProvider providerTestData From e0951471f8aa1fa8351942f8a921240f75a42deb Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Fri, 26 Apr 2024 04:06:15 +0200 Subject: [PATCH 157/167] Encode LCP to JSON if correct format --- inc/Engine/Media/AboveTheFold/AJAX/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index de451056e4..a3450921e8 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -75,7 +75,7 @@ public function add_lcp_data() { 'url' => $url, 'is_mobile' => $is_mobile, 'status' => 'completed', - 'lcp' => wp_json_encode( $lcp ), + 'lcp' => ( is_array( $lcp ) || is_object( $lcp ) ) ? wp_json_encode( $lcp ) : $lcp, 'viewport' => wp_json_encode( $viewport ), 'last_accessed' => current_time( 'mysql', true ), ]; From d77956b7980a55ddb3e96593834b6a2c482463cc Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Fri, 26 Apr 2024 04:06:35 +0200 Subject: [PATCH 158/167] Add bail-out safeguard --- inc/Engine/Media/AboveTheFold/AJAX/Controller.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index a3450921e8..f4205dd73f 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -99,6 +99,11 @@ public function add_lcp_data() { * @return object|null Returns an object with the 'type' property and the first key that exists in the image object. If none of the keys exist in the image object, it returns null. */ private function create_object( $image, $keys ) { + // Bail out if type doesn't exist, it would mean no lcp has been found + if ( ! isset( $image->type ) ) { + return null; + } + $object = new \stdClass(); $object->type = $image->type; From a7e7ae8365dc6cf4a037521ef3b537db74b46ff0 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Fri, 26 Apr 2024 04:15:12 +0200 Subject: [PATCH 159/167] Added tests --- .../Media/AboveTheFold/Frontend/Subscriber/lcp.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php index 8450d07b31..c41f24493b 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/lcp.php @@ -240,4 +240,17 @@ ], 'expected' => $html_output_with_img_lcp, ], + 'shouldNotDoAnythingIfNoLcp' => [ + 'config' => [ + 'html' => $html_input, + 'row' => [ + 'status' => 'completed', + 'url' => 'http://example.org', + 'lcp' => 'not found', + 'viewport' => json_encode( [ + ] ), + ], + ], + 'expected' => $html_output, + ], ]; From 1ea967d3ec51ab343b91105e627a004ac2a93251 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Fri, 26 Apr 2024 04:48:41 +0200 Subject: [PATCH 160/167] Fix linter --- inc/Engine/Media/AboveTheFold/AJAX/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index f4205dd73f..92ce03c7f8 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -99,7 +99,7 @@ public function add_lcp_data() { * @return object|null Returns an object with the 'type' property and the first key that exists in the image object. If none of the keys exist in the image object, it returns null. */ private function create_object( $image, $keys ) { - // Bail out if type doesn't exist, it would mean no lcp has been found + // Bail out if type doesn't exist, it would mean no lcp has been found. if ( ! isset( $image->type ) ) { return null; } From a76706b5855b3f93df4191545aed557452a524b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Fri, 26 Apr 2024 07:49:22 -0400 Subject: [PATCH 161/167] Fixes #6574 Display console message only in debug mode (#6595) --- assets/js/lcp-beacon.js | 35 +++++------ assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- .../AboveTheFold/Frontend/Controller.php | 1 + .../siteURL/{rewrite.php => expected.html} | 8 +-- .../{rewrite.php => expected.html} | 3 - .../inc/Engine/CDN/Subscriber/rewrite.php | 11 +--- .../Subscriber/HTML/output_w_beacon.html | 2 +- .../Minify/CSS/Subscriber/process.php | 14 +---- .../Minify/JS/Subscriber/process.php | 60 +++++-------------- .../Hostings/WPEngine/Int/addFootprint.php | 4 +- ...disableImageDimensionsHeightPercentage.php | 4 +- ...disableImageDimensionsHeightPercentage.php | 3 +- .../inc/Engine/CDN/Subscriber/rewrite.php | 24 +++++--- .../Minify/CSS/Subscriber/process.php | 4 ++ .../Minify/JS/Subscriber/process.php | 8 +++ .../Hostings/WPEngine/addFootprint.php | 11 ++++ ...disableImageDimensionsHeightPercentage.php | 6 +- 18 files changed, 91 insertions(+), 111 deletions(-) rename tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/{rewrite.php => expected.html} (97%) rename tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/{rewrite.php => expected.html} (99%) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index c26a9eba76..a4fdff351d 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -167,7 +167,10 @@ function main() { }); if ( true === lcp_data_response.success ) { - console.log('Bailing out because data is already available'); + if (rocket_lcp_data.debug) { + console.log('Bailing out because data is already available'); + } + return; } @@ -178,7 +181,10 @@ function main() { if ( ( rocket_lcp_data.is_mobile && ( screenWidth > rocket_lcp_data.width_threshold || screenHeight > rocket_lcp_data.height_threshold ) ) || ( ! rocket_lcp_data.is_mobile && ( screenWidth < rocket_lcp_data.width_threshold || screenHeight < rocket_lcp_data.height_threshold ) ) ) { - console.log('Bailing out because screen size is not acceptable'); + if (rocket_lcp_data.debug) { + console.log('Bailing out because screen size is not acceptable'); + } + return; } @@ -193,7 +199,9 @@ function main() { label: "lcp", }]; } else { - console.log("No LCP candidate found."); + if (rocket_lcp_data.debug) { + console.log("No LCP candidate found."); + } } above_the_fold_images.forEach(({ element, elementInfo }) => { @@ -206,14 +214,6 @@ function main() { let performance_images_json = JSON.stringify(performance_images); window.performance_images_json = performance_images_json; - const payload = { - action: 'rocket_lcp', - rocket_lcp_nonce: rocket_lcp_data.nonce, - url: rocket_lcp_data.url, - is_mobile: rocket_lcp_data.is_mobile, - images: performance_images_json, - status: 'success' - }; const data = new FormData(); data.append('action', 'rocket_lcp'); @@ -235,21 +235,22 @@ function main() { .then((data) => { const beaconscript = document.querySelector('[data-name="wpr-lcp-beacon"]'); beaconscript.setAttribute('beacon-completed', 'true'); - console.log(data); + + if (rocket_lcp_data.debug) { + console.log(data); + } }) .catch((error) => { - console.error(error); + if (rocket_lcp_data.debug) { + console.error(error); + } }); } if (document.readyState !== 'loading') { - console.time("extract"); setTimeout(main, 500); - console.timeEnd("extract"); } else { document.addEventListener("DOMContentLoaded", function () { - console.time("extract"); setTimeout(main, 500); - console.timeEnd("extract"); }); } \ No newline at end of file diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index 3cebb05a57..d231d96bf5 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function c(n,o,i){function s(t,e){if(!o[t]){if(!n[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var a=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var c=e.querySelector(\"source\");r.src=e.poster||(c?c.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],s=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",s.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!s||\"\"===s)return null;const a=[...s.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:\"lcp\"}]:console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append(\"action\",\"rocket_lcp\"),n.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),n.append(\"url\",rocket_lcp_data.url),n.append(\"is_mobile\",rocket_lcp_data.is_mobile),n.append(\"images\",r),n.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:n,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?(console.time(\"extract\"),setTimeout(c,500),console.timeEnd(\"extract\")):document.addEventListener(\"DOMContentLoaded\",function(){console.time(\"extract\"),setTimeout(c,500),console.timeEnd(\"extract\")})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var c=e.querySelector(\"source\");r.src=e.poster||(c?c.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],a=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",a.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!a||\"\"===a)return null;const s=[...a.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:\"lcp\"}]:rocket_lcp_data.debug&&console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(a);window.performance_images_json=r;const n=new FormData;n.append(\"action\",\"rocket_lcp\"),n.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),n.append(\"url\",rocket_lcp_data.url),n.append(\"is_mobile\",rocket_lcp_data.is_mobile),n.append(\"images\",r),n.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:n,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?setTimeout(c,500):document.addEventListener(\"DOMContentLoaded\",function(){setTimeout(c,500)})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index 9caff4c4eb..b92f1be6ed 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function c(n,o,i){function s(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var a="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var c=e.querySelector("source");r.src=e.poster||(c?c.src:""),r.current_src=r.src}else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],s=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",s.includes("image-set(")&&(r.type="bg-img-set"),!s||""===s)return null;const a=[...s.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=a.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=a.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?s=[{...r.elementInfo,label:"lcp"}]:console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,s)&&s.push({...e,label:"above-the-fold"})});r=JSON.stringify(s);window.performance_images_json=r;rocket_lcp_data.nonce,rocket_lcp_data.url,rocket_lcp_data.is_mobile;const n=new FormData;n.append("action","rocket_lcp"),n.append("rocket_lcp_nonce",rocket_lcp_data.nonce),n.append("url",rocket_lcp_data.url),n.append("is_mobile",rocket_lcp_data.is_mobile),n.append("images",r),n.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:n,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),console.log(e)}).catch(e=>{console.error(e)})}}else console.log("Bailing out because data is already available")}"loading"!==document.readyState?(console.time("extract"),setTimeout(c,500),console.timeEnd("extract")):document.addEventListener("DOMContentLoaded",function(){console.time("extract"),setTimeout(c,500),console.timeEnd("extract")})},{}]},{},[1]); +!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var c=e.querySelector("source");r.src=e.poster||(c?c.src:""),r.current_src=r.src}else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],a=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",a.includes("image-set(")&&(r.type="bg-img-set"),!a||""===a)return null;const s=[...a.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:"lcp"}]:rocket_lcp_data.debug&&console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:"above-the-fold"})});r=JSON.stringify(a);window.performance_images_json=r;const n=new FormData;n.append("action","rocket_lcp"),n.append("rocket_lcp_nonce",rocket_lcp_data.nonce),n.append("url",rocket_lcp_data.url),n.append("is_mobile",rocket_lcp_data.is_mobile),n.append("images",r),n.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:n,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log("Bailing out because data is already available")}"loading"!==document.readyState?setTimeout(c,500):document.addEventListener("DOMContentLoaded",function(){setTimeout(c,500)})},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index 249fbaa49a..b4e1b19540 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -389,6 +389,7 @@ public function inject_beacon( $html, $url, $is_mobile ): string { 'elements' => $this->lcp_atf_elements(), 'width_threshold' => $width_threshold, 'height_threshold' => $height_threshold, + 'debug' => rocket_get_constant( 'WP_ROCKET_DEBUG' ), ]; $inline_script = ''; diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/expected.html similarity index 97% rename from tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php rename to tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/expected.html index 0cee85dccf..c6fb4607ef 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURL/expected.html @@ -783,14 +783,14 @@ function _isWebView_Android(options) {

In just a bit here, you should see the text start to wrap below the right aligned image and settle in nicely. There should still be plenty of room and everything should be sitting pretty. Yeah… Just like that. It never felt so good to be right.

And that’s a wrap, yo! You survived the tumultuous waters of alignment. Image alignment achievement unlocked!

- +
- +
- + - - diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/expected.html similarity index 99% rename from tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php rename to tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/expected.html index 3ac4a5dec4..fb00ad8b31 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/expected.html @@ -718,8 +718,5 @@ - - - diff --git a/tests/Fixtures/inc/Engine/CDN/Subscriber/rewrite.php b/tests/Fixtures/inc/Engine/CDN/Subscriber/rewrite.php index b68d87a278..840743afa9 100644 --- a/tests/Fixtures/inc/Engine/CDN/Subscriber/rewrite.php +++ b/tests/Fixtures/inc/Engine/CDN/Subscriber/rewrite.php @@ -1,21 +1,14 @@ [ 'site_url' => 'http://example.org', 'original' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/CDN/Subscriber/HTML/siteURL/original.html' ), - 'expected' => $default_site_url_expected, + 'expected' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/CDN/Subscriber/HTML/siteURL/expected.html' ), ], 'testSiteURLWithPath' => [ 'site_url' => 'http://example.org/blog', 'original' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/original.html' ), - 'expected' => $default_site_url_with_path_expected, + 'expected' => file_get_contents( WP_ROCKET_TESTS_FIXTURES_DIR . '/inc/Engine/CDN/Subscriber/HTML/siteURLWithPath/expected.html' ), ], ]; diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html index e11991cdf4..3efc371d25 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/Frontend/Subscriber/HTML/output_w_beacon.html @@ -3,5 +3,5 @@ Test - + diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php index 2b57e86a80..87f0c0f7fd 100644 --- a/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php @@ -38,8 +38,6 @@ - - ', 'files' => [ @@ -84,8 +82,6 @@ - - ', 'files' => [ @@ -128,8 +124,6 @@ - - ', 'files' => [ @@ -170,13 +164,11 @@ Sample Page - + - - ', 'files' => [ @@ -224,8 +216,6 @@ - - ', 'files' => [ @@ -270,8 +260,6 @@ - - ', 'files' => [ diff --git a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php index 35c2fb35df..03c664b0e6 100644 --- a/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php +++ b/tests/Fixtures/inc/Engine/Optimization/Minify/JS/Subscriber/process.php @@ -43,8 +43,6 @@ - - ', 'files' => [ @@ -88,8 +86,6 @@ - - ', 'files' => [ @@ -125,8 +121,6 @@ - - ', 'files' => [], @@ -157,11 +151,9 @@ Sample Page - + - - ', 'files' => [ @@ -201,8 +193,6 @@ - - ', 'files' => [ @@ -238,11 +228,9 @@ Sample Page - + - - ', 'files' => [ @@ -287,9 +275,7 @@ - - - + ', 'files' => [ @@ -333,9 +319,7 @@ - - - + ', 'files' => [ @@ -375,15 +359,13 @@ 'html' => ' Sample Page - + - - - + ', 'files' => [ @@ -424,16 +406,14 @@ 'html' => ' Sample Page - - + + - - - + ', 'files' => [ @@ -473,15 +453,13 @@ 'html' => ' Sample Page - + - - - + ', 'files' => [ @@ -522,16 +500,14 @@ 'html' => ' Sample Page - - + + - - - + ', 'files' => [ @@ -576,9 +552,7 @@ - - - + ', 'files' => [ @@ -624,9 +598,7 @@ - - - + ', 'files' => [ diff --git a/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php b/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php index 2137354490..4a22538be3 100644 --- a/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php +++ b/tests/Fixtures/inc/ThirdParty/Hostings/WPEngine/Int/addFootprint.php @@ -7,7 +7,6 @@ '', 'expected' => 'Sample Page' . '' . - '' . "\n" . '', ], 'testWPEngineAddFootprintWithWhitelabel' => [ @@ -16,7 +15,6 @@ '', 'expected' => 'Sample Page' . '' . - '' . "\n" . '', ], 'testWPEngineAddFootprintNoHtmlShouldBailOut' => [ @@ -24,6 +22,6 @@ 'html' => 'Sample Page' . '', 'expected' => 'Sample Page' . - '', + '', ], ]; diff --git a/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php b/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php index c4a232e351..df47d5c52c 100644 --- a/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php +++ b/tests/Fixtures/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php @@ -20,8 +20,6 @@ - - EXPECTEDHTML; @@ -96,7 +94,7 @@ ], 'html' => [ 'original' => '', - 'expected' => '', + 'expected' => '', ], ], ], diff --git a/tests/Fixtures/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php b/tests/Fixtures/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php index 888ca3169b..3e157e5632 100644 --- a/tests/Fixtures/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php +++ b/tests/Fixtures/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php @@ -18,7 +18,6 @@ - EXPECTEDHTML; @@ -93,7 +92,7 @@ ], 'html' => [ 'original' => '', - 'expected' => '', + 'expected' => '', ], ], ], diff --git a/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php b/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php index 4aeaa633a5..053fe89328 100644 --- a/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php +++ b/tests/Integration/inc/Engine/CDN/Subscriber/rewrite.php @@ -4,15 +4,23 @@ /** * Test class covering \WP_Rocket\Engine\CDN\Subscriber::rewrite - * @uses \WP_Rocket\Engine\CDN\CDN::rewrite - * @group CDN - * @group rewrite + * + * @uses \WP_Rocket\Engine\CDN\CDN::rewrite + * @group CDN */ class Test_Rewrite extends TestCase { + public function set_up() { + parent::set_up(); + + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'rewrite', 20 ); + } + public function tear_down() { remove_filter( 'content_url', [ $this, 'setContentURL' ] ); remove_filter( 'includes_url', [ $this, 'setIncludesURL' ] ); + $this->restoreWpHook( 'rocket_buffer' ); + parent::tear_down(); } @@ -20,14 +28,14 @@ public function tear_down() { * @dataProvider providerTestData */ public function testShouldRewriteURL( $home_url, $original, $expected ) { - $this->cnames = [ + $this->cnames = [ 'cdn.example.org', ]; - $this->cdn_zone = [ - 'all' + $this->cdn_zone = [ + 'all', ]; - $this->home_url = $home_url; - $this->content_url = "{$home_url}/wp-content/"; + $this->home_url = $home_url; + $this->content_url = "{$home_url}/wp-content/"; $this->includes_url = "{$home_url}/wp-includes/"; add_filter( 'pre_get_rocket_option_cdn', [ $this, 'return_true' ] ); diff --git a/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php b/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php index 0fea8ec354..7bb6b1c722 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/CSS/Subscriber/process.php @@ -26,6 +26,8 @@ class Test_Process extends TestCase { public function set_up() { parent::set_up(); + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'process', 16 ); + add_filter( 'pre_get_rocket_option_minify_css', [ $this, 'return_true' ] ); add_filter( 'pre_get_rocket_option_minify_css_key', [ $this, 'return_key' ] ); } @@ -33,6 +35,8 @@ public function set_up() { public function tear_down() { parent::tear_down(); + $this->restoreWpHook( 'rocket_buffer' ); + remove_filter( 'pre_get_rocket_option_minify_css', [ $this, 'return_true' ] ); remove_filter( 'pre_get_rocket_option_minify_css_key', [ $this, 'return_key' ] ); diff --git a/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php b/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php index c183d02acc..1a261a9e92 100644 --- a/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php +++ b/tests/Integration/inc/Engine/Optimization/Minify/JS/Subscriber/process.php @@ -24,9 +24,17 @@ class Test_Process extends TestCase { protected $path_to_test_data = '/inc/Engine/Optimization/Minify/JS/Subscriber/process.php'; + public function set_up() { + parent::set_up(); + + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'process', 22 ); + } + public function tear_down() { parent::tear_down(); + $this->restoreWpHook( 'rocket_buffer' ); + remove_filter( 'pre_get_rocket_option_minify_js', [ $this, 'return_true' ] ); remove_filter( 'pre_get_rocket_option_minify_js_key', [ $this, 'return_key' ] ); remove_filter( 'pre_get_rocket_option_defer_all_js', [ $this, 'return_defer_all_js' ] ); diff --git a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php index 25cce78b20..a23ded55a2 100644 --- a/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php +++ b/tests/Integration/inc/ThirdParty/Hostings/WPEngine/addFootprint.php @@ -12,6 +12,17 @@ * @group ThirdParty */ class Test_AddFootprint extends TestCase { + public function set_up() { + parent::set_up(); + + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'add_footprint', 50 ); + } + + public function tear_down() { + $this->restoreWpHook( 'rocket_buffer' ); + + parent::tear_down(); + } /** * @dataProvider providerTestData diff --git a/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php b/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php index e3a02cea5b..bfc3d6252b 100644 --- a/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php +++ b/tests/Integration/inc/ThirdParty/Themes/Divi/disableImageDimensionsHeightPercentage.php @@ -14,7 +14,7 @@ class Test_DisableImageDimensionsHeightPercentage extends WPThemeTestcase { use DBTrait; protected $path_to_test_data = '/inc/ThirdParty/Themes/Divi/Integration/disableImageDimensionsHeightPercentage.php'; - + private $container; private $event; private $subscriber; @@ -36,12 +36,16 @@ public function set_up() { $this->container = apply_filters( 'rocket_container', '' ); $this->event = $this->container->get( 'event_manager' ); + $this->unregisterAllCallbacksExcept( 'rocket_buffer', 'specify_image_dimensions', 17 ); + add_filter( 'rocket_specify_image_dimensions', '__return_true' ); } public function tear_down() { $this->event->remove_subscriber( $this->subscriber ); + $this->restoreWpHook( 'rocket_buffer' ); + remove_filter( 'rocket_specify_image_dimensions', '__return_true' ); unset( $GLOBALS['wp'] ); From f67703dd26d8bc899b515380fe870de8de43aa3b Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Fri, 26 Apr 2024 15:40:48 +0200 Subject: [PATCH 162/167] Deletes Bail out, and change the way we manage no lcp --- .../Media/AboveTheFold/AJAX/Controller.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index 92ce03c7f8..109a9c5aed 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -54,12 +54,12 @@ public function add_lcp_data() { $keys = [ 'bg_set', 'src' ]; foreach ( $images as $image ) { - if ( 'lcp' === $image->label && 'not found' === $lcp ) { - $lcp = $this->create_object( $image, $keys ); - } elseif ( 'above-the-fold' === $image->label ) { - $viewport_image = $this->create_object( $image, $keys ); - if ( null !== $viewport_image ) { - $viewport[] = $viewport_image; + if ( isset( $image->type ) ) { + $object = $this->create_object( $image, $keys ); + if ( 'lcp' === $image->label && null !== $object ) { + $lcp = $object; + } elseif ( 'above-the-fold' === $image->label && null !== $object ) { + $viewport[] = $object; } } } @@ -99,11 +99,6 @@ public function add_lcp_data() { * @return object|null Returns an object with the 'type' property and the first key that exists in the image object. If none of the keys exist in the image object, it returns null. */ private function create_object( $image, $keys ) { - // Bail out if type doesn't exist, it would mean no lcp has been found. - if ( ! isset( $image->type ) ) { - return null; - } - $object = new \stdClass(); $object->type = $image->type; From 764aaf255a02cdf74bd612262b5274784e6ebd6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Fri, 26 Apr 2024 14:48:27 -0400 Subject: [PATCH 163/167] update the method returning the list of elements for lcp/atf --- inc/Engine/Media/AboveTheFold/Frontend/Controller.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php index b4e1b19540..35d454803d 100644 --- a/inc/Engine/Media/AboveTheFold/Frontend/Controller.php +++ b/inc/Engine/Media/AboveTheFold/Frontend/Controller.php @@ -457,11 +457,11 @@ private function generate_source_tags( $lcp, $start_tag, $end_tag ) { } /** - * Pre-define the lcp/atf element + * Returns a comma-separated list of elements to be considered for the lcp/above-the-fold optimization. * * @return string */ - public function lcp_atf_elements(): string { + private function lcp_atf_elements(): string { $elements = [ 'img', 'video', @@ -482,12 +482,14 @@ public function lcp_atf_elements(): string { * * @param array $formats Array of elements */ - $elements = apply_filters( 'rocket_above_the_fold_elements', $elements ); + $elements = apply_filters( 'rocket_atf_elements', $elements ); if ( ! is_array( $elements ) ) { $elements = $default_elements; } + $elements = array_filter( $elements, 'is_string' ); + return implode( ', ', $elements ); } } From 5a93f898f721f03f37c6237c253fc669399ff3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Fri, 26 Apr 2024 15:09:49 -0400 Subject: [PATCH 164/167] remove unnecessary condition --- inc/Engine/Media/AboveTheFold/AJAX/Controller.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php index da82a0ecfa..9b85244571 100644 --- a/inc/Engine/Media/AboveTheFold/AJAX/Controller.php +++ b/inc/Engine/Media/AboveTheFold/AJAX/Controller.php @@ -79,9 +79,8 @@ public function add_lcp_data() { continue; } - if ( null !== $image_object ) { - $viewport[] = $image_object; - } + $viewport[] = $image_object; + --$max_atf_images_number; } } From 5915e1634bb7c40c0f9c8d451dbe5e50bf45cb6c Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Mon, 29 Apr 2024 03:35:00 +0200 Subject: [PATCH 165/167] Fix unit tests --- .../Media/AboveTheFold/AJAX/Controller/addLcpData.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php index 3d263dde03..48fbaa1a23 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Controller/addLcpData.php @@ -16,6 +16,7 @@ for ( $i = 1; $i <= 50; $i++ ) { $long_array[] = (object) [ 'label' => 'above-the-fold', + 'type' => 'img', 'src' => 'http://example.org/above-the-fold-' . $i . '.jpg', ]; $long_array_2[] = (object) [ @@ -219,10 +220,12 @@ [ (object) [ 'label' => 'lcp', + 'type' => 'img', 'src' => 'http://example.org/lcp.jpg', ], (object) [ 'label' => 'above-the-fold', + 'type' => 'img', 'src' => 'http://example.org/above-the-fold.jpg', ], ] @@ -309,7 +312,7 @@ 'url' => 'http://example.org', 'is_mobile' => false, 'status' => 'completed', - 'lcp' => '"not found"', + 'lcp' => 'not found', 'viewport' => '[]', 'last_accessed' => '2024-01-01 00:00:00', ], @@ -318,7 +321,7 @@ 'url' => 'http://example.org', 'is_mobile' => false, 'status' => 'completed', - 'lcp' => '"not found"', + 'lcp' => 'not found', 'viewport' => '[]', 'last_accessed' => '2024-01-01 00:00:00', ], From 612332526d6b909f0f138b43ede6c709f39168c0 Mon Sep 17 00:00:00 2001 From: Gael Robin Date: Mon, 29 Apr 2024 03:57:10 +0200 Subject: [PATCH 166/167] Add Integrations tests --- .../AJAX/Subscriber/addLcpData.php | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php index 4ee0ca1e19..2098ce06cc 100644 --- a/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php +++ b/tests/Fixtures/inc/Engine/Media/AboveTheFold/AJAX/Subscriber/addLcpData.php @@ -1,4 +1,28 @@ 'img', + 'label' => 'lcp', + 'src' => 'http://example.org/lcp.jpg', + ], +]; +$long_array_2 = [ + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/lcp.jpg', + ], +]; +for ( $i = 1; $i <= 50; $i++ ) { + $long_array[] = (object) [ + 'label' => 'above-the-fold', + 'type' => 'img', + 'src' => 'http://example.org/above-the-fold-' . $i . '.jpg', + ]; + $long_array_2[] = (object) [ + 'type' => 'img', + 'src' => 'http://example.org/above-the-fold-' . $i . '.jpg', + ]; +} return [ 'testShouldBailWhenNotAllowed' => [ @@ -104,4 +128,121 @@ 'result' => true, ], ], + 'testShouldSanitizeLCPAndATF' => [ + 'config' => [ + 'filter' => true, + 'url' => 'http://example.org', + 'is_mobile' => false, + 'images' => json_encode( + [ + (object) [ + 'label' => 'lcp', + 'type' => 'img', + 'src' => 'http://example.org/lcp.jpg', + ], + (object) [ + 'label' => 'above-the-fold', + 'type' => 'img', + 'src' => 'http://example.org/above-the-fold.jpg', + ], + ] + ), + ], + 'expected' => [ + 'item' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => json_encode( + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/lcp.jpgalert("Test XSS");', + ], + ), + 'viewport' => json_encode( [ + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/above-the-fold.jpgalert("Test XSS");', + ], + ] ), + 'last_accessed' => '2024-01-01 00:00:00', + ], + 'result' => true, + 'message' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => json_encode( + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/lcp.jpgalert("Test XSS");', + ], + ), + 'viewport' => json_encode( [ + (object) [ + 'type' => 'img', + 'src' => 'http://example.org/above-the-fold.jpgalert("Test XSS");', + ], + ] ), + 'last_accessed' => '2024-01-01 00:00:00', + ], + ], + ], + 'testShouldAddLongItemToDB' => [ + 'config' => [ + 'filter' => true, + 'url' => 'http://example.org', + 'is_mobile' => false, + 'images' => json_encode( + $long_array + ), + ], + 'expected' => [ + 'item' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => json_encode( $long_array_2[0] ), + 'viewport' => json_encode( array_slice( $long_array_2, 1, 20 ) ), + 'last_accessed' => '2024-01-01 00:00:00', + ], + 'result' => true, + 'message' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => json_encode( $long_array_2[0] ), + 'viewport' => json_encode( array_slice( $long_array_2, 1, 20 ) ), + 'last_accessed' => '2024-01-01 00:00:00', + ], + ], + ], + 'testShouldNotAddItemToDBWhenNoData' => [ + 'config' => [ + 'filter' => true, + 'url' => 'http://example.org', + 'is_mobile' => false, + 'images' => '', + ], + 'expected' => [ + 'item' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => 'not found', + 'viewport' => '[]', + 'last_accessed' => '2024-01-01 00:00:00', + ], + 'result' => true, + 'message' => [ + 'url' => 'http://example.org', + 'is_mobile' => false, + 'status' => 'completed', + 'lcp' => 'not found', + 'viewport' => '[]', + 'last_accessed' => '2024-01-01 00:00:00', + ], + ], + ], + ]; From 43b073c250aa7a4db280a803defae0dbe912de1a Mon Sep 17 00:00:00 2001 From: WordPress Fan <146129302+wordpressfan@users.noreply.github.com> Date: Mon, 29 Apr 2024 20:05:54 +0300 Subject: [PATCH 167/167] 3.16 - Refactor beacon script and notify SaaS that we completed with all possible bailout (PR #6598) --- assets/js/lcp-beacon.js | 485 ++++++++++++++++++-------------- assets/js/lcp-beacon.js.min.map | 2 +- assets/js/lcp-beacon.min.js | 2 +- 3 files changed, 274 insertions(+), 215 deletions(-) diff --git a/assets/js/lcp-beacon.js b/assets/js/lcp-beacon.js index a4fdff351d..120879662b 100644 --- a/assets/js/lcp-beacon.js +++ b/assets/js/lcp-beacon.js @@ -1,256 +1,315 @@ -function isDuplicateImage(image, performance_images) { - const elementInfo = getElementInfo(image); - - if (elementInfo === null) { - return false; +class RocketLcpBeacon { + constructor( config ) { + this.config = config; + this.performanceImages = []; } - const isImageOrVideo = - elementInfo.type === "img" || - elementInfo.type === "img-srcset" || - elementInfo.type === "video"; + init() { + if ( ! this._isValidPreconditions() ) { + this._finalize(); + return; + } - const isBgImageOrPicture = - elementInfo.type === "bg-img" || - elementInfo.type === "bg-img-set" || - elementInfo.type === "picture"; + // Use _generateLcpCandidates method to get all the elements in the viewport. + const above_the_fold_images = this._generateLcpCandidates( Infinity ); + if ( above_the_fold_images ) { + this._initWithFirstElementWithInfo( above_the_fold_images ); + this._fillATFWithoutDuplications( above_the_fold_images ); + } - return ( - isImageOrVideo || isBgImageOrPicture - ) && performance_images.some(item => item.src === elementInfo.src); -} + this._saveFinalResultIntoDB(); + } -function isIntersecting(rect) { - // Check if any part of the image is within the viewport - return ( - rect.bottom >= 0 && - rect.right >= 0 && - rect.top <= (window.innerHeight || document.documentElement.clientHeight) && - rect.left <= (window.innerWidth || document.documentElement.clientWidth) - ); -} + _isValidPreconditions() { + // Check the screensize first because starting any logic. + if ( this._isNotValidScreensize() ) { + this._logMessage('Bailing out because screen size is not acceptable'); + return false; + } -function LCPCandidates(count) { - const potentialCandidates = Array.from(document.querySelectorAll( - rocket_lcp_data.elements, - )); + if ( this._isGeneratedBefore() ) { + this._logMessage('Bailing out because data is already available'); + return false; + } - const topCandidates = potentialCandidates.map(element => { - const rect = element.getBoundingClientRect(); - return { - element: element, - rect: rect, - }; - }).filter(item => { - return ( - item.rect.width > 0 && - item.rect.height > 0 && - isIntersecting(item.rect) - ); - }) - .map(item => ({ - item, - area: getArea(item.rect), - elementInfo: getElementInfo(item.element), - })) - .sort((a, b) => b.area - a.area) - .slice(0, count); - - return topCandidates.map(candidate => ({ - element: candidate.item.element, - elementInfo: candidate.elementInfo, - })); -} + return true; + } -function getArea(rect) { - const visibleWidth = Math.min(rect.width, (window.innerWidth || document.documentElement.clientWidth) - rect.left); - const visibleHeight = Math.min(rect.height, (window.innerHeight || document.documentElement.clientHeight) - rect.top); + _isGeneratedBefore() { + // AJAX call to check if there are any records for the current URL. + let data_check = new FormData(); + data_check.append('action', 'rocket_check_lcp'); + data_check.append('rocket_lcp_nonce', this.config.nonce); + data_check.append('url', this.config.url); + data_check.append('is_mobile', this.config.is_mobile); + + const lcp_data_response = fetch(this.config.ajax_url, { + method: "POST", + credentials: 'same-origin', + body: data_check + }); + + return lcp_data_response.success; + } - return visibleWidth * visibleHeight; -} + _isNotValidScreensize() { + // Check screen size + const screenWidth = window.innerWidth || document.documentElement.clientWidth; + const screenHeight= window.innerHeight || document.documentElement.clientHeight; -function getElementInfo(element) { - const nodeName = element.nodeName.toLowerCase(); - const element_info = { - type: "", - src: "", - srcset: "", - sizes: "", - sources: [], - bg_set: [], - current_src: "" - }; - - const css_bg_url_rgx = /url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/ig; - - if (nodeName === "img" && element.srcset) { - element_info.type = "img-srcset"; - element_info.src = element.src; - element_info.srcset = element.srcset; // capture srcset - element_info.sizes = element.sizes; // capture sizes - element_info.current_src = element.currentSrc; - } else if (nodeName === "img") { - element_info.type = "img"; - element_info.src = element.src; - element_info.current_src = element.currentSrc; - } else if (nodeName === "video") { - element_info.type = "img"; - const source = element.querySelector('source'); - element_info.src = element.poster || (source ? source.src : ''); - element_info.current_src = element_info.src; - } else if (nodeName === "svg") { - const imageElement = element.querySelector('image'); - if (imageElement) { - element_info.type = "img"; - element_info.src = imageElement.getAttribute('href') || ''; - element_info.current_src = element_info.src; - } - } else if (nodeName === "picture") { - element_info.type = "picture"; - const img = element.querySelector('img:not(picture>img)'); - element_info.src = img ? img.src : ""; - element_info.sources = Array.from(element.querySelectorAll('source')).map(source => ({ - srcset: source.srcset || '', - media: source.media || '' - })); - } else { - const computed_style = window.getComputedStyle(element, null); - const bg_props = [ - computed_style.getPropertyValue("background-image"), - getComputedStyle(element, ":after").getPropertyValue("background-image"), - getComputedStyle(element, ":before").getPropertyValue("background-image") - ]; - - const full_bg_prop = bg_props.filter(prop => prop !== "none").join(""); - element_info.type = "bg-img"; - if (full_bg_prop.includes("image-set(")) { - element_info.type = "bg-img-set"; - } - if (!full_bg_prop || full_bg_prop === "") { - return null; - } + const isNotValidForMobile = this.config.is_mobile && + ( screenWidth > this.config.width_threshold || screenHeight > this.config.height_threshold ); + const isNotValidForDesktop = !this.config.is_mobile && + ( screenWidth < this.config.width_threshold || screenHeight < this.config.height_threshold ); - const matches = [...full_bg_prop.matchAll(css_bg_url_rgx)]; - element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim() + (m[2] ? " " + m[2].trim() : "")} : {}); - // Check if bg_set array is populated with empty objects - if (element_info.bg_set.every(item => item.src === "")) { - // If bg_set array is populated with empty objects, populate it with the URLs from the matches array - element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim()} : {}); - } + return isNotValidForMobile || isNotValidForDesktop; + } - if (element_info.bg_set.length > 0) { - element_info.src = element_info.bg_set[0].src; - if (element_info.type === "bg-img-set") { - element_info.src = element_info.bg_set; - } + _generateLcpCandidates( count ) { + const lcpElements = document.querySelectorAll( this.config.elements ); + + if ( lcpElements.length <= 0 ) { + return []; } + + const potentialCandidates = Array.from( lcpElements ); + + const topCandidates = potentialCandidates.map(element => { + const rect = element.getBoundingClientRect(); + return { + element: element, + rect: rect, + }; + }).filter(item => { + return ( + item.rect.width > 0 && + item.rect.height > 0 && + this._isIntersecting(item.rect) + ); + }) + .map(item => ({ + item, + area: this._getElementArea(item.rect), + elementInfo: this._getElementInfo(item.element), + })) + .sort((a, b) => b.area - a.area) + .slice(0, count); + + return topCandidates.map(candidate => ({ + element: candidate.item.element, + elementInfo: candidate.elementInfo, + })); } - return element_info; -} + _isIntersecting(rect) { + // Check if any part of the image is within the viewport + return ( + rect.bottom >= 0 && + rect.right >= 0 && + rect.top <= (window.innerHeight || document.documentElement.clientHeight) && + rect.left <= (window.innerWidth || document.documentElement.clientWidth) + ); + } -let performance_images = []; + _getElementArea(rect) { + const visibleWidth = Math.min(rect.width, (window.innerWidth || document.documentElement.clientWidth) - rect.left); + const visibleHeight = Math.min(rect.height, (window.innerHeight || document.documentElement.clientHeight) - rect.top); -function main() { + return visibleWidth * visibleHeight; + } - // AJAX call to check if there are any records for the current URL - let data_check = new FormData(); - data_check.append('action', 'rocket_check_lcp'); - data_check.append('rocket_lcp_nonce', rocket_lcp_data.nonce); - data_check.append('url', rocket_lcp_data.url); - data_check.append('is_mobile', rocket_lcp_data.is_mobile); + _getElementInfo(element) { + const nodeName = element.nodeName.toLowerCase(); + const element_info = { + type: "", + src: "", + srcset: "", + sizes: "", + sources: [], + bg_set: [], + current_src: "" + }; - const lcp_data_response = fetch(rocket_lcp_data.ajax_url, { - method: "POST", - credentials: 'same-origin', - body: data_check - }); + const css_bg_url_rgx = /url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/ig; - if ( true === lcp_data_response.success ) { - if (rocket_lcp_data.debug) { - console.log('Bailing out because data is already available'); - } - - return; - } + if (nodeName === "img" && element.srcset) { + element_info.type = "img-srcset"; + element_info.src = element.src; + element_info.srcset = element.srcset; // capture srcset + element_info.sizes = element.sizes; // capture sizes + element_info.current_src = element.currentSrc; + } else if (nodeName === "img") { + element_info.type = "img"; + element_info.src = element.src; + element_info.current_src = element.currentSrc; + } else if (nodeName === "video") { + element_info.type = "img"; + const source = element.querySelector('source'); + element_info.src = element.poster || (source ? source.src : ''); + element_info.current_src = element_info.src; + } else if (nodeName === "svg") { + const imageElement = element.querySelector('image'); + if (imageElement) { + element_info.type = "img"; + element_info.src = imageElement.getAttribute('href') || ''; + element_info.current_src = element_info.src; + } + } else if (nodeName === "picture") { + element_info.type = "picture"; + const img = element.querySelector('img:not(picture>img)'); + element_info.src = img ? img.src : ""; + element_info.sources = Array.from(element.querySelectorAll('source')).map(source => ({ + srcset: source.srcset || '', + media: source.media || '' + })); + } else { + const computed_style = window.getComputedStyle(element, null); + const bg_props = [ + computed_style.getPropertyValue("background-image"), + getComputedStyle(element, ":after").getPropertyValue("background-image"), + getComputedStyle(element, ":before").getPropertyValue("background-image") + ]; + + const full_bg_prop = bg_props.filter(prop => prop !== "none").join(""); + element_info.type = "bg-img"; + if (full_bg_prop.includes("image-set(")) { + element_info.type = "bg-img-set"; + } + if (!full_bg_prop || full_bg_prop === "") { + return null; + } - // Check screen size - const screenWidth = window.innerWidth || document.documentElement.clientWidth; - const screenHeight = window.innerHeight || document.documentElement.clientHeight; + const matches = [...full_bg_prop.matchAll(css_bg_url_rgx)]; + element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim() + (m[2] ? " " + m[2].trim() : "")} : {}); + // Check if bg_set array is populated with empty objects + if (element_info.bg_set.every(item => item.src === "")) { + // If bg_set array is populated with empty objects, populate it with the URLs from the matches array + element_info.bg_set = matches.map(m => m[1] ? {src: m[1].trim()} : {}); + } - if ( ( rocket_lcp_data.is_mobile && ( screenWidth > rocket_lcp_data.width_threshold || screenHeight > rocket_lcp_data.height_threshold ) ) || - ( ! rocket_lcp_data.is_mobile && ( screenWidth < rocket_lcp_data.width_threshold || screenHeight < rocket_lcp_data.height_threshold ) ) ) - { - if (rocket_lcp_data.debug) { - console.log('Bailing out because screen size is not acceptable'); + if (element_info.bg_set.length > 0) { + element_info.src = element_info.bg_set[0].src; + if (element_info.type === "bg-img-set") { + element_info.src = element_info.bg_set; + } + } } - return; + return element_info; } - // Use LCPCandidates function to get all the elements in the viewport - const above_the_fold_images = LCPCandidates(Infinity); + _initWithFirstElementWithInfo(elements) { + const firstElementWithInfo = elements.find(item => item.elementInfo !== null); - const firstElementWithInfo = above_the_fold_images.find(item => item.elementInfo !== null); + if ( ! firstElementWithInfo ) { + this._logMessage("No LCP candidate found."); + this.performanceImages = []; + return; + } - if (firstElementWithInfo) { - performance_images = [{ + this.performanceImages = [{ ...firstElementWithInfo.elementInfo, label: "lcp", }]; - } else { - if (rocket_lcp_data.debug) { - console.log("No LCP candidate found."); - } } - above_the_fold_images.forEach(({ element, elementInfo }) => { - const isDuplicate = isDuplicateImage(element, performance_images); + _fillATFWithoutDuplications(elements) { + elements.forEach(({ element, elementInfo }) => { + if ( this._isDuplicateImage(element) ) { + return; + } + + this.performanceImages.push({ ...elementInfo, label: "above-the-fold" }); + }); + } + + _isDuplicateImage(image) { + const elementInfo = this._getElementInfo(image); - if (!isDuplicate) { - performance_images.push({ ...elementInfo, label: "above-the-fold" }); + if (elementInfo === null) { + return false; } - }); - - let performance_images_json = JSON.stringify(performance_images); - window.performance_images_json = performance_images_json; - - const data = new FormData(); - data.append('action', 'rocket_lcp'); - data.append('rocket_lcp_nonce', rocket_lcp_data.nonce); - data.append('url', rocket_lcp_data.url); - data.append('is_mobile', rocket_lcp_data.is_mobile); - data.append('images', performance_images_json); - data.append('status', 'success'); - - fetch(rocket_lcp_data.ajax_url, { - method: "POST", - credentials: 'same-origin', - body: data, - headers: { - 'wpr-saas-no-intercept': true + + const isImageOrVideo = + elementInfo.type === "img" || + elementInfo.type === "img-srcset" || + elementInfo.type === "video"; + + const isBgImageOrPicture = + elementInfo.type === "bg-img" || + elementInfo.type === "bg-img-set" || + elementInfo.type === "picture"; + + return (isImageOrVideo || isBgImageOrPicture) + && + this.performanceImages.some(item => item.src === elementInfo.src); + } + + _saveFinalResultIntoDB() { + if ( ! this.performanceImages ) { + return; } - }) - .then((response) => response.json()) - .then((data) => { + + const data = new FormData(); + data.append('action', 'rocket_lcp'); + data.append('rocket_lcp_nonce', this.config.nonce); + data.append('url', this.config.url); + data.append('is_mobile', this.config.is_mobile); + data.append('images', JSON.stringify(this.performanceImages)); + data.append('status', 'success'); + + fetch(rocket_lcp_data.ajax_url, { + method: "POST", + credentials: 'same-origin', + body: data, + headers: { + 'wpr-saas-no-intercept': true + } + }) + .then((response) => response.json()) + .then((data) => { + this._logMessage(data); + }) + .catch((error) => { + this._logMessage(error); + }) + .finally(() => { + this._finalize(); + }); + } + + _finalize() { const beaconscript = document.querySelector('[data-name="wpr-lcp-beacon"]'); beaconscript.setAttribute('beacon-completed', 'true'); + } + + _logMessage( msg ) { + if ( ! this.config.debug ) { + return; + } + console.log( msg ); + } - if (rocket_lcp_data.debug) { - console.log(data); + static run() { + if ( !window.rocket_lcp_data ) { + return; } - }) - .catch((error) => { - if (rocket_lcp_data.debug) { - console.error(error); + + const instance = new RocketLcpBeacon( window.rocket_lcp_data ); + + if (document.readyState !== 'loading') { + setTimeout(() => { + instance.init(); + }, 500); + return; } - }); + + document.addEventListener("DOMContentLoaded", () => { + setTimeout(() => { + instance.init(); + }, 500); + }); + } } -if (document.readyState !== 'loading') { - setTimeout(main, 500); -} else { - document.addEventListener("DOMContentLoaded", function () { - setTimeout(main, 500); - }); -} \ No newline at end of file +RocketLcpBeacon.run(); \ No newline at end of file diff --git a/assets/js/lcp-beacon.js.min.map b/assets/js/lcp-beacon.js.min.map index d231d96bf5..16eb99076d 100644 --- a/assets/js/lcp-beacon.js.min.map +++ b/assets/js/lcp-beacon.js.min.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r=\"function\"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s=\"function\"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)r.type=\"img-srcset\",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if(\"img\"===t)r.type=\"img\",r.src=e.src,r.current_src=e.currentSrc;else if(\"video\"===t){r.type=\"img\";var c=e.querySelector(\"source\");r.src=e.poster||(c?c.src:\"\"),r.current_src=r.src}else if(\"svg\"===t){const n=e.querySelector(\"image\");n&&(r.type=\"img\",r.src=n.getAttribute(\"href\")||\"\",r.current_src=r.src)}else if(\"picture\"===t){r.type=\"picture\";t=e.querySelector(\"img:not(picture>img)\");r.src=t?t.src:\"\",r.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")],a=i.filter(e=>\"none\"!==e).join(\"\");if(r.type=\"bg-img\",a.includes(\"image-set(\")&&(r.type=\"bg-img-set\"),!a||\"\"===a)return null;const s=[...a.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),r.bg_set.every(e=>\"\"===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:\"lcp\"}]:rocket_lcp_data.debug&&console.log(\"No LCP candidate found.\"),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c=\"img\"===r.type||\"img-srcset\"===r.type||\"video\"===r.type,e=\"bg-img\"===r.type||\"bg-img-set\"===r.type||\"picture\"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:\"above-the-fold\"})});r=JSON.stringify(a);window.performance_images_json=r;const n=new FormData;n.append(\"action\",\"rocket_lcp\"),n.append(\"rocket_lcp_nonce\",rocket_lcp_data.nonce),n.append(\"url\",rocket_lcp_data.url),n.append(\"is_mobile\",rocket_lcp_data.is_mobile),n.append(\"images\",r),n.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:n,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name=\"wpr-lcp-beacon\"]');t.setAttribute(\"beacon-completed\",\"true\"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log(\"Bailing out because data is already available\")}\"loading\"!==document.readyState?setTimeout(c,500):document.addEventListener(\"DOMContentLoaded\",function(){setTimeout(c,500)})},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["lcp-beacon.js"],"sourcesContent":["!function n(r,s,o){function c(t,e){if(!s[t]){if(!r[t]){var i=\"function\"==typeof require&&require;if(!e&&i)return i(t,!0);if(a)return a(t,!0);throw(e=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",e}i=s[t]={exports:{}},r[t][0].call(i.exports,function(e){return c(r[t][1][e]||e)},i,i.exports,n,r,s,o)}return s[t].exports}for(var a=\"function\"==typeof require&&require,e=0;ethis.config.width_threshold||t>this.config.height_threshold),e=!this.config.is_mobile&&(e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>0({item:e,area:this._getElementArea(e.rect),elementInfo:this._getElementInfo(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e).map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}_isIntersecting(e){return 0<=e.bottom&&0<=e.right&&e.top<=(window.innerHeight||document.documentElement.clientHeight)&&e.left<=(window.innerWidth||document.documentElement.clientWidth)}_getElementArea(e){return Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left)*Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top)}_getElementInfo(e){var t=e.nodeName.toLowerCase(),i={type:\"\",src:\"\",srcset:\"\",sizes:\"\",sources:[],bg_set:[],current_src:\"\"};if(\"img\"===t&&e.srcset)i.type=\"img-srcset\",i.src=e.src,i.srcset=e.srcset,i.sizes=e.sizes,i.current_src=e.currentSrc;else if(\"img\"===t)i.type=\"img\",i.src=e.src,i.current_src=e.currentSrc;else if(\"video\"===t){i.type=\"img\";var n=e.querySelector(\"source\");i.src=e.poster||(n?n.src:\"\"),i.current_src=i.src}else if(\"svg\"===t)(n=e.querySelector(\"image\"))&&(i.type=\"img\",i.src=n.getAttribute(\"href\")||\"\",i.current_src=i.src);else if(\"picture\"===t)i.type=\"picture\",n=e.querySelector(\"img:not(picture>img)\"),i.src=n?n.src:\"\",i.sources=Array.from(e.querySelectorAll(\"source\")).map(e=>({srcset:e.srcset||\"\",media:e.media||\"\"}));else{if(t=[window.getComputedStyle(e,null).getPropertyValue(\"background-image\"),getComputedStyle(e,\":after\").getPropertyValue(\"background-image\"),getComputedStyle(e,\":before\").getPropertyValue(\"background-image\")].filter(e=>\"none\"!==e).join(\"\"),i.type=\"bg-img\",t.includes(\"image-set(\")&&(i.type=\"bg-img-set\"),!t||\"\"===t)return null;n=[...t.matchAll(/url\\(\\s*?['\"]?\\s*?(\\S+?)\\s*?[\"']?\\s*?\\)\\s*?([a-zA-Z0-9\\s]*[x|dpcm|dpi|dppx]?)/gi)],i.bg_set=n.map(e=>e[1]?{src:e[1].trim()+(e[2]?\" \"+e[2].trim():\"\")}:{}),i.bg_set.every(e=>\"\"===e.src)&&(i.bg_set=n.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo))?this.performanceImages=[{...e.elementInfo,label:\"lcp\"}]:(this._logMessage(\"No LCP candidate found.\"),this.performanceImages=[])}_fillATFWithoutDuplications(e){e.forEach(e=>{var{element:e,elementInfo:t}=e;this._isDuplicateImage(e)||this.performanceImages.push({...t,label:\"above-the-fold\"})})}_isDuplicateImage(e){const t=this._getElementInfo(e);var i;return null!==t&&(e=\"img\"===t.type||\"img-srcset\"===t.type||\"video\"===t.type,i=\"bg-img\"===t.type||\"bg-img-set\"===t.type||\"picture\"===t.type,e||i)&&this.performanceImages.some(e=>e.src===t.src)}_saveFinalResultIntoDB(){var e;this.performanceImages&&((e=new FormData).append(\"action\",\"rocket_lcp\"),e.append(\"rocket_lcp_nonce\",this.config.nonce),e.append(\"url\",this.config.url),e.append(\"is_mobile\",this.config.is_mobile),e.append(\"images\",JSON.stringify(this.performanceImages)),e.append(\"status\",\"success\"),fetch(rocket_lcp_data.ajax_url,{method:\"POST\",credentials:\"same-origin\",body:e,headers:{\"wpr-saas-no-intercept\":!0}}).then(e=>e.json()).then(e=>{this._logMessage(e)}).catch(e=>{this._logMessage(e)}).finally(()=>{this._finalize()}))}_finalize(){document.querySelector('[data-name=\"wpr-lcp-beacon\"]').setAttribute(\"beacon-completed\",\"true\")}_logMessage(e){this.config.debug&&console.log(e)}static run(){if(window.rocket_lcp_data){const e=new n(window.rocket_lcp_data);\"loading\"!==document.readyState?setTimeout(()=>{e.init()},500):document.addEventListener(\"DOMContentLoaded\",()=>{setTimeout(()=>{e.init()},500)})}}}).run()},{}]},{},[1]);"],"file":"lcp-beacon.js"} \ No newline at end of file diff --git a/assets/js/lcp-beacon.min.js b/assets/js/lcp-beacon.min.js index b92f1be6ed..d15b911ce8 100644 --- a/assets/js/lcp-beacon.min.js +++ b/assets/js/lcp-beacon.min.js @@ -1,2 +1,2 @@ -!function c(n,o,i){function a(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return a(n[t][1][e]||e)},r,r.exports,c,n,o,i)}return o[t].exports}for(var s="function"==typeof require&&require,e=0;e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>{return 0({item:e,area:function(e){var t=Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left),e=Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top);return t*e}(e.rect),elementInfo:i(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e);return r.map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}function i(e){var t=e.nodeName.toLowerCase();const r={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)r.type="img-srcset",r.src=e.src,r.srcset=e.srcset,r.sizes=e.sizes,r.current_src=e.currentSrc;else if("img"===t)r.type="img",r.src=e.src,r.current_src=e.currentSrc;else if("video"===t){r.type="img";var c=e.querySelector("source");r.src=e.poster||(c?c.src:""),r.current_src=r.src}else if("svg"===t){const n=e.querySelector("image");n&&(r.type="img",r.src=n.getAttribute("href")||"",r.current_src=r.src)}else if("picture"===t){r.type="picture";t=e.querySelector("img:not(picture>img)");r.src=t?t.src:"",r.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}))}else{const o=window.getComputedStyle(e,null),i=[o.getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")],a=i.filter(e=>"none"!==e).join("");if(r.type="bg-img",a.includes("image-set(")&&(r.type="bg-img-set"),!a||""===a)return null;const s=[...a.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)];r.bg_set=s.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),r.bg_set.every(e=>""===e.src)&&(r.bg_set=s.map(e=>e[1]?{src:e[1].trim()}:{})),0rocket_lcp_data.width_threshold||r>rocket_lcp_data.height_threshold)||!rocket_lcp_data.is_mobile&&(tnull!==e.elementInfo);r?a=[{...r.elementInfo,label:"lcp"}]:rocket_lcp_data.debug&&console.log("No LCP candidate found."),c.forEach(e=>{var{element:t,elementInfo:e}=e;!function(e,t){const r=i(e);if(null===r)return!1;var c="img"===r.type||"img-srcset"===r.type||"video"===r.type,e="bg-img"===r.type||"bg-img-set"===r.type||"picture"===r.type;return(c||e)&&t.some(e=>e.src===r.src)}(t,a)&&a.push({...e,label:"above-the-fold"})});r=JSON.stringify(a);window.performance_images_json=r;const n=new FormData;n.append("action","rocket_lcp"),n.append("rocket_lcp_nonce",rocket_lcp_data.nonce),n.append("url",rocket_lcp_data.url),n.append("is_mobile",rocket_lcp_data.is_mobile),n.append("images",r),n.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:n,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{const t=document.querySelector('[data-name="wpr-lcp-beacon"]');t.setAttribute("beacon-completed","true"),rocket_lcp_data.debug&&console.log(e)}).catch(e=>{rocket_lcp_data.debug&&console.error(e)})}}else rocket_lcp_data.debug&&console.log("Bailing out because data is already available")}"loading"!==document.readyState?setTimeout(c,500):document.addEventListener("DOMContentLoaded",function(){setTimeout(c,500)})},{}]},{},[1]); +!function n(r,s,o){function c(t,e){if(!s[t]){if(!r[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(a)return a(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}i=s[t]={exports:{}},r[t][0].call(i.exports,function(e){return c(r[t][1][e]||e)},i,i.exports,n,r,s,o)}return s[t].exports}for(var a="function"==typeof require&&require,e=0;ethis.config.width_threshold||t>this.config.height_threshold),e=!this.config.is_mobile&&(e{var t=e.getBoundingClientRect();return{element:e,rect:t}}).filter(e=>0({item:e,area:this._getElementArea(e.rect),elementInfo:this._getElementInfo(e.element)})).sort((e,t)=>t.area-e.area).slice(0,e).map(e=>({element:e.item.element,elementInfo:e.elementInfo}))}_isIntersecting(e){return 0<=e.bottom&&0<=e.right&&e.top<=(window.innerHeight||document.documentElement.clientHeight)&&e.left<=(window.innerWidth||document.documentElement.clientWidth)}_getElementArea(e){return Math.min(e.width,(window.innerWidth||document.documentElement.clientWidth)-e.left)*Math.min(e.height,(window.innerHeight||document.documentElement.clientHeight)-e.top)}_getElementInfo(e){var t=e.nodeName.toLowerCase(),i={type:"",src:"",srcset:"",sizes:"",sources:[],bg_set:[],current_src:""};if("img"===t&&e.srcset)i.type="img-srcset",i.src=e.src,i.srcset=e.srcset,i.sizes=e.sizes,i.current_src=e.currentSrc;else if("img"===t)i.type="img",i.src=e.src,i.current_src=e.currentSrc;else if("video"===t){i.type="img";var n=e.querySelector("source");i.src=e.poster||(n?n.src:""),i.current_src=i.src}else if("svg"===t)(n=e.querySelector("image"))&&(i.type="img",i.src=n.getAttribute("href")||"",i.current_src=i.src);else if("picture"===t)i.type="picture",n=e.querySelector("img:not(picture>img)"),i.src=n?n.src:"",i.sources=Array.from(e.querySelectorAll("source")).map(e=>({srcset:e.srcset||"",media:e.media||""}));else{if(t=[window.getComputedStyle(e,null).getPropertyValue("background-image"),getComputedStyle(e,":after").getPropertyValue("background-image"),getComputedStyle(e,":before").getPropertyValue("background-image")].filter(e=>"none"!==e).join(""),i.type="bg-img",t.includes("image-set(")&&(i.type="bg-img-set"),!t||""===t)return null;n=[...t.matchAll(/url\(\s*?['"]?\s*?(\S+?)\s*?["']?\s*?\)\s*?([a-zA-Z0-9\s]*[x|dpcm|dpi|dppx]?)/gi)],i.bg_set=n.map(e=>e[1]?{src:e[1].trim()+(e[2]?" "+e[2].trim():"")}:{}),i.bg_set.every(e=>""===e.src)&&(i.bg_set=n.map(e=>e[1]?{src:e[1].trim()}:{})),0null!==e.elementInfo))?this.performanceImages=[{...e.elementInfo,label:"lcp"}]:(this._logMessage("No LCP candidate found."),this.performanceImages=[])}_fillATFWithoutDuplications(e){e.forEach(e=>{var{element:e,elementInfo:t}=e;this._isDuplicateImage(e)||this.performanceImages.push({...t,label:"above-the-fold"})})}_isDuplicateImage(e){const t=this._getElementInfo(e);var i;return null!==t&&(e="img"===t.type||"img-srcset"===t.type||"video"===t.type,i="bg-img"===t.type||"bg-img-set"===t.type||"picture"===t.type,e||i)&&this.performanceImages.some(e=>e.src===t.src)}_saveFinalResultIntoDB(){var e;this.performanceImages&&((e=new FormData).append("action","rocket_lcp"),e.append("rocket_lcp_nonce",this.config.nonce),e.append("url",this.config.url),e.append("is_mobile",this.config.is_mobile),e.append("images",JSON.stringify(this.performanceImages)),e.append("status","success"),fetch(rocket_lcp_data.ajax_url,{method:"POST",credentials:"same-origin",body:e,headers:{"wpr-saas-no-intercept":!0}}).then(e=>e.json()).then(e=>{this._logMessage(e)}).catch(e=>{this._logMessage(e)}).finally(()=>{this._finalize()}))}_finalize(){document.querySelector('[data-name="wpr-lcp-beacon"]').setAttribute("beacon-completed","true")}_logMessage(e){this.config.debug&&console.log(e)}static run(){if(window.rocket_lcp_data){const e=new n(window.rocket_lcp_data);"loading"!==document.readyState?setTimeout(()=>{e.init()},500):document.addEventListener("DOMContentLoaded",()=>{setTimeout(()=>{e.init()},500)})}}}).run()},{}]},{},[1]); //# sourceMappingURL=lcp-beacon.js.map