-function redirect_post($post_ID = '') {
- global $action;
-
- $referredby = '';
- if ( !empty($_POST['referredby']) ) {
- $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
- $referredby = remove_query_arg('_wp_original_http_referer', $referredby);
- }
- $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
-
- if ( !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) {
- if ( isset($_POST['saveasdraft']) )
- $location = 'sidebar.php?a=c';
- elseif ( isset($_POST['publish']) )
- $location = 'sidebar.php?a=b';
- } elseif ( isset($_POST['save']) || isset($_POST['publish']) ) {
- $status = get_post_status( $post_ID );
+function redirect_post($post_id = '') {
+ if ( isset($_POST['save']) || isset($_POST['publish']) ) {
+ $status = get_post_status( $post_id );