mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
Deprecate idmode. fixes #2386
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a0ebe5b7b5
commit
65ce9a329f
@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function get_the_author($idmode = '') {
|
function get_the_author($deprecated = '') {
|
||||||
global $authordata;
|
global $authordata;
|
||||||
return apply_filters('the_author', $authordata->display_name);
|
return apply_filters('the_author', $authordata->display_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
function the_author($idmode = '', $echo = true) {
|
// Using echo = false is deprecated. Use get_the_author instead.
|
||||||
if ( $echo )
|
function the_author($deprecated = '', $deprecated_echo = true) {
|
||||||
echo get_the_author($idmode);
|
if ( $deprecated_echo )
|
||||||
return get_the_author($idmode);
|
echo get_the_author();
|
||||||
|
return get_the_author();
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_the_author_description() {
|
function get_the_author_description() {
|
||||||
@ -127,10 +128,10 @@ function the_author_posts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* the_author_posts_link() requires no get_, use get_author_link() */
|
/* the_author_posts_link() requires no get_, use get_author_link() */
|
||||||
function the_author_posts_link($idmode='') {
|
function the_author_posts_link($deprecated = '') {
|
||||||
global $authordata;
|
global $authordata;
|
||||||
|
|
||||||
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>';
|
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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_author_link($echo = false, $author_id, $author_nicename = '') {
|
function get_author_link($echo = false, $author_id, $author_nicename = '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user