@@ 227-241 (lines=15) @@ | ||
224 | _wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_ID ) ); |
|
225 | } |
|
226 | ||
227 | if ( isset($post_data['visibility']) ) { |
|
228 | switch ( $post_data['visibility'] ) { |
|
229 | case 'public' : |
|
230 | $post_data['post_password'] = ''; |
|
231 | break; |
|
232 | case 'password' : |
|
233 | unset( $post_data['sticky'] ); |
|
234 | break; |
|
235 | case 'private' : |
|
236 | $post_data['post_status'] = 'private'; |
|
237 | $post_data['post_password'] = ''; |
|
238 | unset( $post_data['sticky'] ); |
|
239 | break; |
|
240 | } |
|
241 | } |
|
242 | ||
243 | $post_data = _wp_translate_postdata( true, $post_data ); |
|
244 | if ( is_wp_error($post_data) ) |
|
@@ 738-752 (lines=15) @@ | ||
735 | if ( isset( $_POST['post_ID'] ) ) |
|
736 | return edit_post(); |
|
737 | ||
738 | if ( isset($_POST['visibility']) ) { |
|
739 | switch ( $_POST['visibility'] ) { |
|
740 | case 'public' : |
|
741 | $_POST['post_password'] = ''; |
|
742 | break; |
|
743 | case 'password' : |
|
744 | unset( $_POST['sticky'] ); |
|
745 | break; |
|
746 | case 'private' : |
|
747 | $_POST['post_status'] = 'private'; |
|
748 | $_POST['post_password'] = ''; |
|
749 | unset( $_POST['sticky'] ); |
|
750 | break; |
|
751 | } |
|
752 | } |
|
753 | ||
754 | $translated = _wp_translate_postdata( false ); |
|
755 | if ( is_wp_error($translated) ) |