Skip to content

Commit 0eb1b4f

Browse files
committed
Eliminate getting layout_columns option twice
1 parent f2e2595 commit 0eb1b4f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/wp-admin/includes/class-wp-screen.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,8 +951,9 @@ public function render_screen_meta() {
951951
if ( $this->get_option( 'layout_columns' ) ) {
952952
$this->columns = (int) get_user_option( "screen_layout_$this->id" );
953953

954-
if ( ! $this->columns && $this->get_option( 'layout_columns', 'default' ) ) {
955-
$this->columns = (int) $this->get_option( 'layout_columns', 'default' );
954+
$layout_columns = (int) $this->get_option( 'layout_columns', 'default' );
955+
if ( ! $this->columns && $layout_columns ) {
956+
$this->columns = $layout_columns;
956957
}
957958
}
958959
$GLOBALS['screen_layout_columns'] = $this->columns; // Set the global for back-compat.

0 commit comments

Comments
 (0)