Post formats: connect labels with fields, move the two css blocks dealing with formats next to each other, see #23938
git-svn-id: http://core.svn.wordpress.org/trunk@23926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eb142744d8
commit
50ff2315a6
|
@ -3141,109 +3141,6 @@ input#link_url {
|
|||
margin-top: 3px;
|
||||
}
|
||||
|
||||
/* Post formats form */
|
||||
#poststuff .post-format-select {
|
||||
margin-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.post-formats-fields {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wp-format-gallery .post-formats-fields,
|
||||
.wp-format-image .post-formats-fields,
|
||||
.wp-format-link .post-formats-fields,
|
||||
.wp-format-quote .post-formats-fields,
|
||||
.wp-format-video .post-formats-fields,
|
||||
.wp-format-audio .post-formats-fields,
|
||||
.wp-format-gallery .field.wp-format-gallery,
|
||||
.wp-format-image .field.wp-format-image,
|
||||
.wp-format-chat .field.wp-format-chat,
|
||||
.wp-format-link .field.wp-format-link,
|
||||
.wp-format-quote .field.wp-format-quote,
|
||||
.wp-format-video .field.wp-format-video,
|
||||
.wp-format-audio .field.wp-format-audio {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.post-formats-fields .field {
|
||||
display: none;
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.post-formats-fields input,
|
||||
.post-formats-fields textarea {
|
||||
padding: 5px;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.wp-format-video label,
|
||||
.wp-format-audio label {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.wp-format-media-holder {
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
width: 40%;
|
||||
height: 200px;
|
||||
border: 1px dashed #dfdfdf;
|
||||
background: #f5f5f5 url(../images/media-button-2x.png) no-repeat 50% 25%;
|
||||
}
|
||||
|
||||
.wp-format-media-holder.empty {
|
||||
height: auto;
|
||||
padding: 55px 0 20px;
|
||||
}
|
||||
|
||||
.wp-format-media-holder:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.wp-format-media-preview {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mejs-audio audio,
|
||||
.mejs-video video {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wp-format-media-select {
|
||||
display: block;
|
||||
height: 200px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wp-format-media-select img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.empty .wp-format-media-select {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.empty .wp-format-media-metaedit {
|
||||
height: 20px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.edit-format-preview {
|
||||
display: block;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
#wp_format_audio, #wp_format_video {
|
||||
float: left;
|
||||
margin-right: 23px;
|
||||
max-width: 50%;
|
||||
min-height: 97px;
|
||||
}
|
||||
|
||||
/* Post Screen */
|
||||
#post-body #normal-sortables {
|
||||
min-height: 50px;
|
||||
|
@ -4031,9 +3928,112 @@ body .ui-tooltip {
|
|||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
11.4 - Post format selection
|
||||
11.4 - Post formats
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
#poststuff .post-format-select {
|
||||
margin-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.post-formats-fields {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wp-format-gallery .post-formats-fields,
|
||||
.wp-format-image .post-formats-fields,
|
||||
.wp-format-link .post-formats-fields,
|
||||
.wp-format-quote .post-formats-fields,
|
||||
.wp-format-video .post-formats-fields,
|
||||
.wp-format-audio .post-formats-fields,
|
||||
.wp-format-gallery .field.wp-format-gallery,
|
||||
.wp-format-image .field.wp-format-image,
|
||||
.wp-format-chat .field.wp-format-chat,
|
||||
.wp-format-link .field.wp-format-link,
|
||||
.wp-format-quote .field.wp-format-quote,
|
||||
.wp-format-video .field.wp-format-video,
|
||||
.wp-format-audio .field.wp-format-audio {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.post-formats-fields .field {
|
||||
display: none;
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.post-formats-fields input,
|
||||
.post-formats-fields textarea {
|
||||
padding: 5px;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.wp-format-video label,
|
||||
.wp-format-audio label {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.wp-format-media-holder {
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
width: 40%;
|
||||
height: 200px;
|
||||
border: 1px dashed #dfdfdf;
|
||||
background: #f5f5f5 url(../images/media-button-2x.png) no-repeat 50% 25%;
|
||||
}
|
||||
|
||||
.wp-format-media-holder.empty {
|
||||
height: auto;
|
||||
padding: 55px 0 20px;
|
||||
}
|
||||
|
||||
.wp-format-media-holder:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.wp-format-media-preview {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mejs-audio audio,
|
||||
.mejs-video video {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wp-format-media-select {
|
||||
display: block;
|
||||
height: 200px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wp-format-media-select img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.empty .wp-format-media-select {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.empty .wp-format-media-metaedit {
|
||||
height: 20px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.edit-format-preview {
|
||||
display: block;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
#wp_format_audio,
|
||||
#wp_format_video {
|
||||
float: left;
|
||||
margin-right: 23px;
|
||||
max-width: 50%;
|
||||
min-height: 97px;
|
||||
}
|
||||
|
||||
#icon-edit.standard {
|
||||
background: url(../images/post-formats32.png) no-repeat -3px -4px;
|
||||
}
|
||||
|
|
|
@ -10,12 +10,12 @@ $format_meta = get_post_format_meta( $post_ID );
|
|||
|
||||
<div class="field wp-format-quote">
|
||||
<label for="_wp_format_quote"><?php _e( 'Quote' ); ?></label>
|
||||
<textarea name="_wp_format_quote" class="widefat"><?php echo esc_textarea( $format_meta['quote'] ); ?></textarea>
|
||||
<textarea id="_wp_format_quote" name="_wp_format_quote" class="widefat"><?php echo esc_textarea( $format_meta['quote'] ); ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="field wp-format-quote">
|
||||
<label for="_wp_format_quote_source"><?php _e( 'Quote source' ); ?></label>
|
||||
<input type="text" name="_wp_format_quote_source" value="<?php echo esc_attr( $format_meta['quote_source'] ); ?>" class="widefat" />
|
||||
<input type="text" id="_wp_format_quote_source" name="_wp_format_quote_source" value="<?php echo esc_attr( $format_meta['quote_source'] ); ?>" class="widefat" />
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
@ -44,13 +44,13 @@ $format_meta = get_post_format_meta( $post_ID );
|
|||
|
||||
<div class="field wp-format-link wp-format-quote wp-format-image">
|
||||
<label for="_wp_format_url"><?php _e( 'Link URL' ); ?></label>
|
||||
<input type="text" name="_wp_format_url" value="<?php echo esc_url( $format_meta['url'] ); ?>" class="widefat" />
|
||||
<input type="text" id="_wp_format_url" name="_wp_format_url" value="<?php echo esc_url( $format_meta['url'] ); ?>" class="widefat" />
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$show_video_preview = ! empty( $format_meta['video'] );
|
||||
?>
|
||||
<div class="field wp-format-video<?php if ( $show_video_preview ) echo ' has-media-preview' ?>">
|
||||
<div class="field wp-format-video<?php if ( $show_video_preview ) echo ' has-media-preview'; ?>">
|
||||
<?php if ( $show_video_preview ): ?>
|
||||
<div id="video-preview" class="wp-format-media-preview">
|
||||
<?php
|
||||
|
@ -69,7 +69,7 @@ $format_meta = get_post_format_meta( $post_ID );
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif; ?>
|
||||
<label for="_wp_format_video"><?php _e( 'Video embed code or URL' ); ?></label>
|
||||
<textarea id="wp_format_video" type="text" name="_wp_format_video" class="widefat"><?php esc_html_e( $format_meta['video'] ); ?></textarea>
|
||||
<div data-format="video" class="wp-format-media-holder hide-if-no-js<?php if ( ! $image ) echo ' empty'; ?>">
|
||||
|
@ -103,7 +103,7 @@ $format_meta = get_post_format_meta( $post_ID );
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif; ?>
|
||||
<label for="_wp_format_audio"><?php _e( 'Audio embed code or URL' ); ?></label>
|
||||
<textarea id="wp_format_audio" name="_wp_format_audio" class="widefat"><?php esc_html_e( $format_meta['audio'] );
|
||||
?></textarea>
|
||||
|
@ -113,4 +113,4 @@ $format_meta = get_post_format_meta( $post_ID );
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue