WordPress.org

Make WordPress Core

Changeset 23499


Ignore:
Timestamp:
02/27/2013 10:10:08 PM (8 years ago)
Author:
helen
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-formats.php

    r23468 r23499  
    301301        'link_class' => '',
    302302        'image_class' => '',
    303         'gallery' => '[gallery]',
    304         'audio' => '',
    305         'video' => ''
    306303    );
    307304
     
    377374            }
    378375
    379             if ( empty( $meta['gallery'] ) && ! empty( $compat['gallery'] ) ) {
    380                 $format_output .= $compat['gallery'];
    381             } elseif ( ! empty( $meta['gallery'] ) ) {
     376            if ( ! empty( $meta['gallery'] ) ) {
    382377                $format_output .= $meta['gallery'];
    383378            }
     
    389384            $matches = preg_match( $shortcode_regex, $content );
    390385            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'] ) ) {
    394387                    // the metadata is a shortcode or an embed code
    395388                    if ( preg_match( $shortcode_regex, $meta['media'] ) || preg_match( '#<[^>]+>#', $meta['media'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.