Make WordPress Core

Ticket #23198: 23198-2.patch

File 23198-2.patch, 781 bytes (added by azaozz, 11 years ago)
  • 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;
    401402
     403                                $post_format = get_post_format($post);
     404                                if ( $post_format )
     405                                        $body_class .= ' post-format-' . $post_format;
     406                        }
     407
    402408                        if ( !empty($set['tinymce']['body_class']) ) {
    403409                                $body_class .= ' ' . $set['tinymce']['body_class'];
    404410                                unset($set['tinymce']['body_class']);