WordPress.org

Make WordPress Core

Changeset 16196


Ignore:
Timestamp:
11/05/2010 02:04:22 AM (9 years ago)
Author:
markjaquith
Message:

Use post_type_supports() to check for whether a post type supports post formats. Only posts support it by default. props mikeschinkel. see #14746

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r16191 r16196  
    156156
    157157<?php
    158 if ( 'post' == $post->post_type && current_theme_supports( 'post-formats' ) ) :
     158if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) :
    159159$post_formats = get_theme_support( 'post-formats' );
    160160
  • trunk/wp-includes/post.php

    r16191 r16196  
    2525        'rewrite' => false,
    2626        'query_var' => false,
    27         'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'sticky', 'trackbacks', 'custom-fields', 'comments', 'revisions' ),
     27        'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'sticky', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ),
    2828    ) );
    2929
Note: See TracChangeset for help on using the changeset viewer.