WordPress.org

Make WordPress Core

Changeset 52568


Ignore:
Timestamp:
01/12/2022 11:15:15 AM (9 days ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/author-template.php

    r51190 r52568  
    344344function get_author_posts_url( $author_id, $author_nicename = '' ) {
    345345    global $wp_rewrite;
    346     $auth_ID = (int) $author_id;
    347     $link    = $wp_rewrite->get_author_permastruct();
     346
     347    $author_id = (int) $author_id;
     348    $link      = $wp_rewrite->get_author_permastruct();
    348349
    349350    if ( empty( $link ) ) {
    350351        $file = home_url( '/' );
    351         $link = $file . '?author=' . $auth_ID;
     352        $link = $file . '?author=' . $author_id;
    352353    } else {
    353354        if ( '' === $author_nicename ) {
Note: See TracChangeset for help on using the changeset viewer.