TranslatePress 3.4 has 35 actions and 277 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 TranslatePress fires an action
add_action( 'trp_set_translation_for_attribute', function( $nodes, $accessor, $translated_strings ) {
// Your code runs here.
}, 10, 3 );
// Change a value TranslatePress is about to use
add_filter( 'trp_flags_path', function( $value, $code ) {
// Change $value here.
return $value;
}, 10, 2 );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
-
trp_flags_path
filter/** * Custom language flag support */ apply_filters( 'trp_flags_path', '', $code ); -
/** * The filter 'trp_add_similar_and_original_strings_to_db' becomes true only * when TranslatePress Settings->Advanced Settings->Serve similar translations * for strings that are almost identical is set to 'Yes' This filter appears in * multiple places in this class since we use the function process_strings to * make sure all the strings are inserted in the DataBase with their * corresponding translation The... */ apply_filters( 'trp_add_similar_and_original_strings_to_db', false ); -
trp_force_custom_links
filter/** * Run the URL through the same filter that * TRP_Translation_Render::handle_custom_links_and_forms() applies to the href * of an <a> tag, so that Slider Revolution links obey the "Do not translate * certain paths" setting and any other filter hooked to it. */ apply_filters( 'trp_force_custom_links', $url_converter->get_url_for_language( $TRP_LANGUAGE, $local_url, '' ), $local_url, $TRP_LANGUAGE, null ); -
/** * Fires after a translation was written into a node attribute. */ do_action( 'trp_set_translation_for_attribute', $nodes[$i]['node'], $accessor, $translated_strings[$i] ); -
/** * Filter the Breakdance elements that render the current product title. */ apply_filters( 'trp_breakdance_product_title_elements', array( 'EssentialElements\\PostTitle', 'EssentialElements\\WooProductTitle', ) ); -
/** * Filter the query parameters preserved in hreflang URLs. */ apply_filters( 'trp_hreflang_preserved_query_args', $preserved_query_args, $url ); -
/** * Send printf conversions (%s, %1$s, %.2f) as 1TPnT tokens instead of * verbatim. A token leaves a hole an LLM may fill with invented words, * verbatim conversions get rewritten by Google Translate. */ apply_filters( 'trp_machine_translation_printf_as_tokens', $engine === 'google_translate_v2', $engine, $target_language_code, $source_language_code ); -
/** * Text to protect with spans, see wrap(). Each group's prefix must match * ANY_PREFIX_REGEX (trp-{name}-) and needs its own * trp_machine_translation_string_after_receive callback below priority 30, * where remove_leftover_tags() strips the spans nobody unwrapped and puts the * sent text back for tokens nobody restored * (TRP_Machine_Translation_Spans::restore_tokens()), so a token group doesn't * need a cal... */ apply_filters( 'trp_machine_translation_span_terms', $groups, $string, $target_language_code, $source_language_code ); -
/** * Filter a translation returned by the engine, before quotes and punctuation * are restored and it is saved. TranslatePress unwraps the glossary spans and * tokens at priority 10, the excluded word ones at 20, and strips leftover * spans (restoring leftover tokens) at 30. */ apply_filters( 'trp_machine_translation_string_after_receive', $machine_string, $sent_strings[$key], $original_strings[$key], $target_language_code, $source_language_code, $trp_exclude_words_from_automatic_translation ); -
/** * Filter a string right before it is sent to the translation engine. * TranslatePress wraps the excluded words, and for TranslatePress AI the * glossary terms, in spans here (priority 10), as 1TPnT tokens inside * attribute values, and the escaped percent sign %% as a 1TPnT token; markup * added here must be removed again on * trp_machine_translation_string_after_receive. */ apply_filters( 'trp_machine_translation_string_before_send', $decoded_strings[$key], $target_language_code, $source_language_code, $trp_exclude_words_from_automatic_translation ); -
/** * Attributes whose value is text an engine translates (lowercase names). * Excluded words and glossary terms in them are sent as 1TPnT tokens; in every * other attribute only printf conversions are. The value attribute of submit, * button and reset inputs is always text. */ apply_filters( 'trp_machine_translation_text_attributes', explode( ' ', self::TEXT_ATTRIBUTES ) ); -
/** * Roles considered "managerial" for email language purposes. */ apply_filters( 'trp_managerial_roles_for_email_language', [ 'administrator', 'editor', 'shop_manager' ] ); -
trp_pre_translating_html
filter/** * Tries to fix the HTML document. It is off by default. Use at own risk. * Solves the problem where a duplicate attribute inside a tag causes the * plugin to remove the duplicated attribute and all the other attributes to * the right of the it. */ apply_filters( 'trp_pre_translating_html', $output ); -
/** * Replace excluded words with other text in the translation. Applied once per * translated string, only when the sent string has trp-exclude spans or * tokens, or a printf token for a conversion in the exclude list (on master it * ran for every string). Return one replacement per word, in the same order; * any other count is ignored. A replacement is used for each span or token of * its word, except a span... */ apply_filters( 'trp_replace_placeholders_with', $words, $words, array(), $machine_string, $original_string, $target_language_code, $source_language_code ); -
/** * Override whether the translation already has a mark at this boundary, so the * original's ASCII mark is not restored. Not applied when the same ASCII mark * is already present (that is always kept). */ apply_filters( 'trp_restore_punctuation_boundary_has_mark', $has_mark, $char, $punctuation, $at_end, $original_string, $translated_string ); -
/** * TranslatePress START modifications */ apply_filters( 'trp_scan_gettext_translate_functions', array( '__', 'esc_attr__', 'esc_html__', '_e', 'esc_attr_e', 'esc_html_e', '_x', 'esc_attr_x', 'esc_html_x', '_ex', '_n', '_nx' ) ); -
trp_translating_capability
filterapply_filters( 'trp_translating_capability', 'manage_options' ); -
trp_settings_capability
filterapply_filters( 'trp_settings_capability', 'manage_options' ); -
trp_redirect_status
filterapply_filters( 'trp_redirect_status', 301, 'redirect_to_default_language_because_link_is_excluded_from_translation' ); -
trp_allow_tp_to_run
filterapply_filters( 'trp_allow_tp_to_run', true, $this->loader ); -
trp_secondary_languages
filterapply_filters( 'trp_secondary_languages', 1 ); -
apply_filters( 'trp_update_database_capability', 'manage_options' ); -
trp_add_ons_activate
actiondo_action( 'trp_add_ons_activate', $add_on ); -
trp_advanced_setting_list
filterapply_filters( 'trp_advanced_setting_list', $html ); -
apply_filters( 'trp_allow_machine_translation_for_string', true, $trimmed_string, null, null, $row ); -
trp_flag_file_name
filterapply_filters( 'trp_flag_file_name', $flag_file_name, $language_code ); -
trp_hreflang
filterapply_filters( 'trp_hreflang', $hreflang, $language ); -
sanitize_title
filterapply_filters( 'sanitize_title', $title, $raw_title, $context ); -
trp_add_ons_deactivate
actiondo_action( 'trp_add_ons_deactivate', $add_on ); -
trp_advanced_tab_add_element
filterapply_filters( 'trp_advanced_tab_add_element', $advanced_settings_array ); -
trp_allow_language_redirect
filterapply_filters( 'trp_allow_language_redirect', true, $needed_language, $this->url_converter->cur_page_url() ); -
trp_allow_string_saving
filterapply_filters( 'trp_allow_string_saving', true, array(), $chunk_update_strings ); -
trp_apply_gettext_early
filterapply_filters( 'trp_apply_gettext_early', false ); -
do_action( 'trp_before_output_advanced_settings_options' ); -
trp_edit_translation_url
filterapply_filters( 'trp_edit_translation_url', add_query_arg( 'trp-edit-translation', 'true', $url ) ); -
trp_flag_html
filterapply_filters( 'trp_flag_html', $html, $language_code, $flag_path ); -
trp_is_external_link
filterapply_filters( 'trp_is_external_link', true, $url, $home_url ); -
trp_is_rest_api_request
filterapply_filters( 'trp_is_rest_api_request', true ); -
trp_link_to_redirect_to
filterapply_filters( 'trp_link_to_redirect_to', $this->url_converter->get_url_for_language( $TRP_NEEDED_LANGUAGE, null, '' ), $TRP_NEEDED_LANGUAGE ); -
apply_filters( 'trp_ls_floater_show_disabled_language', true, $current_language, $this->settings ); -
apply_filters( 'trp_machine_translation_time_budget', 10 ); -
apply_filters( 'trp_migrate_post_type_or_tax_original_only_if_active', true, $extracted_slugs_array[ $key ]["original"], $values_array['type'] ); -
trp_mtapi_source_language
filterapply_filters( 'trp_mtapi_source_language', $this->machine_translation_codes[$source_language_code], $source_language_code, $target_language_code ); -
trp_needed_language
filterapply_filters( 'trp_needed_language', $needed_language, $lang_from_url, $this->settings, $trp ); -
apply_filters( 'trp_no_auto_translate_selectors', array( ), $TRP_LANGUAGE ); -
trp_settings_tabs
filterapply_filters( 'trp_settings_tabs', array() ); -
trp_stop_translating_page
filterapply_filters( 'trp_stop_translating_page', false, $output ); -
trp_table_name_dictionary
filterapply_filters( 'trp_table_name_dictionary', $table, $wpdb->prefix, $language, $source ); -
trp_wp_ajax_url
filterapply_filters( 'trp_wp_ajax_url', admin_url( 'admin-ajax.php' ) ); -
trp_wpbakery_skip_shortcodes
filterapply_filters( 'trp_wpbakery_skip_shortcodes', $this->get_skip_sc_array() ); -
trp_x
filterapply_filters( 'trp_x', $text, $original_text, $context, $domain, $language ); -
trp-scripts-for-editor
filterapply_filters( 'trp-scripts-for-editor', array( 'jquery', 'jquery-ui-core', 'jquery-effects-core', 'jquery-ui-resizable', 'trp-editor' ) ); -
trp-styles-for-editor
filterapply_filters( 'trp-styles-for-editor', array( 'dashicons', 'trp-editor-style', 'media-views', 'imgareaselect', 'buttons' ) ); -
do_action( "{$this->notificationId}_after_notification_dismissed", $current_user ); -
do_action( "{$this->notificationId}_after_notification_displayed", $current_user, $pagenow ); -
do_action( "{$this->notificationId}_before_notification_dismissed", $current_user ); -
do_action( "{$this->notificationId}_before_notification_displayed", $current_user, $pagenow ); -
do_action( "{$this->notificationId}_notification_displayed", $current_user, $pagenow ); -
apply_filters( "{$this->notificationId}_notification_message", '<div class="'. $this->notificationClass .'" style="position:relative;' . ((strpos($this->notificationClass, 'trp-narrow')!==false ) ? 'max-width: 825px;' : '') . '" >'.$this->notificationMessage.'</div>', $this->notificationMessage ); -
apply_filters( "cozmoslabs_plugin_optin_{$this->option_prefix}metadata_builder_metadata", $this->metadata ); -
apply_filters( 'cozmoslabs_plugin_optin_trp_metadata', $args ); -
disable_maybe_is_local_url
filterapply_filters( 'disable_maybe_is_local_url', false ); -
https_local_ssl_verify
filterapply_filters( 'https_local_ssl_verify', false ); -
plugin_locale
filterapply_filters( 'plugin_locale', get_locale(), $domain ); -
apply_filters( 'tp_handle_custom_links_in_translation_blocks', $handle_custom_links_in_translation_blocks ); -
apply_filters( "trp_{sanitize_key($context)}_ls_html_v2", $html, $list, $config, $layout ); -
apply_filters( 'trp_add_country_hreflang_tags', true ); -
trp_add_default_lang_tags
filterapply_filters( 'trp_add_default_lang_tags', true ); -
apply_filters( 'trp_add_google_v2_supported_languages_to_the_array', $supported_languages ); -
apply_filters( 'trp_add_hreflang_correct_iso_code', array( 'bel' => 'be' ) ); -
apply_filters( 'trp_add_language_to_home_url_check_for_admin', true, $url, $path ); -
trp_add_on_is_active
filterapply_filters( 'trp_add_on_is_active', false, $slug ); -
apply_filters( 'trp_add_ons_listing_allowed_items', array( 'plugins' => array( 'profile-builder/index.php', 'paid-member-subscriptions/index.php', 'wp-webhooks/wp-webhooks.php', ), 'add_ons' => array( 'tp-add-on-seo-pack/tp-seo-pack.php', 'tp-add-on-extra-languages/tp-extra-languages.php', 'tp-add-on-deepl/index.php', 'tp-add-on-automatic-language-detection/tp-automatic-language-detection.php', 'tp-add-on-translator-accounts/index.php', 'tp-add-... ); -
apply_filters( 'trp_add_region_independent_hreflang_tags', true ); -
trp_add_regional_lang_tags
filterapply_filters( 'trp_add_regional_lang_tags', true ); -
apply_filters( 'trp_add_translatepress_ai_supported_languages_to_the_array', $supported_languages ); -
apply_filters( 'trp_adjust_absolute_home_https_based_on_server_variable', true ); -
apply_filters( 'trp_advanced_setting_checkbox', $html ); -
apply_filters( "trp_advanced_setting_custom_{$setting['name']}", $setting ); -
trp_advanced_setting_input
filterapply_filters( 'trp_advanced_setting_input', $html ); -
apply_filters( 'trp_advanced_setting_input_array', $html ); -
trp_advanced_setting_radio
filterapply_filters( 'trp_advanced_setting_radio', $html ); -
trp_advanced_setting_select
filterapply_filters( 'trp_advanced_setting_select', $html ); -
apply_filters( 'trp_advanced_setting_separator', $html ); -
trp_advanced_setting_text
filterapply_filters( 'trp_advanced_setting_text', $html ); -
trp_affiliate_link
filterapply_filters( 'trp_affiliate_link', $link ); -
apply_filters( 'trp_after_excluded_tags_from_translation', $output_with_excluded_tags_removed['output'] ); -
trp_after_language_selector
actiondo_action( 'trp_after_language_selector', $this->settings ); -
trp_ai_api_key_labels
filterapply_filters( 'trp_ai_api_key_labels', $labels ); -
apply_filters( 'trp_allow_machine_translation_for_url', true, $trimmed_string ); -
apply_filters( 'trp_allow_translator_role_to_view_page_as_other_roles', true ); -
trp_apply_wp_kses_on_strings
filterapply_filters( 'trp_apply_wp_kses_on_strings', true ); -
apply_filters( 'trp_automatic_translation_engines_classes', array( 'mtapi' => 'TRP_MTAPI_Machine_Translator', 'google_translate_v2' => 'TRP_Google_Translate_V2_Machine_Translator', 'deepl' => $deepl_class_name ) ); -
trp_base_attribute_selectors
filterapply_filters( 'trp_base_attribute_selectors', array( 'data-trp-translate-id', 'data-trpgettextoriginal', 'data-trp-post-slug' ) ); -
apply_filters( 'trp_batch_async_dispatch_throttle', 5 ); -
trp_batch_async_request_args
filterapply_filters( 'trp_batch_async_request_args', $request_args, $flag_name ); -
apply_filters( 'trp_batch_loopback_request_headers', $headers ); -
apply_filters( 'trp_batch_status_poll_interval', 5000 ); -
trp_batch_upgrade_tasks
filterapply_filters( 'trp_batch_upgrade_tasks', array( 'trp_gettext_tables_optimization_330' => array( 'file' => 'tasks/class-gettext-tables-optimization.php', 'class' => 'TRP_Gettext_Tables_Optimization', 'running_notice' => sprintf( __( '%s is optimizing gettext database tables in the background. Translations continue to work while this runs.', 'translatepress-multilingual' ), '<strong>TranslatePress</strong>' ), 'completion_notice' => __(... ); -
trp_beautify_language_name
filterapply_filters( 'trp_beautify_language_name', $name, $code, $english_or_native, $language_codes ); -
do_action( 'trp_before_language_selector_heading', $this->settings ); -
do_action( 'trp_before_output_machine_translation_settings_options' ); -
trp_before_running_hooks
actiondo_action( 'trp_before_running_hooks', $this ); -
trp_before_translate_content
filterapply_filters( 'trp_before_translate_content', $output ); -
trp_bf_promotion_is_active
filterapply_filters( 'trp_bf_promotion_is_active', false ); -
trp_call_gettext_filters
actiondo_action( 'trp_call_gettext_filters' ); -
trp_change_form_action
filterapply_filters( 'trp_change_form_action', $action_in_current_language, $action_in_default_language, $TRP_LANGUAGE ); -
apply_filters( 'trp_change_search_dictionary_language', $TRP_LANGUAGE, $this, $query ); -
apply_filters( 'trp_check_sprintf_compatibility', true ); -
trp_common_html_tags
filterapply_filters( 'trp_common_html_tags', array( 'html', 'body', 'table', 'tbody', 'thead', 'th', 'td', 'tr', 'div', 'p', 'span', 'b', 'a', 'strong', 'center', 'br', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'img' ) ); -
trp_curpageurl
filterapply_filters( 'trp_curpageurl', $req_uri ); -
trp_custom_ajax_url
filterapply_filters( 'trp_custom_ajax_url', TRP_PLUGIN_URL . 'includes/trp-ajax.php' ); -
trp_default_editor_user_meta
filterapply_filters( 'trp_default_editor_user_meta', array( 'helpPanelOpened' => false, 'dismissTooltipSave' => false, 'dismissTooltipNext' => false, 'dismissTooltipPrevious' => false, 'dismissTooltipDismissAll' => false, 'dismissTooltipHumanorMachineTranslation' => false, 'dismissPreviousTabTooltip' => false, ) ); -
trp_delay_dom_changes_script
filterapply_filters( 'trp_delay_dom_changes_script', false ); -
apply_filters( 'trp_disable_automatic_translations_due_to_error', false ); -
trp_disable_error_manager
filterapply_filters( 'trp_disable_error_manager', false ); -
apply_filters( 'trp_disable_restore_punctuation_patterns', false ); -
apply_filters( 'trp_disable_restore_translation_quotes', false ); -
trp_dismiss_notification
actiondo_action( 'trp_dismiss_notification', $notification_id, $current_user ); -
trp_divi_modules_to_wrap
filterapply_filters( 'trp_divi_modules_to_wrap', array( 'et_pb_text', 'et_pb_post_title', 'et_pb_post_content', 'et_pb_blurb', 'et_pb_cta', 'et_pb_accordion', 'et_pb_toggle', 'et_pb_tabs', 'et_pb_testimonial', 'et_pb_pricing_tables', 'et_pb_number_counter', 'et_pb_countdown_timer' ) ); -
apply_filters( 'trp_do_these_shortcodes_before_automatic_translation', array('trp_language', 'language-include', 'language-exclude') ); -
apply_filters( 'trp_dont_adjust_width_of_ls_in_gutenberg', false ); -
apply_filters( 'trp_duplicate_detections_allowed', 100 ); -
apply_filters( 'trp_dynamic_cache_revalidate_after', 30 * MINUTE_IN_SECONDS ); -
trp_editor_data
filterapply_filters( 'trp_editor_data', $trp_editor_data ); -
apply_filters( 'trp_editor_missing_scripts_and_styles', array( 'jquery' => "<script type='text/javascript' src='" . includes_url( '/js/jquery/jquery.js' ) . "'></script>", 'trp-iframe-preview-script.js' => "<script type='text/javascript' src='" . TRP_PLUGIN_URL . "assets/js/trp-iframe-preview-script.js'></script>", 'trp-translate-dom-changes.js' => "<script>trp_data = '" . addslashes(json_encode($trp_data) ) . "'; trp_data = JSON.parse(trp_data);</s... ); -
trp_editor_nonces
filterapply_filters( 'trp_editor_nonces', $nonces ); -
trp_editor_notices
filterapply_filters( 'trp_editor_notices', $trp_editor_notices ); -
trp_editor_user_meta
filterapply_filters( 'trp_editor_user_meta', $user_meta ); -
apply_filters( 'trp_elements_to_avoid_when_is_file_is_called', array("index.php", "/../") ); -
trp_email_paths_
filterapply_filters( 'trp_email_paths_', array( 'templates/emails/', 'includes/emails/', 'woocommerce/emails/' ) ); -
trp_enable_batch_upgrades
filterapply_filters( 'trp_enable_batch_upgrades', true ); -
apply_filters( 'trp_enable_dynamic_translation', true ); -
trp_enable_indexeddb_cache
filterapply_filters( 'trp_enable_indexeddb_cache', true ); -
trp_enable_translatepress
filterapply_filters( 'trp_enable_translatepress', $enable_translatepress ); -
apply_filters( 'trp_enable_translation_blocks_querying', true ); -
apply_filters( 'trp_enqueue_style_language_switcher_css', true ); -
trp_error_details
actiondo_action( 'trp_error_details', $error_details ); -
apply_filters( 'trp_error_manager_page_output', '' ); -
apply_filters( 'trp_exclude_words_from_automatic_translation', array(), $imploded_strings, $target_language_code, $source_language_code ); -
apply_filters( 'trp_excluded_tags_from_translation', array('script', 'style') ); -
trp_extend_settings
actiondo_action( 'trp_extend_settings' ); -
apply_filters( 'trp_extra_sanitize_advanced_settings', $settings, $submitted_settings, $prev_settings ); -
apply_filters( 'trp_extra_sanitize_glossary_settings', $settings, $submitted_settings ); -
trp_extra_sanitize_settings
filterapply_filters( 'trp_extra_sanitize_settings', $settings ); -
trp_extra_settings
actiondo_action( 'trp_extra_settings', $this->settings ); -
trp_feed_camelcase_tags
filterapply_filters( 'trp_feed_camelcase_tags', array( 'pubDate', 'lastBuildDate' ) ); -
apply_filters( 'trp_filter_absolute_home_result', $this->absolute_home ); -
trp_flag_html_allowed_tags
filterapply_filters( 'trp_flag_html_allowed_tags', [ 'span' => [ 'class' => true, 'role' => true, 'aria-label' => true ], 'img' => [ 'src' => true, 'class' => true, 'alt' => true, 'role' => true, 'loading' => true ], ] ); -
trp_floater_ls_html_v2
filterapply_filters( 'trp_floater_ls_html_v2', $this->get_template( $this->template_path( "floating-switcher.php" ), compact( 'list', 'styles', 'config', 'viewport', 'positionClass', 'is_opposite', 'current_language' ), true ) ); -
apply_filters( 'trp_floating_language_switcher_style_vars', array_merge( [ '--bg' => $cfg['bgColor'] ?: 'transparent', '--bg-hover' => $cfg['bgHoverColor'] ?: 'transparent', '--text' => $cfg['textColor'] ?: '#000', '--text-hover' => $cfg['textHoverColor'] ?: '#000', '--border' => $cfg['borderWidth'] ? "{$cfg['borderWidth']}px solid {$cfg['borderColor']}" : 'none', '--border-radius' => $cfg['borderRadius'] ? $this->build_radius( $cfg['borderRadius'] ) : ... ); -
trp_floating_ls_html
filterapply_filters( 'trp_floating_ls_html', $floating_ls_html ); -
trp_force_search
filterapply_filters( 'trp_force_search', false ); -
trp_form_inputs
filterapply_filters( 'trp_form_inputs', '<input type="hidden" name="trp-form-language" value="' . $this->settings['url-slugs'][ $TRP_LANGUAGE ] . '"/>', $TRP_LANGUAGE, $this->settings['url-slugs'][ $TRP_LANGUAGE ], $row ); -
apply_filters( 'trp_get_default_trp_machine_translation_settings', array( 'machine-translation' => 'no', 'translation-engine' => 'mtapi', 'block-crawlers' => 'yes', 'automatically-translate-slug' => 'yes', 'machine_translation_counter_date' => date ("Y-m-d" ), 'machine_translation_limit_enabled' => 'no', 'machine_translation_limit' => 1000000, 'ai_words_notification_enabled' => 'yes', 'ai_words_notification_email' => '', 'ai_words_notification_threshold' => $t... ); -
apply_filters( 'trp_get_existing_translations', $dictionary, $prepared_query, $strings_array, $language_code, $block_type ); -
trp_get_lang_from_url_string
filterapply_filters( 'trp_get_lang_from_url_string', $lang, $url ); -
trp_get_url_for_language
filterapply_filters( 'trp_get_url_for_language', $new_url, $url, $language, $this->get_abs_home(), $lang_from_url_string, $this->get_url_slug( $language ) ); -
apply_filters( 'trp_gettext_allow_machine_translation', true, $source_language, $language, $new_strings, $gettext_queue ); -
apply_filters( 'trp_gettext_blacklist_functions', $default_blacklist_functions, $text, $translation, $domain ); -
apply_filters( 'trp_gettext_machine_translate_strings', array(), $new_strings, $language, $gettext_queue ); -
apply_filters( 'trp_gettext_pending_storage_chunk_size', 250 ); -
trp_gettext_source_language
filterapply_filters( 'trp_gettext_source_language', 'en_US', $language, array(), $gettext_queue ); -
apply_filters( 'trp_glossary_languages_without_word_boundaries', array( 'zh', 'ja', 'th', 'lo', 'km', 'my', 'bo' ) ); -
apply_filters( 'trp_glossary_replace_batch_size', self::BATCH_SIZE ); -
apply_filters( 'trp_glossary_replace_sync_batch_size', self::SYNC_BATCH_SIZE ); -
apply_filters( 'trp_glossary_replace_sync_time_limit', self::SYNC_TIME_LIMIT ); -
apply_filters( 'trp_handle_custom_links_and_forms_in_default_language', true ); -
apply_filters( 'trp_hdom_quote_default_double_quotes', '"' ); -
trp_head
actiondo_action( 'trp_head' ); -
trp_help_panel_content
filterapply_filters( 'trp_help_panel_content', array( array( 'title' => esc_html__( 'Quick Intro', 'translatepress-multilingual' ), 'content' => wp_kses(sprintf( __( 'Hover any text on the page, click %s,<br> then modify the translation in the sidebar.', 'translatepress-multilingual' ), $edit_icon), array( 'svg' => array( 'class' => array(),'xmlns' => array(),'visibility'=>array(), 'viewbox' => array(), 'aria-hidden' => array(), 'focusable'... ); -
trp_home_url
filterapply_filters( 'trp_home_url', $new_url, $abs_home, $TRP_LANGUAGE, $path, $url ); -
apply_filters( 'trp_href_from_translated_page', $a_href->href, $this->settings['default-language'] ); -
trp_ignore_cdata
filterapply_filters( 'trp_ignore_cdata', true ); -
trp_import_export_batch_size
filterapply_filters( 'trp_import_export_batch_size', 1000 ); -
apply_filters( 'trp_import_export_time_budget', 2 ); -
trp_import_sources
filterapply_filters( 'trp_import_sources', $sources ); -
apply_filters( 'trp_initialize_gutenberg_blocks', true ); -
trp_is_admin_link
filterapply_filters( 'trp_is_admin_link', $is_admin_link, $url, $admin_url, $wp_login_url ); -
apply_filters( 'trp_is_ajax_on_frontend_without_referer', false ); -
trp_is_file
filterapply_filters( 'trp_is_file', true, $path ); -
apply_filters( 'trp_is_page_builder_editor_request', $is_builder_request ); -
trp_is_sql_values_accepted
filterapply_filters( 'trp_is_sql_values_accepted', $return ); -
apply_filters( 'trp_keep_permalinks_unchanged', false ); -
trp_language_name
filterapply_filters( 'trp_language_name', $languages[$language_code], $language_code, $english_or_native_name, $language_codes ); -
trp_language_selector
actiondo_action( 'trp_language_selector', $languages ); -
do_action( 'trp_language_selector_extend_table_heading', $this->settings, $show_formality ); -
do_action( 'trp_language_selector_extend_table_row_end', $selected_language_code, $default_language, $this->settings, $show_formality ); -
do_action( 'trp_language_selector_extend_table_row_middle', $selected_language_code, $default_language, $this->settings, $show_formality ); -
apply_filters( 'trp_language_selector_wrapper_classes', array( 'trp-languages-table__wrapper' ), $this->settings ); -
trp_language_switcher_output
filterapply_filters( 'trp_language_switcher_output', array( 'full-names' => array( 'full_names' => true, 'short_names' => false, 'flags' => false, 'no_html' => false, 'label' => __( 'Full Language Names', 'translatepress-multilingual' ) ), 'short-names' => array( 'full_names' => false, 'short_names' => true, 'flags' => false, 'no_html' => false, 'label' => __( 'Short Language Names', 'translatepress-multilingual' ) ), 'flags-full-names' => array(... ); -
trp_languages
filterapply_filters( 'trp_languages', $this->languages[$english_or_native_name], $english_or_native_name ); -
apply_filters( 'trp_ls_floating_current_language', $current_language, $published_languages, $TRP_LANGUAGE, $this->settings ); -
apply_filters( 'trp_ls_floating_other_languages', $other_languages, $published_languages, $TRP_LANGUAGE, $this->settings ); -
apply_filters( 'trp_ls_shortcode_current_language', $current_language, $published_languages, $TRP_LANGUAGE, $this->settings ); -
apply_filters( 'trp_ls_shortcode_other_languages', $other_languages, $published_languages, $TRP_LANGUAGE, $this->settings ); -
apply_filters( 'trp_ls_shortcode_show_disabled_language', true, $current_language, $current_language_preference, $this->settings ); -
apply_filters( 'trp_machine_translation_engines', array() ); -
do_action( 'trp_machine_translation_extra_settings_bottom', $this->settings['trp_machine_translation_settings'] ); -
do_action( 'trp_machine_translation_extra_settings_middle', $this->settings['trp_machine_translation_settings'] ); -
apply_filters( 'trp_machine_translation_lock_timeout', 50 ); -
apply_filters( 'trp_machine_translation_possible_subtabs', array( 'trp_mt_subtab_general', 'trp_mt_subtab_advanced' ) ); -
apply_filters( 'trp_machine_translation_sanitize_settings', $settings, $mt_settings ); -
apply_filters( 'trp_machine_translation_subtabs', array( 'general' => array( 'id' => 'trp_mt_subtab_general', 'label' => __( 'General', 'translatepress-multilingual' ), 'url' => $on_mt_page ? '' : add_query_arg( 'tab', 'trp_mt_subtab_general', $mt_page_url ) ), 'glossary' => array( 'id' => 'trp_mt_subtab_glossary', 'label' => __( 'Glossary', 'translatepress-multilingual' ), 'url' => admin_url( 'admin.php?page=trp_machine_translation_glossary' ... ); -
apply_filters( 'trp_machine_translator_crawlers', 'rambler|abacho|acoi|accona|aspseek|altavista|estyle|scrubby|lycos|geona|ia_archiver|alexa|sogou|skype|facebook|twitter|pinterest|linkedin|naver|bing|google|yahoo|duckduckgo|yandex|baidu|teoma|xing|java\/1.7.0_45|bot|crawl|slurp|spider|mediapartners|\sask\s|\saol\s' ); -
apply_filters( 'trp_machine_translator_is_available', $is_available, $languages, $settings ); -
apply_filters( 'trp_machine_translator_referer', $this->referer ); -
trp_map_wp_codes_to_google
filterapply_filters( 'trp_map_wp_codes_to_google', array( 'zh_HK' => 'zh-TW', 'zh_TW' => 'zh-TW', 'zh_CN' => 'zh-CN', 'nb_NO' => 'no' ) ); -
trp_media_url_node_types
filterapply_filters( 'trp_media_url_node_types', array( 'image_src', 'picture_image_src', 'picture_source_srcset', 'video_src', 'video_poster', 'video_source_src', 'audio_src', 'audio_source_src', 'meta_desc_img', ) ); -
trp_merge_rules
filterapply_filters( 'trp_merge_rules', $merge_rules ); -
apply_filters( 'trp_minimal_characters_per_strings_considered_for_similarity', 50 ); -
apply_filters( 'trp_minimal_percent_of_compatibility_for_strings_to_be_similar', 0.95 ); -
apply_filters( 'trp_minimum_translation_length', 2 ); -
apply_filters( 'trp_mt_available_supported_languages', $all_are_available, $languages, $this->settings ); -
trp_mtapi_chunk_size
filterapply_filters( 'trp_mtapi_chunk_size', 50 ); -
apply_filters( 'trp_mtapi_formality_languages', $formality_supported_languages ); -
trp_mtapi_target_language
filterapply_filters( 'trp_mtapi_target_language', $this->machine_translation_codes[$target_language_code], $source_language_code, $target_language_code ); -
trp_no_translate_selectors
filterapply_filters( 'trp_no_translate_selectors', array( '#wpadminbar' ), $TRP_LANGUAGE ); -
trp_node_accessors
filterapply_filters( 'trp_node_accessors', array( 'text' => array( 'accessor' => 'outertext', 'attribute' => false ), 'block' => array( 'accessor' => 'innertext', 'attribute' => false ), 'image_src' => array( 'selector' => 'img[src]', 'accessor' => 'src', 'attribute' => true ), 'submit' => array( 'selector' => 'input[type=\'submit\'],input[type=\'button\'], input[type=\'reset\']', 'accessor' => 'value', 'attribute' => true ), 'placehold... ); -
trp_node_type_categories
filterapply_filters( 'trp_node_type_categories', array( $string_groups['metainformation'] => array( 'meta_desc', 'page_title', 'meta_desc_img' ), $string_groups['images'] => array( 'image_src', 'picture_source_srcset', 'picture_image_src' ), $string_groups['videos'] => array( 'video_src', 'video_poster', 'video_source_src'), $string_groups['audios'] => array( 'audio_src', 'audio_source_src'), ) ); -
trp_node_type_descriptions
filterapply_filters( 'trp_node_type_descriptions', array( array( 'type' => 'meta_desc', 'attribute' => 'name', 'value' => 'description', 'description' => esc_html__( 'Description', 'translatepress-multilingual' ) ), array( 'type' => 'meta_desc', 'attribute' => 'property', 'value' => 'article:section', 'description' => esc_html__( 'Article Section', 'translatepress-multilingual' ) ), array( 'type' => 'meta_desc', 'attribute' => 'property', 'valu... ); -
apply_filters( 'trp_oembed_response_data_translatable_items', array('title', 'html', 'provider_name') ); -
apply_filters( 'trp_old_css_styling_for_floater_ls', false ); -
apply_filters( 'trp_old_css_styling_for_shortcode_ls', false ); -
do_action( 'trp_output_advanced_settings_options' ); -
trp_output_buffer_chunk_size
filterapply_filters( 'trp_output_buffer_chunk_size', $chunk_size ); -
trp_paid_addons
filterapply_filters( 'trp_paid_addons', array( 'TRP_IN_Automatic_Language_Detection', 'TRP_IN_Browse_as_other_Role', 'TRP_IN_Extra_Languages', 'TRP_IN_Navigation_Based_on_Language', 'TRP_IN_Seo_Pack', 'TRP_IN_Translator_Accounts', 'TRP_Automatic_Language_Detection', 'TRP_Browse_as_other_Role', 'TRP_Extra_Languages', 'TRP_Navigation_Based_on_Language', 'TRP_Seo_Pack', 'TRP_Translator_Accounts', ) ); -
apply_filters( 'trp_paths_to_scan_for_gettext', array_merge( $this->get_active_plugins_paths(), $this->get_active_theme_paths() ) ); -
trp_php_version
filterapply_filters( 'trp_php_version', phpversion() ); -
trp_plugin_install_slugs
filterapply_filters( 'trp_plugin_install_slugs', $slugs ); -
trp_possible_values_for_tab
filterapply_filters( 'trp_possible_values_for_tab', array('ald_settings', 'troubleshooting', 'exclude_strings', 'debug', 'miscellaneous_options', 'custom_language') ); -
trp_pre_get_url_for_language
filterapply_filters( 'trp_pre_get_url_for_language', $url, $language, $this->get_abs_home(), $this->get_lang_from_url_string( $url ), $this->get_url_slug( $language ) ); -
apply_filters( 'trp_prevent_concurrent_machine_translation', true, $strings, $target_language_code, $source_language_code ); -
apply_filters( 'trp_prevent_permalink_update_on_other_languages', true ); -
trp_process_gettext_tags
filterapply_filters( 'trp_process_gettext_tags', $wrapped_translation, $translation, $skip_gettext_querying, $text, $domain ); -
trp_process_other_text_nodes
filterapply_filters( 'trp_process_other_text_nodes', $row ); -
apply_filters( 'trp_processing_gettext_is_needed', $should_process ); -
apply_filters( 'trp_register_advanced_settings', array() ); -
apply_filters( 'trp_rest_api_skip_shortcode_translation', true, $data ); -
apply_filters( 'trp_rest_api_translation_config', $default_config ); -
apply_filters( 'trp_rest_api_translation_max_depth', 5 ); -
apply_filters( 'trp_safe_json_encode_pretty_print', true ); -
trp_sanitized_query_args
filterapply_filters( 'trp_sanitized_query_args', $query_args, $string_type, $string_types ); -
do_action( 'trp_save_editor_translations_gettext_strings', $update_strings, $this->settings ); -
do_action( 'trp_save_editor_translations_regular_strings', $update_strings, $this->settings ); -
apply_filters( 'trp_saving_advanced_settings_is_successful', true, $settings, $submitted_settings ); -
trp_settings_active_tab
filterapply_filters( 'trp_settings_active_tab', $active_tab ); -
trp_shortcode_ls_html_v2
filterapply_filters( 'trp_shortcode_ls_html_v2', $html, $list, $config, $layout ); -
apply_filters( 'trp_show_dynamic_content_before_translation', false ); -
apply_filters( 'trp_show_language_upgrade_notice', true ); -
apply_filters( 'trp_show_notification_about_review', $show_review_notice, $notification_dismissed, $site_meets_conditions_for_review ); -
apply_filters( 'trp_show_regular_strings_string_translation', true ); -
apply_filters( 'trp_skip_add_language_to_home_url', false, $url, $path ); -
trp_skip_form_action
filterapply_filters( 'trp_skip_form_action', false, $form_action ); -
trp_skip_gettext_processing
filterapply_filters( 'trp_skip_gettext_processing', false, $translation, $text, $domain ); -
trp_skip_gettext_querying
filterapply_filters( 'trp_skip_gettext_querying', false, $translation, $text, $domain ); -
apply_filters( 'trp_skip_machine_translation_for_attr', array( 'href', 'src', 'poster', 'srcset' ) ); -
apply_filters( 'trp_skip_punctuation_only_strings', true ); -
apply_filters( 'trp_skip_selectors_from_dynamic_translation', array( '[data-no-translation]', '[data-no-dynamic-translation]', '[data-trp-translate-id-innertext]', 'script', 'style', 'head', 'trp-span', 'translate-press' ), $TRP_LANGUAGE, $this->settings ); -
apply_filters( 'trp_skip_strings_containing_key_terms', array( array( 'terms'=> array( 'function', 'return', 'if', '==' ), 'operator' => 'and' ) ) ); -
apply_filters( 'trp_skip_strings_from_dynamic_translation', array() ); -
apply_filters( 'trp_skip_strings_from_dynamic_translation_for_substrings', array( 'href' => array('amazon-adsystem', 'googleads', 'g.doubleclick') ) ); -
trp_skip_url_for_language
filterapply_filters( 'trp_skip_url_for_language', false, $url ); -
apply_filters( 'trp_source_language_translation_blocks', '', $default_language, $language_code ); -
trp_st_default_actions
filterapply_filters( 'trp_st_default_actions', $actions ); -
trp_st_default_filters
filterapply_filters( 'trp_st_default_filters', $filters ); -
trp_st_editor_strings
filterapply_filters( 'trp_st_editor_strings', $st_editor_strings ); -
trp_st_string_types_config
filterapply_filters( 'trp_st_string_types_config', $string_types_config, $this ); -
apply_filters( 'trp_start_output_buffer_priority', 0 ); -
trp_string_group_order
filterapply_filters( 'trp_string_group_order', array_values( $this->string_groups() ) ); -
trp_string_groups
filterapply_filters( 'trp_string_groups', $string_groups ); -
apply_filters( 'trp_string_translation_config', $config ); -
trp_string_translation_data
filterapply_filters( 'trp_string_translation_data', $string_translation_data ); -
do_action( 'trp_string_translation_editor_head' ); -
apply_filters( 'trp_string_translation_nonces', $nonces, $type ); -
trp_string_types
filterapply_filters( 'trp_string_types', $string_types ); -
apply_filters( 'trp_subdirectory_for_default_language_disabled', false ); -
apply_filters( 'trp_subdirectory_for_default_language_note', '' ); -
trp_table_name_gettext
filterapply_filters( 'trp_table_name_gettext', $this->db->prefix . 'trp_gettext_' . strtolower( $language_code ), $this->db->prefix, $language_code ); -
apply_filters( 'trp_table_name_machine_translation_locks', sanitize_text_field( $this->db->prefix . 'trp_machine_translation_locks' ), $this->db->prefix ); -
trp_table_name_original_meta
filterapply_filters( 'trp_table_name_original_meta', sanitize_text_field( $this->db->prefix . 'trp_original_meta' ), $this->db->prefix ); -
apply_filters( 'trp_table_name_original_strings', sanitize_text_field( $this->db->prefix . 'trp_original_strings' ), $this->db->prefix ); -
apply_filters( 'trp_temporary_change_current_user_role', $current_user, $view_as ); -
apply_filters( 'trp_translate_encoded_html_as_html', true ); -
apply_filters( 'trp_translate_encoded_html_as_string', false ); -
apply_filters( 'trp_translate_regular_strings', $translate_normal_strings ); -
trp_translate_this_href
filterapply_filters( 'trp_translate_this_href', $translate_href, $row, $TRP_LANGUAGE, $trimmed_string ); -
do_action( 'trp_translateable_information', $translateable_information, $translated_strings, $language_code ); -
do_action( 'trp_translateable_information_manual', $translateable_information_manual, $translated_strings_manual, $language_code ); -
trp_translateable_strings
filterapply_filters( 'trp_translateable_strings', $translateable_information, $html, $no_translate_attribute, $TRP_LANGUAGE, $language_code, $this ); -
apply_filters( 'trp_translateable_strings_manual', array( 'translateable_strings_manual' => $translateable_strings_manual, 'nodes_manual' => $nodes_manual ), $html, $no_translate_attribute, $TRP_LANGUAGE, $language_code, $this ); -
trp_translated_html
filterapply_filters( 'trp_translated_html', $final_html, $TRP_LANGUAGE, $language_code, $preview_mode ); -
trp_updates_details
filterapply_filters( 'trp_updates_details', array( 'remove_cdata_original_and_dictionary_rows' => array( 'version' => '0', 'option_name' => 'trp_remove_cdata_original_and_dictionary_rows', 'callback' => array( $this->trp_query,'remove_cdata_in_original_and_dictionary_tables'), 'batch_size' => 1000, 'message_initial' => '', ), 'remove_untranslated_links_dictionary_rows' => array( 'version' => '0', 'option_name' => 'trp_remove_untranslated... ); -
trp_updb_batch_size
filterapply_filters( 'trp_updb_batch_size', $update_details['batch_size'], sanitize_text_field( $_REQUEST['trp_updb_action'] ), $update_details ); -
trp_url_is_file
filterapply_filters( 'trp_url_is_file', $return, $url, $this->get_abs_home() ); -
trp_use_bundled_translations
filterapply_filters( 'trp_use_bundled_translations', true ); -
trp_view_as_values
filterapply_filters( 'trp_view_as_values', $view_as_roles ); -
apply_filters( 'trp_whitelisted_shortcodes_for_wp_mail', array( 'trp_language', 'language-include', 'language-exclude' ) ); -
trp_woo_email_language
filterapply_filters( 'trp_woo_email_language', $language, $is_customer_email, $recipients, $user_id ); -
apply_filters( 'trp_woo_translate_title_before_translate_page', array( 'wc_add_to_cart_message' ) ); -
trp_wp_bakery_invalid_params
filterapply_filters( 'trp_wp_bakery_invalid_params', $bool, $arr ); -
trp_wp_languages
filterapply_filters( 'trp_wp_languages', $default + $this->wp_languages ); -
apply_filters( 'trp_wrap_with_post_id_overrule', true, $content, $id ); -
trp-exclude-hreflang
filterapply_filters( 'trp-exclude-hreflang', false, $original_url ); -
do_action( 'trp/language-switcher/render_callback', $attributes, $content );
Generated from TranslatePress'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: