Changeset 5598 for trunk/bp-xprofile/bp-xprofile-classes.php
- Timestamp:
- 12/24/2011 06:01:22 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile/bp-xprofile-classes.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-classes.php
r5489 r5598 374 374 } 375 375 376 function delete() { 377 global $wpdb, $bp; 378 379 if ( !$this->id || 380 /* Prevent deletion by url when can_delete is false. */ 381 !$this->can_delete || 382 /* Prevent deletion of option 1 since this invalidates fields with options. */ 383 ( $this->parent_id && $this->option_order == 1 ) ) 376 function delete( $delete_data = false ) { 377 global $wpdb, $bp; 378 379 // Prevent deletion if no ID is present 380 // Prevent deletion by url when can_delete is false. 381 // Prevent deletion of option 1 since this invalidates fields with options. 382 if ( !$this->id || !$this->can_delete || ( $this->parent_id && $this->option_order == 1 ) ) 384 383 return false; 385 384 … … 387 386 return false; 388 387 389 /* delete the data in the DB for this field */ 390 BP_XProfile_ProfileData::delete_for_field( $this->id ); 388 // delete the data in the DB for this field 389 if ( true === $delete_data ) 390 BP_XProfile_ProfileData::delete_for_field( $this->id ); 391 391 392 392 return true;
Note: See TracChangeset
for help on using the changeset viewer.