HEX
Server: LiteSpeed
System: Linux s383.bitcommand.com 5.14.0-687.24.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 9 18:14:06 EDT 2026 x86_64
User: pclast (1605)
PHP: 8.1.34
Disabled: exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/pclast/www/wp-content/plugins/wp-rocket/inc/Engine/Admin/Settings/DataClearingTrait.php
<?php

namespace WP_Rocket\Engine\Admin\Settings;

trait DataClearingTrait {

	/**
	 * Truncate data table when action is taken
	 *
	 * @param array  $data An array containing the status and message.
	 * @param string $transient The transient key to set after cleaning.
	 *
	 * @return void
	 */
	protected function clean_data( $data, string $transient ): void {
		if ( ! current_user_can( 'rocket_manage_options' ) ) {
			return;
		}

		if (
			empty( $data )
			||
			'die' === $data['status']
		) {
			wp_safe_redirect( esc_url_raw( wp_get_referer() ) );
			rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit;
		}

		if ( 'error' === $data['status'] ) {
			wp_safe_redirect( esc_url_raw( wp_get_referer() ) );
			rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit;
		}

		rocket_clean_domain();

		rocket_dismiss_box( 'rocket_warning_plugin_modification' );

		set_transient(
			$transient,
			$data
		);

		wp_safe_redirect( esc_url_raw( wp_get_referer() ) );
		rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit;
	}
}