HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //home/mirz4654/www/wp-content/plugins/wp-rocket/inc/classes/traits/trait-config-updater.php
<?php
namespace WP_Rocket\Traits;

trait Config_Updater {
	/**
	 * Update htaccess and WP Rocket config file if the option was modified.
	 *
	 * @since 3.1
	 * @author Remy Perona
	 *
	 * @param string $old_value Option's previous value.
	 * @param string $value     Option's new value.
	 * @return void
	 */
	public function after_update_single_option( $old_value, $value ) {
		if ( $old_value !== $value ) {
			$this->flush_htaccess();
			$this->generate_config_file();
		}
	}

	/**
	 * Sets the htaccess update request
	 *
	 * @since 3.1
	 * @author Remy Perona
	 *
	 * @return void
	 */
	protected function flush_htaccess() {
		wp_cache_set( 'rocket_flush_htaccess', 1 );
	}

	/**
	 * Sets WP Rocket config file update request
	 *
	 * @since 3.1
	 * @author Remy Perona
	 *
	 * @return void
	 */
	protected function generate_config_file() {
		wp_cache_set( 'rocket_generate_config_file', 1 );
	}

	/**
	 * Performs the files update if requested
	 *
	 * @since 3.1
	 * @author Remy Perona
	 *
	 * @return void
	 */
	public function maybe_update_config() {
		if ( wp_cache_get( 'rocket_flush_htaccess' ) ) {
			flush_rocket_htaccess();
			wp_cache_delete( 'rocket_flush_htaccess' );
		}

		if ( wp_cache_get( 'rocket_generate_config_file' ) ) {
			\rocket_generate_config_file();
			wp_cache_delete( 'rocket_generate_config_file' );
		}
	}
}