Skip to content

Commit

Permalink
A better logic check for whether we are looking at a post formats sup…
Browse files Browse the repository at this point in the history
…porting view.

see #24291.

git-svn-id: http://core.svn.wordpress.org/trunk@24243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
markjaquith committed May 10, 2013
1 parent 0a67245 commit 00f8235
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wp-admin/admin-header.php
Expand Up @@ -85,7 +85,8 @@
$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';

Expand Down

0 comments on commit 00f8235

Please sign in to comment.