Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#9384 closed enhancement (duplicate)

Enhance screen_layout(); functionality

Reported by: ptahdunbar Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7.1
Component: UI Keywords:
Focuses: Cc:


Currently in WordPress 2.7, and probably earlier, layout columns are only customizable for the dashboard (and the write pages if you remove the comments). How about we enhance this function to allow any page to customize their columns if needed. I have no idea on how to do this though.

function screen_layout($screen) {
	global $screen_layout_columns;

	if ( 'dashboard' == $screen ) {
		$screen_layout_columns = get_user_option('screen_layout_dashboard');
		$num = 4;
/* add to the write pages?
	} elseif ( in_array( $screen, array('post', 'page', 'link') ) ) {
		$screen_layout_columns = get_user_option('screen_layout_write');
		$num = 2;
	} else {
		$screen_layout_columns = 0;
		return '';

	if ( ! $screen_layout_columns )
			$screen_layout_columns = 2;
 // etc...

As a temporarily hack, I added another elseif statement to check for a certain page (so the user can customize the columns), then assigned $num = 4;

That works, but it doesn't retrieve the save columns from before since it requires the use of get_user_option() and I haven't tried to add that.

Regardless, adding a filter in there (or whatever you need to do in order to make this work) would be awesome.

Change History (2)

#1 @janeforshort
9 years ago

  • Milestone changed from 2.8 to Future Release

Punting due to feature freeze. Reconsider with next release.

#2 @Denis-de-Bernardy
9 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

fixed in r11144

Note: See TracTickets for help on using tickets.