From c44eb74f66c2fa2aad1079d851eaaa768f340199 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 5 Nov 2010 02:04:22 +0000 Subject: [PATCH] Use post_type_supports() to check for whether a post type supports post formats. Only posts support it by default. props mikeschinkel. see #14746 git-svn-id: https://develop.svn.wordpress.org/trunk@16196 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/meta-boxes.php | 2 +- wp-includes/post.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 8d71d02e72..70666000c2 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -155,7 +155,7 @@ echo esc_html( $visibility_trans ); ?> post_type && current_theme_supports( 'post-formats' ) ) : +if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) : $post_formats = get_theme_support( 'post-formats' ); $post_formats_display = get_post_format_strings(); diff --git a/wp-includes/post.php b/wp-includes/post.php index 2927b71878..5e07e850b9 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -24,7 +24,7 @@ function create_initial_post_types() { 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, - 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'sticky', 'trackbacks', 'custom-fields', 'comments', 'revisions' ), + 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'sticky', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ), ) ); register_post_type( 'page', array(