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

	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

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.