Coding Standards: Remove an extra variable in `get_author_posts_url()`.

This fixes a `Variable "$auth_ID" is not in valid snake_case format` WPCS warning by using the existing `$author_id` variable, and brings consistency with a similar fragment in `get_author_feed_link()`.

Follow-up to [979], [5087], [6364], [6365].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@52568


git-svn-id: http://core.svn.wordpress.org/trunk@52158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-01-12 11:17:08 +00:00
parent c3c39a22b9
commit 23be3c2b55
2 changed files with 5 additions and 4 deletions

View File

@ -343,12 +343,13 @@ function the_author_posts_link( $deprecated = '' ) {
*/
function get_author_posts_url( $author_id, $author_nicename = '' ) {
global $wp_rewrite;
$auth_ID = (int) $author_id;
$author_id = (int) $author_id;
$link = $wp_rewrite->get_author_permastruct();
if ( empty( $link ) ) {
$file = home_url( '/' );
$link = $file . '?author=' . $auth_ID;
$link = $file . '?author=' . $author_id;
} else {
if ( '' === $author_nicename ) {
$user = get_userdata( $author_id );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-52563';
$wp_version = '6.0-alpha-52568';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.