Ticket #13874: 13874.diff
File 13874.diff, 3.3 KB (added by , 11 years ago) |
---|
-
wp-includes/functions.php
2686 2686 * trigger or false to not trigger error. 2687 2687 * 2688 2688 * @param string $function The function that was called 2689 * @param string $version The version of WordPressthat deprecated the function2689 * @param string $version The version of $package that deprecated the function 2690 2690 * @param string $replacement Optional. The function that should have been called 2691 * @param string $package Optional. The package to which $function belongs 2691 2692 */ 2692 function _deprecated_function( $function, $version, $replacement = null ) {2693 function _deprecated_function( $function, $version, $replacement = null, $package = 'core' ) { 2693 2694 2694 do_action( 'deprecated_function_run', $function, $replacement, $version );2695 do_action( 'deprecated_function_run', $function, $replacement, $version, $package ); 2695 2696 2696 2697 // Allow plugin to filter the output error trigger 2697 2698 if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) { … … 2724 2725 * trigger or false to not trigger error. 2725 2726 * 2726 2727 * @param string $file The file that was included 2727 * @param string $version The version of WordPressthat deprecated the file2728 * @param string $version The version of $package that deprecated the file 2728 2729 * @param string $replacement Optional. The file that should have been included based on ABSPATH 2729 2730 * @param string $message Optional. A message regarding the change 2731 * @param string $package Optional. The package to which $function belongs 2730 2732 */ 2731 function _deprecated_file( $file, $version, $replacement = null, $message = '' ) {2733 function _deprecated_file( $file, $version, $replacement = null, $message = '', $package = 'core' ) { 2732 2734 2733 do_action( 'deprecated_file_included', $file, $replacement, $version, $message );2735 do_action( 'deprecated_file_included', $file, $replacement, $version, $message, $package ); 2734 2736 2735 2737 // Allow plugin to filter the output error trigger 2736 2738 if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { … … 2750 2752 * For example: 2751 2753 * <code> 2752 2754 * if ( !empty($deprecated) ) 2753 * _deprecated_argument( __FUNCTION__, '3.0' );2755 * _deprecated_argument( __FUNCTION__, '3.0', 'core' ); 2754 2756 * </code> 2755 2757 * 2756 2758 * There is a hook deprecated_argument_run that will be called that can be used … … 2770 2772 * trigger or false to not trigger error. 2771 2773 * 2772 2774 * @param string $function The function that was called 2773 * @param string $version The version of WordPressthat deprecated the argument used2775 * @param string $version The version of $package that deprecated the argument used 2774 2776 * @param string $message Optional. A message regarding the change. 2777 * @param string $package Optional. The package to which $function belongs 2775 2778 */ 2776 function _deprecated_argument( $function, $version, $message = null ) {2779 function _deprecated_argument( $function, $version, $message = null, $package = 'core' ) { 2777 2780 2778 do_action( 'deprecated_argument_run', $function, $message, $version );2781 do_action( 'deprecated_argument_run', $function, $message, $version, $package ); 2779 2782 2780 2783 // Allow plugin to filter the output error trigger 2781 2784 if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {