Changeset 23847 for trunk/wp-includes/post-formats.php
- Timestamp:
- 03/29/2013 05:21:23 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-formats.php
r23843 r23847 290 290 291 291 $format = get_post_format( $post ); 292 if ( empty( $format ) || in_array( $format, array( 'status', 'aside', 'chat' ) ) )292 if ( empty( $format ) || in_array( $format, array( 'status', 'aside', 'chat', 'gallery' ) ) ) 293 293 return $content; 294 294 … … 309 309 $format_output = ''; 310 310 $meta = get_post_format_meta( $post->ID ); 311 // passed by ref in preg_match()312 $matches = array();313 311 314 312 switch ( $format ) { … … 342 340 break; 343 341 342 case 'image': 343 if ( ! empty( $meta['image'] ) ) { 344 $image = is_numeric( $meta['image'] ) ? wp_get_attachment_url( $meta['image'] ) : $meta['image']; 345 346 if ( ! empty( $image ) && ! stristr( $content, $image ) ) { 347 $image_html = sprintf( 348 '<img %ssrc="%s" alt="" />', 349 empty( $compat['image_class'] ) ? '' : sprintf( 'class="%s" ', esc_attr( $compat['image_class'] ) ), 350 $image 351 ); 352 if ( empty( $meta['url'] ) ) { 353 $format_output .= $image_html; 354 } else { 355 $format_output .= sprintf( 356 '<a href="%s">%s</a>', 357 esc_url( $meta['url'] ), 358 $image_html 359 ); 360 } 361 } 362 } 363 break; 364 344 365 case 'quote': 345 366 if ( ! empty( $meta['quote'] ) && ! stristr( $content, $meta['quote'] ) ) { 346 367 $quote = sprintf( '<blockquote>%s</blockquote>', wpautop( $meta['quote'] ) ); 347 368 if ( ! empty( $meta['quote_source'] ) ) { 348 $source = ( empty( $ quote_meta['url'] ) ) ? $meta['quote_source'] : sprintf( '<a href="%s">%s</a>', esc_url( $meta['url'] ), $meta['quote_source'] );369 $source = ( empty( $meta['url'] ) ) ? $meta['quote_source'] : sprintf( '<a href="%s">%s</a>', esc_url( $meta['url'] ), $meta['quote_source'] ); 349 370 $quote .= sprintf( '<figcaption class="quote-caption">%s</figcaption>', $source ); 350 371 }
Note: See TracChangeset
for help on using the changeset viewer.