Make WordPress Core

Ticket #9008: 9008.5.diff

File 9008.5.diff, 1.7 KB (added by nacin, 15 years ago)

Deprecate bloginfo('url').

  • general-template.php

     
    340340 * versions. These options will trigger the _deprecated_argument() function.
    341341 * The deprecated blog info options are listed in the function contents.
    342342 *
    343  * The possible values for the 'show' parameter are listed below.
    344  * <ol>
    345  * <li><strong>url<strong> - Blog URI to homepage.</li>
    346  * <li><strong>wpurl</strong> - Blog URI path to WordPress.</li>
    347  * <li><strong>description</strong> - Secondary title</li>
    348  * </ol>
     343 * The possible values for the 'show' parameter are listed in the function contents.
     344 * For the blog URI to the homepage, use home_url().
    349345 *
    350346 * The feed URL options can be retrieved from 'rdf_url' (RSS 0.91),
    351347 * 'rss_url' (RSS 1.0), 'rss2_url' (RSS 2.0), or 'atom_url' (Atom feed). The
     
    361357function get_bloginfo( $show = '', $filter = 'raw' ) {
    362358
    363359        switch( $show ) {
    364                 case 'home' : // DEPRECATED
    365                 case 'siteurl' : // DEPRECATED
    366                         _deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The \'%1$s\' option is deprecated for the family of bloginfo() functions. Use the \'%2$s\' option instead.'), $show, 'url' ) );
    367                 case 'url' :
    368                         $output = home_url();
     360                case 'home'    : // DEPRECATED in 2.2
     361                case 'siteurl' : // DEPRECATED in 2.2
     362                case 'url'     : // DEPRECATED in 3.0
     363                        _deprecated_argument( __FUNCTION__, '3.0', sprintf( __('The \'%1$s\' option is deprecated for the family of bloginfo() functions. Use home_url() instead.'), $show ) );
     364                        return home_url();
    369365                        break;
    370366                case 'wpurl' :
    371367                        $output = get_option('siteurl');