LATW AI Translation for TranslatePress 1.1.2 has 19 actions and 34 filters, read directly from its source code on Nov 19, 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 LATW AI Translation for TranslatePress fires an action
add_action( 'latwaitt_admin_menu', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );
// Change a value LATW AI Translation for TranslatePress is about to use
add_filter( 'https_local_ssl_verify', function( $value ) {
// Change $value here.
return $value;
}, 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
-
/** * This filter is documented in wp-includes/class-wp-http-streams.php */ apply_filters( 'https_local_ssl_verify', false ); -
/** * The data object handed to admin.js as latwaittAdmin. */ apply_filters( 'latwaitt_admin_localize', array( 'ajax_url' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('latwaitt_action'), 'strings' => array( 'confirm_translate' => __('Are you sure you want to translate this post?', 'latw-ai-translation-for-translatepress'), 'translating' => __('Translating...', 'latw-ai-translation-for-translatepress'), 'success' => __('Translation completed successfully', 'latw-ai-translation-for-tr... ); -
/** * Fires right below the prompt field. */ do_action( 'latwaitt_after_prompt_field', $latwaitt_prompt_editable, $latwaitt_display_prompt ); -
/** * Settings of an extension that LATW Cloud owns while connected. LATW Cloud * has to offer the same key for this plugin (plugin-settings.ts in the panel). */ apply_filters( 'latwaitt_cloud_settings', array() ); -
/** * The LATW panel this site pairs with. */ apply_filters( 'latwaitt_cloud_url', $url ); -
/** * Build an engine instance for an id the core does not know. */ apply_filters( 'latwaitt_create_provider', null, $provider ); -
/** * Fires at the end of the dashboard card grid. */ do_action( 'latwaitt_dashboard_cards' ); -
/** * The prompt used when the site has not stored one of its own. */ apply_filters( 'latwaitt_default_prompt', LATWAITT_LLM_API::DEFAULT_PROMPT ); -
/** * The dispatch mode for a job. */ apply_filters( 'latwaitt_dispatch_mode', $mode, $provider ); -
/** * Whether the TranslatePress editor integration is active: the Translate with * AI button and the String Translation bulk action. */ apply_filters( 'latwaitt_editor_button_enabled', $enabled ); -
/** * How many strings go to the engine in one on-the-fly request. */ apply_filters( 'latwaitt_engine_chunk_size', $size ); -
/** * The engine and model TranslatePress's on-the-fly mode uses. */ apply_filters( 'latwaitt_engine_model', $choice ); -
/** * Whether the Pro add-on is installed and licensed. */ apply_filters( 'latwaitt_is_pro', false ); -
/** * Per-model token prices. */ apply_filters( 'latwaitt_model_pricing', self::PRICING ); -
/** * The selectable model catalogue for one engine. */ apply_filters( 'latwaitt_models', $models, $provider ); -
/** * Which engines are plain machine-translation engines. */ apply_filters( 'latwaitt_mt_providers', array(self::PROVIDER_GOOGLE_MT, self::PROVIDER_MYMEMORY) ); -
/** * How a post that is already translated gets re-translated. */ apply_filters( 'latwaitt_outdated_mode', self::MODE_FULL, (int) $post_id, (string) $target_lang, (string) $origin ); -
/** * The scope-specific instruction added to the prompt. */ apply_filters( 'latwaitt_payload_scope_note', $note, $this->payload_scope ); -
/** * Whether this post should be queued for this language at all. */ apply_filters( 'latwaitt_pre_dispatch', true, $post_id, $target_lang ); -
/** * Whether the prompt is a field rather than a fixed text. */ apply_filters( 'latwaitt_prompt_editable', false ); -
/** * Selectable translation engines, as id => label. */ apply_filters( 'latwaitt_providers', $providers ); -
/** * The translation actually published for each reference string. */ apply_filters( 'latwaitt_published_translations', $translated, $source, (int) $post_id, (int) $post_id, (string) $target_lang ); -
/** * Fires after the core has registered its settings. */ do_action( 'latwaitt_register_settings' ); -
/** * Buttons beside the Translate Again modal's Back button. */ do_action( 'latwaitt_retranslate_modal_actions' ); -
/** * Fires while the settings form is being saved, before the redirect. */ do_action( 'latwaitt_save_settings', $current_tab ); -
/** * Renders the body of a tab the core does not know about. */ do_action( "latwaitt_settings_tab_{$latwaitt_current_tab}" ); -
/** * The settings screen's tabs. */ apply_filters( 'latwaitt_settings_tabs', $tabs ); -
/** * Fires at the end of the Translation tab's table. */ do_action( 'latwaitt_settings_translation_tab_end' ); -
/** * Which kinds of TranslatePress string the plugin offers to translate. */ apply_filters( 'latwaitt_string_scope', array(self::TYPE_REGULAR, self::TYPE_GETTEXT) ); -
/** * The strings coming back from the model, before anything is saved. */ apply_filters( 'latwaitt_translated_strings', $parsed['translated_content'], $translation ); -
/** * Fires after a translated page has been written. */ do_action( 'latwaitt_translation_completed', $post_id, $completed_at, $translation ); -
/** * The prompt template, before its placeholders are filled in. */ apply_filters( 'latwaitt_translation_prompt', self::get_default_prompt(), array( 'source_lang' => (string) $source_lang, 'target_lang' => (string) $target_lang, ) ); -
/** * The provider handling this dispatch. */ apply_filters( 'latwaitt_translation_provider', self::PROVIDER ); -
/** * Fires after any completed translation has been written. */ do_action( 'latwaitt_translation_saved', $translation, $completed_at ); -
/** * How many columns the table below has. */ apply_filters( 'latwaitt_translations_column_count', 6 ); -
/** * Buttons that act on the table as a whole. */ do_action( 'latwaitt_translations_table_actions', $latwaitt_current_tab ); -
/** * Column headers before the core's own. */ do_action( 'latwaitt_translations_table_header', $latwaitt_current_tab ); -
/** * Cells before the core's own, one per added column. */ do_action( 'latwaitt_translations_table_row', $latwaitt_post, $latwaitt_current_tab, $latwaitt_blocked ); -
do_action( 'latwaitt_activated' ); -
do_action( 'latwaitt_after_init' ); -
do_action( 'latwaitt_before_init' ); -
do_action( 'latwaitt_deactivated' ); -
do_action( 'latwaitt_log', $message, $level, $context ); -
do_action( 'latwaitt_modules_loaded' ); -
apply_filters( 'latwaitt_prompt_glossary', '', $source_lang, $target_lang ); -
apply_filters( 'latwaitt_provider_api', $api, $row_provider, $translation ); -
apply_filters( 'latwaitt_queue_concurrency', 1 ); -
apply_filters( 'trp_allow_string_saving', true, array(), $update ); -
apply_filters( 'trp_gettext_source_language', 'en_US', (string) $target_lang, array(), array() ); -
apply_filters( 'trp_machine_translation_lock_timeout', 50 ); -
apply_filters( 'trp_machine_translation_time_budget', 10 ); -
trp_prevent_concurrent_machine_translation
filter Used by 2 plugins → Copy link Customise this hookapply_filters( 'trp_prevent_concurrent_machine_translation', true, $strings, $target_lang, $source_lang );
Generated from LATW AI Translation for TranslatePress's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: