Remove default content from post format compat output. We shouldn't magically create content for display not specified by the user, especially given that the current compat is handling the case of new data, old theme. see #23347.
git-svn-id: https://develop.svn.wordpress.org/trunk@23499 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ac4ab9cd60
commit
8b26ed504c
@ -300,9 +300,6 @@ function post_formats_compat( $content, $id = 0 ) {
|
||||
'class' => get_post_format_content_class( $format ),
|
||||
'link_class' => '',
|
||||
'image_class' => '',
|
||||
'gallery' => '[gallery]',
|
||||
'audio' => '',
|
||||
'video' => ''
|
||||
);
|
||||
|
||||
$args = apply_filters( 'post_format_compat', array() );
|
||||
@ -376,9 +373,7 @@ function post_formats_compat( $content, $id = 0 ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( empty( $meta['gallery'] ) && ! empty( $compat['gallery'] ) ) {
|
||||
$format_output .= $compat['gallery'];
|
||||
} elseif ( ! empty( $meta['gallery'] ) ) {
|
||||
if ( ! empty( $meta['gallery'] ) ) {
|
||||
$format_output .= $meta['gallery'];
|
||||
}
|
||||
break;
|
||||
@ -388,9 +383,7 @@ function post_formats_compat( $content, $id = 0 ) {
|
||||
$shortcode_regex = '/' . get_shortcode_regex() . '/s';
|
||||
$matches = preg_match( $shortcode_regex, $content );
|
||||
if ( ! $matches || $format !== $matches[2] ) {
|
||||
if ( empty( $meta['media'] ) && ! empty( $compat[$format] ) ) {
|
||||
$format_output .= $compat[$format];
|
||||
} elseif ( ! empty( $meta['media'] ) ) {
|
||||
if ( ! empty( $meta['media'] ) ) {
|
||||
// the metadata is a shortcode or an embed code
|
||||
if ( preg_match( $shortcode_regex, $meta['media'] ) || preg_match( '#<[^>]+>#', $meta['media'] ) ) {
|
||||
$format_output .= $meta['media'];
|
||||
|
Loading…
Reference in New Issue
Block a user