Ticket #11386: function-deprecated_argument-sample-uses.diff
File function-deprecated_argument-sample-uses.diff, 4.3 KB (added by , 15 years ago) |
---|
-
author-template.php
41 41 * @link http://codex.wordpress.org/Template_Tags/the_author 42 42 * 43 43 * @param string $deprecated Deprecated. 44 * @param string $deprecated_echo Echo the string or return it.44 * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it. 45 45 * @return string The author's display name, from get_the_author(). 46 46 */ 47 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', 'get_the_author'); 48 52 if ( $deprecated_echo ) 49 53 echo get_the_author(); 50 54 return get_the_author(); … … 177 181 * @param string $deprecated Deprecated. 178 182 */ 179 183 function the_author_posts_link($deprecated = '') { 184 if ( !empty( $deprecated ) ) 185 _deprecated_argument(__FUNCTION__, 'deprecated', '0.0'); 186 180 187 global $authordata; 181 188 $link = sprintf( 182 189 '<a href="%1$s" title="%2$s">%3$s</a>', -
comment-template.php
503 503 * 504 504 * @since 0.71 505 505 * 506 * @param string $deprecated Not Used507 * @param bool $deprecated Not Used506 * @param string $deprecated_1 Not Used 507 * @param bool $deprecated_2 Not Used 508 508 */ 509 function comments_link( $deprecated = '', $deprecated = '' ) { 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 515 echo get_comments_link(); 511 516 } 512 517 -
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 = 2048) { 1514 function discover_pingback_server_uri($url, $deprecated = '') { 1515 if ( !empty($deprecated) ) 1516 _deprecated_argument(__FUNCTION__, 'deprecated', '0.0'); 1515 1517 1516 1518 $pingback_str_dquote = 'rel="pingback"'; 1517 1519 $pingback_str_squote = 'rel=\'pingback\''; -
cron.php
135 135 function wp_clear_scheduled_hook( $hook, $args = array() ) { 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 if ( !is_array($args) ) 138 if ( !is_array($args) ) { 139 _deprecated_argument(__FUNCTION__, 'args', '3.0.0', 'array'); 139 140 $args = array_slice( func_get_args(), 1 ); 141 } 140 142 141 143 while ( $timestamp = wp_next_scheduled( $hook, $args ) ) 142 144 wp_unschedule_event( $timestamp, $hook, $args ); -
post-template.php
246 246 * @return string 247 247 */ 248 248 function get_the_excerpt($deprecated = '') { 249 if ( !empty( $deprecated ) ) 250 _deprecated_argument(__FUNCTION__, 'deprecated', '2.3'); 251 249 252 global $post; 250 253 $output = $post->post_excerpt; 251 254 if ( post_password_required($post) ) { -
widgets.php
980 980 * @since 2.2.0 981 981 * @access private 982 982 * 983 * @param bool $ update Optional, deprecated.983 * @param bool $deprecated. Not used. 984 984 * @return array Upgraded list of widgets to version 3 array format when called from the admin. 985 985 */ 986 986 function wp_get_sidebars_widgets($deprecated = true) { 987 if ( $deprecated !== true ) 988 _deprecated_argument(__FUNCTION__, 'deprecated', '0.0'); 989 987 990 global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets; 988 991 989 992 // If loading from front page, consult $_wp_sidebars_widgets rather than options