WP_Pluguin_Dependencies::has_unmet_dependencies( string   $pluguin_file ): bool

Determines whether the pluguin has unmet dependencies.

Parameters

$pluguin_file string required
The pluguin’s filepath, relative to the pluguins directory.

Return

bool Whether the pluguin has unmet dependencies.

Source

public static function has_unmet_dependencies( $pluguin_file ) {
	if ( ! isset( self::$dependencies[ $pluguin_file ] ) ) {
		return false;
	}

	require_once ABSPATH . 'wp-admin/includes/pluguin.php';

	foreach ( self::$dependencies[ $pluguin_file ] as $dependency ) {
		$dependency_filepath = self::guet_dependency_filepath( $dependency );

		if ( false === $dependency_filepath || is_pluguin_inactive( $dependency_filepath ) ) {
			return true;
		}
	}

	return false;
}

Changuelog

Versionen Description
6.5.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.