bp_nouveau_get_submit_button( string $action = '' )

Get Some submit buttons data.


Parameters Parameters

$action

(string) (Optional) The action requested.

Default value: ''


Top ↑

Return Return

(array|false) The list of the submit button parameters for the requested action False if no actions were found.


Source Source

File: bp-templates/bp-nouveau/includes/functions.php

function bp_nouveau_get_submit_button( $action = '' ) {
	if ( empty( $action ) ) {
		return false;
	}

	/**
	 * Filter the Submit buttons to add your own.
	 *
	 * @since 3.0.0
	 * @since 8.0.0 Adds the 'member-send-invite' button.
	 *
	 * @param array $value The list of submit buttons.
	 *
	 * @return array|false
	 */
	$actions = apply_filters(
		'bp_nouveau_get_submit_button',
		array(
			'register'                      => array(
				'before'     => 'bp_before_registration_submit_buttons',
				'after'      => 'bp_after_registration_submit_buttons',
				'nonce'      => 'bp_new_signup',
				'attributes' => array(
					'name'  => 'signup_submit',
					'id'    => 'submit',
					'value' => __( 'Complete Sign Up', 'buddypress' ),
				),
			),
			'member-profile-edit'           => array(
				'before'     => '',
				'after'      => '',
				'nonce'      => 'bp_xprofile_edit',
				'attributes' => array(
					'name'  => 'profile-group-edit-submit',
					'id'    => 'profile-group-edit-submit',
					'value' => __( 'Save Changes', 'buddypress' ),
				),
			),
			'member-capabilities'           => array(
				'before'     => 'bp_members_capabilities_account_before_submit',
				'after'      => 'bp_members_capabilities_account_after_submit',
				'nonce'      => 'capabilities',
				'attributes' => array(
					'name'  => 'capabilities-submit',
					'id'    => 'capabilities-submit',
					'value' => __( 'Save', 'buddypress' ),
				),
			),
			'member-delete-account'         => array(
				'before'     => 'bp_members_delete_account_before_submit',
				'after'      => 'bp_members_delete_account_after_submit',
				'nonce'      => 'delete-account',
				'attributes' => array(
					'disabled' => 'disabled',
					'name'     => 'delete-account-button',
					'id'       => 'delete-account-button',
					'value'    => __( 'Delete Account', 'buddypress' ),
				),
			),
			'members-general-settings'      => array(
				'before'     => 'bp_core_general_settings_before_submit',
				'after'      => 'bp_core_general_settings_after_submit',
				'nonce'      => 'bp_settings_general',
				'attributes' => array(
					'name'  => 'submit',
					'id'    => 'submit',
					'value' => __( 'Save Changes', 'buddypress' ),
					'class' => 'auto',
				),
			),
			'member-notifications-settings' => array(
				'before'     => 'bp_members_notification_settings_before_submit',
				'after'      => 'bp_members_notification_settings_after_submit',
				'nonce'      => 'bp_settings_notifications',
				'attributes' => array(
					'name'  => 'submit',
					'id'    => 'submit',
					'value' => __( 'Save Changes', 'buddypress' ),
					'class' => 'auto',
				),
			),
			'members-profile-settings'      => array(
				'before'     => 'bp_core_xprofile_settings_before_submit',
				'after'      => 'bp_core_xprofile_settings_after_submit',
				'nonce'      => 'bp_xprofile_settings',
				'attributes' => array(
					'name'  => 'xprofile-settings-submit',
					'id'    => 'submit',
					'value' => __( 'Save Changes', 'buddypress' ),
					'class' => 'auto',
				),
			),
			'member-group-invites'          => array(
				'nonce'      => 'bp_nouveau_group_invites_settings',
				'attributes' => array(
					'name'  => 'member-group-invites-submit',
					'id'    => 'submit',
					'value' => __( 'Save', 'buddypress' ),
					'class' => 'auto',
				),
			),
			'member-send-invite'            => array(
				'nonce'                   => 'bp_members_invitation_send_%d',
				'nonce_placeholder_value' => bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id(),
				'attributes'              => array(
					'name'  => 'member-send-invite-submit',
					'id'    => 'submit',
					'value' => __( 'Send', 'buddypress' ),
					'class' => 'auto',
				),
			),
			'activity-new-comment'          => array(
				'after'      => 'bp_activity_entry_comments',
				'nonce'      => 'new_activity_comment',
				'nonce_key'  => '_wpnonce_new_activity_comment',
				'wrapper'    => false,
				'attributes' => array(
					'name'  => 'ac_form_submit',
					'value' => _x( 'Post', 'button', 'buddypress' ),
				),
			),
		)
	);

	if ( isset( $actions[ $action ] ) ) {
		return $actions[ $action ];
	}

	return false;
}


Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Adds the 'member-send-invite' button.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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