filter
Filters the language suffixes a documentation cache entry can exist under.
Parameters of davo_cache_language_suffixes Parameter Type Description $suffixes array<int, string> Always includes the empty suffix.
add_filter Copyadd_filter ( 'davo_cache_language_suffixes' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<int, string> $suffixes
*/
function my_filter_callback ( $suffixes ) {
// Change $suffixes as needed, then return it.
return $suffixes ;
}src/domains/docs/services/cache.php:208
action
Fires after one article's cached navigation entries were dropped.
Parameters of davo_docs_article_cache_flushed Parameter Type Description $article_id int Article post ID. $collection_ids array<int, int> Collections that list it.
add_action Copyadd_action ( 'davo_docs_article_cache_flushed' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param array<int, int> $collection_ids
*/
function my_action_callback ( $article_id , $collection_ids ) {
// Your code here.
}src/domains/docs/services/navigation.php:373
filter
Filter the documentation header's link back to the main site.
Parameters of davo_docs_back_link Parameter Type Description $link array{show: bool, label: string, url: string} Link description.
add_filter Copyadd_filter ( 'davo_docs_back_link' , 'my_filter_callback' , 10 , 1 );
/**
* @param array{show: bool, label: string, url: string} $link
*/
function my_filter_callback ( $link ) {
// Change $link as needed, then return it.
return $link ;
}src/domains/docs/services/config.php:282
action
Fires after the documentation caches were invalidated.
add_action Copyadd_action ( 'davo_docs_cache_flushed' , 'my_action_callback' , 10 , 1 );
function my_action_callback ( $arg1 ) {
// Your code here.
}src/domains/docs/services/cache.php:288
filter
Filters the URL path of the documentation front page. Defaults to docs; slashes at the ends are trimmed.
Parameters of davo_docs_front_page_base Parameter Type Description $base string Path segment.
Returns string
add_filter Copyadd_filter ( 'davo_docs_front_page_base' , 'my_filter_callback' , 10 , 1 );
/**
* @param string $base
*/
function my_filter_callback ( $base ) {
// Change $base as needed, then return it.
return $base ;
}src/domains/docs/helpers.php:324
filter
Filter the documentation homepage payload.
Parameters of davo_docs_home Parameter Type Description $home array<string, mixed> Homepage payload. $viewer_id int Viewer's user ID (0 = guest).
add_filter Copyadd_filter ( 'davo_docs_home' , 'my_filter_callback' , 10 , 2 );
/**
* @param array<string, mixed> $home
* @param int $viewer_id
*/
function my_filter_callback ( $home , $viewer_id ) {
// Change $home as needed, then return it.
return $home ;
}src/domains/docs/services/home.php:133
filter
Filter whether the documentation navigation runs in scalable mode.
Parameters of davo_docs_nav_scalable Parameter Type Description $scalable bool The Builder's "Scalable navigation" setting.
add_filter Copyadd_filter ( 'davo_docs_nav_scalable' , 'my_filter_callback' , 10 , 1 );
/**
* @param bool $scalable
*/
function my_filter_callback ( $scalable ) {
// Change $scalable as needed, then return it.
return $scalable ;
}src/domains/docs/helpers.php:173
filter
Filter the documentation navigation tree for a viewer scope.
Runs on every read (after the cached tree is retrieved), so it must be cheap. Applies to the full tree only: in scalable mode the sidebar is built from the skeleton and this filter does not run for it.
Parameters of davo_docs_navigation_tree Parameter Type Description $tree array{items: array<int, array<string, mixed>>, article_count: int} Navigation tree. $scope string Viewer scope: 'guest', 'member' or 'staff'.
add_filter Copyadd_filter ( 'davo_docs_navigation_tree' , 'my_filter_callback' , 10 , 2 );
/**
* @param array{items: array<int, array<string, mixed>>, article_count: int} $tree
* @param string $scope
*/
function my_filter_callback ( $tree , $scope ) {
// Change $tree as needed, then return it.
return $tree ;
}src/domains/docs/services/navigation.php:128
filter
Filter: davo_docs_output_head_tags( bool $output, array $view ).
A documentation page is not a WordPress post, so an SEO plugin has no title, description or canonical for it; these tags are the only correct ones and default to on. A site that supplies them some other way can switch this off.
Passed to callbacks: true$view
add_filter Copyadd_filter ( 'davo_docs_output_head_tags' , 'my_filter_callback' , 10 , 2 );
function my_filter_callback ( $arg1 , $arg2 ) {
// Change $arg1 as needed, then return it.
return $arg1 ;
}src/domains/docs/initializer.php:699
filter
Filter the payload the client router receives for a page.
Parameters of davo_docs_page_payload Parameter Type Description $payload array<string, mixed> Page payload. $view array<string, mixed> The view it was built from. $viewer_id int Viewer's user ID (0 = guest).
add_filter Copyadd_filter ( 'davo_docs_page_payload' , 'my_filter_callback' , 10 , 3 );
/**
* @param array<string, mixed> $payload
* @param array<string, mixed> $view
* @param int $viewer_id
*/
function my_filter_callback ( $payload , $view , $viewer_id ) {
// Change $payload as needed, then return it.
return $payload ;
}src/domains/docs/repository.php:219
filter
Filter the public documentation configuration handed to the front end.
Parameters of davo_docs_public_config Parameter Type Description $config array<string, mixed> Public configuration.
add_filter Copyadd_filter ( 'davo_docs_public_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/domains/docs/services/config.php:374
filter
Filters how many results the documentation search-results view shows per page.
Parameters of davo_docs_search_per_page Parameter Type Description $per_page int Results per page.
add_filter Copyadd_filter ( 'davo_docs_search_per_page' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $per_page
*/
function my_filter_callback ( $per_page ) {
// Change $per_page as needed, then return it.
return $per_page ;
}src/domains/docs/services/search.php:84
action
Fires after Builder settings were saved.
Parameters of davo_docs_settings_updated Parameter Type Description $changed list<string> Keys whose value changed. $values array<string, mixed> All settings after the update.
add_action Copyadd_action ( 'davo_docs_settings_updated' , 'my_action_callback' , 10 , 2 );
/**
* @param list<string> $changed
* @param array<string, mixed> $values
*/
function my_action_callback ( $changed , $values ) {
// Your code here.
}src/domains/docs/services/config.php:469, and 1 more place