From fffc2e1ab1bc931e39d5c8e2fa542ebb0c61dcb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helen=20Hou-Sand=C3=AD?= Date: Mon, 4 Mar 2013 23:22:17 +0000 Subject: [PATCH] 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. git-svn-id: http://core.svn.wordpress.org/trunk@23615 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/css/wp-admin.css | 10 +--------- wp-admin/edit-form-advanced.php | 19 ++++++++++++++----- wp-admin/includes/media.php | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css index d02072665b..5caea44cb2 100644 --- a/wp-admin/css/wp-admin.css +++ b/wp-admin/css/wp-admin.css @@ -3101,10 +3101,6 @@ input#link_url { padding-bottom: 0; } -.post-formats-fields { - margin-bottom: 20px; -} - .wp-format-standard .post-formats-fields, .wp-format-aside .post-formats-fields, .wp-format-chat .post-formats-fields, @@ -4771,10 +4767,6 @@ span.imgedit-scale-warn { padding: 2px 10px; } -.wp_attachment_details { - margin-bottom: 20px; -} - /*------------------------------------------------------------------------------ 15.0 - Comments Screen ------------------------------------------------------------------------------*/ @@ -6325,7 +6317,7 @@ table.form-table td .updated { padding: 0; } -#post-body-content { +.edit-form-section { margin-bottom: 20px; } diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 1c8b1b7ad3..b96190fe6e 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -384,7 +384,11 @@ wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); '; + do_action( 'edit_form_after_title' ); + echo ''; +} // post format fields if ( post_type_supports( $post_type, 'post-formats' ) ) { @@ -395,7 +399,7 @@ if ( isset( $format_meta['image'] ) ) else $image = false; ?> -
+
@@ -447,7 +451,7 @@ else if ( post_type_supports($post_type, 'editor') ) { ?> -
+
post_content, 'content', array('dfw' => true, 'tabfocus_elements' => 'insert-media-button,save-post', 'editor_height' => 360) ); ?> @@ -470,9 +474,14 @@ if ( post_type_supports($post_type, 'editor') ) {
- + +if ( has_action( 'edit_form_after_editor' ) ) { + echo '
'; + do_action( 'edit_form_after_editor' ); + echo '
'; +} +?>
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index adb0817061..c58b2d7b9f 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -2307,7 +2307,7 @@ function edit_form_image_editor() {
-
+