From 00f82359e5a5020a736a33f4c3f4341c34b94b50 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 10 May 2013 23:22:58 +0000 Subject: [PATCH] A better logic check for whether we are looking at a post formats supporting view. see #24291. git-svn-id: http://core.svn.wordpress.org/trunk@24243 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-header.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 9e15168527..3252a09951 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -85,7 +85,8 @@ $admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0- $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' ); $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); -if ( false !== $post_format = get_post_format() ) { +if ( isset( $post ) && is_a( $post, 'WP_Post' ) && post_type_supports( get_post_type(), 'post-formats' ) ) { + $post_format = get_post_format(); if ( ! $post_format ) { $post_format = 'standard';