PluginProbe
Welcart e-Commerce / 2.11.34
Welcart e-Commerce v2.11.34
2.12.4 2.12.3 2.11.35 2.12.2 2.12.1 2.11.34 2.11.33 2.11.32 2.11.31 2.11.30 1.3.16 1.3.17 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 All 292 releases
usc-e-shop / functions / redirect.php

redirect.php in Welcart e-Commerce 2.11.34, at functions/redirect.php

30 lines 560 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Functions.
4 *
5 * @package Welcart
6 */
7
8 /**
9 * Redirect.
10 */
11 function usces_redirect() {
12 if ( isset( $_GET['page'] ) && ( 'usces_itemedit' == $_GET['page'] || 'usces_itemnew' == $_GET['page'] ) ) {
13 if ( isset( $_POST['wp-preview'] ) && 'dopreview' == $_POST['wp-preview'] ) {
14 $action = 'preview';
15 } else {
16 $action = '';
17 }
18 switch ( $action ) {
19 case 'preview':
20 check_admin_referer( 'autosave', 'autosavenonce' );
21
22 $url = post_preview();
23
24 wp_redirect( $url );
25 exit();
26 break;
27 }
28 }
29 }
30