Fires just before an account is permanently deleted.
Other domains should hook here to clean up their own user data before the WordPress user row is removed. Profile_Initializer also hooks the native 'delete_user' action (which fires inside wp_delete_user()) as a secondary cleanup path for admin-initiated deletions.
Parameters of davo_account_before_deletion
Parameter
Type
Description
$user_id
int
WordPress user ID about to be deleted.
add_action
add_action( 'davo_account_before_deletion', 'my_action_callback', 10, 1 );
/**
* @param int $user_id
*/functionmy_action_callback( $user_id ) {
// Your code here.
}
Retrieve the data needed to hydrate the account settings shell.
Profile_Initializer hooks into this filter to provide it — same filter-as-data-provider pattern as davo_profile_template_data, kept consistent even though only one domain currently hooks it.
Parameters of davo_account_settings_template_data
Parameter
Type
Description
$data
array<string,mixed>|null
Null initially.
$user_id
int
Current user ID.
add_filter
add_filter( 'davo_account_settings_template_data', 'my_filter_callback', 10, 2 );
/**
* @param array<string,mixed>|null $data
* @param int $user_id
*/functionmy_filter_callback( $data, $user_id ) {
// Change $data as needed, then return it.return$data;
}
Filters the sections shown on the account settings screen. Other domains add theirs here.
Parameters of davo_profile_settings_sections
Parameter
Type
Description
$sections
array
Sections to show. Empty by default.
$user_id
int
WordPress user ID.
Returnsarray
add_filter
add_filter( 'davo_profile_settings_sections', 'my_filter_callback', 10, 2 );
/**
* @param array $sections
* @param int $user_id
*/functionmy_filter_callback( $sections, $user_id ) {
// Change $sections as needed, then return it.return$sections;
}
src/domains/account/initializer.php:274
Note. Generated from the plugin source. Descriptions and parameters are the ones written in the code. The starter code uses the parameter names from those comments, or generic names where there are none, so check them against your use.