Ticket #15155: 15155.diff
File 15155.diff, 1.7 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 = '') { 266 // Shortcode handlers should provide the name of the shortcode. 267 if ( empty( $shortcode ) ) 268 _deprecated_argument( __FUNCTION__, '3.1', __( 'The "$shortcode" argument should be supplied.' ) ); 269 265 270 $atts = (array)$atts; 266 271 $out = array(); 267 272 foreach($pairs as $name => $default) { … … 270 275 else 271 276 $out[$name] = $default; 272 277 } 278 279 if ( ! empty( $shortcode ) ) { 280 $out = apply_filters( 'shortcode_atts-' . $shortcode, $out, $pairs, $atts ); 281 $out = apply_filters( 'shortcode_atts', $out, $pairs, $atts, $shortcode ); 282 } 283 273 284 return $out; 274 285 } 275 286 -
wp-includes/media.php
729 729 'align' => 'alignnone', 730 730 'width' => '', 731 731 'caption' => '' 732 ), $attr ));732 ), $attr, 'caption')); 733 733 734 734 if ( 1 > (int) $width || empty($caption) ) 735 735 return $content; … … 782 782 'size' => 'thumbnail', 783 783 'include' => '', 784 784 'exclude' => '' 785 ), $attr ));785 ), $attr, 'gallery')); 786 786 787 787 $id = intval($id); 788 788 if ( 'RAND' == $order )