Ticket #11386: 11386.10.diff
File 11386.10.diff, 20.0 KB (added by , 15 years ago) |
---|
-
wp-includes/post-template.php
903 903 */ 904 904 function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) { 905 905 if ( !empty( $deprecated ) ) 906 _deprecated_argument( __FUNCTION__, ' 0.0' );906 _deprecated_argument( __FUNCTION__, '2.5' ); 907 907 908 908 if ( $fullsize ) 909 909 echo wp_get_attachment_link($id, 'full', $permalink); -
wp-includes/comment.php
1513 1513 */ 1514 1514 function discover_pingback_server_uri( $url, $deprecated = '' ) { 1515 1515 if ( !empty( $deprecated ) ) 1516 _deprecated_argument( __FUNCTION__, ' 0.0' );1516 _deprecated_argument( __FUNCTION__, '2.7' ); 1517 1517 1518 1518 $pingback_str_dquote = 'rel="pingback"'; 1519 1519 $pingback_str_squote = 'rel=\'pingback\''; -
wp-includes/functions.php
1207 1207 */ 1208 1208 function wp_get_http( $url, $file_path = false, $deprecated = false ) { 1209 1209 if ( !empty( $deprecated ) ) 1210 _deprecated_argument( __FUNCTION__, ' 0.0' );1210 _deprecated_argument( __FUNCTION__, '2.7' ); 1211 1211 1212 1212 @set_time_limit( 60 ); 1213 1213 … … 1252 1252 */ 1253 1253 function wp_get_http_headers( $url, $deprecated = false ) { 1254 1254 if ( !empty( $deprecated ) ) 1255 _deprecated_argument( __FUNCTION__, ' 0.0' );1255 _deprecated_argument( __FUNCTION__, '2.7' ); 1256 1256 1257 1257 $response = wp_remote_head( $url ); 1258 1258 … … 2190 2190 * @since 2.0.0 2191 2191 * 2192 2192 * @param string $name 2193 * @param null $deprecated N otused. Set to null.2193 * @param null $deprecated Never used. Set to null. 2194 2194 * @param mixed $bits File content 2195 2195 * @param string $time Optional. Time formatted in 'yyyy/mm'. 2196 2196 * @return array 2197 2197 */ 2198 2198 function wp_upload_bits( $name, $deprecated, $bits, $time = null ) { 2199 2199 if ( !empty( $deprecated ) ) 2200 _deprecated_argument( __FUNCTION__, ' 0.0' );2200 _deprecated_argument( __FUNCTION__, '2.0' ); 2201 2201 2202 2202 if ( empty( $name ) ) 2203 2203 return array( 'error' => __( 'Empty filename' ) ); … … 2983 2983 * This function is to be used in every function in depreceated.php 2984 2984 * 2985 2985 * @package WordPress 2986 * @ package Debug2986 * @subpackage Debug 2987 2987 * @since 2.5.0 2988 2988 * @access private 2989 2989 * 2990 * @uses do_action() Calls 'deprecated_function_run' and passes the function name and what to use instead. 2991 * @uses apply_filters() Calls 'deprecated_function_trigger_error' and expects boolean value of true to do trigger or false to not trigger error. 2990 * @uses do_action() Calls 'deprecated_function_run' and passes the function name, what to use instead, 2991 * and the version the function was deprecated in. 2992 * @uses apply_filters() Calls 'deprecated_function_trigger_error' and expects boolean value of true to do 2993 * trigger or false to not trigger error. 2992 2994 * 2993 2995 * @param string $function The function that was called 2994 2996 * @param string $version The version of WordPress that deprecated the function 2995 2997 * @param string $replacement Optional. The function that should have been called 2996 2998 */ 2997 function _deprecated_function( $function, $version, $replacement=null) {2999 function _deprecated_function( $function, $version, $replacement=null ) { 2998 3000 2999 do_action( 'deprecated_function_run', $function, $replacement);3001 do_action( 'deprecated_function_run', $function, $replacement, $version ); 3000 3002 3001 3003 // Allow plugin to filter the output error trigger 3002 if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true )) {3003 if ( !is_null($replacement) )3004 if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) { 3005 if ( ! is_null($replacement) ) 3004 3006 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) ); 3005 3007 else 3006 3008 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) ); … … 3019 3021 * This function is to be used in every file that is depreceated 3020 3022 * 3021 3023 * @package WordPress 3022 * @ package Debug3024 * @subpackage Debug 3023 3025 * @since 2.5.0 3024 3026 * @access private 3025 3027 * 3026 * @uses do_action() Calls 'deprecated_file_included' and passes the file name and what to use instead. 3027 * @uses apply_filters() Calls 'deprecated_file_trigger_error' and expects boolean value of true to do trigger or false to not trigger error. 3028 * @uses do_action() Calls 'deprecated_file_included' and passes the file name, what to use instead, 3029 * and the version in which the file was deprecated. 3030 * @uses apply_filters() Calls 'deprecated_file_trigger_error' and expects boolean value of true to do 3031 * trigger or false to not trigger error. 3028 3032 * 3029 3033 * @param string $file The file that was included 3030 3034 * @param string $version The version of WordPress that deprecated the file 3031 3035 * @param string $replacement Optional. The file that should have been included based on ABSPATH 3032 3036 */ 3033 function _deprecated_file( $file, $version, $replacement=null) {3037 function _deprecated_file( $file, $version, $replacement = null ) { 3034 3038 3035 do_action( 'deprecated_file_included', $file, $replacement);3039 do_action( 'deprecated_file_included', $file, $replacement, $version ); 3036 3040 3037 3041 // Allow plugin to filter the output error trigger 3038 if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {3039 if ( !is_null($replacement) )3042 if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { 3043 if ( ! is_null( $replacement ) ) 3040 3044 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) ); 3041 3045 else 3042 3046 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) ); … … 3051 3055 * For example: 3052 3056 * <code> 3053 3057 * if ( !empty($deprecated) ) 3054 * _deprecated_argument( __FUNCTION__, ' 0.0' );3058 * _deprecated_argument( __FUNCTION__, '3.0' ); 3055 3059 * </code> 3056 3060 * 3057 3061 * There is a hook deprecated_argument_run that will be called that can be used … … 3061 3065 * The current behavior is to trigger an user error if WP_DEBUG is true. 3062 3066 * 3063 3067 * @package WordPress 3064 * @ package Debug3068 * @subpackage Debug 3065 3069 * @since 3.0.0 3066 3070 * @access private 3067 3071 * 3068 * @uses do_action() Calls 'deprecated_argument_run' and passes the function name and what to use instead. 3069 * @uses apply_filters() Calls 'deprecated_argument_trigger_error' and expects boolean value of true to do trigger or false to not trigger error. 3072 * @uses do_action() Calls 'deprecated_argument_run' and passes the function name, a message on the change, 3073 * and the version in which the argument was deprecated. 3074 * @uses apply_filters() Calls 'deprecated_argument_trigger_error' and expects boolean value of true to do 3075 * trigger or false to not trigger error. 3070 3076 * 3071 3077 * @param string $function The function that was called 3072 3078 * @param string $version The version of WordPress that deprecated the argument used 3073 3079 * @param string $message Optional. A message regarding the change. 3074 3080 */ 3075 function _deprecated_argument( $function, $version, $message = null) {3081 function _deprecated_argument( $function, $version, $message = null ) { 3076 3082 3077 do_action( 'deprecated_argument_run', $function, $message);3083 do_action( 'deprecated_argument_run', $function, $message ); 3078 3084 3079 3085 // Allow plugin to filter the output error trigger 3080 if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {3081 if ( !is_null($message) )3086 if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) { 3087 if ( ! is_null( $message ) ) 3082 3088 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) ); 3083 3089 else 3084 3090 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 ) ); -
wp-includes/comment-template.php
504 504 * @since 0.71 505 505 * 506 506 * @param string $deprecated Not Used 507 * @param bool $deprecated Not Used507 * @param bool $deprecated_2 Not Used 508 508 */ 509 function comments_link( $deprecated = '', $deprecated = '' ) {509 function comments_link( $deprecated = '', $deprecated_2 = '' ) { 510 510 if ( !empty( $deprecated ) ) 511 _deprecated_argument( __FUNCTION__, '0.0' ); 511 _deprecated_argument( __FUNCTION__, '0.72' ); 512 if ( !empty( $deprecated_2 ) ) 513 _deprecated_argument( __FUNCTION__, '1.3' ); 512 514 echo get_comments_link(); 513 515 } 514 516 … … 553 555 global $id; 554 556 555 557 if ( !empty( $deprecated ) ) 556 _deprecated_argument( __FUNCTION__, ' 0.0' );558 _deprecated_argument( __FUNCTION__, '1.3' ); 557 559 558 560 $number = get_comments_number($id); 559 561 -
wp-includes/link-template.php
170 170 */ 171 171 function post_permalink( $post_id = 0, $deprecated = '' ) { 172 172 if ( !empty( $deprecated ) ) 173 _deprecated_argument( __FUNCTION__, ' 0.0' );173 _deprecated_argument( __FUNCTION__, '1.3' ); 174 174 175 175 return get_permalink($post_id); 176 176 } -
wp-includes/formatting.php
867 867 */ 868 868 function convert_chars($content, $deprecated = '') { 869 869 if ( !empty( $deprecated ) ) 870 _deprecated_argument( __FUNCTION__, '0. 0' );870 _deprecated_argument( __FUNCTION__, '0.71' ); 871 871 872 872 // Translation of invalid Unicode references range to valid range 873 873 $wp_htmltranswinuni = array( -
wp-includes/author-template.php
24 24 global $authordata; 25 25 26 26 if ( !empty( $deprecated ) ) 27 _deprecated_argument( __FUNCTION__, ' 0.0' );27 _deprecated_argument( __FUNCTION__, '2.1' ); 28 28 29 29 return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null); 30 30 } … … 49 49 * @return string The author's display name, from get_the_author(). 50 50 */ 51 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 if ( !empty( $deprecated ) ) 53 _deprecated_argument( __FUNCTION__, '2.1' ); 54 if ( $deprecated_echo !== true ) 55 _deprecated_argument( __FUNCTION__, '1.5', __('Use get_the_author() instead if you do not want the value echoed.') ); 54 56 if ( $deprecated_echo ) 55 57 echo get_the_author(); 56 58 return get_the_author(); … … 184 186 */ 185 187 function the_author_posts_link($deprecated = '') { 186 188 if ( !empty( $deprecated ) ) 187 _deprecated_argument( __FUNCTION__, ' 0.0' );189 _deprecated_argument( __FUNCTION__, '2.1' ); 188 190 189 191 global $authordata; 190 192 $link = sprintf( -
wp-includes/kses.php
1196 1196 add_action('init', 'kses_init'); 1197 1197 add_action('set_current_user', 'kses_init'); 1198 1198 1199 /** 1200 * Inline CSS filter 1201 * 1202 * @since 2.8.1 1203 */ 1199 1204 function safecss_filter_attr( $css, $deprecated = '' ) { 1200 1205 if ( !empty( $deprecated ) ) 1201 _deprecated_argument( __FUNCTION__, ' 0.0' );1206 _deprecated_argument( __FUNCTION__, '2.8.1' ); // Never implemented 1202 1207 1203 1208 $css = wp_kses_no_null($css); 1204 1209 $css = str_replace(array("\n","\r","\t"), '', $css); -
wp-includes/widgets.php
985 985 */ 986 986 function wp_get_sidebars_widgets($deprecated = true) { 987 987 if ( $deprecated !== true ) 988 _deprecated_argument( __FUNCTION__, ' 0.0' );988 _deprecated_argument( __FUNCTION__, '2.8.1' ); 989 989 990 990 global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets; 991 991 -
wp-admin/includes/meta-boxes.php
636 636 * 637 637 * @param string $class 638 638 * @param string $value 639 * @param mixed $deprecated N otused.639 * @param mixed $deprecated Never used. 640 640 */ 641 function xfn_check( $class, $value = '', $deprecated = '') {641 function xfn_check( $class, $value = '', $deprecated = '' ) { 642 642 global $link; 643 643 644 644 if ( !empty( $deprecated ) ) 645 _deprecated_argument( __FUNCTION__, '0.0' ); 645 _deprecated_argument( __FUNCTION__, '0.0' ); // Never implemented 646 646 647 647 $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: ''; 648 648 $rels = preg_split('/\s+/', $link_rel); … … 689 689 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?> </th> 690 690 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?> </span></legend> 691 691 <label for="contact"> 692 <input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact' , 'radio'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('contact') ?></label>692 <input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('contact') ?></label> 693 693 <label for="acquaintance"> 694 <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance' , 'radio'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('acquaintance') ?></label>694 <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('acquaintance') ?></label> 695 695 <label for="friend"> 696 <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend' , 'radio'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friend') ?></label>696 <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friend') ?></label> 697 697 <label for="friendship"> 698 <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship' , '', 'radio'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>698 <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label> 699 699 </fieldset></td> 700 700 </tr> 701 701 <tr> … … 721 721 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </th> 722 722 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </span></legend> 723 723 <label for="co-resident"> 724 <input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident' , 'radio'); ?> />724 <input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident'); ?> /> 725 725 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-resident') ?></label> 726 726 <label for="neighbor"> 727 <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor' , 'radio'); ?> />727 <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor'); ?> /> 728 728 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('neighbor') ?></label> 729 729 <label for="geographical"> 730 <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical' , '', 'radio'); ?> />730 <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical'); ?> /> 731 731 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label> 732 732 </fieldset></td> 733 733 </tr> … … 735 735 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </th> 736 736 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </span></legend> 737 737 <label for="child"> 738 <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child' , 'radio'); ?> />738 <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child'); ?> /> 739 739 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('child') ?></label> 740 740 <label for="kin"> 741 <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin' , 'radio'); ?> />741 <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin'); ?> /> 742 742 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('kin') ?></label> 743 743 <label for="parent"> 744 <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent' , 'radio'); ?> />744 <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent'); ?> /> 745 745 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('parent') ?></label> 746 746 <label for="sibling"> 747 <input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling' , 'radio'); ?> />747 <input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling'); ?> /> 748 748 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sibling') ?></label> 749 749 <label for="spouse"> 750 <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse' , 'radio'); ?> />750 <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse'); ?> /> 751 751 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('spouse') ?></label> 752 752 <label for="family"> 753 <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family' , '', 'radio'); ?> />753 <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family'); ?> /> 754 754 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label> 755 755 </fieldset></td> 756 756 </tr> -
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 N otused.20 * @param mixed $deprecated Never used. 21 21 * @return string Thumbnail path on success, Error string on failure. 22 22 */ 23 23 function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { 24 24 if ( !empty( $deprecated ) ) 25 _deprecated_argument( __FUNCTION__, ' 0.0' );25 _deprecated_argument( __FUNCTION__, '1.2' ); 26 26 $thumbpath = image_resize( $file, $max_side, $max_side ); 27 27 return apply_filters( 'wp_create_thumbnail', $thumbpath ); 28 28 }