From cd3367d942c943278592926969714d93f6ceba9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helen=20Hou-Sand=C3=AD?= Date: Tue, 6 Oct 2015 14:34:24 +0000 Subject: [PATCH] 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 --- wp-includes/shortcodes.php | 13 ++++++++----- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/wp-includes/shortcodes.php b/wp-includes/shortcodes.php index 3959818575..0042877e17 100644 --- a/wp-includes/shortcodes.php +++ b/wp-includes/shortcodes.php @@ -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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index a2bfd38a9d..1796d2d42d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.