Ticket #23198: 23198-4.diff
File 23198-4.diff, 2.4 KB (added by , 11 years ago) |
---|
-
wp-includes/post-template.php
Property changes on: . ___________________________________________________________________ Added: svn:ignore + wp-config.php
437 437 if ( post_type_supports( $post->post_type, 'post-formats' ) ) { 438 438 $post_format = get_post_format( $post->ID ); 439 439 440 if ( $post_format && !is_wp_error( $post_format) )440 if ( $post_format && !is_wp_error( $post_format ) ) 441 441 $classes[] = 'single-format-' . sanitize_html_class( $post_format ); 442 442 else 443 443 $classes[] = 'single-format-standard'; -
wp-includes/post.php
758 758 * 759 759 * @since 3.1.0 760 760 * 761 * @param int|object $post A post761 * @param int|object $post Post ID or post object. Optional, default is the current post from the loop. 762 762 * 763 763 * @return mixed The format if successful. False if no format is set. WP_Error if errors. 764 764 */ 765 765 function get_post_format( $post = null ) { 766 766 $post = get_post($post); 767 767 768 if ( empty($post) ) 769 return new WP_Error('invalid_post', __('Invalid post')); 770 768 771 if ( ! post_type_supports( $post->post_type, 'post-formats' ) ) 769 772 return false; 770 773 -
wp-includes/class-wp-editor.php
395 395 } 396 396 397 397 $body_class = $editor_id; 398 $post = get_post(); 398 399 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 } 401 410 402 411 if ( !empty($set['tinymce']['body_class']) ) { 403 412 $body_class .= ' ' . $set['tinymce']['body_class'];