mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-13 19:56:27 +09:00
fix
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
/*jQuery('body').on('error', '.um-avatar', function() {
|
||||
if( jQuery(this).data('load-error') != undefined ) return;
|
||||
jQuery(this).data('load-error', '1').attr('src', jQuery(this).data('default'));
|
||||
});*/
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
jQuery(document).on('click', '.um-dropdown a', function(e){
|
||||
|
||||
@@ -1761,7 +1761,7 @@ function um_get_user_avatar_data( $user_id = '', $size = '96' ) {
|
||||
$data = array(
|
||||
'user_id' => $user_id,
|
||||
'default' => um_get_default_avatar_uri(),
|
||||
'class' => 'func-um_user gravatar avatar avatar-' . $size . ' um-avatar',
|
||||
'class' => 'gravatar avatar avatar-' . $size . ' um-avatar',
|
||||
'size' => $size
|
||||
);
|
||||
|
||||
@@ -2154,7 +2154,8 @@ function um_user( $data, $attrs = null ) {
|
||||
width="' . esc_attr($data['size']) . '"
|
||||
height="' . esc_attr($data['size']) . '"
|
||||
alt="' . esc_attr($data['alt']) . '"
|
||||
onerror="this.src=\''.esc_attr($data['default']).'\';" />'; //don't move attribute before src
|
||||
data-default="' . esc_attr($data['default']) . '"
|
||||
onerror="if(!this.getAttribute(\'data-load-error\')){this.setAttribute(\'data-load-error\', \'1\');this.setAttribute(\'src\', this.getAttribute(\'data-default\'));}" />'; //don't move attribute before src
|
||||
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user