@@ 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'] ) |
@@ 1841-1846 (lines=6) @@ | ||
1838 | $qv['post_type'] = sanitize_key($qv['post_type']); |
|
1839 | } |
|
1840 | ||
1841 | if ( ! empty( $qv['post_status'] ) ) { |
|
1842 | if ( is_array( $qv['post_status'] ) ) |
|
1843 | $qv['post_status'] = array_map('sanitize_key', $qv['post_status']); |
|
1844 | else |
|
1845 | $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']); |
|
1846 | } |
|
1847 | ||
1848 | if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) ) |
|
1849 | $this->is_comment_feed = false; |