Ticket #15155: 15155.3.diff
File 15155.3.diff, 1.4 KB (added by , 12 years ago) |
---|
-
wp-includes/media.php
644 644 'align' => 'alignnone', 645 645 'width' => '', 646 646 'caption' => '' 647 ), $attr ));647 ), $attr, 'caption')); 648 648 649 649 if ( 1 > (int) $width || empty($caption) ) 650 650 return $content; … … 704 704 'size' => 'thumbnail', 705 705 'include' => '', 706 706 'exclude' => '' 707 ), $attr ));707 ), $attr, 'gallery')); 708 708 709 709 $id = intval($id); 710 710 if ( 'RAND' == $order ) -
wp-includes/shortcodes.php
289 289 * 290 290 * @param array $pairs Entire list of supported attributes and their defaults. 291 291 * @param array $atts User defined attributes in shortcode tag. 292 * @param string $shortcode Optional. The name of the shortcode, provided for context to enable filtering 292 293 * @return array Combined and filtered attribute list. 293 294 */ 294 function shortcode_atts( $pairs, $atts) {295 function shortcode_atts( $pairs, $atts, $shortcode = '' ) { 295 296 $atts = (array)$atts; 296 297 $out = array(); 297 298 foreach($pairs as $name => $default) { … … 300 301 else 301 302 $out[$name] = $default; 302 303 } 304 305 if ( ! empty( $shortcode ) ) 306 $out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts ); 307 303 308 return $out; 304 309 } 305 310