bp_profile_search_set_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/profile-search/bps-start.php

function bp_profile_search_set_platform_tab_submenu_active( $parent_file ) {
	global $pagenow, $current_screen, $post;

	if ( false === bp_disable_advanced_profile_search() ) {
		if ( ( isset( $post->post_type ) && $post->post_type == 'bp_ps_form' && $pagenow == 'edit.php' ) || ( isset( $post->post_type ) && $post->post_type == 'bp_ps_form' && $pagenow == 'post-new.php' ) || ( isset( $post->post_type ) && $post->post_type == 'bp_ps_form' && $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.