WordPress.org

Make WordPress Core

Ticket #13874: 13874.diff

File 13874.diff, 3.3 KB (added by ericmann, 2 years ago)

Refreshed patch with $package at end of function calls.

  • wp-includes/functions.php

     
    26862686 *   trigger or false to not trigger error. 
    26872687 * 
    26882688 * @param string $function The function that was called 
    2689  * @param string $version The version of WordPress that deprecated the function 
     2689 * @param string $version The version of $package that deprecated the function 
    26902690 * @param string $replacement Optional. The function that should have been called 
     2691 * @param string $package Optional. The package to which $function belongs 
    26912692 */ 
    2692 function _deprecated_function( $function, $version, $replacement = null ) { 
     2693function _deprecated_function( $function, $version, $replacement = null, $package = 'core' ) { 
    26932694 
    2694         do_action( 'deprecated_function_run', $function, $replacement, $version ); 
     2695        do_action( 'deprecated_function_run', $function, $replacement, $version, $package ); 
    26952696 
    26962697        // Allow plugin to filter the output error trigger 
    26972698        if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) { 
     
    27242725 *   trigger or false to not trigger error. 
    27252726 * 
    27262727 * @param string $file The file that was included 
    2727  * @param string $version The version of WordPress that deprecated the file 
     2728 * @param string $version The version of $package that deprecated the file 
    27282729 * @param string $replacement Optional. The file that should have been included based on ABSPATH 
    27292730 * @param string $message Optional. A message regarding the change 
     2731 * @param string $package Optional. The package to which $function belongs 
    27302732 */ 
    2731 function _deprecated_file( $file, $version, $replacement = null, $message = '' ) { 
     2733function _deprecated_file( $file, $version, $replacement = null, $message = '', $package = 'core' ) { 
    27322734 
    2733         do_action( 'deprecated_file_included', $file, $replacement, $version, $message ); 
     2735        do_action( 'deprecated_file_included', $file, $replacement, $version, $message, $package ); 
    27342736 
    27352737        // Allow plugin to filter the output error trigger 
    27362738        if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { 
     
    27502752 * For example: 
    27512753 * <code> 
    27522754 * if ( !empty($deprecated) ) 
    2753  *      _deprecated_argument( __FUNCTION__, '3.0' ); 
     2755 *      _deprecated_argument( __FUNCTION__, '3.0', 'core' ); 
    27542756 * </code> 
    27552757 * 
    27562758 * There is a hook deprecated_argument_run that will be called that can be used 
     
    27702772 *   trigger or false to not trigger error. 
    27712773 * 
    27722774 * @param string $function The function that was called 
    2773  * @param string $version The version of WordPress that deprecated the argument used 
     2775 * @param string $version The version of $package that deprecated the argument used 
    27742776 * @param string $message Optional. A message regarding the change. 
     2777 * @param string $package Optional. The package to which $function belongs 
    27752778 */ 
    2776 function _deprecated_argument( $function, $version, $message = null ) { 
     2779function _deprecated_argument( $function, $version, $message = null, $package = 'core' ) { 
    27772780 
    2778         do_action( 'deprecated_argument_run', $function, $message, $version ); 
     2781        do_action( 'deprecated_argument_run', $function, $message, $version, $package ); 
    27792782 
    27802783        // Allow plugin to filter the output error trigger 
    27812784        if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {