Make WordPress Core

Changeset 34868


Ignore:
Timestamp:
10/06/2015 02:33:27 PM (9 years ago)
Author:
helen
Message:

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

props mattheu.
fixes #34167.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/shortcodes.php

    r34761 r34868  
    531531     *
    532532     * @since 3.6.0
     533     * @since 4.4.0 Added the `$shortcode` parameter.
    533534     *
    534      * @param array $out   The output array of shortcode attributes.
    535      * @param array $pairs The supported attributes and their defaults.
    536      * @param array $atts  The user defined shortcode attributes.
     535     * @param array  $out       The output array of shortcode attributes.
     536     * @param array  $pairs     The supported attributes and their defaults.
     537     * @param array  $atts      The user defined shortcode attributes.
     538     * @param string $shortcode The shortcode name.
    537539     */
    538     if ( $shortcode )
    539         $out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts );
     540    if ( $shortcode ) {
     541        $out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
     542    }
    540543
    541544    return $out;
Note: See TracChangeset for help on using the changeset viewer.