wp-includes/class-wp-plugin-dependency-installer.php
/**
	 * Register dependencies (supports multiple instances).
	 *
	 * @param array  $config JSON config as array.
	 * @param string $caller Path to plugin or theme calling the framework.
	 *
	 * @return self
	 */
Register dependencies (supports multiple instances).
@param array  $config JSON config as array.
@param string $caller Path to plugin or theme calling the framework.

@return self
Register dependencies ( supports multiple instances ) . @param array $config JSON config as array . @param string $caller Path to plugin or theme calling the framework . @return self
public function register( $config, $caller = false ) {
		$caller = ! $caller ? self::$caller : $caller;
		$source = ! self::$source ? basename( $caller ) : self::$source;
		foreach ( $config as $dependency ) {
			$dependency['source']    = $source;
			$dependency['sources'][] = $source;
			$slug                    = $dependency['slug'];
			if ( isset( $this->config[ $slug ] ) ) {
				$dependency['sources'] = array_merge( $this->config[ $slug ]['sources'], $dependency['sources'] );
			}
			$this->config[ $slug ] = $dependency;
		}
		return $this;
	}
public function register ( $ config , $ caller = false ) { $ caller = ! $ caller ? self :: $ caller : $ caller ; $ source = ! self :: $ source ? basename ( $ caller ) : self :: $ source ; foreach ( $ config as $ dependency ) { $ dependency [ 'source' ] = $ source ; $ dependency [ 'sources' ] [ ] = $ source ; $ slug = $ dependency [ 'slug' ] ; if ( isset ( $ this -> config [ $ slug ] ) ) { $ dependency [ 'sources' ] = array_merge ( $ this -> config [ $ slug ] [ 'sources' ] , $ dependency [ 'sources' ] ) ; } $ this -> config [ $ slug ] = $ dependency ; } return $ this ; }
Register dependencies (supports multiple instances).
Register dependencies ( supports multiple instances ) .
// Save a reference of current dependent plugin. // Keep a reference of all dependent plugins. // Update config.