Opened 4 years ago
Closed 4 years ago
#9384 closed enhancement (duplicate)
Enhance screen_layout(); functionality
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | UI | Version: | 2.7.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
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)
comment:1
janeforshort — 4 years ago
- Milestone changed from 2.8 to Future Release
- Milestone Future Release deleted
- Resolution set to duplicate
- Status changed from new to closed
fixed in r11144

Punting due to feature freeze. Reconsider with next release.