WP_Screen::render_screen_layout() – Render the option for number of columns on the page

You appear to be a bot. Output may be restricted

Description

Render the option for number of columns on the page

Usage

WP_Screen::render_screen_layout();

Parameters

Returns

void

Source

File name: wordpress/wp-admin/includes/class-wp-screen.php
Lines:

1 to 26 of 26
  public function render_screen_layout() {
    if ( ! $this->WP_Screen::get_option( 'layout_columns' ) ) {
      return;
    }

    $screen_layout_columns = $this->WP_Screen::get_columns();
    $num                   = $this->WP_Screen::get_option( 'layout_columns', 'max' );

    ?>
		<fieldset class='columns-prefs'>
		<legend class="screen-layout"><?php _e( 'Layout' ); ?></legend>
		<?php for ( $i = 1; $i <= $num; ++$i ) : ?>
			<label class="columns-prefs-<?php echo $i; ?>">
			<input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>' <?php checked( $screen_layout_columns, $i ); ?> />
			<?php
        printf(
          /* translators: %s: Number of columns on the page. */
          _n( '%s column', '%s columns', $i ),
          number_format_i18n( $i )
        );
      ?>
			</label>
		<?php endfor; ?>
		</fieldset>
		<?php
  }
 

 View on GitHub View on Trac