[wp-trac] [WordPress Trac] #32572: Remove extra gravatar api call

WordPress Trac noreply at wordpress.org
Mon Jun 8 09:58:10 UTC 2015


#32572: Remove extra gravatar api call
-------------------------------------+-----------------------------
 Reporter:  ravinderk                |       Owner:  SergeyBiryukov
     Type:  enhancement              |      Status:  reopened
 Priority:  normal                   |   Milestone:  4.3
Component:  Users                    |     Version:  4.2
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:  performance
-------------------------------------+-----------------------------

Comment (by ravinderk):

 Replying to [comment:9 miqrogroove]:
 > That is an invalid assumption.

 Let take a case where gravatar api changes and s parameter is not valid,
 in that case we have to rewrite my patch and get_avatar_data() function
 because they are both using s parameter in there url params.


 {{{
 $url_args = array(
                 's' => $args['size'],
                 'd' => $args['default'],
                 'f' => $args['force_default'] ? 'y' : false,
                 'r' => $args['rating'],
         );

         $url = sprintf( 'http://%d.gravatar.com/avatar/%s',
 $gravatar_server, $email_hash );

         $url = add_query_arg(
                 rawurlencode_deep( array_filter( $url_args ) ),
                 set_url_scheme( $url, $args['scheme'] )
         );
 }}}

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


More information about the wp-trac mailing list