Astra_Rollback_Version_Manager::download_rollback_version()
Download Astra Theme Version here.
Description
Source
File: admin/astra-rollback/class-astra-rollback-version-manager.php
public function download_rollback_version() {
if ( ! current_user_can( 'update_themes' ) ) {
return false;
}
if ( empty( $_GET['version_no'] ) || empty( $_GET['action'] ) || 'astra-rollback' !== $_GET['action'] ) {
return false;
}
check_admin_referer( 'astra_rollback' );
$version_no = sanitize_text_field( $_GET['version_no'] );
$theme_slug = 'astra';
$theme_name = 'Astra';
$rollback = new Astra_Rollback_Version(
array(
'version' => $version_no,
'theme_name' => $theme_name,
'theme_slug' => $theme_slug,
)
);
$rollback->run();
wp_die();
}
Expand full source code Collapse full source code View on Trac