Make WordPress Core


Ignore:
Timestamp:
03/04/2013 11:22:17 PM (13 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.