Changeset 10370
- Timestamp:
- 11/19/2015 07:49:04 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/avatars.php
r10293 r10370 136 136 } 137 137 138 $avatar_url = $host . md5( strtolower( $this->params['email'] ) ) . '?d=' . $default_grav . '&s=' . $this->params['width']; 138 $avatar_url = $host . md5( strtolower( $this->params['email'] ) ); 139 140 // Main Gravatar URL args. 141 $url_args = array( 142 's' => $this->params['width'] 143 ); 144 145 // Force default. 146 if ( ! empty( $this->params['force_default'] ) ) { 147 $url_args['f'] = 'y'; 148 } 139 149 140 150 // Gravatar rating; http://bit.ly/89QxZA 141 151 $rating = strtolower( get_option( 'avatar_rating' ) ); 142 152 if ( ! empty( $rating ) ) { 143 $ avatar_url .= "&r={$rating}";153 $url_args['r'] = $rating; 144 154 } 155 156 // Default avatar. 157 if ( 'gravatar_default' !== $default_grav ) { 158 $url_args['d'] = $default_grav; 159 } 160 161 // Set up the Gravatar URL. 162 $avatar_url = esc_url( add_query_arg( 163 rawurlencode_deep( array_filter( $url_args ) ), 164 $avatar_url 165 ) ); 166 145 167 } 146 168
Note: See TracChangeset
for help on using the changeset viewer.