LLMS_PlayNice::buddyboss_compatibility()

Compatibility for BuddyBoss.


Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.playnice.php

	public function buddyboss_compatibility() {

		if ( ! function_exists( 'is_plugin_active' ) || ! function_exists( 'bp_is_my_profile' ) || bp_is_my_profile() ) {
			return;
		}

		if (
			is_plugin_active( 'buddyboss-platform/bp-loader.php' ) ||
			( is_multisite() && is_plugin_active_for_network( 'buddyboss-platform/bp-loader.php' ) )
		) {
			$plugin_data    = get_plugin_data( trailingslashit( WP_PLUGIN_DIR ) . 'buddyboss-platform/bp-loader.php' );
			$plugin_version = ! empty( $plugin_data['Version'] ) ? $plugin_data['Version'] : 0;
			if ( $plugin_version && version_compare( $plugin_version, '2.0.3', '>=' ) ) {
				// Nothing to do.
				return;
			}
		}

		// Do not add our profile nav items when not in front-end (and not in "my profile"), to avoid a fatal error.
		$bp_integration = llms()->integrations()->get_integration( 'buddypress' );
		remove_action( 'bp_setup_nav', array( $bp_integration, 'add_profile_nav_items' ) );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.