XProfile_Group::delete( $args,  $assoc_args )

Delete specific XProfile field group(s).


Description Description

Top ↑

OPTIONS OPTIONS

… : ID or IDs for the field group.
[–yes] : Answer yes to the confirmation message.
## EXAMPLE
$ wp bp xprofile group delete 500 –yes


Source Source

File: cli/src/xprofile-group.php

	public function delete( $args, $assoc_args ) {
		WP_CLI::confirm( 'Are you sure you want to delete this field group?', $assoc_args );

		parent::_delete( $args, $assoc_args, function( $field_group_id ) {
			if ( xprofile_delete_field_group( $field_group_id ) ) {
				return array( 'success', 'Field group deleted.' );
			} else {
				return array( 'error', 'Could not delete the field group.' );
			}
		} );
	}


Top ↑

User Contributed Notes User Contributed Notes

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