WordPress.org

Make WordPress Core

Ticket #48251: 48251.patch

File 48251.patch, 2.6 KB (added by jrf, 6 weeks ago)

Remove private assignation from _deprecated_..() and _doing_it_wrong() functions

  • src/wp-includes/functions.php

    From 8dd0ced153acf5625d6a20916914a5aa4ec56b1f Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Tue, 8 Oct 2019 13:40:29 +0200
    Subject: [PATCH] Remove private assignation from _deprecated_..() and
     _doing_it_wrong() functions
    
    ---
     src/wp-includes/functions.php | 11 +++++------
     1 file changed, 5 insertions(+), 6 deletions(-)
    
    diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
    index 717da22699..30ca4643e6 100644
    a b function absint( $maybeint ) { 
    45254525 * This function is to be used in every function that is deprecated.
    45264526 *
    45274527 * @since 2.5.0
    4528  * @access private
     4528 * @since 5.4.0 This function is no longer marked as "private".
    45294529 *
    45304530 * @param string $function    The function that was called.
    45314531 * @param string $version     The version of WordPress that deprecated the function.
    function _deprecated_function( $function, $version, $replacement = null ) { 
    45824582 *
    45834583 * @since 4.3.0
    45844584 * @since 4.5.0 Added the `$parent_class` parameter.
    4585  *
    4586  * @access private
     4585 * @since 5.4.0 This function is no longer marked as "private".
    45874586 *
    45884587 * @param string $class        The class containing the deprecated constructor.
    45894588 * @param string $version      The version of WordPress that deprecated the function.
    function _deprecated_constructor( $class, $version, $parent_class = '' ) { 
    46754674 * This function is to be used in every file that is deprecated.
    46764675 *
    46774676 * @since 2.5.0
    4678  * @access private
     4677 * @since 5.4.0 This function is no longer marked as "private".
    46794678 *
    46804679 * @param string $file        The file that was included.
    46814680 * @param string $version     The version of WordPress that deprecated the file.
    function _deprecated_file( $file, $version, $replacement = null, $message = '' ) 
    47424741 * The current behavior is to trigger a user error if WP_DEBUG is true.
    47434742 *
    47444743 * @since 3.0.0
    4745  * @access private
     4744 * @since 5.4.0 This function is no longer marked as "private".
    47464745 *
    47474746 * @param string $function The function that was called.
    47484747 * @param string $version  The version of WordPress that deprecated the argument used.
    function _deprecated_hook( $hook, $version, $replacement = null, $message = null 
    48494848 * The current behavior is to trigger a user error if `WP_DEBUG` is true.
    48504849 *
    48514850 * @since 3.1.0
    4852  * @access private
     4851 * @since 5.4.0 This function is no longer marked as "private".
    48534852 *
    48544853 * @param string $function The function that was called.
    48554854 * @param string $message  A message explaining what has been done incorrectly.