Customizer not loading: Issue in class-wp-user-avatar-admin.php
-
Hi,
there is an issue in wp-user-avatar “Trying to get property ‘ID’ of non-object in wp-user-avatar/includes/class-wp-user-avatar-admin.php 376 when opening customizer in WordPress.
Fix:
public function wpua_add_media_state($states) {
global $wpua_avatar_default;
$is_wpua = get_post_custom_values(‘_wp_attachment_wp_user_avatar’, get_the_ID());
if(!empty($is_wpua)) {
$states[] = __(‘Profile Picture’,’wp-user-avatar’);
}
if(!empty($wpua_avatar_default) && ($wpua_avatar_default == get_the_ID())) {
$states[] = __(‘Default Avatar’,’wp-user-avatar’);
}
/**
* Filter media states
* @since 1.4
* @param array $states
*/
return apply_filters(‘wpua_add_media_state’, $states);
}Cheers
- The topic ‘Customizer not loading: Issue in class-wp-user-avatar-admin.php’ is closed to new replies.