Skip to:
Content

BuddyPress.org

Ticket #7600: 7600.patch

File 7600.patch, 1.1 KB (added by mechter, 2 years ago)
  • src/bp-xprofile/classes/class-bp-xprofile-field.php

     
    344344                        return false;
    345345                }
    346346
     347                /**
     348                 * Fires before the current field instance gets deleted.
     349                 *
     350                 * @since 3.0.0
     351                 *
     352                 * @param BP_XProfile_Field $this Current instance of the field being deleted. Passed by reference.
     353                 */
     354                do_action_ref_array( 'xprofile_field_before_delete', array( &$this ) );
     355
    347356                $bp  = buddypress();
    348357                $sql = $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_fields} WHERE id = %d OR parent_id = %d", $this->id, $this->id );
    349358
     
    356365                        BP_XProfile_ProfileData::delete_for_field( $this->id );
    357366                }
    358367
     368                /**
     369                 * Fires after the current field instance gets deleted.
     370                 *
     371                 * @since 3.0.0
     372                 *
     373                 * @param BP_XProfile_Field $this Current instance of the field being deleted. Passed by reference.
     374                 */
     375                do_action_ref_array( 'xprofile_field_after_delete', array( &$this ) );
     376
    359377                return true;
    360378        }
    361379