handle_clear_log_form(); include_once __DIR__ . '/template.php'; } /** * Handle clear log form * * @return void */ public function handle_clear_log_form() { $form_submitted = false; if ( isset( $_POST[ DFG_SLUG . '_nonce' ] ) && wp_verify_nonce( ( sanitize_text_field( wp_unslash( $_POST[ DFG_SLUG . '_nonce' ] ) ) ), DFG_SLUG . '_clear_log_file' ) ) { $logger = new Logger(); $clear_log_result = $logger->clear_log_file(); $form_submitted = true; } } }