action
Fires after a user's avatar has been deleted.
Parameters of davo_profile_avatar_deleted Parameter Type Description $user_id int WordPress user ID.
add_action Copyadd_action ( 'davo_profile_avatar_deleted' , 'my_action_callback' , 10 , 1 );
/**
* @param int $user_id
*/
function my_action_callback ( $user_id ) {
// Your code here.
}src/domains/profile/repository.php:1059
filter
Filters whether the current user may change another user's avatar.
Only consulted when the current user is neither the owner nor a site admin.
Parameters of davo_profile_can_manage_avatar Parameter Type Description $can_manage bool Whether the change is allowed. Default false. $target_user_id int User whose avatar would change. $current_user int User making the request.
add_filter Copyadd_filter ( 'davo_profile_can_manage_avatar' , 'my_filter_callback' , 10 , 3 );
/**
* @param bool $can_manage
* @param int $target_user_id
* @param int $current_user
*/
function my_filter_callback ( $can_manage , $target_user_id , $current_user ) {
// Change $can_manage as needed, then return it.
return $can_manage ;
}src/domains/profile/routes.php:496, and 1 more place
filter
Filter the field/weight pairs used to compute the profile completion score.
Each element must be a two-element array: [ field_key (string), weight (int) ]. avatar is a virtual key checked against $avatar_id, not a real profile key.
Parameters of davo_profile_completion_fields Parameter Type Description $fields array<array{string, int}> Default field/weight pairs. $profile array<string, mixed> Raw profile array. $avatar_id int Avatar attachment ID.
add_filter Copyadd_filter ( 'davo_profile_completion_fields' , 'my_filter_callback' , 10 , 3 );
/**
* @param array<array{string, int}> $fields
* @param array<string, mixed> $profile
* @param int $avatar_id
*/
function my_filter_callback ( $fields , $profile , $avatar_id ) {
// Change $fields as needed, then return it.
return $fields ;
}src/domains/profile/helpers.php:510
action
Fires after a user's cover image has been deleted.
Parameters of davo_profile_cover_deleted Parameter Type Description $user_id int WordPress user ID.
add_action Copyadd_action ( 'davo_profile_cover_deleted' , 'my_action_callback' , 10 , 1 );
/**
* @param int $user_id
*/
function my_action_callback ( $user_id ) {
// Your code here.
}src/domains/profile/repository.php:1127
filter
Filter the full profile response before it is returned.
Parameters of davo_profile_data Parameter Type Description $profile array<string, mixed> Profile data array. $user_id int Profile owner user ID. $viewing_user_id int Viewing user ID (0 = guest).
add_filter Copyadd_filter ( 'davo_profile_data' , 'my_filter_callback' , 10 , 3 );
/**
* @param array<string, mixed> $profile
* @param int $user_id
* @param int $viewing_user_id
*/
function my_filter_callback ( $profile , $user_id , $viewing_user_id ) {
// Change $profile as needed, then return it.
return $profile ;
}src/domains/profile/repository.php:660
filter
Hydrate registry-public activity through the Activity read service.
Parameters of davo_profile_initial_activity Parameter Type Description $timeline array|null First page or null when unavailable. $user_id int Profile author. $section string Requested section. $viewer_id int Current viewer; the public visibility constraint remains enforced.
add_filter Copyadd_filter ( 'davo_profile_initial_activity' , 'my_filter_callback' , 10 , 4 );
/**
* @param array|null $timeline
* @param int $user_id
* @param string $section
* @param int $viewer_id
*/
function my_filter_callback ( $timeline , $user_id , $section , $viewer_id ) {
// Change $timeline as needed, then return it.
return $timeline ;
}src/domains/profile/initializer.php:685
filter
Read author content through its owning domain, with guest visibility for public attribution.
Parameters of davo_profile_initial_content Parameter Type Description $content array|null Prepared author page. $user_id int Profile author. $kind string Resource kind. $viewer_id int Guest viewer (0). $page int Page number, defaulting to 1 for template hydration.
add_filter Copyadd_filter ( 'davo_profile_initial_content' , 'my_filter_callback' , 10 , 5 );
/**
* @param array|null $content
* @param int $user_id
* @param string $kind
* @param int $viewer_id
* @param int $page
*/
function my_filter_callback ( $content , $user_id , $kind , $viewer_id , $page ) {
// Change $content as needed, then return it.
return $content ;
}src/domains/profile/repository.php:114, and 1 more place
filter
Filters the navigation items shown on a member profile. Items are sorted by their order value.
Parameters of davo_profile_nav_items Parameter Type Description $items array<int, array<string, mixed>> Navigation items. Empty by default. $user_id int The profile owner's user ID. $viewing_user_id int The viewing user's ID.
Returns array<int, array<string, mixed>>
add_filter Copyadd_filter ( 'davo_profile_nav_items' , 'my_filter_callback' , 10 , 3 );
/**
* @param array<int, array<string, mixed>> $items
* @param int $user_id
* @param int $viewing_user_id
*/
function my_filter_callback ( $items , $user_id , $viewing_user_id ) {
// Change $items as needed, then return it.
return $items ;
}src/domains/profile/repository.php:648
action
Fires when syncing user_nicename to a newly changed Davo slug fails. The Davo slug change itself has already succeeded.
Parameters of davo_profile_nicename_sync_failed Parameter Type Description $user_id int WordPress user ID. $slug string The slug that failed to sync. $error WP_Error The resulting error from wp_update_user().
add_action Copyadd_action ( 'davo_profile_nicename_sync_failed' , 'my_action_callback' , 10 , 3 );
/**
* @param int $user_id
* @param string $slug
* @param WP_Error $error
*/
function my_action_callback ( $user_id , $slug , $error ) {
// Your code here.
}src/domains/profile/repository.php:448
filter
Filters the browser tab title of a member profile page. Defaults to the member's display name followed by "Member Profile".
Parameters of davo_profile_page_title Parameter Type Description $title string Page title. $profile array<string, mixed> The profile being shown.
Returns string
add_filter Copyadd_filter ( 'davo_profile_page_title' , 'my_filter_callback' , 10 , 2 );
/**
* @param string $title
* @param array<string, mixed> $profile
*/
function my_filter_callback ( $title , $profile ) {
// Change $title as needed, then return it.
return $title ;
}src/domains/profile/templates/profile-page.php:69
action
Fires after a user's profile slug has been successfully changed.
Parameters of davo_profile_slug_changed Parameter Type Description $user_id int WordPress user ID. $new_slug string The newly active slug. $old_slug string The previous active slug, or empty string.
add_action Copyadd_action ( 'davo_profile_slug_changed' , 'my_action_callback' , 10 , 3 );
/**
* @param int $user_id
* @param string $new_slug
* @param string $old_slug
*/
function my_action_callback ( $user_id , $new_slug , $old_slug ) {
// Your code here.
}src/domains/profile/repository.php:458
filter
Filter the profile stats for a user.
Other domains hook here to contribute their own content counts. Do NOT add persistent caching inside this hook — the outer get_stats() call already caches the assembled result.
Parameters of davo_profile_stats Parameter Type Description $stats array<string, int> Current stats array. $user_id int WordPress user ID.
add_filter Copyadd_filter ( 'davo_profile_stats' , 'my_filter_callback' , 10 , 2 );
/**
* @param array<string, int> $stats
* @param int $user_id
*/
function my_filter_callback ( $stats , $user_id ) {
// Change $stats as needed, then return it.
return $stats ;
}src/domains/profile/repository.php:1179
filter
Retrieve the resolved profile data for the current slug.
The Profile_Initializer hooks into this filter to provide the data. Returns null when the slug results in a 404 (the redirect case is handled earlier in template_redirect — by the time we arrive here the slug is always current).
Parameters of davo_profile_template_data Parameter Type Description $data array<string,mixed>|null Null initially. $slug string Profile slug from the URL.
add_filter Copyadd_filter ( 'davo_profile_template_data' , 'my_filter_callback' , 10 , 2 );
/**
* @param array<string,mixed>|null $data
* @param string $slug
*/
function my_filter_callback ( $data , $slug ) {
// Change $data as needed, then return it.
return $data ;
}src/domains/profile/templates/profile-page.php:37