bb_group_wp_admin_bar_updates_menu()

Learndash Plugin updates Group Page admin bar Edit link to dashboard home page instead of the platform groups page.

Description

Filter fix the issue and making sure platform group page is being edited.

Source

File: bp-integrations/learndash/bp-learndash-filters.php

function bb_group_wp_admin_bar_updates_menu() {
	global $wp_admin_bar;

	$page_ids = bp_core_get_directory_page_ids();
	if ( bp_is_groups_directory() && is_array( $page_ids ) && isset( $page_ids['groups'] ) && !empty( $page_ids['groups'] ) ) {

		//Get a reference to the edit node to modify.
		$new_content_node = $wp_admin_bar->get_node('edit');

		if ( isset( $new_content_node ) && ! empty( $new_content_node->href ) ) {
			//Change href
			$new_content_node->href = get_edit_post_link( $page_ids['groups'] );
		}

		//Update Node.
		$wp_admin_bar->add_node($new_content_node);

	}
}

Changelog

Changelog
Version Description
BuddyBoss 1.4.7 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.