bp_core_optouts_admin()

Opt-outs admin page router.


Description Description

Depending on the context, display

  • the list of optouts,
  • or the delete confirmation screen,

Also prepare the admin notices.


Source Source

File: bp-core/admin/bp-core-admin-optouts.php

function bp_core_optouts_admin() {
	$doaction = bp_admin_list_table_current_bulk_action();

	// Prepare notices for admin.
	$notice = bp_core_get_optouts_notice();

	// Display notices.
	if ( ! empty( $notice ) ) :
		if ( 'updated' === $notice['class'] ) : ?>

			<div id="message" class="<?php echo esc_attr( $notice['class'] ); ?> notice is-dismissible">

		<?php else: ?>

			<div class="<?php echo esc_attr( $notice['class'] ); ?> notice is-dismissible">

		<?php endif; ?>

			<p><?php echo esc_html( $notice['message'] ); ?></p>
		</div>

	<?php endif;

	// Show the proper screen.
	switch ( $doaction ) {
		case 'delete' :
			bp_core_optouts_admin_manage( $doaction );
			break;

		default:
			bp_core_optouts_admin_index();
			break;
	}
}


Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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