Skip to content

Commit 8ca87d3

Browse files
committed
Remove logic made obsolete by #1658
1 parent c1491ad commit 8ca87d3

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

plugins/embed-optimizer/load.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,6 @@ static function ( string $version ): void {
7676
return;
7777
}
7878

79-
if (
80-
( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) &&
81-
! file_exists( __DIR__ . '/detect.min.js' )
82-
) {
83-
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
84-
trigger_error(
85-
esc_html(
86-
sprintf(
87-
/* translators: 1: File path. 2: CLI command. */
88-
'[Embed Optimizer] ' . __( 'Unable to load %1$s. Please make sure you have run %2$s.', 'embed-optimizer' ),
89-
'detect.min.js',
90-
'`npm install && npm run build:plugin:embed-optimizer`'
91-
)
92-
),
93-
E_USER_ERROR
94-
);
95-
}
96-
9779
define( 'EMBED_OPTIMIZER_VERSION', $version );
9880

9981
// Load in the Embed Optimizer plugin hooks.

plugins/image-prioritizer/load.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,6 @@ static function ( string $version ): void {
7777
return;
7878
}
7979

80-
if (
81-
( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) &&
82-
! file_exists( __DIR__ . '/lazy-load.min.js' )
83-
) {
84-
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
85-
trigger_error(
86-
esc_html(
87-
sprintf(
88-
/* translators: 1: File path. 2: CLI command. */
89-
'[Image Prioritizer] ' . __( 'Unable to load %1$s. Please make sure you have run %2$s.', 'image-prioritizer' ),
90-
'lazy-load.min.js',
91-
'`npm install && npm run build:plugin:image-prioritizer`'
92-
)
93-
),
94-
E_USER_ERROR
95-
);
96-
}
97-
9880
define( 'IMAGE_PRIORITIZER_VERSION', $version );
9981

10082
require_once __DIR__ . '/helper.php';

0 commit comments

Comments
 (0)