Ticket #23823: 23823.diff
File 23823.diff, 1.2 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentythirteen/functions.php
447 447 function twentythirteen_featured_gallery() { 448 448 $pattern = get_shortcode_regex(); 449 449 450 if ( preg_match( "/$pattern/s", get_the_content(), $match ) ) { 451 if ( 'gallery' == $match[2] ) { 452 if ( ! strpos( $match[3], 'size' ) ) 453 $match[3] .= ' size="medium"'; 454 455 echo do_shortcode_tag( $match ); 456 } 450 if ( preg_match( "/$pattern/s", get_the_content(), $match ) && 'gallery' == $match[2] ) { 451 add_filter( 'shortcode_atts_gallery', 'twentythirteen_gallery_atts' ); 452 echo do_shortcode_tag( $match ); 457 453 } 458 454 } 459 455 endif; 460 456 461 457 /** 458 * Sets the image size in featured galleries to large. 459 * 460 * @see twentythirteen_featured_gallery() 461 * 462 * @since Twenty Thirteen 1.0 463 * 464 * @param array $atts Combined and filtered attribute list. 465 * @return array 466 */ 467 function twentythirteen_gallery_atts( $atts ) { 468 $atts['size'] = 'large'; 469 return $atts; 470 } 471 472 /** 462 473 * Extends the default WordPress body class to denote: 463 474 * 1. Custom fonts enabled. 464 475 * 2. Single or multiple authors.