bp_forums_highlight_forums_view_submenu( $submenu_file )

Make submenu highlight when on editing/creating topic

Description

Source

File: bp-forums/admin.php

function bp_forums_highlight_forums_view_submenu( $submenu_file ) {
	global $pagenow;

	$post_type = get_post_type();
	$forums_post_types = [ bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ];

	if ( $pagenow && 'post.php' == $pagenow && in_array( $post_type, $forums_post_types ) ) {
		return 'edit.php?post_type=' . $post_type;
	}

	return $submenu_file;
}

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.