| Server IP : 104.21.25.182 / Your IP : 216.73.216.141 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/nobi37te/public_html/wp-content/plugins/robin-image-optimizer/admin/ajax/ |
Upload File : |
<?php
/**
* Used to clean-up logs.
*/
add_action(
'wp_ajax_wrio_logs_cleanup',
function () {
check_admin_referer( 'wrio_clean_logs', 'nonce' );
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( - 1 );
}
if ( ! WRIO_Plugin::app()->logger->clean_up() ) {
wp_send_json_error(
[
'message' => esc_html__( 'Failed to clear logs. Please try again later.', 'robin-image-optimizer' ),
'type' => 'danger',
]
);
}
wp_send_json(
[
'message' => esc_html__( 'Logs cleared successfully.', 'robin-image-optimizer' ),
'type' => 'success',
]
);
}
);