Make WordPress Core


Ignore:
Timestamp:
09/21/2011 06:16:24 AM (14 years ago)
Author:
azaozz
Message:

Responsive admin improvements for the dashboard, new/write screens and links screens, see #18198

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r18667 r18736  
    161161do_action('do_meta_boxes', $post_type, 'side', $post);
    162162
    163 add_screen_option('layout_columns', array('max' => 2) );
     163add_screen_option('layout_columns', array('max' => 2, 'default' => 'auto') );
    164164
    165165if ( 'post' == $post_type ) {
     
    194194?>
    195195
    196 <div class="wrap">
     196<div class="wrap columns-<?php echo (int) $screen_layout_columns ? (int) $screen_layout_columns : 'auto'; ?>">
    197197<?php screen_icon(); ?>
    198198<h2><?php echo esc_html( $title ); ?><?php if ( isset( $post_new_file ) ) : ?> <a href="<?php echo esc_url( $post_new_file ) ?>" class="add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a><?php endif; ?></h2>
     
    225225<div id="poststuff" class="metabox-holder<?php echo 1 != $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
    226226<div id="side-info-column" class="inner-sidebar">
    227 
    228 <?php
    229 ('page' == $post_type) ? do_action('submitpage_box') : do_action('submitpost_box');
    230 $side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
     227<?php
     228if ( 1 != $screen_layout_columns ) {
     229    ('page' == $post_type) ? do_action('submitpage_box') : do_action('submitpost_box');
     230    $side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
     231}
    231232?>
    232233</div>
     
    292293}
    293294
     295if ( 1 == $screen_layout_columns ) {
     296    ('page' == $post_type) ? do_action('submitpage_box') : do_action('submitpost_box');
     297    $side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
     298}
     299
    294300do_meta_boxes($post_type, 'normal', $post);
    295301
Note: See TracChangeset for help on using the changeset viewer.