In miscellaneous publishing actions, use :last-child instead of a separate misc-pub-section-last class to control borders. Allows for sane use of the post_submitbox_misc_actions hook. (Actually uses :first-child for browser compat reasons.) fixes #19604.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-03-02 19:52:23 +00:00
parent ee35957ab0
commit 13be6d8fb9
5 changed files with 21 additions and 10 deletions

View File

@ -1833,7 +1833,7 @@ fieldset.inline-edit-col-right .inline-edit-col {
} }
#post-body .misc-pub-section { #post-body .misc-pub-section {
border-right-color: #eee; border-left-color: #eee;
} }
.post-com-count span { .post-com-count span {

View File

@ -1468,7 +1468,7 @@ fieldset.inline-edit-col-right .inline-edit-col {
} }
#post-body .misc-pub-section { #post-body .misc-pub-section {
border-right-color: #eee; border-left-color: #eee;
} }
.post-com-count span { .post-com-count span {

View File

@ -939,7 +939,13 @@ ul#add-to-blog-users {
#major-publishing-actions { #major-publishing-actions {
padding: 10px 10px 8px; padding: 10px 10px 8px;
clear: both; clear: both;
border-top: none; border-top: 1px solid #f5f5f5;
margin-top: -2px;
}
#post-body #major-publishing-actions {
border-top: 0;
margin-top: 0;
} }
#delete-action { #delete-action {
@ -964,8 +970,8 @@ ul#add-to-blog-users {
} }
#post-body .misc-pub-section { #post-body .misc-pub-section {
border-right-width: 1px; border-left-width: 1px;
border-right-style: solid; border-left-style: solid;
border-top: 0; border-top: 0;
border-bottom: 0; border-bottom: 0;
min-height: 30px; min-height: 30px;
@ -973,6 +979,10 @@ ul#add-to-blog-users {
max-width: 32%; max-width: 32%;
} }
#post-body .misc-pub-section:first-child {
border-left: 0;
}
#post-body .misc-pub-section-last { #post-body .misc-pub-section-last {
border-right: 0; border-right: 0;
} }
@ -990,6 +1000,7 @@ ul#add-to-blog-users {
.misc-pub-section:first-child { .misc-pub-section:first-child {
border-top-width: 0; border-top-width: 0;
} }
.misc-pub-section-last { .misc-pub-section-last {
border-bottom-width: 0; border-bottom-width: 0;
} }

View File

@ -44,7 +44,7 @@ if ( !defined('ABSPATH') )
<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php /* translators: comment type radio button */ _ex('Spam', 'adjective'); ?></label> <label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php /* translators: comment type radio button */ _ex('Spam', 'adjective'); ?></label>
</div> </div>
<div class="misc-pub-section curtime misc-pub-section-last"> <div class="misc-pub-section curtime">
<?php <?php
// translators: Publish box date format, see http://php.net/date // translators: Publish box date format, see http://php.net/date
$datef = __( 'M j, Y @ G:i' ); $datef = __( 'M j, Y @ G:i' );

View File

@ -57,7 +57,7 @@ if ( 'publish' == $post->post_status ) {
<div id="misc-publishing-actions"> <div id="misc-publishing-actions">
<div class="misc-pub-section<?php if ( !$can_publish ) { echo ' misc-pub-section-last'; } ?>"><label for="post_status"><?php _e('Status:') ?></label> <div class="misc-pub-section"><label for="post_status"><?php _e('Status:') ?></label>
<span id="post-status-display"> <span id="post-status-display">
<?php <?php
switch ( $post->post_status ) { switch ( $post->post_status ) {
@ -107,7 +107,7 @@ switch ( $post->post_status ) {
<?php } ?> <?php } ?>
</div><?php // /misc-pub-section ?> </div><?php // /misc-pub-section ?>
<div class="misc-pub-section " id="visibility"> <div class="misc-pub-section" id="visibility">
<?php _e('Visibility:'); ?> <span id="post-visibility-display"><?php <?php _e('Visibility:'); ?> <span id="post-visibility-display"><?php
if ( 'private' == $post->post_status ) { if ( 'private' == $post->post_status ) {
@ -174,7 +174,7 @@ if ( 0 != $post->ID ) {
} }
if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
<div class="misc-pub-section curtime misc-pub-section-last"> <div class="misc-pub-section curtime">
<span id="timestamp"> <span id="timestamp">
<?php printf($stamp, $date); ?></span> <?php printf($stamp, $date); ?></span>
<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
@ -615,7 +615,7 @@ function link_submit_meta_box($link) {
</div> </div>
<div id="misc-publishing-actions"> <div id="misc-publishing-actions">
<div class="misc-pub-section misc-pub-section-last"> <div class="misc-pub-section">
<label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label> <label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label>
</div> </div>
</div> </div>