Changeset 12584 for trunk/wp-includes/functions.php
- Timestamp:
- 12/30/2009 04:23:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r12581 r12584 571 571 */ 572 572 function add_option( $name, $value = '', $deprecated = '', $autoload = 'yes' ) { 573 if ( !empty( $deprecated ) ) 574 _deprecated_argument( __FUNCTION__, '2.3' ); 575 573 576 global $wpdb; 574 577 … … 1204 1207 */ 1205 1208 function wp_get_http( $url, $file_path = false, $deprecated = false ) { 1209 if ( !empty( $deprecated ) ) 1210 _deprecated_argument( __FUNCTION__, '0.0' ); 1211 1206 1212 @set_time_limit( 60 ); 1207 1213 … … 1246 1252 */ 1247 1253 function wp_get_http_headers( $url, $deprecated = false ) { 1254 if ( !empty( $deprecated ) ) 1255 _deprecated_argument( __FUNCTION__, '0.0' ); 1256 1248 1257 $response = wp_remote_head( $url ); 1249 1258 … … 2188 2197 */ 2189 2198 function wp_upload_bits( $name, $deprecated, $bits, $time = null ) { 2199 if ( !empty( $deprecated ) ) 2200 _deprecated_argument( __FUNCTION__, '0.0' ); 2201 2190 2202 if ( empty( $name ) ) 2191 2203 return array( 'error' => __( 'Empty filename' ) ); … … 3040 3052 * <code> 3041 3053 * if ( !empty($deprecated) ) 3042 * _deprecated_argument( __FUNCTION__, ' deprecated', '0.0' );3054 * _deprecated_argument( __FUNCTION__, '0.0' ); 3043 3055 * </code> 3044 3056 * … … 3054 3066 * @access private 3055 3067 * 3056 * @uses do_action() Calls 'deprecated_argument_run' and passes the function and argument namesand what to use instead.3068 * @uses do_action() Calls 'deprecated_argument_run' and passes the function name and what to use instead. 3057 3069 * @uses apply_filters() Calls 'deprecated_argument_trigger_error' and expects boolean value of true to do trigger or false to not trigger error. 3058 3070 * 3059 3071 * @param string $function The function that was called 3060 * @param string $argument The name of the deprecated argument that was used 3061 * @param string $version The version of WordPress that deprecated the function 3072 * @param string $version The version of WordPress that deprecated the argument used 3062 3073 * @param string $message Optional. A message regarding the change. 3063 3074 */ 3064 function _deprecated_argument($function, $ argument, $version, $message = null) {3065 3066 do_action('deprecated_argument_run', $function, $ argument, $message);3075 function _deprecated_argument($function, $version, $message = null) { 3076 3077 do_action('deprecated_argument_run', $function, $message); 3067 3078 3068 3079 // Allow plugin to filter the output error trigger 3069 3080 if( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) { 3070 3081 if( !is_null($message) ) 3071 trigger_error( sprintf( __(' The %1$s argument of %2$s is <strong>deprecated</strong> since version %3$s! %4$s'), $function, $argument, $version, $message ) );3082 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) ); 3072 3083 else 3073 trigger_error( sprintf( __(' The %1$s argument of %2$s is <strong>deprecated</strong> since version %3$s with no alternative available.'), $function, $argument, $version ) );3084 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) ); 3074 3085 } 3075 3086 }
Note: See TracChangeset
for help on using the changeset viewer.