Changeset 12680 for trunk/wp-includes/functions.php
- Timestamp:
- 01/09/2010 10:03:55 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r12669 r12680 1171 1171 function wp_get_http( $url, $file_path = false, $deprecated = false ) { 1172 1172 if ( !empty( $deprecated ) ) 1173 _deprecated_argument( __FUNCTION__, ' 0.0' );1173 _deprecated_argument( __FUNCTION__, '2.7' ); 1174 1174 1175 1175 @set_time_limit( 60 ); … … 1216 1216 function wp_get_http_headers( $url, $deprecated = false ) { 1217 1217 if ( !empty( $deprecated ) ) 1218 _deprecated_argument( __FUNCTION__, ' 0.0' );1218 _deprecated_argument( __FUNCTION__, '2.7' ); 1219 1219 1220 1220 $response = wp_remote_head( $url ); … … 2154 2154 * 2155 2155 * @param string $name 2156 * @param null $deprecated N otused. Set to null.2156 * @param null $deprecated Never used. Set to null. 2157 2157 * @param mixed $bits File content 2158 2158 * @param string $time Optional. Time formatted in 'yyyy/mm'. … … 2161 2161 function wp_upload_bits( $name, $deprecated, $bits, $time = null ) { 2162 2162 if ( !empty( $deprecated ) ) 2163 _deprecated_argument( __FUNCTION__, ' 0.0' );2163 _deprecated_argument( __FUNCTION__, '2.0' ); 2164 2164 2165 2165 if ( empty( $name ) ) … … 2962 2962 * 2963 2963 * @package WordPress 2964 * @ package Debug2964 * @subpackage Debug 2965 2965 * @since 2.5.0 2966 2966 * @access private 2967 2967 * 2968 * @uses do_action() Calls 'deprecated_function_run' and passes the function name and what to use instead. 2969 * @uses apply_filters() Calls 'deprecated_function_trigger_error' and expects boolean value of true to do trigger or false to not trigger error. 2968 * @uses do_action() Calls 'deprecated_function_run' and passes the function name, what to use instead, 2969 * and the version the function was deprecated in. 2970 * @uses apply_filters() Calls 'deprecated_function_trigger_error' and expects boolean value of true to do 2971 * trigger or false to not trigger error. 2970 2972 * 2971 2973 * @param string $function The function that was called … … 2973 2975 * @param string $replacement Optional. The function that should have been called 2974 2976 */ 2975 function _deprecated_function( $function, $version, $replacement=null) {2976 2977 do_action( 'deprecated_function_run', $function, $replacement);2977 function _deprecated_function( $function, $version, $replacement=null ) { 2978 2979 do_action( 'deprecated_function_run', $function, $replacement, $version ); 2978 2980 2979 2981 // Allow plugin to filter the output error trigger 2980 if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true )) {2981 if ( !is_null($replacement) )2982 if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) { 2983 if ( ! is_null($replacement) ) 2982 2984 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) ); 2983 2985 else … … 2998 3000 * 2999 3001 * @package WordPress 3000 * @ package Debug3002 * @subpackage Debug 3001 3003 * @since 2.5.0 3002 3004 * @access private 3003 3005 * 3004 * @uses do_action() Calls 'deprecated_file_included' and passes the file name and what to use instead. 3005 * @uses apply_filters() Calls 'deprecated_file_trigger_error' and expects boolean value of true to do trigger or false to not trigger error. 3006 * @uses do_action() Calls 'deprecated_file_included' and passes the file name, what to use instead, 3007 * and the version in which the file was deprecated. 3008 * @uses apply_filters() Calls 'deprecated_file_trigger_error' and expects boolean value of true to do 3009 * trigger or false to not trigger error. 3006 3010 * 3007 3011 * @param string $file The file that was included … … 3009 3013 * @param string $replacement Optional. The file that should have been included based on ABSPATH 3010 3014 */ 3011 function _deprecated_file( $file, $version, $replacement=null) {3012 3013 do_action( 'deprecated_file_included', $file, $replacement);3015 function _deprecated_file( $file, $version, $replacement = null ) { 3016 3017 do_action( 'deprecated_file_included', $file, $replacement, $version ); 3014 3018 3015 3019 // Allow plugin to filter the output error trigger 3016 if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {3017 if ( !is_null($replacement) )3020 if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { 3021 if ( ! is_null( $replacement ) ) 3018 3022 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) ); 3019 3023 else … … 3030 3034 * <code> 3031 3035 * if ( !empty($deprecated) ) 3032 * _deprecated_argument( __FUNCTION__, ' 0.0' );3036 * _deprecated_argument( __FUNCTION__, '3.0' ); 3033 3037 * </code> 3034 3038 * … … 3040 3044 * 3041 3045 * @package WordPress 3042 * @ package Debug3046 * @subpackage Debug 3043 3047 * @since 3.0.0 3044 3048 * @access private 3045 3049 * 3046 * @uses do_action() Calls 'deprecated_argument_run' and passes the function name and what to use instead. 3047 * @uses apply_filters() Calls 'deprecated_argument_trigger_error' and expects boolean value of true to do trigger or false to not trigger error. 3050 * @uses do_action() Calls 'deprecated_argument_run' and passes the function name, a message on the change, 3051 * and the version in which the argument was deprecated. 3052 * @uses apply_filters() Calls 'deprecated_argument_trigger_error' and expects boolean value of true to do 3053 * trigger or false to not trigger error. 3048 3054 * 3049 3055 * @param string $function The function that was called … … 3051 3057 * @param string $message Optional. A message regarding the change. 3052 3058 */ 3053 function _deprecated_argument( $function, $version, $message = null) {3054 3055 do_action( 'deprecated_argument_run', $function, $message);3059 function _deprecated_argument( $function, $version, $message = null ) { 3060 3061 do_action( 'deprecated_argument_run', $function, $message ); 3056 3062 3057 3063 // Allow plugin to filter the output error trigger 3058 if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {3059 if ( !is_null($message) )3064 if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) { 3065 if ( ! is_null( $message ) ) 3060 3066 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) ); 3061 3067 else
Note: See TracChangeset
for help on using the changeset viewer.