Ticket #13874: 13874.2.diff
File 13874.2.diff, 3.3 KB (added by , 10 years ago) |
---|
-
wp-includes/functions.php
2848 2848 * trigger or false to not trigger error. 2849 2849 * 2850 2850 * @param string $function The function that was called 2851 * @param string $version The version of WordPressthat deprecated the function2851 * @param string $version The version of $package that deprecated the function 2852 2852 * @param string $replacement Optional. The function that should have been called 2853 * @param string $package Optional. The package to which $function belongs 2853 2854 */ 2854 function _deprecated_function( $function, $version, $replacement = null ) {2855 function _deprecated_function( $function, $version, $replacement = null, $package = 'core' ) { 2855 2856 2856 do_action( 'deprecated_function_run', $function, $replacement, $version );2857 do_action( 'deprecated_function_run', $function, $replacement, $version, $package ); 2857 2858 2858 2859 // Allow plugin to filter the output error trigger 2859 2860 if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) { … … 2886 2887 * trigger or false to not trigger error. 2887 2888 * 2888 2889 * @param string $file The file that was included 2889 * @param string $version The version of WordPressthat deprecated the file2890 * @param string $version The version of $package that deprecated the file 2890 2891 * @param string $replacement Optional. The file that should have been included based on ABSPATH 2891 2892 * @param string $message Optional. A message regarding the change 2893 * @param string $package Optional. The package to which $function belongs 2892 2894 */ 2893 function _deprecated_file( $file, $version, $replacement = null, $message = '' ) {2895 function _deprecated_file( $file, $version, $replacement = null, $message = '', $package = 'core' ) { 2894 2896 2895 do_action( 'deprecated_file_included', $file, $replacement, $version, $message );2897 do_action( 'deprecated_file_included', $file, $replacement, $version, $message, $package ); 2896 2898 2897 2899 // Allow plugin to filter the output error trigger 2898 2900 if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { … … 2912 2914 * For example: 2913 2915 * <code> 2914 2916 * if ( !empty($deprecated) ) 2915 * _deprecated_argument( __FUNCTION__, '3.0' );2917 * _deprecated_argument( __FUNCTION__, '3.0', 'core' ); 2916 2918 * </code> 2917 2919 * 2918 2920 * There is a hook deprecated_argument_run that will be called that can be used … … 2932 2934 * trigger or false to not trigger error. 2933 2935 * 2934 2936 * @param string $function The function that was called 2935 * @param string $version The version of WordPressthat deprecated the argument used2937 * @param string $version The version of $package that deprecated the argument used 2936 2938 * @param string $message Optional. A message regarding the change. 2939 * @param string $package Optional. The package to which $function belongs 2937 2940 */ 2938 function _deprecated_argument( $function, $version, $message = null ) {2941 function _deprecated_argument( $function, $version, $message = null, $package = 'core' ) { 2939 2942 2940 do_action( 'deprecated_argument_run', $function, $message, $version );2943 do_action( 'deprecated_argument_run', $function, $message, $version, $package ); 2941 2944 2942 2945 // Allow plugin to filter the output error trigger 2943 2946 if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {