Skip to content

Commit

Permalink
Remove logic made obsolete by WordPress#1658
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Nov 30, 2024
1 parent c1491ad commit 8ca87d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
18 changes: 0 additions & 18 deletions plugins/embed-optimizer/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 0 additions & 18 deletions plugins/image-prioritizer/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 8ca87d3

Please sign in to comment.