bp_forums_highlight_forums_new_parent_menu( $parent_file )

Make paretn menu highlight when on editing/creating topic

Description

Source

File: bp-forums/admin.php

107
108
109
110
111
112
113
114
115
116
117
118
function bp_forums_highlight_forums_new_parent_menu( $parent_file ) {
    global $pagenow;
 
    $post_type = isset( $_GET['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-new.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.