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:
parent
2d1fff2c75
commit
cd3367d942
|
@ -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 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;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue