bp_groups_admin_create()

Display the single groups create screen.

Description

Source

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

function bp_groups_admin_create() {

	if ( ! bp_current_user_can( 'bp_moderate' ) )
		die( '-1' );

	?>

	<div class="wrap">
		<?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?>

			<h1 class="wp-heading-inline"><?php _e( 'Create New Group', 'buddyboss' ); ?></h1>

			<hr class="wp-header-end">

		<?php else : ?>

			<h1><?php _e( 'Create New Group', 'buddyboss' ); ?> </h1>

		<?php endif; ?>

		<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" id="bp-groups-edit-form" method="post">
			<div id="poststuff">

				<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
					<div id="post-body-content">
						<div id="postdiv">
							<div id="bp_groups_name" class="postbox">
								<h2><?php _e( 'Name and Description', 'buddyboss' ); ?></h2>
								<div class="inside">
									<label for="bp-groups-name" class="screen-reader-text"><?php
										/* translators: accessibility text */
										_e( 'Group Name', 'buddyboss' );
										?></label>
									<input required type="text" name="bp-groups-name" id="bp-groups-name" value="" />


									<label for="bp-groups-description" class="screen-reader-text"><?php
										/* translators: accessibility text */
										_e( 'Group Description', 'buddyboss' );
										?></label>
									<?php wp_editor( '', 'bp-groups-description', array( 'media_buttons' => false, 'teeny' => true, 'textarea_rows' => 5, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ) ) ); ?>
								</div>
							</div>
						</div>
					</div><!-- #post-body-content -->

					<input type="hidden" name="action" value="bp_create_group_admin">
					<?php wp_nonce_field( 'bp_create_group_form_nonce' ); ?>

					<div id="postbox-container-1" class="postbox-container">
						<div id="submitdiv" class="postbox">
							<h2 class="hndle ui-sortable-handle"><span><?php esc_html_e('Publish', 'buddyboss' );?></span></h2>
							<div class="inside">
								<div id="submitcomment" class="submitbox">
									<div id="major-publishing-actions">
										<div id="publishing-action">
											<input type="submit" name="save" id="save" class="button button-primary" value="<?php esc_attr_e('Publish', 'buddyboss' );?>">			</div>
										<div class="clear"></div>
									</div><!-- #major-publishing-actions -->
								</div><!-- #submitcomment -->
							</div>
						</div>
					</div>


				</div><!-- #post-body -->

			</div><!-- #poststuff -->

		</form>


	</div><!-- .wrap -->

	<?php
}

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.