bp_core_memberpress_the_content( mixed $content )

Fix Memberpress Privacy for BuddyPress pages.

Description

Parameters

$content

(Required)

Return

(mixed)

Source

File: bp-core/compatibility/bp-incompatible-plugins-helper.php

function bp_core_memberpress_the_content( $content ) {
	if ( class_exists( 'MeprBaseModel' ) ) {
		global $post;
		$page_ids = bp_core_get_directory_page_ids();

		if (
			bp_is_groups_component()
			&& !empty( $page_ids['groups'] )
			&& empty( $post->ID )
		) {
			$post = get_post( $page_ids['groups'] );
		} else if (
			bp_is_media_component()
			&& !empty( $page_ids['media'] )
			&& empty( $post->ID )
		) {
			$post = get_post( $page_ids['media'] );
		} else if (
			bp_is_members_component()
			&& !empty( $page_ids['members'] )
			&& empty( $post->ID )
		) {
			$post = get_post( $page_ids['members'] );
		} else if (
			bp_is_activity_component()
			&& !empty( $page_ids['activity'] )
			&& empty( $post->ID )
		) {
			$post = get_post( $page_ids['activity'] );
		}
	}

	return $content;
}

Changelog

Changelog
Version Description
BuddyBoss 1.2.4 Introduced.

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.