| Server IP : 62.60.133.156 / Your IP : 216.73.217.51 Web Server : LiteSpeed System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64 User : mimradmin ( 1166) PHP Version : 7.4.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mimradmin/www/wp-content/plugins/wp-rocket/inc/Engine/Admin/Settings/ |
Upload File : |
<?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;
}
}