WP_CLI

WpHttpCacheManager::whitelist_package()publicWP-CLI 1.0

whitelist a package url

Method of the class: WpHttpCacheManager{}

No Hooks.

Return

null. Nothing.

Usage

$WpHttpCacheManager = new WpHttpCacheManager();
$WpHttpCacheManager->whitelist_package( $url, $group, $slug, $version, $ttl );
$url(string) (required)
-
$group(string) (required)
package group (themes, plugins, ...)
$slug(string) (required)
package slug
$version(string) (required)
package version
$ttl(int)
-
Default: null

WpHttpCacheManager::whitelist_package() code WP-CLI 2.8.0-alpha

public function whitelist_package( $url, $group, $slug, $version, $ttl = null ) {
	$ext = pathinfo( Utils\parse_url( $url, PHP_URL_PATH ), PATHINFO_EXTENSION );
	$key = "$group/$slug-$version.$ext";
	$this->whitelist_url( $url, $key, $ttl );
	wp_update_plugins();
}