BP_XProfile_ProfileData::delete_for_field( int $field_id )

Delete field.


Parameters Parameters

$field_id

(int) (Required) ID of the field to delete.


Top ↑

Return Return

(bool)


Source Source

File: bp-xprofile/classes/class-bp-xprofile-profiledata.php

	public static function delete_for_field( $field_id ) {
		global $wpdb;

		$bp      = buddypress();
		$deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_data} WHERE field_id = %d", $field_id ) );
		if ( empty( $deleted ) || is_wp_error( $deleted ) ) {
			return false;
		}

		return true;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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