Changeset 12584
- Timestamp:
- 12/30/2009 04:23:39 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/image.php
r12524 r12584 18 18 * @param mixed $file Filename of the original image, Or attachment id. 19 19 * @param int $max_side Maximum length of a single side for the thumbnail. 20 * @param mixed $deprecated Not used. 20 21 * @return string Thumbnail path on success, Error string on failure. 21 22 */ 22 23 function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { 24 if ( !empty( $deprecated ) ) 25 _deprecated_argument( __FUNCTION__, '0.0' ); 23 26 $thumbpath = image_resize( $file, $max_side, $max_side ); 24 27 return apply_filters( 'wp_create_thumbnail', $thumbpath ); -
trunk/wp-admin/includes/meta-boxes.php
r12351 r12584 639 639 function xfn_check($class, $value = '', $deprecated = '') { 640 640 global $link; 641 642 if ( !empty( $deprecated ) ) 643 _deprecated_argument( __FUNCTION__, '0.0' ); 641 644 642 645 $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: ''; -
trunk/wp-admin/includes/upgrade.php
r12560 r12584 34 34 * @return array Array keys 'url', 'user_id', 'password', 'password_message'. 35 35 */ 36 function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated='') {36 function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '' ) { 37 37 global $wp_rewrite; 38 39 if ( !empty( $deprecated ) ) 40 _deprecated_argument( __FUNCTION__, '2.6' ); 38 41 39 42 wp_check_mysql_version(); -
trunk/wp-app.php
r12515 r12584 885 885 * @since 2.2.0 886 886 * 887 * @param mixed $deprecated Optional, not used.887 * @param mixed $deprecated Not used. 888 888 * @return string 889 889 */ 890 890 function get_categories_url($deprecated = '') { 891 if ( !empty( $deprecated ) ) 892 _deprecated_argument( __FUNCTION__, '2.5' ); 891 893 return $this->app_base . $this->CATEGORIES_PATH; 892 894 } -
trunk/wp-includes/author-template.php
r12537 r12584 23 23 function get_the_author($deprecated = '') { 24 24 global $authordata; 25 26 if ( !empty( $deprecated ) ) 27 _deprecated_argument( __FUNCTION__, '0.0' ); 28 25 29 return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null); 26 30 } … … 45 49 * @return string The author's display name, from get_the_author(). 46 50 */ 47 function the_author($deprecated = '', $deprecated_echo = true) { 48 if ( !empty($deprecated) ) 49 _deprecated_argument(__FUNCTION__, 'deprecated', '1.5'); 50 if ( $deprecated_echo !== true ) 51 _deprecated_argument(__FUNCTION__, 'deprecated_echo', '1.5', __('Use get_the_author() instead if you do not want the value echoed.')); 51 function the_author( $deprecated = '', $deprecated_echo = true ) { 52 if ( !empty( $deprecated ) || $deprecated_echo !== true ) 53 _deprecated_argument( __FUNCTION__, '1.5', $deprecated_echo !== true ? __('Use get_the_author() instead if you do not want the value echoed.') : null ); 52 54 if ( $deprecated_echo ) 53 55 echo get_the_author(); … … 183 185 function the_author_posts_link($deprecated = '') { 184 186 if ( !empty( $deprecated ) ) 185 _deprecated_argument( __FUNCTION__, 'deprecated', '0.0');187 _deprecated_argument( __FUNCTION__, '0.0' ); 186 188 187 189 global $authordata; -
trunk/wp-includes/comment-template.php
r12537 r12584 504 504 * @since 0.71 505 505 * 506 * @param string $deprecated_1 Not Used 507 * @param bool $deprecated_2 Not Used 508 */ 509 function comments_link( $deprecated_1 = '', $deprecated_2 = '' ) { 510 if ( !empty( $deprecated_1 ) ) 511 _deprecated_argument(__FUNCTION__, 'deprecated_1', '0.0'); 512 if ( !empty( $deprecated_2 ) ) 513 _deprecated_argument(__FUNCTION__, 'deprecated_2', '0.0'); 514 506 * @param string $deprecated Not Used 507 * @param bool $deprecated Not Used 508 */ 509 function comments_link( $deprecated = '', $deprecated = '' ) { 510 if ( !empty( $deprecated ) ) 511 _deprecated_argument( __FUNCTION__, '0.0' ); 515 512 echo get_comments_link(); 516 513 } … … 555 552 function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) { 556 553 global $id; 554 555 if ( !empty( $deprecated ) ) 556 _deprecated_argument( __FUNCTION__, '0.0' ); 557 557 558 $number = get_comments_number($id); 558 559 … … 697 698 * @uses get_trackback_url() Gets the trackback url for the current post 698 699 * 699 * @param bool $deprecated Remove backwards compat in 2.5700 * @param bool $deprecated_echo Remove backwards compat in 2.5 700 701 * @return void|string Should only be used to echo the trackback URL, use get_trackback_url() for the result instead. 701 702 */ 702 function trackback_url($deprecated = true) { 703 if ($deprecated) echo get_trackback_url(); 704 else return get_trackback_url(); 703 function trackback_url( $deprecated_echo = true ) { 704 if ( $deprecated_echo !== true ) 705 _deprecated_argument( __FUNCTION__, '2.5', __('Use get_trackback_url() instead if you do not want the value echoed.') ); 706 if ( $deprecated_echo ) 707 echo get_trackback_url(); 708 else 709 return get_trackback_url(); 705 710 } 706 711 … … 713 718 */ 714 719 function trackback_rdf($deprecated = '') { 720 if ( !empty( $deprecated ) ) 721 _deprecated_argument( __FUNCTION__, '2.5' ); 722 715 723 if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) { 716 724 echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" -
trunk/wp-includes/comment.php
r12537 r12584 1512 1512 * @return bool|string False on failure, string containing URI on success. 1513 1513 */ 1514 function discover_pingback_server_uri( $url, $deprecated = '') {1515 if ( !empty( $deprecated) )1516 _deprecated_argument( __FUNCTION__, 'deprecated', '0.0');1514 function discover_pingback_server_uri( $url, $deprecated = '' ) { 1515 if ( !empty( $deprecated ) ) 1516 _deprecated_argument( __FUNCTION__, '0.0' ); 1517 1517 1518 1518 $pingback_str_dquote = 'rel="pingback"'; -
trunk/wp-includes/cron.php
r12537 r12584 137 137 // Previously this function took the arguments as discrete vars rather than an array like the rest of the API 138 138 if ( !is_array($args) ) { 139 _deprecated_argument( __FUNCTION__, 'args', '3.0.0', __('This argument has changed to an array so as to match with the behaviour of allthe other cron functions.') );139 _deprecated_argument( __FUNCTION__, '3.0.0', __('This argument has changed to an array to match the behavior of the other cron functions.') ); 140 140 $args = array_slice( func_get_args(), 1 ); 141 141 } -
trunk/wp-includes/formatting.php
r12504 r12584 867 867 */ 868 868 function convert_chars($content, $deprecated = '') { 869 if ( !empty( $deprecated ) ) 870 _deprecated_argument( __FUNCTION__, '0.0' ); 871 869 872 // Translation of invalid Unicode references range to valid range 870 873 $wp_htmltranswinuni = array( -
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 } -
trunk/wp-includes/kses.php
r12199 r12584 1198 1198 1199 1199 function safecss_filter_attr( $css, $deprecated = '' ) { 1200 if ( !empty( $deprecated ) ) 1201 _deprecated_argument( __FUNCTION__, '0.0' ); 1202 1200 1203 $css = wp_kses_no_null($css); 1201 1204 $css = str_replace(array("\n","\r","\t"), '', $css); -
trunk/wp-includes/link-template.php
r12548 r12584 169 169 * @return string 170 170 */ 171 function post_permalink($post_id = 0, $deprecated = '') { 171 function post_permalink( $post_id = 0, $deprecated = '' ) { 172 if ( !empty( $deprecated ) ) 173 _deprecated_argument( __FUNCTION__, '0.0' ); 174 172 175 return get_permalink($post_id); 173 176 } -
trunk/wp-includes/post-template.php
r12550 r12584 247 247 * @return string 248 248 */ 249 function get_the_excerpt( $deprecated = '') {249 function get_the_excerpt( $deprecated = '' ) { 250 250 if ( !empty( $deprecated ) ) 251 _deprecated_argument( __FUNCTION__, 'deprecated', '2.3');251 _deprecated_argument( __FUNCTION__, '2.3' ); 252 252 253 253 global $post; … … 902 902 * @param bool $permalink Optional, default is false. Whether to include permalink. 903 903 */ 904 function the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $permalink = false) { 904 function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) { 905 if ( !empty( $deprecated ) ) 906 _deprecated_argument( __FUNCTION__, '0.0' ); 907 905 908 if ( $fullsize ) 906 909 echo wp_get_attachment_link($id, 'full', $permalink); -
trunk/wp-includes/post.php
r12571 r12584 3539 3539 * @param object $post Object type containing the post information 3540 3540 */ 3541 function _future_post_hook($deprecated = '', $post) { 3541 function _future_post_hook( $deprecated = '', $post ) { 3542 if ( !empty( $deprecated ) ) 3543 _deprecated_argument( __FUNCTION__, '0.0' ); 3542 3544 wp_clear_scheduled_hook( 'publish_future_post', array( $post->ID ) ); 3543 wp_schedule_single_event( strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID));3545 wp_schedule_single_event( strtotime( $post->post_date_gmt. ' GMT' ), 'publish_future_post', array( $post->ID ) ); 3544 3546 } 3545 3547 -
trunk/wp-includes/widgets.php
r12537 r12584 986 986 function wp_get_sidebars_widgets($deprecated = true) { 987 987 if ( $deprecated !== true ) 988 _deprecated_argument( __FUNCTION__, 'deprecated', '0.0');988 _deprecated_argument( __FUNCTION__, '0.0' ); 989 989 990 990 global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets;
Note: See TracChangeset
for help on using the changeset viewer.