Skip to content

Actions and filters

Utils: 4 hooks.

Every hook here has a description in the source.

0 actions4 filters

filter

davo_allow_system_file_edit

Filter: 'davo_allow_system_file_edit' - Allow developers to change whether the editing of .htaccess and robots.txt is allowed.

Parameters of davo_allow_system_file_edit
ParameterTypeDescription
$allowedboolWhether file editing is allowed.
add_filter
add_filter( 'davo_allow_system_file_edit', 'my_filter_callback', 10, 1 );

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

src/utils.php:99

filter

davo_debug_json_data

Filter the Davo development mode.

Parameters of davo_debug_json_data
ParameterTypeDescription
$dataarrayAllows filtering of the JSON data for debug purposes.
add_filter
add_filter( 'davo_debug_json_data', 'my_filter_callback', 10, 1 );

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

src/utils.php:1026

filter

davo_development_mode

Filter the Davo development mode.

Parameters of davo_development_mode
ParameterTypeDescription
$development_modeboolIs Davo development mode active.
add_filter
add_filter( 'davo_development_mode', 'my_filter_callback', 10, 1 );

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

src/utils.php:953, and 1 more place

filter

davo_format_admin_url

Filters a formatted admin URL.

Parameters of davo_format_admin_url
ParameterTypeDescription
$urlstringThe formatted URL.

Returns string

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

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

src/utils.php:929

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