Make WordPress Core

Ticket #34167: 34167.2.diff

File 34167.2.diff, 887 bytes (added by mattheu, 8 years ago)
  • src/wp-includes/shortcodes.php

    diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php
    index 86976a2..fbabc1c 100644
    a b function shortcode_atts( $pairs, $atts, $shortcode = '' ) { 
    510510         * The third parameter, $shortcode, is the name of the shortcode.
    511511         *
    512512         * @since 3.6.0
     513         * @since 4.4.0 Added shortcode name.
    513514         *
    514515         * @param array $out   The output array of shortcode attributes.
    515516         * @param array $pairs The supported attributes and their defaults.
    516517         * @param array $atts  The user defined shortcode attributes.
     518         * @param array $atts  The shortcode name.
    517519         */
    518         if ( $shortcode )
    519                 $out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts );
     520        if ( $shortcode ) {
     521                $out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
     522        }
    520523
    521524        return $out;
    522525}