Last active
March 13, 2023 00:05
-
-
Save KaineLabs/be6e87ae48e027739a0df34f2ed1e801 to your computer and use it in GitHub Desktop.
Jetpack - Disable Lasy Load on Change Avatar Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
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
That works.