bp_core_enqueue_isInViewPort()

Description

Source

File: bp-core/bp-core-cssjs.php

function bp_core_enqueue_isInViewPort() {
	if ( bp_is_user_media() ||
		 bp_is_single_album() ||
		 bp_is_media_directory() ||
		 bp_is_activity_component() ||
		 bp_is_group_activity() ||
		 bp_is_group_media() ||
		 bp_is_group_albums() ||
		 bp_is_messages_component() ||
		 ( function_exists( 'bp_is_profile_media_support_enabled' ) && bp_is_profile_media_support_enabled() ) ||
		 ( function_exists( 'bp_is_group_media_support_enabled' ) && bp_is_group_media_support_enabled() ) ||
		 ( function_exists( 'bp_is_group_albums_support_enabled' ) && bp_is_group_albums_support_enabled() ) ||
		 ( function_exists( 'bp_is_messages_media_support_enabled' ) && bp_is_messages_media_support_enabled() )
	) {
		wp_enqueue_script( 'isInViewport' );
	}
}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.