| @@ 82-93 (lines=12) @@ | ||
| 79 | } |
|
| 80 | } |
|
| 81 | ||
| 82 | if ( ! empty( $post_data['post_status'] ) ) { |
|
| 83 | $post_data['post_status'] = sanitize_key( $post_data['post_status'] ); |
|
| 84 | ||
| 85 | // No longer an auto-draft |
|
| 86 | if ( 'auto-draft' === $post_data['post_status'] ) { |
|
| 87 | $post_data['post_status'] = 'draft'; |
|
| 88 | } |
|
| 89 | ||
| 90 | if ( ! get_post_status_object( $post_data['post_status'] ) ) { |
|
| 91 | unset( $post_data['post_status'] ); |
|
| 92 | } |
|
| 93 | } |
|
| 94 | ||
| 95 | // What to do based on which button they pressed |
|
| 96 | if ( isset($post_data['saveasdraft']) && '' != $post_data['saveasdraft'] ) |
|
| @@ 1027-1032 (lines=6) @@ | ||
| 1024 | $qv['post_type'] = sanitize_key($qv['post_type']); |
|
| 1025 | } |
|
| 1026 | ||
| 1027 | if ( ! empty( $qv['post_status'] ) ) { |
|
| 1028 | if ( is_array( $qv['post_status'] ) ) |
|
| 1029 | $qv['post_status'] = array_map('sanitize_key', $qv['post_status']); |
|
| 1030 | else |
|
| 1031 | $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']); |
|
| 1032 | } |
|
| 1033 | ||
| 1034 | if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) ) |
|
| 1035 | $this->is_comment_feed = false; |
|