WordPress.org

Make WordPress Core

Ticket #13874: 13874.2.diff

File 13874.2.diff, 3.3 KB (added by wonderboymusic, 15 months ago)
  • wp-includes/functions.php

     
    28482848 *   trigger or false to not trigger error. 
    28492849 * 
    28502850 * @param string $function The function that was called 
    2851  * @param string $version The version of WordPress that deprecated the function 
     2851 * @param string $version The version of $package that deprecated the function 
    28522852 * @param string $replacement Optional. The function that should have been called 
     2853 * @param string $package Optional. The package to which $function belongs 
    28532854 */ 
    2854 function _deprecated_function( $function, $version, $replacement = null ) { 
     2855function _deprecated_function( $function, $version, $replacement = null, $package = 'core' ) { 
    28552856 
    2856         do_action( 'deprecated_function_run', $function, $replacement, $version ); 
     2857        do_action( 'deprecated_function_run', $function, $replacement, $version, $package ); 
    28572858 
    28582859        // Allow plugin to filter the output error trigger 
    28592860        if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) { 
     
    28862887 *   trigger or false to not trigger error. 
    28872888 * 
    28882889 * @param string $file The file that was included 
    2889  * @param string $version The version of WordPress that deprecated the file 
     2890 * @param string $version The version of $package that deprecated the file 
    28902891 * @param string $replacement Optional. The file that should have been included based on ABSPATH 
    28912892 * @param string $message Optional. A message regarding the change 
     2893 * @param string $package Optional. The package to which $function belongs 
    28922894 */ 
    2893 function _deprecated_file( $file, $version, $replacement = null, $message = '' ) { 
     2895function _deprecated_file( $file, $version, $replacement = null, $message = '', $package = 'core' ) { 
    28942896 
    2895         do_action( 'deprecated_file_included', $file, $replacement, $version, $message ); 
     2897        do_action( 'deprecated_file_included', $file, $replacement, $version, $message, $package ); 
    28962898 
    28972899        // Allow plugin to filter the output error trigger 
    28982900        if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { 
     
    29122914 * For example: 
    29132915 * <code> 
    29142916 * if ( !empty($deprecated) ) 
    2915  *      _deprecated_argument( __FUNCTION__, '3.0' ); 
     2917 *      _deprecated_argument( __FUNCTION__, '3.0', 'core' ); 
    29162918 * </code> 
    29172919 * 
    29182920 * There is a hook deprecated_argument_run that will be called that can be used 
     
    29322934 *   trigger or false to not trigger error. 
    29332935 * 
    29342936 * @param string $function The function that was called 
    2935  * @param string $version The version of WordPress that deprecated the argument used 
     2937 * @param string $version The version of $package that deprecated the argument used 
    29362938 * @param string $message Optional. A message regarding the change. 
     2939 * @param string $package Optional. The package to which $function belongs 
    29372940 */ 
    2938 function _deprecated_argument( $function, $version, $message = null ) { 
     2941function _deprecated_argument( $function, $version, $message = null, $package = 'core' ) { 
    29392942 
    2940         do_action( 'deprecated_argument_run', $function, $message, $version ); 
     2943        do_action( 'deprecated_argument_run', $function, $message, $version, $package ); 
    29412944 
    29422945        // Allow plugin to filter the output error trigger 
    29432946        if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {