Changeset 762477
- Timestamp:
- 08/26/2013 02:36:29 PM (13 years ago)
- Location:
- libravatar-replace/trunk
- Files:
-
- 2 edited
-
libravatar-replace.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
libravatar-replace/trunk/libravatar-replace.php
r762102 r762477 4 4 Plugin URI: http://code.sunchaser.info/libravatar 5 5 Description: Libravatar support for WordPress and BuddyPress 6 Version: 2.0. 26 Version: 2.0.3 7 7 Author: Christian Archer 8 8 Author URI: https://sunchaser.info/ … … 58 58 $avatar_defaults['gravatar_default'] = __('Libravatar Logo'); // rename accordingly 59 59 return $avatar_defaults; 60 } 61 62 /** 63 * Update default avatar links so they will show defaults 64 * 65 * Can be removed when Libravatar will support forcedefault 66 * 67 * @param string $avatar_list 68 * @return string 69 */ 70 function filterDefaultAvatarSelect($avatar_list) 71 { 72 return preg_replace('~/[a-f0-9]{32}~', '/'.str_repeat('0', 32), $avatar_list); // fill hash with zeros 60 73 } 61 74 … … 121 134 $options['d'] = $default; 122 135 } 123 $url = $libravatar-> url($email, $options);136 $url = $libravatar->getUrl($email, $options); 124 137 125 138 $avatar = "<img alt='{$safe_alt}' src='{$url}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />"; … … 175 188 add_filter('get_avatar', array($libravatar_replace, 'filterGetAvatar'), 10, 5); 176 189 add_filter('avatar_defaults', array($libravatar_replace, 'filterAvatarDefaults')); 190 add_filter('default_avatar_select', array($libravatar_replace, 'filterDefaultAvatarSelect')); 177 191 add_filter('bp_core_gravatar_email', array($libravatar_replace, 'filterBPCoreGravatarEmail')); 178 192 add_filter('bp_gravatar_url', array($libravatar_replace, 'filterBPGravatarUrl', 10)); -
libravatar-replace/trunk/readme.txt
r762359 r762477 34 34 == Changelog == 35 35 36 = 2.0.3 = 37 * Default images in admin page fix 38 36 39 = 2.0.2 = 37 40 * No special blank treatment - it just works
Note: See TracChangeset
for help on using the changeset viewer.