diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 39d267b623037..c5b5cb7103d88 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':