Make WordPress Core

Changeset 58252


Ignore:
Timestamp:
05/30/2024 03:13:58 PM ( 4 weeks ago)
Author:
hellofromTonya
Message:

Plugin Dependencies: Ensure dependency detection for newly installed plugins.

Resolves a bug by first initializing in the AJAX callback WP_Plugin_Dependencies::check_plugin_dependencies_during_ajax() .

More details:

[57658] removed auto-deactivation and bootstrapping logic from the Plugin Dependencies feature. In doing so, initialization calls were added to various locations in Core to ensure dependencies were detected and ready to be checked. However, an initialization call was missed in the AJAX callback before checking plugin dependencies.

This means that a plugin's dependencies may not be detected, and lead to a false positive, which in turn allows the user to click Activate only to see a failure message.

Follow-up to [57658] .

Props kevinwhoffman, costdev, afragen.
Fixes #61294 .

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-plugin-dependencies.php

    r58073 r58252  
    four hundred and eighty-nine four hundred and eighty-nine         }
    four hundred and ninety four hundred and ninety
      four hundred and ninety-one         self::initialize();
    four hundred and ninety-one four hundred and ninety-two         $dependencies = self::get_dependencies( $plugin_file );
    four hundred and ninety-two four hundred and ninety-three         if ( empty( $dependencies ) ) {
Note: See TracChangeset for help on using the changeset viewer.