filter
Filter: 'davo_accessible_post_types' - Allow changing the accessible post types.
Parameters of davo_accessible_post_types Parameter Type Description $post_types array The public post types.
add_filter Copyadd_filter ( 'davo_accessible_post_types' , 'my_filter_callback' , 10 , 1 );
/**
* @param array $post_types
*/
function my_filter_callback ( $post_types ) {
// Change $post_types as needed, then return it.
return $post_types ;
}src/helpers/post-type-helper.php:61
filter
Filter the cookie consent categories metadata and storage inventory shown in the preferences dialog.
Parameters of davo_cookie_consent_categories Parameter Type Description $categories array<int, array<string, mixed>> Categories metadata array.
add_filter Copyadd_filter ( 'davo_cookie_consent_categories' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<int, array<string, mixed>> $categories
*/
function my_filter_callback ( $categories ) {
// Change $categories as needed, then return it.
return $categories ;
}src/helpers/cookie-consent-helper.php:564
filter
Filter the resolved cookie consent mode for the current request.
Parameters of davo_cookie_consent_effective_mode Parameter Type Description $effective string Resolved mode ('opt_in' or 'opt_out'). $configured string Configured mode ('opt_in', 'opt_out', or 'auto_region').
add_filter Copyadd_filter ( 'davo_cookie_consent_effective_mode' , 'my_filter_callback' , 10 , 2 );
/**
* @param string $effective
* @param string $configured
*/
function my_filter_callback ( $effective , $configured ) {
// Change $effective as needed, then return it.
return $effective ;
}src/helpers/cookie-consent-helper.php:254
filter
Filter whether Davo's native cookie consent system is active.
Parameters of davo_cookie_consent_enabled Parameter Type Description $enabled bool Whether the native banner and consent engine should run.
add_filter Copyadd_filter ( 'davo_cookie_consent_enabled' , 'my_filter_callback' , 10 , 1 );
/**
* @param bool $enabled
*/
function my_filter_callback ( $enabled ) {
// Change $enabled as needed, then return it.
return $enabled ;
}src/helpers/cookie-consent-helper.php:170
filter
Filter whether an external cookie consent management platform (CMP) is active.
Parameters of davo_cookie_consent_external_cmp_detected Parameter Type Description $detected bool Whether a third-party CMP was detected.
add_filter Copyadd_filter ( 'davo_cookie_consent_external_cmp_detected' , 'my_filter_callback' , 10 , 1 );
/**
* @param bool $detected
*/
function my_filter_callback ( $detected ) {
// Change $detected as needed, then return it.
return $detected ;
}src/helpers/cookie-consent-helper.php:150
filter
Filter the frontend cookie consent configuration object.
Parameters of davo_cookie_consent_frontend_config Parameter Type Description $config array<string, mixed> Frontend configuration payload.
add_filter Copyadd_filter ( 'davo_cookie_consent_frontend_config' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<string, mixed> $config
*/
function my_filter_callback ( $config ) {
// Change $config as needed, then return it.
return $config ;
}src/helpers/cookie-consent-helper.php:623
filter
Filter whether consent is granted for a category.
Parameters of davo_cookie_consent_has_consent Parameter Type Description $granted bool Whether consent is granted. $category string Consent category slug.
add_filter Copyadd_filter ( 'davo_cookie_consent_has_consent' , 'my_filter_callback' , 10 , 2 );
/**
* @param bool $granted
* @param string $category
*/
function my_filter_callback ( $granted , $category ) {
// Change $granted as needed, then return it.
return $granted ;
}src/helpers/cookie-consent-helper.php:407, and 2 more places
filter
Filter the map of WordPress script handles to Davo cookie consent categories.
Example: array( 'ga4-gtag' => 'analytics', 'youtube-embed' => 'marketing' )
Parameters of davo_cookie_consent_script_handles Parameter Type Description $handle_map array<string, string> Map of script handle => consent category.
add_filter Copyadd_filter ( 'davo_cookie_consent_script_handles' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<string, string> $handle_map
*/
function my_filter_callback ( $handle_map ) {
// Change $handle_map as needed, then return it.
return $handle_map ;
}src/helpers/cookie-consent-helper.php:654
filter
Filter the list of country codes that require strict opt-in consent.
Parameters of davo_cookie_consent_strict_opt_in_countries Parameter Type Description $countries string[] List of uppercase ISO 3166-1 alpha-2 country codes.
add_filter Copyadd_filter ( 'davo_cookie_consent_strict_opt_in_countries' , 'my_filter_callback' , 10 , 1 );
/**
* @param string[] $countries
*/
function my_filter_callback ( $countries ) {
// Change $countries as needed, then return it.
return $countries ;
}src/helpers/cookie-consent-helper.php:234
filter
Filter the detected two-letter visitor country code used for regional privacy rules.
Parameters of davo_cookie_consent_visitor_country Parameter Type Description $country string Uppercase ISO 3166-1 alpha-2 code or empty string.
add_filter Copyadd_filter ( 'davo_cookie_consent_visitor_country' , 'my_filter_callback' , 10 , 1 );
/**
* @param string $country
*/
function my_filter_callback ( $country ) {
// Change $country as needed, then return it.
return $country ;
}src/helpers/cookie-consent-helper.php:208
filter
Filters the ID of an existing page found for a slug before a new page is created. Return a page ID to reuse that page.
Parameters of davo_create_page_id Parameter Type Description $page_id int|string|null The existing page ID, or null if none was found. $slug string Page slug. $page_content string Content the new page would have.
Returns int|string|null
add_filter Copyadd_filter ( 'davo_create_page_id' , 'my_filter_callback' , 10 , 3 );
/**
* @param int|string|null $page_id
* @param string $slug
* @param string $page_content
*/
function my_filter_callback ( $page_id , $slug , $page_content ) {
// Change $page_id as needed, then return it.
return $page_id ;
}src/helpers/page-helper.php:209
filter
Determines which pages are created during install.
Parameters of davo_create_pages Parameter Type Description $pages array<string, array<string, mixed>> Page definitions keyed by page key.
add_filter Copyadd_filter ( 'davo_create_pages' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<string, array<string, mixed>> $pages
*/
function my_filter_callback ( $pages ) {
// Change $pages as needed, then return it.
return $pages ;
}src/helpers/page-helper.php:289
filter
Filter: Modify the default page ID for simple pages.
Parameters of davo_frontend_page_type_simple_page_id Parameter Type Description $page_id int The default page ID.
add_filter Copyadd_filter ( 'davo_frontend_page_type_simple_page_id' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $page_id
*/
function my_filter_callback ( $page_id ) {
// Change $page_id as needed, then return it.
return $page_id ;
}src/helpers/current-page-helper.php:80
filter
Filters the stored ID of a Davo page. The hook name is davo_get_{$page}_page_id, where $page is the page slug.
The name is built at runtime: davo_get_ followed by a suffix.
Parameters of davo_get_… Parameter Type Description $page_id mixed The stored page ID option value.
Returns mixed
add_filter Copy// $suffix is the part of the name that varies.
add_filter ( 'davo_get_' . $suffix , 'my_filter_callback' , 10 , 1 );
/**
* @param mixed $page_id
*/
function my_filter_callback ( $page_id ) {
// Change $page_id as needed, then return it.
return $page_id ;
}src/helpers/page-helper.php:577
filter
Filter Google Fonts choices.
Allows modification of the Google Fonts choices before they are returned.
Parameters of davo_google_fonts_choices Parameter Type Description $choices array Google Fonts choices.
add_filter Copyadd_filter ( 'davo_google_fonts_choices' , 'my_filter_callback' , 10 , 1 );
/**
* @param array $choices
*/
function my_filter_callback ( $choices ) {
// Change $choices as needed, then return it.
return $choices ;
}src/helpers/google-fonts-helper.php:111
filter
Filter Google Fonts list.
Parameters of davo_google_fonts_list Parameter Type Description $list array Google Fonts list.
add_filter Copyadd_filter ( 'davo_google_fonts_list' , 'my_filter_callback' , 10 , 1 );
/**
* @param array $list
*/
function my_filter_callback ( $list ) {
// Change $list as needed, then return it.
return $list ;
}src/helpers/google-fonts-helper.php:71
filter
Filter Google Fonts URL.
Parameters of davo_google_fonts_url Parameter Type Description $fonts_url string Fonts URL. $font_families array Font families map (empty when served from URL cache).
add_filter Copyadd_filter ( 'davo_google_fonts_url' , 'my_filter_callback' , 10 , 2 );
/**
* @param string $fonts_url
* @param array $font_families
*/
function my_filter_callback ( $fonts_url , $font_families ) {
// Change $fonts_url as needed, then return it.
return $fonts_url ;
}src/helpers/google-fonts-helper.php:180, and 1 more place
filter
Filter Google Icons list.
Parameters of davo_google_icons_list Parameter Type Description $list array Google Icons list.
add_filter Copyadd_filter ( 'davo_google_icons_list' , 'my_filter_callback' , 10 , 1 );
/**
* @param array $list
*/
function my_filter_callback ( $list ) {
// Change $list as needed, then return it.
return $list ;
}src/helpers/google-icons-helper.php:52
action
Action: davo_home_url - Allows overriding of the home URL.
add_action Copyadd_action ( 'davo_home_url' , 'my_action_callback' , 10 , 1 );
function my_action_callback ( $arg1 ) {
// Your code here.
}src/helpers/url-helper.php:116
filter
Filter: 'davo_image_data' - Filter image data.
Elements with keys not listed in the section will be discarded.
Parameters of davo_image_data Parameter Type Description $image_data array { Array of image data @type int id Image's ID as an attachment. @type string alt Image's alt text. @type string path Image's path. @type int width Width of image. @type int height Height of image. @type int pixels Number of pixels in the image. @type string type Image's MIME type. @type string size Image's size. @type string url Image's URL. @type int filesize The file size in bytes, if already set. } $attachment_id int Attachment ID.
add_filter Copyadd_filter ( 'davo_image_data' , 'my_filter_callback' , 10 , 2 );
/**
* @param array $image_data
* @param int $attachment_id
*/
function my_filter_callback ( $image_data , $attachment_id ) {
// Change $image_data as needed, then return it.
return $image_data ;
}src/helpers/image-helper.php:530
filter
Filter: 'davo_image_image_weight_limit' - Determines what the maximum weight (in bytes) of an image is allowed to be, default is 2 MB.
Parameters of davo_image_image_weight_limit Parameter Type Description $max_bytes int The maximum weight (in bytes) of an image.
add_filter Copyadd_filter ( 'davo_image_image_weight_limit' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $max_bytes
*/
function my_filter_callback ( $max_bytes ) {
// Change $max_bytes as needed, then return it.
return $max_bytes ;
}src/helpers/image-helper.php:554
filter
Filter: 'davo_image_sizes' - Determines which image sizes we'll loop through to get an appropriate image.
Parameters of davo_image_sizes Parameter Type Description $sizes array<string> The array of image sizes to loop through.
add_filter Copyadd_filter ( 'davo_image_sizes' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<string> $sizes
*/
function my_filter_callback ( $sizes ) {
// Change $sizes as needed, then return it.
return $sizes ;
}src/helpers/image-helper.php:732
filter
Filter: davo_locate_template - Modify the located template path.
Parameters of davo_locate_template Parameter Type Description $template string The located template path. $template_name string The name of the template file. $default_path string The default path to the template directory.
add_filter Copyadd_filter ( 'davo_locate_template' , 'my_filter_callback' , 10 , 3 );
/**
* @param string $template
* @param string $template_name
* @param string $default_path
*/
function my_filter_callback ( $template , $template_name , $default_path ) {
// Change $template as needed, then return it.
return $template ;
}src/helpers/template-helper.php:78
action
Fires after a Davo page is created.
Parameters of davo_page_created Parameter Type Description $page_id int The new page's ID. $page_data array<string, mixed> The data the page was created from.
add_action Copyadd_action ( 'davo_page_created' , 'my_action_callback' , 10 , 2 );
/**
* @param int $page_id
* @param array<string, mixed> $page_data
*/
function my_action_callback ( $page_id , $page_data ) {
// Your code here.
}src/helpers/page-helper.php:266
filter
Filter: 'davo_pre_analysis_post_content' - Allow filtering the content before analysis.
Parameters of davo_pre_analysis_post_content Parameter Type Description $post_content string The Post content string. $post WP_Post The current post.
add_filter Copyadd_filter ( 'davo_pre_analysis_post_content' , 'my_filter_callback' , 10 , 2 );
/**
* @param string $post_content
* @param WP_Post $post
*/
function my_filter_callback ( $post_content , $post ) {
// Change $post_content as needed, then return it.
return $post_content ;
}src/helpers/content-images-helper.php:107
filter
Filters the current profile slug for a user.
Same filter Account's template already calls — Profile_Initializer hooks into this to return the slug from the profile domain's own slug table. Default is '' if nothing hooks it.
Parameters of davo_profile_current_slug Parameter Type Description $slug string Default empty slug. $user_id int WordPress user ID.
add_filter Copyadd_filter ( 'davo_profile_current_slug' , 'my_filter_callback' , 10 , 2 );
/**
* @param string $slug
* @param int $user_id
*/
function my_filter_callback ( $slug , $user_id ) {
// Change $slug as needed, then return it.
return $slug ;
}src/helpers/user-helper.php:198, and 1 more place
filter
Filters the resolution of a profile slug back to a WP_User.
Return a WP_User to short-circuit the built-in user_nicename fallback below — needed if the Profile domain's slug table can ever diverge from user_nicename. Default is null, in which case the user_nicename fallback runs.
Parameters of davo_profile_resolve_user_by_slug Parameter Type Description $user WP_User|null Default null. $slug string The username/slug segment from the URL.
add_filter Copyadd_filter ( 'davo_profile_resolve_user_by_slug' , 'my_filter_callback' , 10 , 2 );
/**
* @param WP_User|null $user
* @param string $slug
*/
function my_filter_callback ( $user , $slug ) {
// Change $user as needed, then return it.
return $user ;
}src/helpers/user-helper.php:227
filter
Filter: davo_template_path - Modify the default template path.
Parameters of davo_template_path Parameter Type Description $path string The default template path.
add_filter Copyadd_filter ( 'davo_template_path' , 'my_filter_callback' , 10 , 1 );
/**
* @param string $path
*/
function my_filter_callback ( $path ) {
// Change $path as needed, then return it.
return $path ;
}src/helpers/template-helper.php:94