mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Twenty Eleven: add support for Status and Quote formats, props iandstewart - see #17198
git-svn-id: http://svn.automattic.com/wordpress/trunk@17717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
972a41501e
commit
89bad03498
@ -38,7 +38,7 @@ add_theme_support( 'automatic-feed-links' );
|
||||
/**
|
||||
* Add support for an Aside Post Format
|
||||
*/
|
||||
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery' ) );
|
||||
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote' ) );
|
||||
|
||||
/**
|
||||
* Add support for custom backgrounds
|
||||
|
@ -87,7 +87,7 @@ get_header(); ?>
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'post_format',
|
||||
'terms' => array( 'post-format-aside', 'post-format-link' ),
|
||||
'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ),
|
||||
'field' => 'slug',
|
||||
'operator' => 'NOT IN',
|
||||
),
|
||||
|
@ -796,7 +796,10 @@ dl.gallery-item {
|
||||
top: 80px;
|
||||
}
|
||||
|
||||
/* Aside */
|
||||
|
||||
/* =Aside
|
||||
----------------------------------------------- */
|
||||
|
||||
.format-aside .entry-title,
|
||||
.format-aside .entry-header .comments-link {
|
||||
display: none;
|
||||
@ -811,7 +814,10 @@ dl.gallery-item {
|
||||
padding: 1.625em 0 0;
|
||||
}
|
||||
|
||||
/* Link */
|
||||
|
||||
/* =Link
|
||||
----------------------------------------------- */
|
||||
|
||||
.format-link .entry-title,
|
||||
.format-link .entry-header .comments-link {
|
||||
display: none;
|
||||
@ -826,14 +832,57 @@ dl.gallery-item {
|
||||
padding: 1.625em 0 0;
|
||||
}
|
||||
|
||||
/* Gallery */
|
||||
|
||||
/* =Gallery
|
||||
----------------------------------------------- */
|
||||
|
||||
.format-gallery .gallery-thumb {
|
||||
float: left;
|
||||
display: block;
|
||||
margin-right: 1.625em;
|
||||
}
|
||||
|
||||
/* error404 */
|
||||
|
||||
/* =Status
|
||||
----------------------------------------------- */
|
||||
|
||||
.format-status .entry-title,
|
||||
.format-status .entry-header .comments-link {
|
||||
display: none;
|
||||
}
|
||||
.singular .format-status .entry-title {
|
||||
display: block;
|
||||
}
|
||||
.format-status .entry-content {
|
||||
padding: 0;
|
||||
}
|
||||
.singular .format-status .entry-content {
|
||||
padding: 1.625em 0 0;
|
||||
}
|
||||
.format-status img.avatar {
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 1px 2px #ccc;
|
||||
-moz-box-shadow: 0 1px 2px #ccc;
|
||||
box-shadow: 0 1px 2px #ccc;
|
||||
float: left;
|
||||
margin: 4px 10px 1.625em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/* =Quote
|
||||
----------------------------------------------- */
|
||||
|
||||
.format-quote blockquote {
|
||||
color: #555;
|
||||
font-size: 17px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
/* =error404
|
||||
----------------------------------------------- */
|
||||
.error404 #main #searchform {
|
||||
background: #f9f9f9;
|
||||
border: 1px solid #ddd;
|
||||
|
@ -12,7 +12,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||
* @return void
|
||||
**/
|
||||
function Twenty_Eleven_Ephemera_Widget() {
|
||||
$widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside and Link posts', 'twentyeleven' ) );
|
||||
$widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ) );
|
||||
$this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops );
|
||||
$this->alt_option_name = 'widget_twentyeleven_ephemera';
|
||||
|
||||
@ -63,7 +63,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'post_format',
|
||||
'terms' => array( 'post-format-aside', 'post-format-link' ),
|
||||
'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-status', 'post-format-quote' ),
|
||||
'field' => 'slug',
|
||||
'operator' => 'IN',
|
||||
),
|
||||
@ -85,7 +85,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||
<ol>
|
||||
<?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
|
||||
|
||||
<?php if ( 'aside' == get_post_format( $post->ID ) ) : ?>
|
||||
<?php if ( 'link' != get_post_format( $post->ID ) ) : ?>
|
||||
|
||||
<li class="entry-title">
|
||||
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
|
||||
@ -94,7 +94,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<?php elseif ( 'link' == get_post_format( $post->ID ) ) : ?>
|
||||
<?php else : ?>
|
||||
|
||||
<li class="entry-title">
|
||||
<?php
|
||||
|
Loading…
Reference in New Issue
Block a user