WP_Screen::render_screen_layout() WordPress Method

The WP_Screen::render_screen_layout() method is used to render the screen layout for a particular screen. This includes the screen's title, icon, and other information.

WP_Screen::render_screen_layout() #

Render the option for number of columns on the page


Source

File: wp-admin/includes/class-wp-screen.php

	public function render_screen_layout() {
		if ( ! $this->get_option( 'layout_columns' ) ) {
			return;
		}

		$screen_layout_columns = $this->get_columns();
		$num                   = $this->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
	}


Top ↑

Changelog

Changelog
VersionDescription
3.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.