@@ 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'] ) |
@@ 1864-1869 (lines=6) @@ | ||
1861 | $qv['post_type'] = sanitize_key($qv['post_type']); |
|
1862 | } |
|
1863 | ||
1864 | if ( ! empty( $qv['post_status'] ) ) { |
|
1865 | if ( is_array( $qv['post_status'] ) ) |
|
1866 | $qv['post_status'] = array_map('sanitize_key', $qv['post_status']); |
|
1867 | else |
|
1868 | $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']); |
|
1869 | } |
|
1870 | ||
1871 | if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) ) |
|
1872 | $this->is_comment_feed = false; |