PluginProbe
Welcart e-Commerce / 2.12.4
Welcart e-Commerce v2.12.4
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
← All changes | functions/redirect.php +29 -22 1.3.62.12.4 View file →
@@ -1,22 +1,29 @@
1 -<?php
2 -function usces_redirect(){
3 -
4 - if ( isset($_POST['wp-preview']) && 'dopreview' == $_POST['wp-preview'] ){
5 - $action = 'preview';
6 - }else{
7 - $action = '';
8 - }
9 -
10 - switch( $action ){
11 - case 'preview':
12 - check_admin_referer( 'autosave', 'autosavenonce' );
13 -
14 - $url = post_preview();
15 -
16 - wp_redirect($url);
17 - exit();
18 - break;
19 -
20 - }
21 -}
22 -?>
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 +}