Shortcodes: Pass the name as context for shortcode_atts_{$shortcode}.

props mattheu.
fixes #34167.

Built from https://develop.svn.wordpress.org/trunk@34868


git-svn-id: http://core.svn.wordpress.org/trunk@34833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2015-10-06 14:34:24 +00:00
parent 2d1fff2c75
commit cd3367d942
2 changed files with 9 additions and 6 deletions

View File

@ -530,13 +530,16 @@ function shortcode_atts( $pairs, $atts, $shortcode = '' ) {
* The third parameter, $shortcode, is the name of the shortcode.
*
* @since 3.6.0
* @since 4.4.0 Added the `$shortcode` parameter.
*
* @param array $out The output array of shortcode attributes.
* @param array $pairs The supported attributes and their defaults.
* @param array $atts The user defined shortcode attributes.
* @param array $out The output array of shortcode attributes.
* @param array $pairs The supported attributes and their defaults.
* @param array $atts The user defined shortcode attributes.
* @param string $shortcode The shortcode name.
*/
if ( $shortcode )
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts );
if ( $shortcode ) {
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
}
return $out;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34867';
$wp_version = '4.4-alpha-34868';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.