WordPress.org

Make WordPress Core

Changeset 16197


Ignore:
Timestamp:
11/05/10 02:25:41 (7 years ago)
Author:
markjaquith
Message:

Add Post Format support to TwentyTen. Can now use this to designate an Aside or a Gallery! see #14746

Location:
trunk/wp-content/themes/twentyten
Files:
3 edited

Legend:

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

    r16174 r16197  
    7878    add_editor_style(); 
    7979 
    80     // Temporarily add Post Format support 
    81     add_theme_support( 'post-formats', array( 'aside', 'video', 'image' ) ); 
     80    // Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories. 
     81    add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); 
    8282 
    8383    // This theme uses post thumbnails 
  • trunk/wp-content/themes/twentyten/loop.php

    r15392 r16197  
    5858<?php /* How to display posts in the Gallery category. */ ?> 
    5959 
    60     <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?> 
     60    <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) || 'gallery' == get_post_format( $post->ID ) ) : ?> 
    6161        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
    6262            <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> 
     
    9999<?php /* How to display posts in the asides category */ ?> 
    100100 
    101     <?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?> 
     101    <?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) || 'aside' == get_post_format( $post->ID ) ) : ?> 
    102102        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
    103103 
  • trunk/wp-content/themes/twentyten/style.css

    r15997 r16197  
    44Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar. 
    55Author: the WordPress team 
    6 Version: 1.1 
     6Version: 1.2-alpha 
    77Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu 
    88*/ 
Note: See TracChangeset for help on using the changeset viewer.