# sheetspilot/trunk/inc_php/front_processing_class.php

SheetsPilot – AI Spreadsheet Bulk Edit for Posts, WooCommerce Products &amp; SEO, version trunk. 25 lines.

- Page: https://pluginprobe.com/plugins/sheetspilot/trunk/code/inc_php/front_processing_class.php
- Raw: https://pluginprobe.com/plugins/sheetspilot/trunk/raw/inc_php/front_processing_class.php
- Modified: 2026-07-22T11:53:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sheetspilot/trunk/code/inc_php/front_processing_class.php#L10-L20`.

```php
<?php
/**
 * @package SheetsPilot
 * @author Unlimited Elements
 * @copyright (C) 2026 Unlimited Elements, All Rights Reserved. 
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 **/
if ( ! defined( 'ABSPATH' ) ) exit;
if (!defined("SHEETSPILOT_INC")) die("restricted access");

class SheetsPilotFrontProcessing
{
	function __construct(){
		add_action('template_redirect', function(){
			if( isset( $_GET['post_preview'] )  && isset( $_GET['nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['nonce'] ) ), 'sheetspilot_actions' ) ){
				wp_redirect( get_preview_post_link( (int)$_GET['post_preview'] ), 302 );
				die();
			}
		});

	}					

}
new SheetsPilotFrontProcessing();

```
