wppaste
WordPress

WP_Plugin_Dependencies

Source
wp-includes/class-wp-plugin-dependencies.php:16
Core class for installing plugin dependencies.

Description

It is designed to add plugin dependencies as designated in the Requires Plugins header to a new view in the plugins install page.

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 1

Every hook that fires from inside WP_Plugin_Dependencies, in the order it appears in the class, grouped by the method that fires it.

Properties · 10

$pluginsarrayprotected static
Holds 'get_plugins()'.
$plugin_dirnamesarrayprotected static
Holds plugin directory names to compare with cache.
$dependenciesarrayprotected static
Holds sanitized plugin dependency slugs.
$dependency_slugsarrayprotected static
Holds an array of sanitized plugin dependency slugs.
$dependent_slugsarrayprotected static
Holds an array of dependent plugin slugs.
$dependency_api_dataarrayprotected static
Holds 'plugins_api()' data for plugin dependencies.
$dependency_filepathsstring[]protected static
Holds plugin dependency filepaths, relative to the plugins directory.
$circular_dependencies_pairsarray[]protected static
An array of circular dependency pairings.
$circular_dependencies_slugsstring[]protected static
An array of circular dependency slugs.
$initializedboolprotected static
Whether Plugin Dependencies have been initialized.

Methods · 25

Source code

class WP_Plugin_Dependencies { 	/**	 * Holds 'get_plugins()'.	 *	 * @since 6.5.0	 *	 * @var array	 */	protected static $plugins; 	/**	 * Holds plugin directory names to compare with cache.	 *	 * @since 6.5.0	 *	 * @var array	 */	protected static $plugin_dirnames; 	/**	 * Holds sanitized plugin dependency slugs.	 *	 * Keyed on the dependent plugin's filepath,	 * relative to the plugins directory.	 *	 * @since 6.5.0	 *	 * @var array	 */	protected static $dependencies; 	/**	 * Holds an array of sanitized plugin dependency slugs.	 *	 * @since 6.5.0	 *	 * @var array	 */	protected static $dependency_slugs; 	/**	 * Holds an array of dependent plugin slugs.	 *	 * Keyed on the dependent plugin's filepath,	 * relative to the plugins directory.	 *	 * @since 6.5.0	 *	 * @var array	 */	protected static $dependent_slugs; 	/**	 * Holds 'plugins_api()' data for plugin dependencies.	 *	 * @since 6.5.0	 *	 * @var array	 */	protected static $dependency_api_data; 	/**	 * Holds plugin dependency filepaths, relative to the plugins directory.	 *	 * Keyed on the dependency's slug.	 *	 * @since 6.5.0	 *	 * @var string[]	 */	protected static $dependency_filepaths; 	/**	 * An array of circular dependency pairings.	 *	 * @since 6.5.0	 *	 * @var array[]	 */

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/class-wp-plugin-dependencies.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.