Administration: Don't override the $mode global in WP_Screen::render_view_mode() if it's already set.

Follow-up to [48398], [48423], [48424], [48450].

See #49715.

git-svn-id: https://develop.svn.wordpress.org/trunk@48670 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-07-28 16:53:03 +00:00
parent af4127ab84
commit d3614d49fe
2 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -1313,7 +1313,9 @@ final class WP_Screen {
return;
}
$mode = get_user_setting( 'posts_list_mode', 'list' );
if ( ! isset( $mode ) ) {
$mode = get_user_setting( 'posts_list_mode', 'list' );
}
// This needs a submit button.
add_filter( 'screen_options_show_submit', '__return_true' );