WordPress.org

Make WordPress Core

Changeset 4234


Ignore:
Timestamp:
09/25/2006 02:21:05 AM (15 years ago)
Author:
ryan
Message:

Deprecate idmode. fixes #2386

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.