[wp-trac] [WordPress Trac] #41544: $id_or_email parameter in get_avatar filter needs to be more concrete

WordPress Trac noreply at wordpress.org
Sat Oct 14 13:00:18 UTC 2017


#41544: $id_or_email parameter in get_avatar filter needs to be more concrete
-------------------------------------------------+-------------------------
 Reporter:  dikiy_forester                       |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Users                                |  Review
 Severity:  normal                               |     Version:
 Keywords:  dev-feedback has-unit-tests has-     |  Resolution:
  patch                                          |     Focuses:
-------------------------------------------------+-------------------------
Changes (by birgire):

 * keywords:  dev-feedback => dev-feedback has-unit-tests has-patch


Comment:

 In [attachment:41544.diff] is a first attempt to introduce a new
 {{{wp_parse_id_or_email()}}} function.

 Included are tests.

 If we want patch the new processed arguments, {{{found_user_id}}} and
 {{{context}}}, then we could use:

 {{{
 $parsed = wp_parse_id_or_email( $id_or_email );

 $args['found_user_id'] =  $parsed['user_id'];
 $args['context'] =  $parsed['context'];

 }}}

 within {{{get_avatar_data()}}}, with some minor adjustments.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41544#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list