Migrate final get_author_name() calls to use get_the_author_meta() instead. See #9393 props sivel.

git-svn-id: http://svn.automattic.com/wordpress/trunk@11370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-05-16 22:32:48 +00:00
parent 31ee4f86c1
commit f4331cacbd
3 changed files with 13 additions and 7 deletions

View File

@ -2285,8 +2285,8 @@ function wp_explain_nonce( $action ) {
$trans['add']['user'] = array( __( 'Your attempt to add this user has failed.' ), false ); $trans['add']['user'] = array( __( 'Your attempt to add this user has failed.' ), false );
$trans['delete']['users'] = array( __( 'Your attempt to delete users has failed.' ), false ); $trans['delete']['users'] = array( __( 'Your attempt to delete users has failed.' ), false );
$trans['bulk']['users'] = array( __( 'Your attempt to bulk modify users has failed.' ), false ); $trans['bulk']['users'] = array( __( 'Your attempt to bulk modify users has failed.' ), false );
$trans['update']['user'] = array( __( 'Your attempt to edit this user: “%s” has failed.' ), 'get_author_name' ); $trans['update']['user'] = array( __( 'Your attempt to edit this user: “%s” has failed.' ), 'get_the_author_meta', 'display_name' );
$trans['update']['profile'] = array( __( 'Your attempt to modify the profile for: “%s” has failed.' ), 'get_author_name' ); $trans['update']['profile'] = array( __( 'Your attempt to modify the profile for: “%s” has failed.' ), 'get_the_author_meta', 'display_name' );
$trans['update']['options'] = array( __( 'Your attempt to edit your settings has failed.' ), false ); $trans['update']['options'] = array( __( 'Your attempt to edit your settings has failed.' ), false );
$trans['update']['permalink'] = array( __( 'Your attempt to change your permalink structure to: %s has failed.' ), 'use_id' ); $trans['update']['permalink'] = array( __( 'Your attempt to change your permalink structure to: %s has failed.' ), 'use_id' );
@ -2299,9 +2299,15 @@ function wp_explain_nonce( $action ) {
if ( isset( $trans[$verb][$noun] ) ) { if ( isset( $trans[$verb][$noun] ) ) {
if ( !empty( $trans[$verb][$noun][1] ) ) { if ( !empty( $trans[$verb][$noun][1] ) ) {
$lookup = $trans[$verb][$noun][1]; $lookup = $trans[$verb][$noun][1];
if ( isset($trans[$verb][$noun][2]) )
$lookup_value = $trans[$verb][$noun][2];
$object = $matches[4]; $object = $matches[4];
if ( 'use_id' != $lookup ) if ( 'use_id' != $lookup ) {
$object = call_user_func( $lookup, $object ); if ( isset( $lookup_value ) )
$object = call_user_func( $lookup, $lookup_value, $object );
else
$object = call_user_func( $lookup, $object );
}
return sprintf( $trans[$verb][$noun][0], wp_specialchars($object) ); return sprintf( $trans[$verb][$noun][0], wp_specialchars($object) );
} else { } else {
return $trans[$verb][$noun][0]; return $trans[$verb][$noun][0];

View File

@ -1486,7 +1486,7 @@ function feed_links_extra( $args ) {
} elseif ( is_author() ) { } elseif ( is_author() ) {
$author_id = intval( get_query_var('author') ); $author_id = intval( get_query_var('author') );
$title = esc_attr(sprintf( $args['authortitle'], get_bloginfo('name'), $args['separator'], get_author_name( $author_id ) )); $title = esc_attr(sprintf( $args['authortitle'], get_bloginfo('name'), $args['separator'], get_the_author_meta( 'display_name', $author_id ) ));
$href = get_author_feed_link( $author_id ); $href = get_author_feed_link( $author_id );
} elseif ( is_search() ) { } elseif ( is_search() ) {
$title = esc_attr(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query() )); $title = esc_attr(sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query() ));

View File

@ -1241,7 +1241,7 @@ function wp_post_revision_title( $revision, $link = true ) {
* @uses wp_get_post_revisions() * @uses wp_get_post_revisions()
* @uses wp_post_revision_title() * @uses wp_post_revision_title()
* @uses get_edit_post_link() * @uses get_edit_post_link()
* @uses get_author_name() * @uses get_the_author_meta()
* *
* @todo split into two functions (list, form-table) ? * @todo split into two functions (list, form-table) ?
* *
@ -1286,7 +1286,7 @@ function wp_list_post_revisions( $post_id = 0, $args = null ) {
continue; continue;
$date = wp_post_revision_title( $revision ); $date = wp_post_revision_title( $revision );
$name = get_author_name( $revision->post_author ); $name = get_the_author_meta( 'display_name', $revision->post_author );
if ( 'form-table' == $format ) { if ( 'form-table' == $format ) {
if ( $left ) if ( $left )