Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active March 13, 2023 00:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/be6e87ae48e027739a0df34f2ed1e801 to your computer and use it in GitHub Desktop.
Save KaineLabs/be6e87ae48e027739a0df34f2ed1e801 to your computer and use it in GitHub Desktop.
Jetpack - Disable Lasy Load on Change Avatar Page
<?php
// Disable Lasy Load on Change avatar pages !
function yzc_disable_lazy_load_on_change_avatar_pages( $enabled ) {
if ( bp_is_user_change_avatar() ) {
return false;
}
if ( bp_is_active( 'groups' ) && ( bp_is_group_creation_step( 'group-avatar' )
|| bp_is_group_admin_screen( 'group-avatar' ) ) ) {
return false;
}
return $enabled;
}
add_filter( 'lazyload_is_enabled', 'yzc_disable_lazy_load_on_change_avatar_pages' );
@Lance2j
Copy link

Lance2j commented Aug 9, 2022

That works.

@Miracle-Zidouemba
Copy link

Thank you very much for this service. You are a man of greatness. May Allah give you longevity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment