Make WordPress Core

Ticket #17025: 17025.11.diff

File 17025.11.diff, 860 bytes (added by costdev, 2 years ago)

Refresh of 17025.10.diff with docblock improvements and WPCS fixes.

  • src/wp-includes/author-template.php

    diff --git a/src/wp-includes/author-template.php b/src/wp-includes/author-template.php
    index 5a119b4ccc..e8eb4e534d 100644
    a b function wp_list_authors( $args = '' ) { 
    476476                }
    477477
    478478                if ( $args['show_fullname'] && $author->first_name && $author->last_name ) {
    479                         $name = "$author->first_name $author->last_name";
     479
     480                        $full_name = $author->first_name . ' ' . $author->last_name;
     481
     482                        /**
     483                        * Filters the author's full name.
     484                        *
     485                        * @since 6.1.0
     486                        *
     487                        * @param string $full_name Full Name of the author. Default: The author's first name and last name.
     488                        * @param object $author    Author data in object format.
     489                        */
     490
     491                        $name = apply_filters( 'wp_list_author_full_name', $full_name, $author );
    480492                } else {
    481493                        $name = $author->display_name;
    482494                }