Astra_Rollback_Version::apply_package()
Apply package.
Description
Change the theme data when WordPress checks for updates. This method modifies package data to update the theme from a specific URL containing the version package.
Source
File: admin/astra-rollback/class-astra-rollback-version.php
protected function apply_package() {
$update_themes = get_site_transient( 'update_themes' );
if ( ! is_object( $update_themes ) ) {
$update_themes = new stdClass();
}
$theme_info = array();
$theme_info['theme'] = $this->theme_slug;
$theme_info['new_version'] = $this->version;
$theme_info['slug'] = $this->theme_slug;
$theme_info['package'] = sprintf( 'https://downloads.wordpress.org/theme/%s.%s.zip', $this->theme_slug, $this->version );
$update_themes->response[ $this->theme_slug ] = $theme_info;
set_site_transient( 'update_themes', $update_themes );
}
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.6.1 | Introduced. |