Changeset 23753 for trunk/wp-includes/post-formats.php
- Timestamp:
- 03/19/2013 05:18:07 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post-formats.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-formats.php
r23729 r23753 84 84 'quote' => '', 85 85 'quote_source' => '', 86 'image' => '',87 86 'url' => '', 88 'gallery' => '',89 87 'media' => '', 90 88 ); … … 300 298 'class' => get_post_format_content_class( $format ), 301 299 'link_class' => '', 302 'image_class' => '',303 300 ); 304 301 … … 344 341 break; 345 342 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 $image355 );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_html363 );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 374 343 case 'video': 375 344 case 'audio':
Note: See TracChangeset
for help on using the changeset viewer.