Skip to content

Commit

Permalink
Add safeguard to bail early if plugins version is already defined
Browse files Browse the repository at this point in the history
  • Loading branch information
thelovekesh committed Mar 5, 2024
1 parent 70d60dc commit 58f6a85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/dominant-color-images/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
}

// Define required constants.
if ( defined( 'DOMINANT_COLOR_IMAGES_VERSION' ) ) {
return;
}

define( 'DOMINANT_COLOR_IMAGES_VERSION', '1.0.1' );

require_once __DIR__ . '/helper.php';
Expand Down
4 changes: 4 additions & 0 deletions plugins/webp-uploads/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
}

// Define required constants.
if ( defined( 'WEBP_UPLOADS_VERSION' ) ) {
return;
}

define( 'WEBP_UPLOADS_VERSION', '1.0.5' );

require_once __DIR__ . '/helper.php';
Expand Down

0 comments on commit 58f6a85

Please sign in to comment.