bp_set_emails_platform_tab_submenu_active( string $parent_file )

Highlights the submenu item using WordPress native styles.

Description

Parameters

$parent_file

(Required) The filename of the parent menu.

Return

(string) $parent_file The filename of the parent menu.

Source

File: bp-core/admin/bp-core-admin-functions.php

function bp_set_emails_platform_tab_submenu_active( $parent_file ) {
	global $pagenow, $current_screen;

	if ( ( isset( $current_screen->post_type ) && $current_screen->post_type == bp_get_email_post_type() && $pagenow == 'edit.php' ) || ( isset( $current_screen->post_type ) && $current_screen->post_type == bp_get_email_post_type() && $pagenow == 'post-new.php' ) || ( isset( $current_screen->post_type ) && $current_screen->post_type == bp_get_email_post_type() && $pagenow == 'post.php' ) ) {
		$parent_file = 'buddyboss-platform';
	}
	return $parent_file;
}

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.