bp_register_group_type_sections_filters_actions()

Add actions and filters for group types.

Description

Source

File: bp-groups/bp-groups-admin.php

function bp_register_group_type_sections_filters_actions() {

	if ( true === bp_disable_group_type_creation() ) {

		// Action for opening the groups tab while on group types add/edit page.
		add_action( 'admin_head', 'bp_group_type_show_correct_current_menu', 50 );

		// Action for register meta boxes for group type post type.
		add_action( 'add_meta_boxes_' . bp_get_group_type_post_type(), 'bp_group_type_custom_meta_boxes' );

		//add column
		add_filter( 'manage_' . bp_get_group_type_post_type() . '_posts_columns', 'bp_group_type_add_column' );

		// action for adding a sortable column name.
		add_action( 'manage_' . bp_get_group_type_post_type() . '_posts_custom_column', 'bp_group_type_show_data', 10, 2 );

		//sortable columns
		add_filter( 'manage_edit-' . bp_get_group_type_post_type() . '_sortable_columns', 'bp_group_type_add_sortable_columns' );

		//hide quick edit link on the custom post type list screen
		add_filter( 'post_row_actions', 'bp_group_type_hide_quick_edit', 10, 2 );

		// action for saving meta boxes data of group type post data.
		add_action( 'save_post', 'bp_save_group_type_post_meta_box_data' );

		// action for saving meta boxes data of group type role labels post data.
		add_action( 'save_post', 'bp_save_group_type_role_labels_post_meta_box_data' );

	}
}

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.