Ticket #15155: 15155.2.diff
File 15155.2.diff, 1.4 KB (added by , 14 years ago) |
---|
-
wp-includes/shortcodes.php
259 259 * 260 260 * @param array $pairs Entire list of supported attributes and their defaults. 261 261 * @param array $atts User defined attributes in shortcode tag. 262 * @param string $shortcode Optional. The name of the shortcode, provided for context to enable filtering 262 263 * @return array Combined and filtered attribute list. 263 264 */ 264 function shortcode_atts( $pairs, $atts) {265 function shortcode_atts( $pairs, $atts, $shortcode = '' ) { 265 266 $atts = (array)$atts; 266 267 $out = array(); 267 268 foreach($pairs as $name => $default) { … … 270 271 else 271 272 $out[$name] = $default; 272 273 } 274 275 if ( ! empty( $shortcode ) ) 276 $out = apply_filters( 'shortcode_atts_' . $shortcode, $out, $pairs, $atts ); 277 273 278 return $out; 274 279 } 275 280 -
wp-includes/media.php
731 731 'align' => 'alignnone', 732 732 'width' => '', 733 733 'caption' => '' 734 ), $attr ));734 ), $attr, 'caption')); 735 735 736 736 if ( 1 > (int) $width || empty($caption) ) 737 737 return $content; … … 784 784 'size' => 'thumbnail', 785 785 'include' => '', 786 786 'exclude' => '' 787 ), $attr ));787 ), $attr, 'gallery')); 788 788 789 789 $id = intval($id); 790 790 if ( 'RAND' == $order )