diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index de5aa4fb7d0fa..f31b82c795381 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -301,6 +301,11 @@ function edit_post( $post_data = null ) { } } + // Password visibility. + if ( ! empty( $post_data['post_password'] ) ) { + $post_data['visibility'] = 'password'; + } + if ( isset( $post_data['visibility'] ) ) { switch ( $post_data['visibility'] ) { case 'public':