WordPress.org

Make WordPress Core

Changeset 12537


Ignore:
Timestamp:
12/24/2009 11:12:04 AM (10 years ago)
Author:
westi
Message:

Fix typo in _deprecated_argument() and start using _deprecated_argument() in wp-includes files. See #11386 props nacin.

Location:
trunk/wp-includes
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/author-template.php

    r12284 r12537  
    4242 *
    4343 * @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.
    4545 * @return string The author's display name, from get_the_author().
    4646 */
    4747function 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.'));
    4852    if ( $deprecated_echo )
    4953        echo get_the_author();
     
    178182 */
    179183function the_author_posts_link($deprecated = '') {
     184    if ( !empty( $deprecated ) )
     185        _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
     186
    180187    global $authordata;
    181188    $link = sprintf(
  • trunk/wp-includes/comment-template.php

    r12396 r12537  
    504504 * @since 0.71
    505505 *
    506  * @param string $deprecated Not Used
    507  * @param bool $deprecated Not Used
    508  */
    509 function comments_link( $deprecated = '', $deprecated = '' ) {
     506 * @param string $deprecated_1 Not Used
     507 * @param bool $deprecated_2 Not Used
     508 */
     509function 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
    510515    echo get_comments_link();
    511516}
  • trunk/wp-includes/comment.php

    r12518 r12537  
    15121512 * @return bool|string False on failure, string containing URI on success.
    15131513 */
    1514 function discover_pingback_server_uri($url, $deprecated = 2048) {
     1514function discover_pingback_server_uri($url, $deprecated = '') {
     1515    if ( !empty($deprecated) )
     1516        _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
    15151517
    15161518    $pingback_str_dquote = 'rel="pingback"';
  • trunk/wp-includes/cron.php

    r12462 r12537  
    136136    // Backward compatibility
    137137    // 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', __('This argument has changed to an array so as to match with the behaviour of all the other cron functions.') );
    139140        $args = array_slice( func_get_args(), 1 );
     141    }
    140142
    141143    while ( $timestamp = wp_next_scheduled( $hook, $args ) )
  • trunk/wp-includes/functions.php

    r12536 r12537  
    30463046    // Allow plugin to filter the output error trigger
    30473047    if( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
    3048         if( !is_null($replacement) )
     3048        if( !is_null($message) )
    30493049            trigger_error( sprintf( __('The %1$s argument of %2$s is <strong>deprecated</strong> since version %3$s! %4$s'), $function, $argument, $version, $message ) );
    30503050        else
  • trunk/wp-includes/post-template.php

    r12513 r12537  
    247247 */
    248248function get_the_excerpt($deprecated = '') {
     249    if ( !empty( $deprecated ) )
     250        _deprecated_argument(__FUNCTION__, 'deprecated', '2.3');
     251
    249252    global $post;
    250253    $output = $post->post_excerpt;
  • trunk/wp-includes/widgets.php

    r12249 r12537  
    981981 * @access private
    982982 *
    983  * @param bool $update Optional, deprecated.
     983 * @param bool $deprecated. Not used.
    984984 * @return array Upgraded list of widgets to version 3 array format when called from the admin.
    985985 */
    986986function wp_get_sidebars_widgets($deprecated = true) {
     987    if ( $deprecated !== true )
     988        _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
     989
    987990    global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets;
    988991
Note: See TracChangeset for help on using the changeset viewer.