Ticket #11386: _deprecated_argument_in-the-wild.diff
File _deprecated_argument_in-the-wild.diff, 10.3 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__, 'deprecated', '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__, 'deprecated', '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__, 'deprecated', '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__, 'deprecated', '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__, 'deprecated', '0.0' ); 28 25 29 return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null); 26 30 } 27 31 -
wp-includes/comment-template.php
554 554 */ 555 555 function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) { 556 556 global $id; 557 558 if ( !empty( $deprecated ) 559 _deprecated_argument( __FUNCTION__, 'deprecated', '0.0' ); 560 557 561 $number = get_comments_number($id); 558 562 559 563 if ( $number > 1 ) … … 696 700 * @since 0.71 697 701 * @uses get_trackback_url() Gets the trackback url for the current post 698 702 * 699 * @param bool $deprecated Remove backwards compat in 2.5703 * @param bool $deprecated_echo Remove backwards compat in 2.5 700 704 * @return void|string Should only be used to echo the trackback URL, use get_trackback_url() for the result instead. 701 705 */ 702 function trackback_url($deprecated = true) { 703 if ($deprecated) echo get_trackback_url(); 704 else return get_trackback_url(); 706 function trackback_url( $deprecated_echo = true ) { 707 if ( $deprecated_echo === true ) { 708 echo get_trackback_url(); 709 } else { 710 _deprecated_argument( __FUNCTION__, 'deprecated', '2.5', __('Use get_trackback_url() instead if you do not want the value echoed.') ); 711 return get_trackback_url(); 712 } 705 713 } 706 714 707 715 /** … … 712 720 * @param int $deprecated Not used (Was $timezone = 0) 713 721 */ 714 722 function trackback_rdf($deprecated = '') { 723 if ( !empty( $deprecated ) ) 724 _deprecated_argument( __FUNCTION__, 'deprecated', '2.5' ); 725 715 726 if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) { 716 727 echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 717 728 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__, 'deprecated', '0.0' ); 1517 1517 1518 1518 $pingback_str_dquote = 'rel="pingback"'; 1519 1519 $pingback_str_squote = 'rel=\'pingback\''; -
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__, 'deprecated', '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__, 'deprecated', '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__, 'deprecated', '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__, 'deprecated', '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__, 'deprecated', '0.0' ); 2186 2175 2187 if ( empty( $name ) ) 2176 2188 return array( 'error' => __( 'Empty filename' ) ); 2177 2189 -
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__, 'deprecated', '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__, 'deprecated', '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__, 'deprecated', '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__, 'deprecated', '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__, 'deprecated', '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 /**