bp_groups_admin_groups_type_change_notice()

Display an admin notice upon group type bulk update.


Source Source

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

function bp_groups_admin_groups_type_change_notice() {
	$updated = isset( $_REQUEST['updated'] ) ? $_REQUEST['updated'] : false;

	// Display feedback.
	if ( $updated && in_array( $updated, array( 'group-type-change-error', 'group-type-change-success' ), true ) ) {

		if ( 'group-type-change-error' === $updated ) {
			$notice = __( 'There was an error while changing group type. Please try again.', 'buddypress' );
			$type   = 'error';
		} else {
			$notice = __( 'Group type was changed successfully.', 'buddypress' );
			$type   = 'updated';
		}

		bp_core_add_admin_notice( $notice, $type );
	}
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.