BP_Nouveau_Groups::setup_actions()

Register do_action() hooks

Description

Source

File: bp-templates/bp-nouveau/includes/groups/loader.php

	protected function setup_actions() {
		if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
			add_action( 'groups_setup_nav', 'bp_nouveau_group_setup_nav' );
		}

		add_action( 'bp_nouveau_enqueue_scripts', 'bp_nouveau_groups_enqueue_scripts' );

		// Avoid Notices for BuddyPress Legacy Backcompat
		remove_action( 'bp_groups_directory_group_filter', 'bp_group_backcompat_create_nav_item', 1000 );

		// Register the Groups Notifications filters
		add_action( 'bp_nouveau_notifications_init_filters', 'bp_nouveau_groups_notification_filters' );

		// Actions to check whether we are in the Group's default front page sidebar
		add_action( 'dynamic_sidebar_before', array( $this, 'group_home_sidebar_set' ), 10, 1 );
		add_action( 'dynamic_sidebar_after', array( $this, 'group_home_sidebar_unset' ), 10, 1 );

		// Add a new nav item to settings to let users choose their group invites preferences
		if ( bp_is_active( 'friends' ) && ! bp_nouveau_groups_disallow_all_members_invites() ) {
			add_action( 'bp_settings_setup_nav', 'bp_nouveau_groups_invites_restriction_nav' );
		}
	}

Changelog

Changelog
Version Description
BuddyPress 3.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.