Make WordPress Core

Ticket #52055: 52055.2.patch

File 52055.2.patch, 2.3 KB (added by Mista-Flo, 2 years ago)

Fix first patch

  • src/wp-includes/media.php

    diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
    index d29426213e..76b7bc9038 100644
    a b function gallery_shortcode( $attr ) { 
    22562256                $attr['include'] = $attr['ids'];
    22572257        }
    22582258
    2259         /**
    2260          * Filters the default gallery shortcode output.
    2261          *
    2262          * If the filtered output isn't empty, it will be used instead of generating
    2263          * the default gallery template.
    2264          *
    2265          * @since 2.5.0
    2266          * @since 4.2.0 The `$instance` parameter was added.
    2267          *
    2268          * @see gallery_shortcode()
    2269          *
    2270          * @param string $output   The gallery output. Default empty.
    2271          * @param array  $attr     Attributes of the gallery shortcode.
    2272          * @param int    $instance Unique numeric ID of this gallery shortcode instance.
    2273          */
    2274         $output = apply_filters( 'post_gallery', '', $attr, $instance );
    2275 
    2276         if ( ! empty( $output ) ) {
    2277                 return $output;
    2278         }
    2279 
    22802259        $html5 = current_theme_supports( 'html5', 'gallery' );
    22812260        $atts  = shortcode_atts(
    22822261                array(
    function gallery_shortcode( $attr ) { 
    22962275                'gallery'
    22972276        );
    22982277
     2278        /**
     2279         * Filters the shortcode attributes.
     2280         *
     2281         * @since 5.7.0
     2282         *
     2283         * @see gallery_shortcode()
     2284         *
     2285         * @param array  $atts     Merged attributes of the gallery shortcode.
     2286         * @param array  $attr     User attributes of the gallery shortcode.
     2287         * @param int    $instance Unique numeric ID of this gallery shortcode instance.
     2288         */
     2289        $atts = apply_filters( 'post_gallery_attributes', $atts, $attr, $instance );
     2290
     2291        /**
     2292         * Filters the default gallery shortcode output.
     2293         *
     2294         * If the filtered output isn't empty, it will be used instead of generating
     2295         * the default gallery template.
     2296         *
     2297         * @since 2.5.0
     2298         * @since 4.2.0 The `$instance` parameter was added.
     2299         * @since 5.7.0 The `$atts` parameter was added.
     2300         *
     2301         * @see gallery_shortcode()
     2302         *
     2303         * @param string $output   The gallery output. Default empty.
     2304         * @param array  $attr     User attributes of the gallery shortcode.
     2305         * @param int    $instance Unique numeric ID of this gallery shortcode instance.
     2306         * @param array  $atts     Merged attributes of the gallery shortcode.
     2307         */
     2308        $output = apply_filters( 'post_gallery', '', $attr, $instance, $atts );
     2309
     2310        if ( ! empty( $output ) ) {
     2311                return $output;
     2312        }
     2313
    22992314        $id = (int) $atts['id'];
    23002315
    23012316        if ( ! empty( $atts['include'] ) ) {