[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * BuddyPress - Groups Create 4 * 5 * @package BuddyPress 6 * @subpackage bp-legacy 7 * @version 3.0.0 8 */ 9 10 /** 11 * Fires at the top of the groups creation template file. 12 * 13 * @since 1.7.0 14 */ 15 do_action( 'bp_before_create_group_page' ); ?> 16 17 <div id="buddypress"> 18 19 <?php 20 21 /** 22 * Fires before the display of group creation content. 23 * 24 * @since 1.6.0 25 */ 26 do_action( 'bp_before_create_group_content_template' ); ?> 27 28 <form action="<?php bp_group_creation_form_action(); ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data"> 29 30 <?php 31 32 /** 33 * Fires before the display of group creation. 34 * 35 * @since 1.2.0 36 */ 37 do_action( 'bp_before_create_group' ); ?> 38 39 <div class="item-list-tabs no-ajax" id="group-create-tabs"> 40 <ul> 41 42 <?php bp_group_creation_tabs(); ?> 43 44 </ul> 45 </div> 46 47 <div id="template-notices" role="alert" aria-atomic="true"> 48 <?php 49 50 /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */ 51 do_action( 'template_notices' ); ?> 52 53 </div> 54 55 <div class="item-body" id="group-create-body"> 56 57 <?php /* Group creation step 1: Basic group details */ ?> 58 <?php if ( bp_is_group_creation_step( 'group-details' ) ) : ?> 59 60 <h2 class="bp-screen-reader-text"><?php 61 /* translators: accessibility text */ 62 _e( 'Group Details', 'buddypress' ); 63 ?></h2> 64 65 <?php 66 67 /** 68 * Fires before the display of the group details creation step. 69 * 70 * @since 1.1.0 71 */ 72 do_action( 'bp_before_group_details_creation_step' ); ?> 73 74 <div> 75 <label for="group-name"><?php _e( 'Group Name (required)', 'buddypress' ); ?></label> 76 <input type="text" name="group-name" id="group-name" aria-required="true" value="<?php echo esc_attr( bp_get_new_group_name() ); ?>" /> 77 </div> 78 79 <div> 80 <label for="group-desc"><?php _e( 'Group Description (required)', 'buddypress' ); ?></label> 81 <textarea name="group-desc" id="group-desc" aria-required="true"><?php bp_new_group_description(); ?></textarea> 82 </div> 83 84 <?php 85 86 /** 87 * Fires after the display of the group details creation step. 88 * 89 * @since 1.1.0 90 */ 91 do_action( 'bp_after_group_details_creation_step' ); 92 do_action( 'groups_custom_group_fields_editable' ); // @Deprecated 93 94 wp_nonce_field( 'groups_create_save_group-details' ); ?> 95 96 <?php endif; ?> 97 98 <?php /* Group creation step 2: Group settings */ ?> 99 <?php if ( bp_is_group_creation_step( 'group-settings' ) ) : ?> 100 101 <h2 class="bp-screen-reader-text"><?php 102 /* translators: accessibility text */ 103 _e( 'Group Settings', 'buddypress' ); 104 ?></h2> 105 106 <?php 107 108 /** 109 * Fires before the display of the group settings creation step. 110 * 111 * @since 1.1.0 112 */ 113 do_action( 'bp_before_group_settings_creation_step' ); ?> 114 115 <fieldset class="group-create-privacy"> 116 117 <legend><?php _e( 'Privacy Options', 'buddypress' ); ?></legend> 118 119 <div class="radio"> 120 121 <label for="group-status-public"><input type="radio" name="group-status" id="group-status-public" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <?php _e( 'This is a public group', 'buddypress' ); ?></label> 122 123 <ul id="public-group-description"> 124 <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li> 125 <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li> 126 <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li> 127 </ul> 128 129 <label for="group-status-private"><input type="radio" name="group-status" id="group-status-private" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <?php _e( 'This is a private group', 'buddypress' ); ?></label> 130 131 <ul id="private-group-description"> 132 <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li> 133 <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li> 134 <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li> 135 </ul> 136 137 <label for="group-status-hidden"><input type="radio" name="group-status" id="group-status-hidden" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <?php _e('This is a hidden group', 'buddypress' ); ?></label> 138 139 <ul id="hidden-group-description"> 140 <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li> 141 <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li> 142 <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li> 143 </ul> 144 145 </div> 146 147 </fieldset> 148 149 <?php // Group type selection ?> 150 <?php if ( $group_types = bp_groups_get_group_types( array( 'show_in_create_screen' => true ), 'objects' ) ): ?> 151 152 <fieldset class="group-create-types"> 153 <legend><?php _e( 'Group Types', 'buddypress' ); ?></legend> 154 155 <p><?php _e( 'Select the types this group should be a part of.', 'buddypress' ); ?></p> 156 157 <?php foreach ( $group_types as $type ) : ?> 158 <div class="checkbox"> 159 <label for="<?php printf( 'group-type-%s', $type->name ); ?>"><input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php checked( true, ! empty( $type->create_screen_checked ) ); ?> /> <?php echo esc_html( $type->labels['name'] ); ?> 160 <?php 161 if ( ! empty( $type->description ) ) { 162 /* translators: Group type description shown when creating a group. */ 163 printf( __( '– %s', 'buddypress' ), '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' ); 164 } 165 ?> 166 </label> 167 </div> 168 169 <?php endforeach; ?> 170 171 </fieldset> 172 173 <?php endif; ?> 174 175 <fieldset class="group-create-invitations"> 176 177 <legend><?php _e( 'Group Invitations', 'buddypress' ); ?></legend> 178 179 <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p> 180 181 <div class="radio"> 182 183 <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php _e( 'All group members', 'buddypress' ); ?></label> 184 185 <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ); ?></label> 186 187 <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php _e( 'Group admins only', 'buddypress' ); ?></label> 188 189 </div> 190 191 </fieldset> 192 193 <?php 194 195 /** 196 * Fires after the display of the group settings creation step. 197 * 198 * @since 1.1.0 199 */ 200 do_action( 'bp_after_group_settings_creation_step' ); ?> 201 202 <?php wp_nonce_field( 'groups_create_save_group-settings' ); ?> 203 204 <?php endif; ?> 205 206 <?php /* Group creation step 3: Avatar Uploads */ ?> 207 <?php if ( bp_is_group_creation_step( 'group-avatar' ) ) : ?> 208 209 <h2 class="bp-screen-reader-text"><?php 210 /* translators: accessibility text */ 211 _e( 'Group Avatar', 'buddypress' ); 212 ?></h2> 213 214 <?php 215 216 /** 217 * Fires before the display of the group avatar creation step. 218 * 219 * @since 1.1.0 220 */ 221 do_action( 'bp_before_group_avatar_creation_step' ); ?> 222 223 <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?> 224 225 <div class="left-menu"> 226 227 <?php bp_new_group_avatar(); ?> 228 229 </div><!-- .left-menu --> 230 231 <div class="main-column"> 232 <p><?php _e( "Upload an image to use as a profile photo for this group. The image will be shown on the main group page, and in search results.", 'buddypress' ); ?></p> 233 234 <p> 235 <label for="file" class="bp-screen-reader-text"><?php 236 /* translators: accessibility text */ 237 _e( 'Select an image', 'buddypress' ); 238 ?></label> 239 <input type="file" name="file" id="file" /> 240 <input type="submit" name="upload" id="upload" value="<?php esc_attr_e( 'Upload Image', 'buddypress' ); ?>" /> 241 <input type="hidden" name="action" id="action" value="bp_avatar_upload" /> 242 </p> 243 244 <p><?php _e( 'To skip the group profile photo upload process, hit the "Next Step" button.', 'buddypress' ); ?></p> 245 </div><!-- .main-column --> 246 247 <?php 248 /** 249 * Load the Avatar UI templates 250 * 251 * @since 2.3.0 252 */ 253 bp_avatar_get_templates(); ?> 254 255 <?php endif; ?> 256 257 <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> 258 259 <h4><?php _e( 'Crop Group Profile Photo', 'buddypress' ); ?></h4> 260 261 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Profile photo to crop', 'buddypress' ); ?>" /> 262 263 <div id="avatar-crop-pane"> 264 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php esc_attr_e( 'Profile photo preview', 'buddypress' ); ?>" /> 265 </div> 266 267 <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php esc_attr_e( 'Crop Image', 'buddypress' ); ?>" /> 268 269 <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" /> 270 <input type="hidden" name="upload" id="upload" /> 271 <input type="hidden" id="x" name="x" /> 272 <input type="hidden" id="y" name="y" /> 273 <input type="hidden" id="w" name="w" /> 274 <input type="hidden" id="h" name="h" /> 275 276 <?php endif; ?> 277 278 <?php 279 280 /** 281 * Fires after the display of the group avatar creation step. 282 * 283 * @since 1.1.0 284 */ 285 do_action( 'bp_after_group_avatar_creation_step' ); ?> 286 287 <?php wp_nonce_field( 'groups_create_save_group-avatar' ); ?> 288 289 <?php endif; ?> 290 291 <?php /* Group creation step 4: Cover image */ ?> 292 <?php if ( bp_is_group_creation_step( 'group-cover-image' ) ) : ?> 293 294 <h2 class="bp-screen-reader-text"><?php 295 /* translators: accessibility text */ 296 _e( 'Cover Image', 'buddypress' ); 297 ?></h2> 298 299 <?php 300 301 /** 302 * Fires before the display of the group cover image creation step. 303 * 304 * @since 2.4.0 305 */ 306 do_action( 'bp_before_group_cover_image_creation_step' ); ?> 307 308 <div id="header-cover-image"></div> 309 310 <p><?php _e( 'The Cover Image will be used to customize the header of your group.', 'buddypress' ); ?></p> 311 312 <?php bp_attachments_get_template_part( 'cover-images/index' ); ?> 313 314 <?php 315 316 /** 317 * Fires after the display of the group cover image creation step. 318 * 319 * @since 2.4.0 320 */ 321 do_action( 'bp_after_group_cover_image_creation_step' ); ?> 322 323 <?php wp_nonce_field( 'groups_create_save_group-cover-image' ); ?> 324 325 <?php endif; ?> 326 327 <?php /* Group creation step 5: Invite friends to group */ ?> 328 <?php if ( bp_is_group_creation_step( 'group-invites' ) ) : ?> 329 330 <h2 class="bp-screen-reader-text"><?php 331 /* translators: accessibility text */ 332 _e( 'Group Invites', 'buddypress' ); 333 ?></h2> 334 335 <?php 336 337 /** 338 * Fires before the display of the group invites creation step. 339 * 340 * @since 1.1.0 341 */ 342 do_action( 'bp_before_group_invites_creation_step' ); ?> 343 344 <?php if ( bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> 345 346 <div class="left-menu"> 347 348 <div id="invite-list"> 349 <ul> 350 <?php bp_new_group_invite_friend_list(); ?> 351 </ul> 352 353 <?php wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' ); ?> 354 </div> 355 356 </div><!-- .left-menu --> 357 358 <div class="main-column"> 359 360 <div id="message" class="info"> 361 <p><?php _e('Select people to invite from your friends list.', 'buddypress' ); ?></p> 362 </div> 363 364 <?php /* The ID 'friend-list' is important for AJAX support. */ ?> 365 <ul id="friend-list" class="item-list"> 366 367 <?php if ( bp_group_has_invites() ) : ?> 368 369 <?php while ( bp_group_invites() ) : bp_group_the_invite(); ?> 370 371 <li id="<?php bp_group_invite_item_id(); ?>"> 372 373 <?php bp_group_invite_user_avatar(); ?> 374 375 <h4><?php bp_group_invite_user_link(); ?></h4> 376 <span class="activity"><?php bp_group_invite_user_last_active(); ?></span> 377 378 <div class="action"> 379 <a class="remove" href="<?php bp_group_invite_user_remove_invite_url(); ?>" id="<?php bp_group_invite_item_id(); ?>"><?php _e( 'Remove Invite', 'buddypress' ); ?></a> 380 </div> 381 </li> 382 383 <?php endwhile; ?> 384 385 <?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites' ); ?> 386 387 <?php endif; ?> 388 389 </ul> 390 391 </div><!-- .main-column --> 392 393 <?php else : ?> 394 395 <div id="message" class="info"> 396 <p><?php _e( 'Once you have built up friend connections you will be able to invite others to your group.', 'buddypress' ); ?></p> 397 </div> 398 399 <?php endif; ?> 400 401 <?php wp_nonce_field( 'groups_create_save_group-invites' ); ?> 402 403 <?php 404 405 /** 406 * Fires after the display of the group invites creation step. 407 * 408 * @since 1.1.0 409 */ 410 do_action( 'bp_after_group_invites_creation_step' ); ?> 411 412 <?php endif; ?> 413 414 <?php 415 416 /** 417 * Fires inside the group admin template. 418 * 419 * Allows plugins to add custom group creation steps. 420 * 421 * @since 1.1.0 422 */ 423 do_action( 'groups_custom_create_steps' ); ?> 424 425 <?php 426 427 /** 428 * Fires before the display of the group creation step buttons. 429 * 430 * @since 1.1.0 431 */ 432 do_action( 'bp_before_group_creation_step_buttons' ); ?> 433 434 <?php if ( 'crop-image' != bp_get_avatar_admin_step() ) : ?> 435 436 <div class="submit" id="previous-next"> 437 438 <?php /* Previous Button */ ?> 439 <?php if ( !bp_is_first_group_creation_step() ) : ?> 440 441 <input type="button" value="<?php esc_attr_e( 'Back to Previous Step', 'buddypress' ); ?>" id="group-creation-previous" name="previous" onclick="location.href='<?php bp_group_creation_previous_link(); ?>'" /> 442 443 <?php endif; ?> 444 445 <?php /* Next Button */ ?> 446 <?php if ( !bp_is_last_group_creation_step() && !bp_is_first_group_creation_step() ) : ?> 447 448 <input type="submit" value="<?php esc_attr_e( 'Next Step', 'buddypress' ); ?>" id="group-creation-next" name="save" /> 449 450 <?php endif;?> 451 452 <?php /* Create Button */ ?> 453 <?php if ( bp_is_first_group_creation_step() ) : ?> 454 455 <input type="submit" value="<?php esc_attr_e( 'Create Group and Continue', 'buddypress' ); ?>" id="group-creation-create" name="save" /> 456 457 <?php endif; ?> 458 459 <?php /* Finish Button */ ?> 460 <?php if ( bp_is_last_group_creation_step() ) : ?> 461 462 <input type="submit" value="<?php esc_attr_e( 'Finish', 'buddypress' ); ?>" id="group-creation-finish" name="save" /> 463 464 <?php endif; ?> 465 </div> 466 467 <?php endif;?> 468 469 <?php 470 471 /** 472 * Fires after the display of the group creation step buttons. 473 * 474 * @since 1.1.0 475 */ 476 do_action( 'bp_after_group_creation_step_buttons' ); ?> 477 478 <?php /* Don't leave out this hidden field */ ?> 479 <input type="hidden" name="group_id" id="group_id" value="<?php bp_new_group_id(); ?>" /> 480 481 <?php 482 483 /** 484 * Fires and displays the groups directory content. 485 * 486 * @since 1.1.0 487 */ 488 do_action( 'bp_directory_groups_content' ); ?> 489 490 </div><!-- .item-body --> 491 492 <?php 493 494 /** 495 * Fires after the display of group creation. 496 * 497 * @since 1.2.0 498 */ 499 do_action( 'bp_after_create_group' ); ?> 500 501 </form> 502 503 <?php 504 505 /** 506 * Fires after the display of group creation content. 507 * 508 * @since 1.6.0 509 */ 510 do_action( 'bp_after_create_group_content_template' ); ?> 511 512 </div> 513 514 <?php 515 516 /** 517 * Fires at the bottom of the groups creation template file. 518 * 519 * @since 1.7.0 520 */ 521 do_action( 'bp_after_create_group_page' );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Jan 25 01:01:33 2021 | Cross-referenced by PHPXref 0.7.1 |