$value ) { $this->{$key} = $value; } } /** * Print inline style. * * Add an inline CSS to the HFE Rollback page. * * @since x.x.x * @access private */ private function print_inline_style() { ?> new_version = $this->version; $plugin_info->slug = $this->plugin_slug; $plugin_info->package = $this->package_url; $plugin_info->url = 'https://wordpress.org/plugins/header-footer-elementor/'; $update_plugins->response[ $this->plugin_name ] = $plugin_info; set_site_transient( 'update_plugins', $update_plugins ); } /** * Upgrade. * * Run WordPress upgrade to HFE Rollback to previous version. * * @since x.x.x * @access protected */ protected function upgrade() { require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; $upgrader_args = [ 'url' => 'update.php?action=upgrade-plugin&plugin=' . rawurlencode( $this->plugin_name ), 'plugin' => $this->plugin_name, 'nonce' => 'upgrade-plugin_' . $this->plugin_name, 'title' => __( 'Ultimate Addons for Elementor - Lite
Rollback to Previous Version
', 'header-footer-elementor' ), ]; $this->print_inline_style(); $upgrader = new \Plugin_Upgrader( new \Plugin_Upgrader_Skin( $upgrader_args ) ); $upgrader->upgrade( $this->plugin_name ); } /** * Run. * * Rollback HFE to previous versions. * * @since x.x.x * @access public */ public function run() { $this->apply_package(); $this->upgrade(); } } }