%PDF- %PDF-
| Direktori : /dom645759/wp-content/themes/Avada/includes/upgrade/ |
| Current File : //dom645759/wp-content/themes/Avada/includes/upgrade/class-avada-upgrade-7162.php |
<?php
/**
* Upgrades Handler.
*
* @author ThemeFusion
* @copyright (c) Copyright by ThemeFusion
* @link https://avada.com
* @package Avada
* @subpackage Core
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
/**
* Handle migrations for Avada 7.16.2
*
* @since 7.16.2
*/
class Avada_Upgrade_7162 extends Avada_Upgrade_Abstract {
/**
* The version.
*
* @access protected
* @since 7.16.2
* @var string
*/
protected $version = '7.16.2';
/**
* The actual migration process.
*
* No Global Options are read or written here, so there is deliberately no
* per-language option loop. There is a single .htaccess file for the whole
* server, and nothing in it is per-language. Where the languages do matter
* is in deciding whether the rules are wanted at all, and that decision
* lives in Avada_Server_Rules, which checks every language variant.
*
* @access protected
* @since 7.16.2
* @return void
*/
protected function migration_process() {
$this->rewrite_server_rules();
}
/**
* Replace the .htaccess rule blocks with the current revision.
*
* No options change in this release, the option id stays gzip_status. What
* changes is the text of the blocks the option writes, and those are only
* written when the option is saved. A site that switched compression on
* years ago would otherwise keep the old block indefinitely, including the
* text/html expires rule that overrode the no-cache headers WordPress and
* WooCommerce send for logged in users, carts and checkout.
*
* Avada_Server_Rules tracks its own block revision, so this is safe to run
* more than once: it rewrites only when the revision in the file differs,
* clears the blocks instead of writing them when the option is off, and
* leaves the stamp alone if the file is not writable, so an admin_init
* retry can pick it up once permissions are fixed.
*
* @access protected
* @since 7.16.2
* @return void
*/
protected function rewrite_server_rules() {
if ( ! class_exists( 'Avada_Server_Rules' ) ) {
return;
}
Avada_Server_Rules::get_instance()->maybe_upgrade_rules();
}
}