Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/07/2018 06:48:42 AM (8 years ago)
Author:
offereins
Message:

XProfile: add context parameter to field deletion actions

Passes the $delete_data parameter to the 'xprofile_field_before_delete'
and 'xprofile_field_after_delete' hooks, to provide context for whether
data is deleted along with the field.

Fixes #7686.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php

    r11845 r11846  
    350350                 * @since 3.0.0
    351351                 *
    352                  * @param BP_XProfile_Field $this Current instance of the field being deleted. Passed by reference.
     352                 * @param BP_XProfile_Field $this        Current instance of the field being deleted. Passed by reference.
     353                 * @param bool              $delete_data Whether or not to delete data.
    353354                 */
    354                 do_action_ref_array( 'xprofile_field_before_delete', array( &$this ) );
     355                do_action_ref_array( 'xprofile_field_before_delete', array( &$this, $delete_data ) );
    355356
    356357                $bp  = buddypress();
     
    371372                 * @since 3.0.0
    372373                 *
    373                  * @param BP_XProfile_Field $this Current instance of the field being deleted. Passed by reference.
     374                 * @param BP_XProfile_Field $this        Current instance of the field being deleted. Passed by reference.
     375                 * @param bool              $delete_data Whether or not to delete data.
    374376                 */
    375                 do_action_ref_array( 'xprofile_field_after_delete', array( &$this ) );
     377                do_action_ref_array( 'xprofile_field_after_delete', array( &$this, $delete_data ) );
    376378
    377379                return true;
Note: See TracChangeset for help on using the changeset viewer.