bp_forums_highlight_forums_view_parent_menu( $parent_file )

Make paretn menu highlight when on editing/creating topic

Description

Source

File: bp-forums/admin.php

145
146
147
148
149
150
151
152
153
154
155
156
function bp_forums_highlight_forums_view_parent_menu( $parent_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 'bp-forums';
    }
 
    return $parent_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.