Make WordPress Core


Ignore:
Timestamp:
03/19/2013 05:18:07 PM (13 years ago)
Author:
helen
Message:

Remove separate meta fields for image and gallery post formats. These are proving to be more confusing and labor-intensive from both a user and dev perspective than entering into the regular content editor. We will rely on good content parsing instead. See #19570, #23347.

File:
1 edited

Legend:

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

    r23729 r23753  
    8484        'quote'        => '',
    8585        'quote_source' => '',
    86         'image'        => '',
    8786        'url'          => '',
    88         'gallery'      => '',
    8987        'media'        => '',
    9088    );
     
    300298        'class' => get_post_format_content_class( $format ),
    301299        'link_class' => '',
    302         'image_class' => '',
    303300    );
    304301
     
    344341            break;
    345342
    346         case 'image':
    347             if ( ! empty( $meta['image'] ) ) {
    348                 $image = is_numeric( $meta['image'] ) ? wp_get_attachment_url( $meta['image'] ) : $meta['image'];
    349 
    350                 if ( ! empty( $image ) && ! stristr( $content, $image ) ) {
    351                     $image_html = sprintf(
    352                         '<img %ssrc="%s" alt="" />',
    353                         empty( $compat['image_class'] ) ? '' : sprintf( 'class="%s" ', esc_attr( $compat['image_class'] ) ),
    354                         $image
    355                     );
    356                     if ( empty( $meta['url'] ) ) {
    357                         $format_output .= $image_html;
    358                     } else {
    359                         $format_output .= sprintf(
    360                             '<a href="%s">%s</a>',
    361                             esc_url( $meta['url'] ),
    362                             $image_html
    363                         );
    364                     }
    365                 }
    366             }
    367             break;
    368 
    369         case 'gallery':
    370             if ( ! has_shortcode( $post->post_content, $format ) && ! empty( $meta['gallery'] ) )
    371                 $format_output .= $meta['gallery'];
    372             break;
    373 
    374343        case 'video':
    375344        case 'audio':
Note: See TracChangeset for help on using the changeset viewer.