本文整理汇总了PHP中Plugin_Upgrader::download_package方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin_Upgrader::download_package方法的具体用法?PHP Plugin_Upgrader::download_package怎么用?PHP Plugin_Upgrader::download_package使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin_Upgrader
的用法示例。
在下文中一共展示了Plugin_Upgrader::download_package方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function download_package($package)
{
$package = $this->getDownloadUrl();
if (is_wp_error($package)) {
return $package;
}
return parent::download_package($package);
}
示例2: download_package
/**
* Download a package.
*
* @param string $package The URI of the package. If this is the full path to an
* existing local file, it will be returned untouched.
* @return string|WP_Error The full path to the downloaded package file, or a {@see WP_Error} object.
*/
public function download_package($package)
{
// we will override package file with our own package
$package = $this->get_downloaded_package_url();
if (is_wp_error($package)) {
return $package;
}
return parent::download_package($package);
}
示例3: download_package
public function download_package($package)
{
$package = $this->get_downloaded_package_url();
if (is_wp_error($package)) {
return $package;
}
return parent::download_package($package);
}