Skip to content

Actions and filters

Ai discovery: 5 hooks.

Every hook here has a description in the source.

0 actions5 filters

filter

davo_ai_discovery_llms_full_txt

Filters the llms-full.txt text before it is served.

Parameters of davo_ai_discovery_llms_full_txt
ParameterTypeDescription
$textstringDocument text.
add_filter
add_filter( 'davo_ai_discovery_llms_full_txt', 'my_filter_callback', 10, 1 );

/**
 * @param string $text
 */
function my_filter_callback( $text ) {
	// Change $text as needed, then return it.
	return $text;
}

src/domains/ai-discovery/repository.php:517

filter

davo_ai_discovery_llms_txt

Filters the llms.txt text before it is served.

The text is public. A filter must not add anything that is not safe to show every visitor.

Parameters of davo_ai_discovery_llms_txt
ParameterTypeDescription
$textstringDocument text.
add_filter
add_filter( 'davo_ai_discovery_llms_txt', 'my_filter_callback', 10, 1 );

/**
 * @param string $text
 */
function my_filter_callback( $text ) {
	// Change $text as needed, then return it.
	return $text;
}

src/domains/ai-discovery/repository.php:439

filter

davo_ai_discovery_log_retention_days

Filters how many days AI Discovery agent-read analytics rows are retained.

Parameters of davo_ai_discovery_log_retention_days
ParameterTypeDescription
$daysintNumber of days (minimum 7).
add_filter
add_filter( 'davo_ai_discovery_log_retention_days', 'my_filter_callback', 10, 1 );

/**
 * @param int $days
 */
function my_filter_callback( $days ) {
	// Change $days as needed, then return it.
	return $days;
}

src/domains/ai-discovery/crons/cleanup.php:69

filter

davo_ai_discovery_public_items_{suffix}

Filters public discovery items for custom-table content types (e.g. changelog, video).

The name is built at runtime: davo_ai_discovery_public_items_ followed by a suffix.

Parameters of davo_ai_discovery_public_items_…
ParameterTypeDescription
$itemsarray<int, array<string, mixed>>Existing items.
$limitintMaximum items.
add_filter
// $suffix is the part of the name that varies.
add_filter( 'davo_ai_discovery_public_items_' . $suffix, 'my_filter_callback', 10, 2 );

/**
 * @param array<int, array<string, mixed>> $items
 * @param int $limit
 */
function my_filter_callback( $items, $limit ) {
	// Change $items as needed, then return it.
	return $items;
}

src/domains/ai-discovery/repository.php:668

filter

davo_client_ip

This filter is documented in plugin/src/domains/auth/services/security.php */

Passed to callbacks: $ip

add_filter
add_filter( 'davo_client_ip', 'my_filter_callback', 10, 1 );

function my_filter_callback( $arg1 ) {
	// Change $arg1 as needed, then return it.
	return $arg1;
}

src/domains/ai-discovery/helpers.php:374, and 5 more places

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.

See it on your own site.

Davo is a WordPress theme and plugin by Exorex.

  • Runs on your own WordPress
  • Guided setup wizard
  • AI is off until you switch it on
  • Read the licence on the marketplace first