Ticket #11386: 11386.7.diff
File 11386.7.diff, 15.1 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/image.php
17 17 * 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 ); 25 28 } -
wp-admin/includes/meta-boxes.php
639 639 function xfn_check($class, $value = '', $deprecated = '') { 640 640 global $link; 641 641 642 if ( !empty( $deprecated ) ) 643 _deprecated_argument( __FUNCTION__, '0.0' ); 644 642 645 $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: ''; 643 646 $rels = preg_split('/\s+/', $link_rel); 644 647 -
wp-admin/includes/upgrade.php
33 33 * @param null $deprecated Optional. Not used. 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 38 39 if ( !empty( $deprecated ) ) 40 _deprecated_argument( __FUNCTION__, '2.6' ); 41 39 42 wp_check_mysql_version(); 40 43 wp_cache_flush(); 41 44 make_db_current_silent(); -
wp-app.php
884 884 * 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 } 893 895 -
wp-includes/author-template.php
22 22 */ 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 } 27 31 … … 44 48 * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it. 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(); 54 56 return get_the_author(); … … 182 184 */ 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; 188 190 $link = sprintf( -
wp-includes/comment-template.php
507 507 * @param bool $deprecated_2 Not Used 508 508 */ 509 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 510 if ( !empty( $deprecated_1 ) || empty( $deprecated_2 ) ) 511 _deprecated_argument( __FUNCTION__, '0.0' ); 515 512 echo get_comments_link(); 516 513 } 517 514 … … 554 551 */ 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 559 560 if ( $number > 1 ) … … 696 697 * @since 0.71 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 707 712 /** … … 712 717 * @param int $deprecated Not used (Was $timezone = 0) 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#" 717 725 xmlns:dc="http://purl.org/dc/elements/1.1/" -
wp-includes/comment.php
1511 1511 * @param int $deprecated Not Used. 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"'; 1519 1519 $pingback_str_squote = 'rel=\'pingback\''; -
wp-includes/cron.php
136 136 // Backward compatibility 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 } 142 142 -
wp-includes/formatting.php
866 866 * @return string Converted string. 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( 871 874 '€' => '€', // the Euro sign -
wp-includes/functions.php
570 570 * @return null returns when finished. 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 575 578 wp_protect_special_option( $name ); … … 1188 1191 * @return bool|string False on failure and string of headers if HEAD request. 1189 1192 */ 1190 1193 function wp_get_http( $url, $file_path = false, $deprecated = false ) { 1194 if ( !empty( $deprecated ) ) 1195 _deprecated_argument( __FUNCTION__, '0.0' ); 1196 1191 1197 @set_time_limit( 60 ); 1192 1198 1193 1199 $options = array(); … … 1230 1236 * @return bool|string False on failure, headers on success. 1231 1237 */ 1232 1238 function wp_get_http_headers( $url, $deprecated = false ) { 1239 if ( !empty( $deprecated ) ) 1240 _deprecated_argument( __FUNCTION__, '0.0' ); 1241 1233 1242 $response = wp_remote_head( $url ); 1234 1243 1235 1244 if ( is_wp_error( $response ) ) … … 2172 2181 * @return array 2173 2182 */ 2174 2183 function wp_upload_bits( $name, $deprecated, $bits, $time = null ) { 2184 if ( !empty( $deprecated ) ) 2185 _deprecated_argument( __FUNCTION__, '0.0' ); 2186 2175 2187 if ( empty( $name ) ) 2176 2188 return array( 'error' => __( 'Empty filename' ) ); 2177 2189 … … 3017 3029 * For example: 3018 3030 * <code> 3019 3031 * if ( !empty($deprecated) ) 3020 * _deprecated_argument( __FUNCTION__, ' deprecated', '0.0' );3032 * _deprecated_argument( __FUNCTION__, '0.0' ); 3021 3033 * </code> 3022 3034 * 3023 3035 * There is a hook deprecated_argument_run that will be called that can be used … … 3031 3043 * @since 3.0.0 3032 3044 * @access private 3033 3045 * 3034 * @uses do_action() Calls 'deprecated_argument_run' and passes the function and argument namesand what to use instead.3046 * @uses do_action() Calls 'deprecated_argument_run' and passes the function name and what to use instead. 3035 3047 * @uses apply_filters() Calls 'deprecated_argument_trigger_error' and expects boolean value of true to do trigger or false to not trigger error. 3036 3048 * 3037 3049 * @param string $function The function that was called 3038 * @param string $argument The name of the deprecated argument that was used 3039 * @param string $version The version of WordPress that deprecated the function 3050 * @param string $version The version of WordPress that deprecated the argument used 3040 3051 * @param string $message Optional. A message regarding the change. 3041 3052 */ 3042 function _deprecated_argument($function, $ argument, $version, $message = null) {3053 function _deprecated_argument($function, $version, $message = null) { 3043 3054 3044 do_action('deprecated_argument_run', $function, $ argument, $message);3055 do_action('deprecated_argument_run', $function, $message); 3045 3056 3046 3057 // Allow plugin to filter the output error trigger 3047 3058 if( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) { 3048 3059 if( !is_null($message) ) 3049 trigger_error( sprintf( __(' The %1$s argument of %2$s is <strong>deprecated</strong> since version %3$s! %4$s'), $function, $argument, $version, $message ) );3060 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) ); 3050 3061 else 3051 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 ) );3062 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $argument, $version ) ); 3052 3063 } 3053 3064 } 3054 3065 -
wp-includes/kses.php
1197 1197 add_action('set_current_user', 'kses_init'); 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); 1202 1205 -
wp-includes/link-template.php
168 168 * @param mixed $deprecated Not used. 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 } 174 177 -
wp-includes/post-template.php
245 245 * @param mixed $deprecated Not used. 246 246 * @return string 247 247 */ 248 function get_the_excerpt( $deprecated = '') {248 function get_the_excerpt( $deprecated = '' ) { 249 249 if ( !empty( $deprecated ) ) 250 _deprecated_argument( __FUNCTION__, 'deprecated', '2.3');250 _deprecated_argument( __FUNCTION__, '2.3' ); 251 251 252 252 global $post; 253 253 $output = $post->post_excerpt; … … 900 900 * @param bool $deprecated Deprecated. Not used. 901 901 * @param bool $permalink Optional, default is false. Whether to include permalink. 902 902 */ 903 function the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $permalink = false) { 903 function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) { 904 if ( !empty( $deprecated ) ) 905 _deprecated_argument( __FUNCTION__, '0.0' ); 906 904 907 if ( $fullsize ) 905 908 echo wp_get_attachment_link($id, 'full', $permalink); 906 909 else -
wp-includes/post.php
3538 3538 * @param int $deprecated Not Used. Can be set to null. 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 3546 3548 /** -
wp-includes/widgets.php
985 985 */ 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; 991 991