redirect.php in Welcart e-Commerce 2.11.31, at functions/redirect.php
| 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 |