[wp-trac] [WordPress Trac] #46410: Invalid check for twentynineteen_get_user_avatar_markup in twentynineteen
WordPress Trac
noreply at wordpress.org
Mon Mar 4 14:25:28 UTC 2019
#46410: Invalid check for twentynineteen_get_user_avatar_markup in twentynineteen
-----------------------------+--------------------------------------
Reporter: Diego La Monica | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: critical | Keywords: dev-feedback needs-patch
Focuses: template |
-----------------------------+--------------------------------------
Hi all folks,
I've found a small bug in twentynineteen theme.
In file **inc/template-tags.php** @ row **169** the check for the function
is wrong.
Indeed the nested function is **twentynineteen_get_user_avatar_markup**
and not as wrongly reported **twentynineteen_comment_avatar**.
Follows the excerpt:
{{{#!php
<?php
if ( ! function_exists( 'twentynineteen_comment_avatar' ) ) :
/**
* Returns the HTML markup to generate a user avatar.
*/
function twentynineteen_get_user_avatar_markup( $id_or_email =
null ) {
if ( ! isset( $id_or_email ) ) {
$id_or_email = get_current_user_id();
}
return sprintf( '<div class="comment-user-avatar comment-
author vcard">%s</div>', get_avatar( $id_or_email,
twentynineteen_get_avatar_size() ) );
}
endif;
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46410>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list