Restore accidental removal of get_usernumposts(). This function is now deprecated in favor of count_user_posts() for naming consistency. fixes #12642 props Viper007Bond.

git-svn-id: http://svn.automattic.com/wordpress/trunk@13761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-03-19 01:11:21 +00:00
parent 96d21ae1f3
commit 8704bbf226
2 changed files with 15 additions and 2 deletions

View File

@ -2440,10 +2440,23 @@ function automatic_feed_links( $add = true ) {
* @see get_the_author_meta() * @see get_the_author_meta()
*/ */
function get_profile( $field, $user = false ) { function get_profile( $field, $user = false ) {
_deprecated_function(__FUNCTION__, '3.0', 'get_the_author_meta()' ); _deprecated_function( __FUNCTION__, '3.0', 'get_the_author_meta()' );
if ( $user ) { if ( $user ) {
$user = get_user_by( 'login', $user ); $user = get_user_by( 'login', $user );
$user = $user->ID; $user = $user->ID;
} }
return get_the_author_meta( $field, $user ); return get_the_author_meta( $field, $user );
}
/**
* Number of posts user has written.
*
* @since 0.71
* @deprecated 3.0.0
* @deprecated Use count_user_posts()
* @see count_user_posts()
*/
function get_usernumposts( $userid ) {
_deprecated_function( __FUNCTION__, '3.0', 'count_user_posts()' );
return count_user_posts( $userid );
} }

View File

@ -142,7 +142,7 @@ function wp_authenticate_cookie($user, $username, $password) {
/** /**
* Number of posts user has written. * Number of posts user has written.
* *
* @since 0.71 * @since 3.0.0
* @uses $wpdb WordPress database object for queries. * @uses $wpdb WordPress database object for queries.
* *
* @param int $userid User ID. * @param int $userid User ID.