Make WordPress Core

Changeset 12587


Ignore:
Timestamp:
12/30/2009 05:05:02 PM (14 years ago)
Author:
westi
Message:

Use _deprecated_argument() in get_bloginfo() and then don't pass deprecated argument to get_bloginfo(). Fixes #11652 props nacin.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-app.php

    r12584 r12587  
    372372            $this->auth_required( __( 'Sorry, you do not have the right to access this blog.' ) );
    373373
    374         $home = esc_attr(get_bloginfo_rss('home'));
     374        $home = esc_attr(get_bloginfo_rss('url'));
    375375
    376376        $categories = "";
  • trunk/wp-includes/feed-atom-comments.php

    r11323 r12587  
    3737    <id><?php echo get_search_comments_feed_link('', 'atom'); ?></id>
    3838<?php } else { ?>
    39     <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('home'); ?>" />
     39    <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('url'); ?>" />
    4040    <link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />
    4141    <id><?php bloginfo_rss('comments_atom_url'); ?></id>
  • trunk/wp-includes/feed-atom.php

    r11980 r12587  
    1414  xmlns:thr="http://purl.org/syndication/thread/1.0"
    1515  xml:lang="<?php echo get_option('rss_language'); ?>"
    16   xml:base="<?php bloginfo_rss('home') ?>/wp-atom.php"
     16  xml:base="<?php bloginfo_rss('url') ?>/wp-atom.php"
    1717  <?php do_action('atom_ns'); ?>
    1818 >
     
    2323    <?php the_generator( 'atom' ); ?>
    2424
    25     <link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
     25    <link rel="alternate" type="text/html" href="<?php bloginfo_rss('url') ?>" />
    2626    <id><?php bloginfo('atom_url'); ?></id>
    2727    <link rel="self" type="application/atom+xml" href="<?php self_link(); ?>" />
  • trunk/wp-includes/general-template.php

    r12514 r12587  
    274274 *
    275275 * Some show parameter values are deprecated and will be removed in future
    276  * versions. Care should be taken to check the function contents and know what
    277  * the deprecated blog info options are. Options without "// DEPRECATED" are
    278  * the preferred and recommended ways to get the information.
     276 * versions. These options will trigger the _deprecated_argument() function.
     277 * The deprecated blog info options are listed in the function contents.
    279278 *
    280279 * The possible values for the 'show' parameter are listed below.
     
    290289 * feed) or 'comments_rss2_url' (RSS 2.0 comment feed).
    291290 *
    292  * There are many other options and you should check the function contents:
    293  * {@source 32 37}
    294  *
    295291 * @since 0.71
    296292 *
     
    299295 * @return string Mostly string values, might be empty.
    300296 */
    301 function get_bloginfo($show = '', $filter = 'raw') {
    302 
    303     switch($show) {
    304         case 'url' :
     297function get_bloginfo( $show = '', $filter = 'raw' ) {
     298
     299    switch( $show ) {
    305300        case 'home' : // DEPRECATED
    306301        case 'siteurl' : // DEPRECATED
     302            _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' ) );
     303        case 'url' :
    307304            $output = get_option('home');
    308305            break;
  • trunk/wp-includes/link-template.php

    r12584 r12587  
    13051305
    13061306    if ( !$wp_rewrite->using_permalinks() || is_admin() ) {
    1307         $base = trailingslashit( get_bloginfo( 'home' ) );
     1307        $base = trailingslashit( get_bloginfo( 'url' ) );
    13081308
    13091309        if ( $pagenum > 1 ) {
Note: See TracChangeset for help on using the changeset viewer.