Add post format icons to the radio chooser. This also trims empty margins from the sprites to make them usable in RTL and make positioning numbers more sane. props ryelle, kovshenin for the initial patch. fixes #24519.
git-svn-id: http://core.svn.wordpress.org/trunk@24429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@ -1460,7 +1460,7 @@ div.wp-menu-image {
|
||||
|
||||
/* Post format icons */
|
||||
|
||||
a.post-state-format {
|
||||
.post-format-icon {
|
||||
background: url(../images/post-formats-vs.png) no-repeat;
|
||||
}
|
||||
|
||||
@ -2283,9 +2283,9 @@ h2.nav-tab-wrapper, h3.nav-tab-wrapper {
|
||||
}
|
||||
|
||||
/* 16px post formats */
|
||||
a.post-state-format {
|
||||
.post-format-icon {
|
||||
background-image: url(../images/post-formats32-vs.png);
|
||||
background-size: 32px 320px;
|
||||
background-size: 16px 304px;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1354,7 +1354,7 @@ div.wp-menu-image {
|
||||
|
||||
/* Post format icons */
|
||||
|
||||
a.post-state-format {
|
||||
.post-format-icon {
|
||||
background: url(../images/post-formats.png) no-repeat;
|
||||
}
|
||||
|
||||
@ -2171,9 +2171,9 @@ h2.nav-tab-wrapper, h3.nav-tab-wrapper {
|
||||
}
|
||||
|
||||
/* 16px post formats */
|
||||
a.post-state-format {
|
||||
.post-format-icon {
|
||||
background-image: url(../images/post-formats32.png);
|
||||
background-size: 32px 320px;
|
||||
background-size: 16px 304px;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1053,6 +1053,53 @@ a.post-state-format {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
label.post-format-icon {
|
||||
margin-left: 0;
|
||||
margin-right: 5px;
|
||||
padding-left: 0px;
|
||||
padding-right: 21px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-standard {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-image {
|
||||
background-position: 100% -32px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-gallery {
|
||||
background-position: 100% -64px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-audio {
|
||||
background-position: 100% -96px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-video {
|
||||
background-position: 100% -128px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-chat {
|
||||
background-position: 100% -160px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-status {
|
||||
background-position: 100% -192px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-aside {
|
||||
background-position: 100% -224px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-quote {
|
||||
background-position: 100% -256px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-link {
|
||||
background-position: 100% -288px;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
12.0 - Categories
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -3946,40 +3946,53 @@ a.post-state-format {
|
||||
text-indent: -999em;
|
||||
}
|
||||
|
||||
a.post-state-format.format-image {
|
||||
background-position: -8px -40px;
|
||||
#post-formats-select {
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
a.post-state-format.format-gallery {
|
||||
background-position: -8px -72px;
|
||||
label.post-format-icon {
|
||||
margin-left: 5px;
|
||||
padding: 2px 0 2px 21px;
|
||||
}
|
||||
|
||||
a.post-state-format.format-audio {
|
||||
background-position: -8px -104px;
|
||||
.post-format-icon.post-format-standard {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
a.post-state-format.format-video {
|
||||
background-position: -8px -136px;
|
||||
.post-format-icon.post-format-image {
|
||||
background-position: 0 -32px;
|
||||
}
|
||||
|
||||
a.post-state-format.format-chat {
|
||||
background-position: -8px -168px;
|
||||
.post-format-icon.post-format-gallery {
|
||||
background-position: 0 -64px;
|
||||
}
|
||||
|
||||
a.post-state-format.format-status {
|
||||
background-position: -8px -200px;
|
||||
.post-format-icon.post-format-audio {
|
||||
background-position: 0 -96px;
|
||||
}
|
||||
|
||||
a.post-state-format.format-aside {
|
||||
background-position: -8px -232px;
|
||||
.post-format-icon.post-format-video {
|
||||
background-position: 0 -128px;
|
||||
}
|
||||
|
||||
a.post-state-format.format-quote {
|
||||
background-position: -8px -265px;
|
||||
.post-format-icon.post-format-chat {
|
||||
background-position: 0 -160px;
|
||||
}
|
||||
|
||||
a.post-state-format.format-link {
|
||||
background-position: -8px -296px;
|
||||
.post-format-icon.post-format-status {
|
||||
background-position: 0 -192px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-aside {
|
||||
background-position: 0 -224px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-quote {
|
||||
background-position: 0 -256px;
|
||||
}
|
||||
|
||||
.post-format-icon.post-format-link {
|
||||
background-position: 0 -288px;
|
||||
}
|
||||
|
||||
|
||||
@ -6432,8 +6445,7 @@ table.form-table td .updated {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
#post-visibility-select,
|
||||
#post-formats-select {
|
||||
#post-visibility-select {
|
||||
line-height: 1.5em;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 7.6 KiB |
@ -551,7 +551,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
if ( $format = get_post_format( $post->ID ) ) {
|
||||
$label = get_post_format_string( $format );
|
||||
|
||||
echo '<a href="' . esc_url( add_query_arg( array( 'post_format' => $format, 'post_type' => $post->post_type ), 'edit.php' ) ) . '" class="post-state-format format-' . $format . '" title="' . $label . '">' . $label . ":</a> ";
|
||||
echo '<a href="' . esc_url( add_query_arg( array( 'post_format' => $format, 'post_type' => $post->post_type ), 'edit.php' ) ) . '" class="post-state-format post-format-icon post-format-' . $format . '" title="' . $label . '">' . $label . ":</a> ";
|
||||
}
|
||||
|
||||
if ( $can_edit_post && $post->post_status != 'trash' ) {
|
||||
|
@ -315,9 +315,9 @@ function post_format_meta_box( $post, $box ) {
|
||||
$post_formats[0][] = $post_format;
|
||||
?>
|
||||
<div id="post-formats-select">
|
||||
<input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> /> <label for="post-format-0"><?php _e('Standard'); ?></label>
|
||||
<input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> /> <label for="post-format-0" class="post-format-icon post-format-standard"><?php _e('Standard'); ?></label>
|
||||
<?php foreach ( $post_formats[0] as $format ) : ?>
|
||||
<br /><input type="radio" name="post_format" class="post-format" id="post-format-<?php echo esc_attr( $format ); ?>" value="<?php echo esc_attr( $format ); ?>" <?php checked( $post_format, $format ); ?> /> <label for="post-format-<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label>
|
||||
<br /><input type="radio" name="post_format" class="post-format" id="post-format-<?php echo esc_attr( $format ); ?>" value="<?php echo esc_attr( $format ); ?>" <?php checked( $post_format, $format ); ?> /> <label for="post-format-<?php echo esc_attr( $format ); ?>" class="post-format-icon post-format-<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label>
|
||||
<?php endforeach; ?><br />
|
||||
</div>
|
||||
<?php endif; endif;
|
||||
|