Skip to content

Actions and filters

Changelog: 25 hooks.

Every hook here has a description in the source.

15 actions10 filters

filter

davo_changelog_client_ip

Filter the client IP the changelog rate limiter keys on.

Parameters of davo_changelog_client_ip
ParameterTypeDescription
$ipstringAddress taken from REMOTE_ADDR.
add_filter
add_filter( 'davo_changelog_client_ip', 'my_filter_callback', 10, 1 );

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

src/domains/changelog/helpers.php:333

filter

davo_changelog_default_language

This filter is documented in services/languages.php. */

Passed to callbacks: ''

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

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

src/domains/changelog/seo.php:332, and 1 more place

action

davo_changelog_entry_created

Fires after a changelog entry is created.

Parameters of davo_changelog_entry_created
ParameterTypeDescription
$entry_idintThe new entry's ID.
$entryobjectThe entry row.
add_action
add_action( 'davo_changelog_entry_created', 'my_action_callback', 10, 2 );

/**
 * @param int $entry_id
 * @param object $entry
 */
function my_action_callback( $entry_id, $entry ) {
	// Your code here.
}

src/domains/changelog/services/entries.php:122

action

davo_changelog_entry_deleted

Fires after a changelog entry is deleted.

Parameters of davo_changelog_entry_deleted
ParameterTypeDescription
$entry_idintThe deleted entry's ID.
$entryobjectThe entry row as it was before deletion.
add_action
add_action( 'davo_changelog_entry_deleted', 'my_action_callback', 10, 2 );

/**
 * @param int $entry_id
 * @param object $entry
 */
function my_action_callback( $entry_id, $entry ) {
	// Your code here.
}

src/domains/changelog/services/entries.php:539

action

davo_changelog_entry_published

Fires when a changelog entry is published, either created as published or published later.

Parameters of davo_changelog_entry_published
ParameterTypeDescription
$entry_idintEntry ID.
$entryobjectThe entry row.
add_action
add_action( 'davo_changelog_entry_published', 'my_action_callback', 10, 2 );

/**
 * @param int $entry_id
 * @param object $entry
 */
function my_action_callback( $entry_id, $entry ) {
	// Your code here.
}

src/domains/changelog/services/entries.php:131, and 1 more place

action

davo_changelog_entry_translation_created

Fires after a translation of a changelog entry is created.

Parameters of davo_changelog_entry_translation_created
ParameterTypeDescription
$entry_idstringThe new entry's ID.
$entryobjectThe new entry row.
$source_idstringThe entry it translates.
add_action
add_action( 'davo_changelog_entry_translation_created', 'my_action_callback', 10, 3 );

/**
 * @param string $entry_id
 * @param object $entry
 * @param string $source_id
 */
function my_action_callback( $entry_id, $entry, $source_id ) {
	// Your code here.
}

src/domains/changelog/services/entries.php:448

action

davo_changelog_entry_updated

Fires after a changelog entry is updated.

Parameters of davo_changelog_entry_updated
ParameterTypeDescription
$entry_idintEntry ID.
$entryobjectThe updated entry row.
add_action
add_action( 'davo_changelog_entry_updated', 'my_action_callback', 10, 2 );

/**
 * @param int $entry_id
 * @param object $entry
 */
function my_action_callback( $entry_id, $entry ) {
	// Your code here.
}

src/domains/changelog/services/entries.php:296, and 1 more place

action

davo_changelog_guest_subscribed

Fires after a guest confirms their changelog subscription.

Parameters of davo_changelog_guest_subscribed
ParameterTypeDescription
$subscriber_idstringStable subscriber identifier.
add_action
add_action( 'davo_changelog_guest_subscribed', 'my_action_callback', 10, 1 );

/**
 * @param string $subscriber_id
 */
function my_action_callback( $subscriber_id ) {
	// Your code here.
}

src/domains/changelog/services/subscribers.php:371

filter

davo_changelog_language

This filter is documented in services/languages.php. */

Passed to callbacks: ''

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

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

src/domains/changelog/helpers.php:299, and 3 more places

filter

davo_changelog_languages

Filters the languages changelog entries and releases can be written in.

Parameters of davo_changelog_languages
ParameterTypeDescription
$languagesarray<string, string>Language code => display name.
add_filter
add_filter( 'davo_changelog_languages', 'my_filter_callback', 10, 1 );

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

src/domains/changelog/services/languages.php:38

filter

davo_changelog_manage_capability

Filter the capability required to manage the Changelog domain.

Parameters of davo_changelog_manage_capability
ParameterTypeDescription
$capabilitystringCapability slug. Default 'davo_manage_options'.
add_filter
add_filter( 'davo_changelog_manage_capability', 'my_filter_callback', 10, 1 );

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

src/domains/changelog/helpers.php:177

action

davo_changelog_release_created

Fires after a changelog release is created.

Parameters of davo_changelog_release_created
ParameterTypeDescription
$release_idintThe new release's ID.
$releaseobjectThe release row.
add_action
add_action( 'davo_changelog_release_created', 'my_action_callback', 10, 2 );

/**
 * @param int $release_id
 * @param object $release
 */
function my_action_callback( $release_id, $release ) {
	// Your code here.
}

src/domains/changelog/services/releases.php:86

action

davo_changelog_release_deleted

Fires after a changelog release is deleted.

Parameters of davo_changelog_release_deleted
ParameterTypeDescription
$release_idintThe deleted release's ID.
$releaseobjectThe release row as it was before deletion.
add_action
add_action( 'davo_changelog_release_deleted', 'my_action_callback', 10, 2 );

/**
 * @param int $release_id
 * @param object $release
 */
function my_action_callback( $release_id, $release ) {
	// Your code here.
}

src/domains/changelog/services/releases.php:265

action

davo_changelog_release_translation_created

Fires after a translation of a release is created.

Parameters of davo_changelog_release_translation_created
ParameterTypeDescription
$release_idstringId of the new release.
$releaseobjectThe new release row.
$source_idstringThe release it translates.
add_action
add_action( 'davo_changelog_release_translation_created', 'my_action_callback', 10, 3 );

/**
 * @param string $release_id
 * @param object $release
 * @param string $source_id
 */
function my_action_callback( $release_id, $release, $source_id ) {
	// Your code here.
}

src/domains/changelog/services/releases.php:378

action

davo_changelog_release_updated

Fires after a changelog release is updated.

Parameters of davo_changelog_release_updated
ParameterTypeDescription
$release_idintRelease ID.
$releaseobjectThe updated release row.
add_action
add_action( 'davo_changelog_release_updated', 'my_action_callback', 10, 2 );

/**
 * @param int $release_id
 * @param object $release
 */
function my_action_callback( $release_id, $release ) {
	// Your code here.
}

src/domains/changelog/services/releases.php:167

action

davo_changelog_releases_reordered

Fires after the release order has been saved and verified.

Parameters of davo_changelog_releases_reordered
ParameterTypeDescription
$finalstring[]Every release id in its new order.
add_action
add_action( 'davo_changelog_releases_reordered', 'my_action_callback', 10, 1 );

/**
 * @param string[] $final
 */
function my_action_callback( $final ) {
	// Your code here.
}

src/domains/changelog/services/releases.php:476

filter

davo_changelog_sitemap_language

Filters the language a changelog sitemap lists.

Parameters of davo_changelog_sitemap_language
ParameterTypeDescription
$languagestringLanguage code, or an empty string to list every language.
add_filter
add_filter( 'davo_changelog_sitemap_language', 'my_filter_callback', 10, 1 );

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

src/domains/changelog/sitemap-provider.php:191

action

davo_changelog_subscriber_deleted

Fires after an admin removes a changelog subscriber.

Parameters of davo_changelog_subscriber_deleted
ParameterTypeDescription
$subscriber_idstringStable subscriber identifier.
add_action
add_action( 'davo_changelog_subscriber_deleted', 'my_action_callback', 10, 1 );

/**
 * @param string $subscriber_id
 */
function my_action_callback( $subscriber_id ) {
	// Your code here.
}

src/domains/changelog/services/subscribers.php:680

action

davo_changelog_types_changed

Fires after the changelog type list changes (create, update, delete, or reorder).

Parameters of davo_changelog_types_changed
ParameterTypeDescription
$typesarray<int, array<string, mixed>>Full, current type list.
add_action
add_action( 'davo_changelog_types_changed', 'my_action_callback', 10, 1 );

/**
 * @param array<int, array<string, mixed>> $types
 */
function my_action_callback( $types ) {
	// Your code here.
}

src/domains/changelog/services/types.php:361

action

davo_changelog_unsubscribed

Fires after a subscriber opts out of changelog updates.

Parameters of davo_changelog_unsubscribed
ParameterTypeDescription
$subscriber_idstringStable subscriber identifier.
add_action
add_action( 'davo_changelog_unsubscribed', 'my_action_callback', 10, 1 );

/**
 * @param string $subscriber_id
 */
function my_action_callback( $subscriber_id ) {
	// Your code here.
}

src/domains/changelog/services/subscribers.php:949

filter

davo_changelog_untranslated_fallback

Filters whether an untranslated item is shown in the default language rather than hidden.

Parameters of davo_changelog_untranslated_fallback
ParameterTypeDescription
$enabledboolWhether to fall back.
add_filter
add_filter( 'davo_changelog_untranslated_fallback', 'my_filter_callback', 10, 1 );

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

src/domains/changelog/services/languages.php:121

action

davo_changelog_user_subscribed

This action is documented in Changelog_Subscribers_Service::subscribe_user(). */

Passed to callbacks: $user_id

add_action
add_action( 'davo_changelog_user_subscribed', 'my_action_callback', 10, 1 );

function my_action_callback( $arg1 ) {
	// Your code here.
}

src/domains/changelog/services/subscribers.php:111, and 1 more place

filter

davo_language_locale

This filter is documented in the Language domain (Language_Content::language_locale()). */

Passed to callbacks: ''$code

add_filter
add_filter( 'davo_language_locale', 'my_filter_callback', 10, 2 );

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

src/domains/changelog/seo.php:258, and 1 more place

filter

davo_language_row_url

Filters a changelog row's URL so it points at a language.

Parameters of davo_language_row_url
ParameterTypeDescription
$urlstringURL built from the site home.
$langstringLanguage to put it under.
add_filter
add_filter( 'davo_language_row_url', 'my_filter_callback', 10, 2 );

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

src/domains/changelog/helpers.php:311

filter

davo_language_untranslated_content_url

Filters the canonical URL of a page whose content is not translated.

Parameters of davo_language_untranslated_content_url
ParameterTypeDescription
$urlstringURL of the page in the current language.
add_filter
add_filter( 'davo_language_untranslated_content_url', 'my_filter_callback', 10, 1 );

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

src/domains/changelog/seo.php:279

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