Ticket #23347: 23347.9.diff
File 23347.9.diff, 1.3 KB (added by , 11 years ago) |
---|
-
wp-includes/post-formats.php
300 300 'class' => get_post_format_content_class( $format ), 301 301 'link_class' => '', 302 302 'image_class' => '', 303 'gallery' => '[gallery]',304 'audio' => '',305 'video' => ''306 303 ); 307 304 308 305 $args = apply_filters( 'post_format_compat', array() ); … … 376 373 } 377 374 } 378 375 379 if ( empty( $meta['gallery'] ) && ! empty( $compat['gallery'] ) ) { 380 $format_output .= $compat['gallery']; 381 } elseif ( ! empty( $meta['gallery'] ) ) { 376 if ( ! empty( $meta['gallery'] ) ) { 382 377 $format_output .= $meta['gallery']; 383 378 } 384 379 break; … … 388 383 $shortcode_regex = '/' . get_shortcode_regex() . '/s'; 389 384 $matches = preg_match( $shortcode_regex, $content ); 390 385 if ( ! $matches || $format !== $matches[2] ) { 391 if ( empty( $meta['media'] ) && ! empty( $compat[$format] ) ) { 392 $format_output .= $compat[$format]; 393 } elseif ( ! empty( $meta['media'] ) ) { 386 if ( ! empty( $meta['media'] ) ) { 394 387 // the metadata is a shortcode or an embed code 395 388 if ( preg_match( $shortcode_regex, $meta['media'] ) || preg_match( '#<[^>]+>#', $meta['media'] ) ) { 396 389 $format_output .= $meta['media'];