This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BP_XProfile_Field::submit_metabox( string $button_text = '' )
Private method used to display the submit metabox.
Description
Parameters
- $button_text
-
(Optional) Text to put on button.
Default value: ''
Source
File: bp-xprofile/classes/class-bp-xprofile-field.php
1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 | private function submit_metabox( $button_text = '' ) { // Setup the URL for deleting $users_url = bp_get_admin_url( 'admin.php' ); $cancel_url = add_query_arg( array ( 'page' => 'bp-profile-setup' ), $users_url ); /** * Fires before XProfile Field submit metabox. * * @since BuddyPress 2.1.0 * * @param BP_XProfile_Field $this Current XProfile field. */ do_action( 'xprofile_field_before_submitbox' , $this ); ?> <div id= "submitdiv" class = "postbox" > <h2><?php esc_html_e( 'Submit' , 'buddyboss' ); ?></h2> <div class = "inside" > <div id= "submitcomment" class = "submitbox" > <div id= "major-publishing-actions" > <?php /** * Fires at the beginning of the XProfile Field publishing actions section. * * @since BuddyPress 2.1.0 * * @param BP_XProfile_Field $this Current XProfile field. */ do_action( 'xprofile_field_submitbox_start' , $this ); ?> <input type= "hidden" name= "field_order" id= "field_order" value= "<?php echo esc_attr( $this->field_order ); ?>" /> <?php if ( ! empty ( $button_text ) ) : ?> <div id= "publishing-action" > <input type= "submit" name= "saveField" value= "<?php echo esc_attr( $button_text ); ?>" class = "button-primary" /> </div> <?php endif ; ?> <div id= "delete-action" > <a href= "<?php echo esc_url( $cancel_url ); ?>" class = "deletion" ><?php esc_html_e( 'Cancel' , 'buddyboss' ); ?></a> </div> <?php wp_nonce_field( 'xprofile_delete_option' ); ?> <div class = "clear" ></div> </div> </div> </div> </div> <?php /** * Fires after XProfile Field submit metabox. * * @since BuddyPress 2.1.0 * * @param BP_XProfile_Field $this Current XProfile field. */ do_action( 'xprofile_field_after_submitbox' , $this ); } |
Changelog
Version | Description |
---|---|
BuddyPress 2.3.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.