bp_member_type_shortcode_add_body_class( $class )

Adds body class where the shortcode is added.

Description

Parameters

$class

(Required)

Return

(array)

Source

File: bp-members/bp-members-functions.php

function bp_member_type_shortcode_add_body_class( $class ) {

	global $post;

	if( isset($post->post_content) && has_shortcode( $post->post_content, 'profile' ) ) {
		$class[] = 'directory';
		$class[] = 'members';
		$class[] = 'buddypress';
		$class[] = 'buddyboss';
		$class[] = 'bb-buddypanel';
	}
	return $class;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 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.