Make WordPress Core

Ticket #23198: 23198-3.diff

File 23198-3.diff, 1.7 KB (added by adamsilverstein, 11 years ago)
  • wp-includes/post-template.php

    Property changes on: .
    ___________________________________________________________________
    Added: svn:ignore
       + wp-config.php
    
    
     
    437437                        if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
    438438                                $post_format = get_post_format( $post->ID );
    439439
    440                                 if ( $post_format && !is_wp_error($post_format) )
     440                                if ( $post_format && !is_wp_error( $post_format ) )
    441441                                        $classes[] = 'single-format-' . sanitize_html_class( $post_format );
    442442                                else
    443443                                        $classes[] = 'single-format-standard';
  • wp-includes/class-wp-editor.php

     
    395395                        }
    396396
    397397                        $body_class = $editor_id;
     398                        $post = get_post();
    398399
    399                         if ( $post = get_post() )
    400                                 $body_class .= ' post-type-' . $post->post_type;
     400                        if ( $post ) {
     401                                $body_class .= ' post-type-' . $post->post_type . ' post-status-' . $post->post_status;
     402                                if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
     403                                        $post_format = get_post_format( $post );
     404                                        if ( $post_format && !is_wp_error( $post_format ) )
     405                                                $body_class .= ' post-format-' . sanitize_html_class( $post_format );
     406                                        else
     407                                                $body_class .= ' post-format-standard';
     408                                }
     409                        }
    401410
    402411                        if ( !empty($set['tinymce']['body_class']) ) {
    403412                                $body_class .= ' ' . $set['tinymce']['body_class'];