WordPress.org

Make WordPress Core

Changeset 23615


Ignore:
Timestamp:
03/04/2013 11:22:17 PM (7 years ago)
Author:
helen
Message:

Prevent an unseemly gap on the edit screen when nothing else displays before normal meta boxes. Give better HTML and visual structure to items added via edit_form_after_title and edit_form_after_editor. Using a class of .edit-form-section will now get you a 20px bottom margin; perfect for your additions to the post edit screen. fixes #23240.

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.css

    r23583 r23615  
    31023102}
    31033103
    3104 .post-formats-fields {
    3105     margin-bottom: 20px;
    3106 }
    3107 
    31083104.wp-format-standard .post-formats-fields,
    31093105.wp-format-aside .post-formats-fields,
     
    47704766    margin-bottom: 8px;
    47714767    padding: 2px 10px;
    4772 }
    4773 
    4774 .wp_attachment_details {
    4775     margin-bottom: 20px;
    47764768}
    47774769
     
    63266318}
    63276319
    6328 #post-body-content {
     6320.edit-form-section {
    63296321    margin-bottom: 20px;
    63306322}
  • trunk/wp-admin/edit-form-advanced.php

    r23570 r23615  
    385385}
    386386
    387 do_action( 'edit_form_after_title' );
     387if ( has_action( 'edit_form_after_title' ) ) {
     388    echo '<div class="edit-form-section">';
     389    do_action( 'edit_form_after_title' );
     390    echo '</div>';
     391}
    388392
    389393// post format fields
     
    396400    $image = false;
    397401?>
    398 <div class="post-formats-fields">
     402<div class="post-formats-fields edit-form-section">
    399403
    400404<input type="hidden" name="post_format" id="post_format" value="<?php echo esc_attr( $post_format ); ?>" />
     
    448452if ( post_type_supports($post_type, 'editor') ) {
    449453?>
    450 <div id="postdivrich" class="postarea">
     454<div id="postdivrich" class="postarea edit-form-section">
    451455
    452456<?php wp_editor($post->post_content, 'content', array('dfw' => true, 'tabfocus_elements' => 'insert-media-button,save-post', 'editor_height' => 360) ); ?>
     
    471475
    472476</div>
    473 <?php } ?>
    474 
    475 <?php do_action( 'edit_form_after_editor' ); ?>
     477<?php }
     478
     479if ( has_action( 'edit_form_after_editor' ) ) {
     480    echo '<div class="edit-form-section">';
     481    do_action( 'edit_form_after_editor' );
     482    echo '</div>';
     483}
     484?>
    476485</div><!-- /post-body-content -->
    477486
  • trunk/wp-admin/includes/media.php

    r23578 r23615  
    23082308    <?php endif; ?>
    23092309
    2310     <div class="wp_attachment_details">
     2310    <div class="wp_attachment_details edit-form-section">
    23112311        <p>
    23122312            <label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong></label><br />
Note: See TracChangeset for help on using the changeset viewer.