Toolkit for Polylang 2.3.1 has 8 actions and 44 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Toolkit for Polylang fires an action
add_action( 'cpfm_register_notice', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Toolkit for Polylang is about to use
add_filter( 'cpfm_environment', function( $env ) {
// Change $env here.
return $env;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
cpfm_environment
filter/** * Filter the shared CPFM environment snapshot. */ apply_filters( 'cpfm_environment', $env ); -
cpfm_register_notice
action/** * Allow other plugins to register notices dynamically. Example usage in other * plugins: add_action('cpfm_register_notice', function() { * CPFM_Feedback_Notice::cpfm_register_notice('events', [ 'title' => 'Events * Plugin Notice', 'message' => 'This is a events dashboard setup notice.', * 'pages' => ['dashboard'], ]); }); */ do_action( 'cpfm_register_notice' ); -
dupcap_acf_nested_row_limit
filter/** * Max rows read per repeater or flexible content field. */ apply_filters( 'dupcap_acf_nested_row_limit', 50 ); -
/** * Filter detected active Polylang add-on labels. */ apply_filters( 'dupcap_active_polylang_addons', $names ); -
dupcap_checks
filter/** * Filter the list of check instances. */ apply_filters( 'dupcap_checks', $checks ); -
dupcap_content_section_keys
filter/** * Filter which issue groups appear in the Content section. */ apply_filters( 'dupcap_content_section_keys', $content_keys, $group ); -
dupcap_coverage_post_types
filter/** * Filter post types included in translation coverage. */ apply_filters( 'dupcap_coverage_post_types', $post_types ); -
dupcap_coverage_taxonomies
filter/** * Filter taxonomies included in translation coverage. */ apply_filters( 'dupcap_coverage_taxonomies', $taxonomies ); -
/** * Filter per-language coverage rows. */ apply_filters( 'dupcap_dashboard_language_coverage_rows', $rows, $default, $languages ); -
dupcap_dashboard_notices
action/** * Fires on the Translation Inspector dashboard notice area. */ do_action( 'dupcap_dashboard_notices' ); -
/** * Filter dashboard Elementor insight payload. */ apply_filters( 'dupcap_elementor_dashboard_insights', $result, $report ); -
/** * Filter Elementor document IDs before scanning. */ apply_filters( 'dupcap_elementor_document_ids', $ids, $this->default_lang ); -
/** * Filter Elementor loop widget types scanned for template references. */ apply_filters( 'dupcap_elementor_loop_widget_types', $types ); -
/** * Filter repeater translatable Elementor widget fields. */ apply_filters( 'dupcap_elementor_repeater_fields', $fields ); -
dupcap_elementor_scan_limit
filter/** * Max Elementor documents the deep scan parses. 0 (the default) scans every * document; a host that times out can set a cap here. */ apply_filters( 'dupcap_elementor_scan_limit', 0 ); -
/** * Filter which issue groups appear in the Elementor section. */ apply_filters( 'dupcap_elementor_section_keys', $keys, $group ); -
/** * Filter simple translatable Elementor widget fields. */ apply_filters( 'dupcap_elementor_simple_fields', $fields ); -
/** * Filter Elementor widget link settings. */ apply_filters( 'dupcap_elementor_simple_link_fields', $fields ); -
dupcap_force_rescan
filter/** * Force a fresh Translation Inspector scan. */ apply_filters( 'dupcap_force_rescan', false ); -
dupcap_inspector_topbar_urls
filter/** * Filter Translation Inspector topbar link URLs. */ apply_filters( 'dupcap_inspector_topbar_urls', array( 'support' => $support_url, 'docs' => $docs_url, ) ); -
dupcap_issue_groups
filter/** * Filter the Elementor insight bucket copy. */ apply_filters( 'dupcap_issue_groups', self::$elementor ); -
dupcap_issue_types
filter/** * Filter the issue type definitions. */ apply_filters( 'dupcap_issue_types', self::$definitions ); -
/** * Filter detected language switcher locations (label strings). */ apply_filters( 'dupcap_language_switcher_locations', $locations ); -
dupcap_onboarding_addons
filter/** * Filter the optional add-ons offered during onboarding. */ apply_filters( 'dupcap_onboarding_addons', $addons ); -
dupcap_onboarding_steps
filter/** * Filter onboarding steps. */ apply_filters( 'dupcap_onboarding_steps', $steps ); -
/** * Map of plugin basename => label for Polylang add-ons shown in Environment. */ apply_filters( 'dupcap_polylang_addon_plugins', $known ); -
/** * Filter alternate slugs tried when resolving an internal link URL. */ apply_filters( 'dupcap_resolve_url_slug_aliases', $aliases, $slug, $url ); -
dupcap_scan_results
filter/** * Allow other add-ons to inject extra results. */ apply_filters( 'dupcap_scan_results', $results ); -
dupcap_snapshot_field_limit
filter/** * Max characters of one field kept in a snapshot. */ apply_filters( 'dupcap_snapshot_field_limit', 20000 ); -
dupcap_snapshot_max_fields
filter/** * Max fields kept in a snapshot. */ apply_filters( 'dupcap_snapshot_max_fields', 400 ); -
dupcap_url_section_keys
filter/** * Filter which issue groups appear in the URLs & Routing section. */ apply_filters( 'dupcap_url_section_keys', $keys, $group ); -
dupcap_use_issue_normalizer
filter/** * Enable the normalized issue layer. */ apply_filters( 'dupcap_use_issue_normalizer', true ); -
pll_get_post_types
filterapply_filters( 'pll_get_post_types', $public_post_types, true ); -
pll_get_taxonomies
filterapply_filters( 'pll_get_taxonomies', $public_taxonomies, true ); -
cpfm_after_opt_in_{$id}
actiondo_action( "cpfm_after_opt_in_{$id}", self::CONSENT_CATEGORY ); -
do_action( "cpfm_after_opt_in_{$plugin_name}", $category ); -
cpfm_after_opt_out_{$id}
actiondo_action( "cpfm_after_opt_out_{$id}", self::CONSENT_CATEGORY ); -
do_action( "cpfm_after_opt_out_{$plugin_name}", $category ); -
dupcap_dashboard_environment
filterapply_filters( 'dupcap_dashboard_environment', array() ); -
apply_filters( 'dupcap_dashboard_language_coverage', array(), $results ); -
dupcap_dashboard_results
filterapply_filters( 'dupcap_dashboard_results', array() ); -
apply_filters( 'dupcap_elementor_dashboard_example_limit', 250 ); -
apply_filters( 'dupcap_elementor_dashboard_insight_limit', 6 ); -
apply_filters( 'dupcap_polylang_addon_filter_caption_txt', $new_caption, $new_attachment, $new_lang_slug ); -
dupcap_post_content
filterapply_filters( 'dupcap_post_content', $from_post_obj->post_content, $post, $new_lang->slug ); -
dupcap_post_content_filter
filterapply_filters( 'dupcap_post_content_filter', $content, $post, $new_lang_slug ); -
dupcap_post_title
filterapply_filters( 'dupcap_post_title', $from_post_obj->post_title, $new_lang->slug ); -
apply_filters( 'dupcap_untranslated_similarity_threshold', 0.80 ); -
pll_copy_post_metas
filterapply_filters( 'pll_copy_post_metas', $is_global_sync ? array( $meta_key ) : array(), true, (int) $source_id, (int) $translation_id, (string) $lang ); -
tfp_toolkit_admin_notices
actiondo_action( 'tfp_toolkit_admin_notices' ); -
do_action( 'tfp_toolkit_all_admin_notices' );
Generated from Toolkit for Polylang's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: