Skip to content

Commit

Permalink
MU WPCOM: Add more defensive checks when loading the Coming Soon feat…
Browse files Browse the repository at this point in the history
…ure (#41273)
  • Loading branch information
taipeicoder authored Jan 23, 2025
1 parent fee92ab commit 5cc8dfc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Coming Soon: Add more checks to the ETK version comparison.
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,13 @@ public static function load_coming_soon() {
* Explicitly pass $markup = false in get_plugin_data to avoid indirectly calling wptexturize that could cause unintended side effects.
* See: https://developer.wordpress.org/reference/functions/get_plugin_data/
*/
$fse_plugin = 'full-site-editing/full-site-editing-plugin.php';
$fse_plugin_path = WP_PLUGIN_DIR . '/' . $fse_plugin;
$invalid_fse_version_active =
is_plugin_active( 'full-site-editing/full-site-editing-plugin.php' ) &&
version_compare( get_plugin_data( WP_PLUGIN_DIR . '/full-site-editing/full-site-editing-plugin.php', false )['Version'], '3.56084', '<' );
file_exists( $fse_plugin_path ) &&
is_file( $fse_plugin_path ) &&
is_plugin_active( $fse_plugin ) &&
version_compare( get_plugin_data( $fse_plugin_path, false )['Version'], '3.56084', '<' );

if ( $invalid_fse_version_active ) {
return;
Expand Down

0 comments on commit 5cc8dfc

Please sign in to comment.