action
Fires after an article is added to a collection.
Parameters of davo_article_added_to_collection Parameter Type Description $article_id int Article post ID. $collection_id int Collection ID.
add_action Copyadd_action ( 'davo_article_added_to_collection' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $collection_id
*/
function my_action_callback ( $article_id , $collection_id ) {
// Your code here.
}src/domains/articles/services/collections.php:742
action
Fires after an article is archived.
Parameters of davo_article_archived Parameter Type Description $article_id int Article post ID. $user_id int User who archived it.
add_action Copyadd_action ( 'davo_article_archived' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $user_id
*/
function my_action_callback ( $article_id , $user_id ) {
// Your code here.
}src/domains/articles/services/publishing.php:422
action
Fires after an article collection is created.
Parameters of davo_article_collection_created Parameter Type Description $collection_id int The new collection ID. $user_id int User who created it.
add_action Copyadd_action ( 'davo_article_collection_created' , 'my_action_callback' , 10 , 2 );
/**
* @param int $collection_id
* @param int $user_id
*/
function my_action_callback ( $collection_id , $user_id ) {
// Your code here.
}src/domains/articles/services/collections.php:107
action
Fires after an article collection is deleted.
Parameters of davo_article_collection_deleted Parameter Type Description $collection_id int The deleted collection ID. $user_id int User who deleted it.
add_action Copyadd_action ( 'davo_article_collection_deleted' , 'my_action_callback' , 10 , 2 );
/**
* @param int $collection_id
* @param int $user_id
*/
function my_action_callback ( $collection_id , $user_id ) {
// Your code here.
}src/domains/articles/services/collections.php:269
filter
Filter how many levels of nested collections are allowed.
Parameters of davo_article_collection_max_depth Parameter Type Description $max_depth int Maximum number of levels; the top level counts as 1.
add_filter Copyadd_filter ( 'davo_article_collection_max_depth' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $max_depth
*/
function my_filter_callback ( $max_depth ) {
// Change $max_depth as needed, then return it.
return $max_depth ;
}src/domains/articles/services/collections.php:569
action
Fires after a collection has been moved and re-ordered.
Parameters of davo_article_collection_moved Parameter Type Description $collection_id int Collection that moved. $old_parent_id int|null Its previous parent, or null for the top level. $new_parent_id int|null Its new parent, or null for the top level.
add_action Copyadd_action ( 'davo_article_collection_moved' , 'my_action_callback' , 10 , 3 );
/**
* @param int $collection_id
* @param int|null $old_parent_id
* @param int|null $new_parent_id
*/
function my_action_callback ( $collection_id , $old_parent_id , $new_parent_id ) {
// Your code here.
}src/domains/articles/services/collections.php:547
action
Fires after the articles inside a collection are reordered.
Parameters of davo_article_collection_reordered Parameter Type Description $collection_id int Collection ID.
add_action Copyadd_action ( 'davo_article_collection_reordered' , 'my_action_callback' , 10 , 1 );
/**
* @param int $collection_id
*/
function my_action_callback ( $collection_id ) {
// Your code here.
}src/domains/articles/services/collections.php:860
action
Fires after an article collection is updated.
Parameters of davo_article_collection_updated Parameter Type Description $collection_id int Collection ID. $user_id int User who updated it.
add_action Copyadd_action ( 'davo_article_collection_updated' , 'my_action_callback' , 10 , 2 );
/**
* @param int $collection_id
* @param int $user_id
*/
function my_action_callback ( $collection_id , $user_id ) {
// Your code here.
}src/domains/articles/services/collections.php:204
action
Fires after the collections under one parent are reordered.
Parameters of davo_article_collections_reordered Parameter Type Description $parent_id int Parent collection ID.
add_action Copyadd_action ( 'davo_article_collections_reordered' , 'my_action_callback' , 10 , 1 );
/**
* @param int $parent_id
*/
function my_action_callback ( $parent_id ) {
// Your code here.
}src/domains/articles/services/collections.php:446, and 2 more places
action
Fires after an article is created. When it is created already published, davo_article_published follows.
Parameters of davo_article_created Parameter Type Description $article_id int The new article's post ID. $author_id int The author's user ID.
add_action Copyadd_action ( 'davo_article_created' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $author_id
*/
function my_action_callback ( $article_id , $author_id ) {
// Your code here.
}src/domains/articles/services/publishing.php:102
action
Fires when an article is moved to the trash. It does not fire when an article is deleted permanently.
Parameters of davo_article_deleted Parameter Type Description $article_id int Article post ID. $user_id int User who deleted the article.
add_action Copyadd_action ( 'davo_article_deleted' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $user_id
*/
function my_action_callback ( $article_id , $user_id ) {
// Your code here.
}src/domains/articles/repository.php:418
action
Fires after an article is marked as deprecated.
Parameters of davo_article_deprecated Parameter Type Description $article_id int Article post ID. $replacement_id int The replacement article ID, or 0 if there is none.
add_action Copyadd_action ( 'davo_article_deprecated' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $replacement_id
*/
function my_action_callback ( $article_id , $replacement_id ) {
// Your code here.
}src/domains/articles/services/freshness.php:57
action
Fires when an article's helpful rate drops below the poor-feedback threshold (the articles_poor_feedback_threshold_percent setting, 40 by default). It fires once until the rate recovers.
Parameters of davo_article_feedback_poor Parameter Type Description $article_id int Article post ID. $rate float Percentage of votes that were helpful. $total int Total number of votes.
add_action Copyadd_action ( 'davo_article_feedback_poor' , 'my_action_callback' , 10 , 3 );
/**
* @param int $article_id
* @param float $rate
* @param int $total
*/
function my_action_callback ( $article_id , $rate , $total ) {
// Your code here.
}src/domains/articles/services/freshness.php:152
action
Fires the first time an article is published. It does not fire again when the article is republished.
Parameters of davo_article_first_published Parameter Type Description $article_id int Article post ID. $user_id int User who published it.
add_action Copyadd_action ( 'davo_article_first_published' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $user_id
*/
function my_action_callback ( $article_id , $user_id ) {
// Your code here.
}src/domains/articles/services/publishing.php:305
filter
Filters the maximum allowed article title length. Defaults to the articles_max_title_length setting (150).
Parameters of davo_article_max_title_length Parameter Type Description $length int Maximum length in characters.
Returns int
add_filter Copyadd_filter ( 'davo_article_max_title_length' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $length
*/
function my_filter_callback ( $length ) {
// Change $length as needed, then return it.
return $length ;
}src/domains/articles/helpers.php:262
filter
Filters the minimum allowed article title length. Defaults to the articles_min_title_length setting (5).
Parameters of davo_article_min_title_length Parameter Type Description $length int Minimum length in characters.
Returns int
add_filter Copyadd_filter ( 'davo_article_min_title_length' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $length
*/
function my_filter_callback ( $length ) {
// Change $length as needed, then return it.
return $length ;
}src/domains/articles/helpers.php:245
action
Fires just before an article is permanently deleted — a real wp_delete_post() (force-delete, or WordPress's own 30-day trash auto-purge), not the recoverable soft-trash that fires davo_article_deleted. Kept distinct so listeners that treat "no longer visible" and "gone forever" differently (e.g. Realtime) only ever fire on a removal that can't be undone by restoring from trash.
Parameters of davo_article_permanently_deleted Parameter Type Description $article_id int Post ID, still readable at this point. $author_id int Article author user ID.
add_action Copyadd_action ( 'davo_article_permanently_deleted' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $author_id
*/
function my_action_callback ( $article_id , $author_id ) {
// Your code here.
}src/domains/articles/initializer.php:2335
action
Fires after an article's primary collection changes.
Parameters of davo_article_primary_collection_changed Parameter Type Description $article_id int Article post ID. $collection_id int The new primary collection ID. $previous_collection_id int|null The previous primary collection ID, or null if there was none.
add_action Copyadd_action ( 'davo_article_primary_collection_changed' , 'my_action_callback' , 10 , 3 );
/**
* @param int $article_id
* @param int $collection_id
* @param int|null $previous_collection_id
*/
function my_action_callback ( $article_id , $collection_id , $previous_collection_id ) {
// Your code here.
}src/domains/articles/services/collections.php:645
action
Fires when an article is published, whether created as published or published later.
Parameters of davo_article_published Parameter Type Description $article_id int Article post ID. $user_id int User who published it.
add_action Copyadd_action ( 'davo_article_published' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $user_id
*/
function my_action_callback ( $article_id , $user_id ) {
// Your code here.
}src/domains/articles/services/publishing.php:111, and 1 more place
action
Fires after a related article is added by hand.
Parameters of davo_article_related Parameter Type Description $article_id int Article post ID. $related_article_id int The related article's post ID.
add_action Copyadd_action ( 'davo_article_related' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $related_article_id
*/
function my_action_callback ( $article_id , $related_article_id ) {
// Your code here.
}src/domains/articles/services/relations.php:61
filter
Filters the maximum number of related articles shown for an article. Defaults to the articles_related_limit setting (5).
Parameters of davo_article_related_limit Parameter Type Description $limit int Maximum related articles.
Returns int
add_filter Copyadd_filter ( 'davo_article_related_limit' , 'my_filter_callback' , 10 , 1 );
/**
* @param int $limit
*/
function my_filter_callback ( $limit ) {
// Change $limit as needed, then return it.
return $limit ;
}src/domains/articles/helpers.php:296
action
Fires after an article is removed from a collection.
Parameters of davo_article_removed_from_collection Parameter Type Description $article_id int Article post ID. $collection_id int Collection ID.
add_action Copyadd_action ( 'davo_article_removed_from_collection' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $collection_id
*/
function my_action_callback ( $article_id , $collection_id ) {
// Your code here.
}src/domains/articles/services/collections.php:835
filter
Filter an article's built REST response — the extension point other domains (Feedback, Attachments, Search) use to embed their own data without Articles knowing they exist.
Parameters of davo_article_response Parameter Type Description $response array<string, mixed> The response so far. $post WP_Post Article post. $viewer_id int Current viewer's user ID (0 = guest). $with_content bool False for list and card responses, true for the full article. Extensions that add per-article queries should skip lists.
add_filter Copyadd_filter ( 'davo_article_response' , 'my_filter_callback' , 10 , 4 );
/**
* @param array<string, mixed> $response
* @param WP_Post $post
* @param int $viewer_id
* @param bool $with_content
*/
function my_filter_callback ( $response , $post , $viewer_id , $with_content ) {
// Change $response as needed, then return it.
return $response ;
}src/domains/articles/helpers.php:1575
action
Fires after an archived or trashed article is restored to published.
Parameters of davo_article_restored Parameter Type Description $article_id int Article post ID. $user_id int User who restored it.
add_action Copyadd_action ( 'davo_article_restored' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $user_id
*/
function my_action_callback ( $article_id , $user_id ) {
// Your code here.
}src/domains/articles/services/publishing.php:468
action
Fires after an article is scheduled for future publication.
Parameters of davo_article_scheduled Parameter Type Description $article_id int Article post ID. $user_id int User who scheduled it. $scheduled_at string Publish time as a GMT MySQL datetime.
add_action Copyadd_action ( 'davo_article_scheduled' , 'my_action_callback' , 10 , 3 );
/**
* @param int $article_id
* @param int $user_id
* @param string $scheduled_at
*/
function my_action_callback ( $article_id , $user_id , $scheduled_at ) {
// Your code here.
}src/domains/articles/services/publishing.php:365
filter
Filter the address an article's search result links to.
Parameters of davo_article_search_url Parameter Type Description $url string The article's permalink. $post WP_Post Article post.
add_filter Copyadd_filter ( 'davo_article_search_url' , 'my_filter_callback' , 10 , 2 );
/**
* @param string $url
* @param WP_Post $post
*/
function my_filter_callback ( $url , $post ) {
// Change $url as needed, then return it.
return $url ;
}src/domains/articles/initializer.php:1563
filter
Filter the final, resolved sidebar widget list for an article, after every registered resolver has already run.
Parameters of davo_article_sidebar_resolved_widgets Parameter Type Description $resolved array<int, array<string, mixed>> Ordered, resolved widget list. $article_id int Article post ID. $viewer_id int Current viewer's user ID (0 = guest).
add_filter Copyadd_filter ( 'davo_article_sidebar_resolved_widgets' , 'my_filter_callback' , 10 , 3 );
/**
* @param array<int, array<string, mixed>> $resolved
* @param int $article_id
* @param int $viewer_id
*/
function my_filter_callback ( $resolved , $article_id , $viewer_id ) {
// Change $resolved as needed, then return it.
return $resolved ;
}src/domains/articles/sidebar-registry.php:265
action
Fires after a third-party article sidebar widget is successfully registered.
Parameters of davo_article_sidebar_widget_registered Parameter Type Description $id string Normalized widget ID. $normalized array<string, mixed> Normalized widget definition.
add_action Copyadd_action ( 'davo_article_sidebar_widget_registered' , 'my_action_callback' , 10 , 2 );
/**
* @param string $id
* @param array<string, mixed> $normalized
*/
function my_action_callback ( $id , $normalized ) {
// Your code here.
}src/domains/articles/sidebar-registry.php:180
filter
Filters whether an article type supports an explicit semantic version field.
Parameters of davo_article_type_is_versioned Parameter Type Description $is_versioned bool Whether the type is versioned. True for the built-in versioned types. $type string Article type slug.
Returns bool
add_filter Copyadd_filter ( 'davo_article_type_is_versioned' , 'my_filter_callback' , 10 , 2 );
/**
* @param bool $is_versioned
* @param string $type
*/
function my_filter_callback ( $is_versioned , $type ) {
// Change $is_versioned as needed, then return it.
return $is_versioned ;
}src/domains/articles/helpers.php:782
filter
Filter the full set of article types available for selection.
Parameters of davo_article_types Parameter Type Description $labels array<string, string> Type slug => human label.
add_filter Copyadd_filter ( 'davo_article_types' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<string, string> $labels
*/
function my_filter_callback ( $labels ) {
// Change $labels as needed, then return it.
return $labels ;
}src/domains/articles/helpers.php:357
action
Fires after an article's deprecated mark is removed.
Parameters of davo_article_undeprecated Parameter Type Description $article_id int Article post ID.
add_action Copyadd_action ( 'davo_article_undeprecated' , 'my_action_callback' , 10 , 1 );
/**
* @param int $article_id
*/
function my_action_callback ( $article_id ) {
// Your code here.
}src/domains/articles/services/freshness.php:82
action
Fires after a related article is removed.
Parameters of davo_article_unrelated Parameter Type Description $article_id int Article post ID. $related_article_id int The removed related article's post ID.
add_action Copyadd_action ( 'davo_article_unrelated' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $related_article_id
*/
function my_action_callback ( $article_id , $related_article_id ) {
// Your code here.
}src/domains/articles/services/relations.php:83
action
Fires after an article is updated.
Parameters of davo_article_updated Parameter Type Description $article_id int Article post ID. $editor_id int User who edited it.
add_action Copyadd_action ( 'davo_article_updated' , 'my_action_callback' , 10 , 2 );
/**
* @param int $article_id
* @param int $editor_id
*/
function my_action_callback ( $article_id , $editor_id ) {
// Your code here.
}src/domains/articles/services/publishing.php:218
filter
Filters whether the articles archive page is marked noindex. By default it is, from page 2 on and whenever a search, type, sort, category or tag filter is active.
Parameters of davo_articles_archive_seo_noindex Parameter Type Description $noindex bool Whether to mark the page noindex. $params array The archive's query parameters.
Returns bool
add_filter Copyadd_filter ( 'davo_articles_archive_seo_noindex' , 'my_filter_callback' , 10 , 2 );
/**
* @param bool $noindex
* @param array $params
*/
function my_filter_callback ( $noindex , $params ) {
// Change $noindex as needed, then return it.
return $noindex ;
}src/domains/articles/templates/archive-articles.php:144
filter
Filter the article statuses the Documentation Builder lists.
Parameters of davo_articles_builder_statuses Parameter Type Description $statuses array<int, string> Post statuses.
add_filter Copyadd_filter ( 'davo_articles_builder_statuses' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<int, string> $statuses
*/
function my_filter_callback ( $statuses ) {
// Change $statuses as needed, then return it.
return $statuses ;
}src/domains/articles/services/documentation-builder.php:294
filter
Filters whether an article's slug and a sibling collection's slug may match.
Parameters of davo_articles_enforce_path_uniqueness Parameter Type Description $enforce bool True to keep them distinct. Default false.
add_filter Copyadd_filter ( 'davo_articles_enforce_path_uniqueness' , 'my_filter_callback' , 10 , 1 );
/**
* @param bool $enforce
*/
function my_filter_callback ( $enforce ) {
// Change $enforce as needed, then return it.
return $enforce ;
}src/domains/articles/services/collections.php:1269
filter
Filters whether Davo prints its own SEO tags on article pages. Defaults to false when a known SEO plugin is active.
Parameters of davo_articles_output_seo_tags Parameter Type Description $output bool Whether to print the tags.
Returns bool
add_filter Copyadd_filter ( 'davo_articles_output_seo_tags' , 'my_filter_callback' , 10 , 1 );
/**
* @param bool $output
*/
function my_filter_callback ( $output ) {
// Change $output as needed, then return it.
return $output ;
}src/domains/articles/initializer.php:628, and 1 more place
filter
Filters how many articles are listed per page by default. Defaults to the articles_per_page setting (20).
Parameters of davo_articles_per_page Parameter Type Description $per_page int Articles per page.
Returns int
add_filter Copyadd_filter ( 'davo_articles_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/articles/helpers.php:279
filter
Filter whether section feedback shows a pin and a tint on the block under the pointer while reading. Off by default: readers moving the mouse over text would see paragraphs highlight constantly. Review mode and text selection reach the same form either way.
Parameters of davo_articles_section_feedback_hover_pin Parameter Type Description $hover_pin bool Whether the hover pin is enabled.
add_filter Copyadd_filter ( 'davo_articles_section_feedback_hover_pin' , 'my_filter_callback' , 10 , 1 );
/**
* @param bool $hover_pin
*/
function my_filter_callback ( $hover_pin ) {
// Change $hover_pin as needed, then return it.
return $hover_pin ;
}src/domains/articles/templates/partials/article-view.php:107
filter
Filters an article author's presence for the article response, so a status dot can be shown without a second request. Null when the User Status domain is not active.
Parameters of davo_author_presence Parameter Type Description $presence mixed The author's presence. Default null. $author_id int The author's user ID.
add_filter Copyadd_filter ( 'davo_author_presence' , 'my_filter_callback' , 10 , 2 );
/**
* @param mixed $presence
* @param int $author_id
*/
function my_filter_callback ( $presence , $author_id ) {
// Change $presence as needed, then return it.
return $presence ;
}src/domains/articles/repository.php:884, and 3 more places
filter
Filters the creation of the documentation reader home page. A listener creates the page and returns its ID or a WP_Error.
Parameters of davo_docs_create_reader_home Parameter Type Description $page_id int|\WP_Error|null The new page ID, or an error. Default null.
Returns int|\WP_Error|null
add_filter Copyadd_filter ( 'davo_docs_create_reader_home' , 'my_filter_callback' , 10 , 1 );
/**
* @param int|\WP_Error|null $page_id
*/
function my_filter_callback ( $page_id ) {
// Change $page_id as needed, then return it.
return $page_id ;
}src/domains/articles/routes.php:1073
filter
Filters the status of the documentation reader home page, which tells the admin whether the page exists.
Parameters of davo_docs_reader_home_status Parameter Type Description $status array<string, mixed> Status details. exists is false by default.
Returns array<string, mixed>
add_filter Copyadd_filter ( 'davo_docs_reader_home_status' , 'my_filter_callback' , 10 , 1 );
/**
* @param array<string, mixed> $status
*/
function my_filter_callback ( $status ) {
// Change $status as needed, then return it.
return $status ;
}src/domains/articles/routes.php:1109
filter
Filters the term meta keys moved with Articles terms.
Only keys holding plain values belong here; a key that stores the ID of another object would point at the wrong object on the destination.
Parameters of davo_migrations_articles_term_meta_keys Parameter Type Description $keys array<int, string> Term meta keys. Default the term icon key. $taxonomy string Taxonomy slug.
add_filter Copyadd_filter ( 'davo_migrations_articles_term_meta_keys' , 'my_filter_callback' , 10 , 2 );
/**
* @param array<int, string> $keys
* @param string $taxonomy
*/
function my_filter_callback ( $keys , $taxonomy ) {
// Change $keys as needed, then return it.
return $keys ;
}src/domains/articles/terms-migration-provider.php:313
action
Register custom article sidebar widgets.
Fired once per request, on 'init', after Articles' own core widgets have already been registered and the registry locked against further core registrations. Use $registry->register() — never register_core_widget(), which will simply fail.
Parameters of davo_register_article_sidebar_widgets Parameter Type Description $registry Articles_Sidebar_Registry Shared sidebar widget registry.
add_action Copyadd_action ( 'davo_register_article_sidebar_widgets' , 'my_action_callback' , 10 , 1 );
/**
* @param Articles_Sidebar_Registry $registry
*/
function my_action_callback ( $registry ) {
// Your code here.
}src/domains/articles/initializer.php:1269