Make WordPress Core

Changeset 17717


Ignore:
Timestamp:
04/26/2011 06:46:31 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Eleven: add support for Status and Quote formats, props iandstewart - see #17198

Location:
trunk/wp-content/themes/twentyeleven
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/functions.php

    r17714 r17717  
    3939 * Add support for an Aside Post Format
    4040 */
    41 add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery' ) );
     41add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote' ) );
    4242
    4343/**
  • trunk/wp-content/themes/twentyeleven/showcase.php

    r17714 r17717  
    8888                            array(
    8989                                'taxonomy' => 'post_format',
    90                                 'terms' => array( 'post-format-aside', 'post-format-link' ),
     90                                'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ),
    9191                                'field' => 'slug',
    9292                                'operator' => 'NOT IN',
  • trunk/wp-content/themes/twentyeleven/style.css

    r17669 r17717  
    797797}
    798798
    799 /* Aside */
     799
     800/* =Aside
     801----------------------------------------------- */
     802
    800803.format-aside .entry-title,
    801804.format-aside .entry-header .comments-link {
     
    812815}
    813816
    814 /* Link */
     817
     818/* =Link
     819----------------------------------------------- */
     820
    815821.format-link .entry-title,
    816822.format-link .entry-header .comments-link {
     
    827833}
    828834
    829 /* Gallery */
     835
     836/* =Gallery
     837----------------------------------------------- */
     838
    830839.format-gallery .gallery-thumb {
    831840    float: left;
     
    834843}
    835844
    836 /* error404 */
     845
     846/* =Status
     847----------------------------------------------- */
     848
     849.format-status .entry-title,
     850.format-status .entry-header .comments-link {
     851    display: none;
     852}
     853.singular .format-status .entry-title {
     854    display: block;
     855}
     856.format-status .entry-content {
     857    padding: 0;
     858}
     859.singular .format-status .entry-content {
     860    padding: 1.625em 0 0;
     861}
     862.format-status img.avatar {
     863    -moz-border-radius: 3px;
     864    border-radius: 3px;
     865    -webkit-box-shadow: 0 1px 2px #ccc;
     866    -moz-box-shadow: 0 1px 2px #ccc;
     867    box-shadow: 0 1px 2px #ccc;
     868    float: left;
     869    margin: 4px 10px 1.625em 0;
     870    padding: 0;
     871}
     872
     873
     874/* =Quote
     875----------------------------------------------- */
     876
     877.format-quote blockquote {
     878    color: #555;
     879    font-size: 17px;
     880    margin: 0;
     881}
     882
     883
     884/* =error404
     885----------------------------------------------- */
    837886.error404 #main #searchform {
    838887    background: #f9f9f9;
  • trunk/wp-content/themes/twentyeleven/widgets.php

    r17714 r17717  
    1313     **/
    1414    function Twenty_Eleven_Ephemera_Widget() {
    15         $widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside and Link posts', 'twentyeleven' ) );
     15        $widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ) );
    1616        $this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops );
    1717        $this->alt_option_name = 'widget_twentyeleven_ephemera';
     
    6464                array(
    6565                    'taxonomy' => 'post_format',
    66                     'terms' => array( 'post-format-aside', 'post-format-link' ),
     66                    'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-status', 'post-format-quote' ),
    6767                    'field' => 'slug',
    6868                    'operator' => 'IN',
     
    8686        <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
    8787
    88             <?php if ( 'aside' == get_post_format( $post->ID ) ) : ?>
     88            <?php if ( 'link' != get_post_format( $post->ID ) ) : ?>
    8989
    9090            <li class="entry-title">
     
    9595            </li>
    9696
    97             <?php elseif ( 'link' == get_post_format( $post->ID ) ) : ?>
     97            <?php else : ?>
    9898
    9999            <li class="entry-title">
Note: See TracChangeset for help on using the changeset viewer.