Make WordPress Core

Ticket #48255: 48255-deprecated-hooks-correct-placement-of-hook-documentatio.patch

File 48255-deprecated-hooks-correct-placement-of-hook-documentatio.patch, 2.6 KB (added by jrf, 5 years ago)

Documentation: correct placement of hook documentation x 2

  • src/wp-includes/functions.wp-styles.php

    From 59aea1b3566b07bb03dd750553a5cef0f6bba2c4 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Tue, 8 Oct 2019 06:39:09 +0200
    Subject: [PATCH] Documentation: correct placement of hook documentation x 2
    
    ---
     src/wp-includes/functions.wp-styles.php | 11 +++++-----
     src/wp-includes/shortcodes.php          | 29 +++++++++++++------------
     2 files changed, 21 insertions(+), 19 deletions(-)
    
    diff --git a/src/wp-includes/functions.wp-styles.php b/src/wp-includes/functions.wp-styles.php
    index 517aac8887..ec41361dc1 100644
    a b function wp_print_styles( $handles = false ) { 
    4343        if ( '' === $handles ) { // for wp_head
    4444                $handles = false;
    4545        }
    46         /**
    47          * Fires before styles in the $handles queue are printed.
    48          *
    49          * @since 2.6.0
    50          */
     46
    5147        if ( ! $handles ) {
     48                /**
     49                 * Fires before styles in the $handles queue are printed.
     50                 *
     51                 * @since 2.6.0
     52                 */
    5253                do_action( 'wp_print_styles' );
    5354        }
    5455
  • src/wp-includes/shortcodes.php

    diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php
    index df29332215..b951b17ec1 100644
    a b function shortcode_atts( $pairs, $atts, $shortcode = '' ) { 
    565565                        $out[ $name ] = $default;
    566566                }
    567567        }
    568         /**
    569          * Filters a shortcode's default attributes.
    570          *
    571          * If the third parameter of the shortcode_atts() function is present then this filter is available.
    572          * The third parameter, $shortcode, is the name of the shortcode.
    573          *
    574          * @since 3.6.0
    575          * @since 4.4.0 Added the `$shortcode` parameter.
    576          *
    577          * @param array  $out       The output array of shortcode attributes.
    578          * @param array  $pairs     The supported attributes and their defaults.
    579          * @param array  $atts      The user defined shortcode attributes.
    580          * @param string $shortcode The shortcode name.
    581          */
     568
    582569        if ( $shortcode ) {
     570                /**
     571                 * Filters a shortcode's default attributes.
     572                 *
     573                 * If the third parameter of the shortcode_atts() function is present then this filter is available.
     574                 * The third parameter, $shortcode, is the name of the shortcode.
     575                 *
     576                 * @since 3.6.0
     577                 * @since 4.4.0 Added the `$shortcode` parameter.
     578                 *
     579                 * @param array  $out       The output array of shortcode attributes.
     580                 * @param array  $pairs     The supported attributes and their defaults.
     581                 * @param array  $atts      The user defined shortcode attributes.
     582                 * @param string $shortcode The shortcode name.
     583                 */
    583584                $out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
    584585        }
    585586