From 8ca87d35c7faf996555dcaeff7079d592717f69b Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 29 Nov 2024 19:50:50 -0800 Subject: [PATCH] Remove logic made obsolete by #1658 --- plugins/embed-optimizer/load.php | 18 ------------------ plugins/image-prioritizer/load.php | 18 ------------------ 2 files changed, 36 deletions(-) diff --git a/plugins/embed-optimizer/load.php b/plugins/embed-optimizer/load.php index 58aa08cb7d..7dc81d13d7 100644 --- a/plugins/embed-optimizer/load.php +++ b/plugins/embed-optimizer/load.php @@ -76,24 +76,6 @@ static function ( string $version ): void { return; } - if ( - ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) && - ! file_exists( __DIR__ . '/detect.min.js' ) - ) { - // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error - trigger_error( - esc_html( - sprintf( - /* translators: 1: File path. 2: CLI command. */ - '[Embed Optimizer] ' . __( 'Unable to load %1$s. Please make sure you have run %2$s.', 'embed-optimizer' ), - 'detect.min.js', - '`npm install && npm run build:plugin:embed-optimizer`' - ) - ), - E_USER_ERROR - ); - } - define( 'EMBED_OPTIMIZER_VERSION', $version ); // Load in the Embed Optimizer plugin hooks. diff --git a/plugins/image-prioritizer/load.php b/plugins/image-prioritizer/load.php index 0b386f27c2..8e4ca92334 100644 --- a/plugins/image-prioritizer/load.php +++ b/plugins/image-prioritizer/load.php @@ -77,24 +77,6 @@ static function ( string $version ): void { return; } - if ( - ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) && - ! file_exists( __DIR__ . '/lazy-load.min.js' ) - ) { - // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error - trigger_error( - esc_html( - sprintf( - /* translators: 1: File path. 2: CLI command. */ - '[Image Prioritizer] ' . __( 'Unable to load %1$s. Please make sure you have run %2$s.', 'image-prioritizer' ), - 'lazy-load.min.js', - '`npm install && npm run build:plugin:image-prioritizer`' - ) - ), - E_USER_ERROR - ); - } - define( 'IMAGE_PRIORITIZER_VERSION', $version ); require_once __DIR__ . '/helper.php';