Changeset 4234

Show
Ignore:
Timestamp:
09/25/06 02:21:05 (2 years ago)
Author:
ryan
Message:

Deprecate idmode. fixes #2386

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/wp-includes/template-functions-author.php

    r4056 r4234  
    11<?php 
    22 
    3 function get_the_author($idmode = '') { 
     3function get_the_author($deprecated = '') { 
    44    global $authordata; 
    55    return apply_filters('the_author', $authordata->display_name); 
    66} 
    77 
    8 function the_author($idmode = '', $echo = true) { 
    9     if ( $echo ) 
    10         echo get_the_author($idmode); 
    11     return get_the_author($idmode); 
     8// Using echo = false is deprecated.  Use get_the_author instead. 
     9function the_author($deprecated = '', $deprecated_echo = true) { 
     10    if ( $deprecated_echo ) 
     11        echo get_the_author(); 
     12    return get_the_author(); 
    1213} 
    1314 
     
    128129 
    129130/* the_author_posts_link() requires no get_, use get_author_link() */ 
    130 function the_author_posts_link($idmode='') { 
    131     global $authordata; 
    132  
    133     echo '<a href="' . get_author_link(0, $authordata->ID, $authordata->user_nicename) . '" title="' . sprintf(__("Posts by %s"), wp_specialchars(the_author($idmode, false))) . '">' . the_author($idmode, false) . '</a>'; 
     131function the_author_posts_link($deprecated = '') { 
     132    global $authordata; 
     133 
     134    echo '<a href="' . get_author_link(0, $authordata->ID, $authordata->user_nicename) . '" title="' . sprintf(__("Posts by %s"), wp_specialchars(get_the_author())) . '">' . get_the_author() . '</a>'; 
    134135} 
    135136