Multilingual AI Translator 1.1.1 has 30 actions and 97 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 Multilingual AI Translator fires an action
add_action( 'lmat_init_options_for_blog', function( $object, $current_blog_id, $arg3 ) {
// Your code runs here.
}, 10, 3 );
// Change a value Multilingual AI Translator is about to use
add_filter( 'lmat_get_post_types', function( $post_types, $arg2 ) {
// Change $post_types here.
return $post_types;
}, 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
-
/** * Filters the list of post types available for translation. The default are * post types which have the parameter βpublicβ set to true. The filter * must be added soon in the WordPress loading process: in a function hooked to * βplugins_loadedβ or directly in functions.php for themes. */ apply_filters( 'lmat_get_post_types', $post_types, false ); -
/** * Filters the list of taxonomies available for translation. The default are * taxonomies which have the parameter βpublicβ set to true. The filter * must be added soon in the WordPress loading process: in a function hooked to * βplugins_loadedβ or directly in functions.php for themes. */ apply_filters( 'lmat_get_taxonomies', $taxonomies, false ); -
/** * Filter whether to hide an archive translation url */ apply_filters( 'lmat_hide_archive_translation_url', ! $count, $language->slug, array( 'taxonomy' => $term->taxonomy ) ); -
/** * Fires after the options have been init for the current blog. This is the * best place to register options. */ do_action( 'lmat_init_options_for_blog', $this, $this->current_blog_id, $this->is_plugin_active() ); -
/** * This action is documented in frontend/choose-lang.php */ do_action( 'lmat_language_defined', $this->curlang->slug, $this->curlang ); -
/** * This action is documented in include/class-linguator.php */ do_action( 'lmat_no_language_defined' ); -
/** * This filter is documented in wp-includes/general-template.php */ apply_filters( 'get_calendar', $cache[ $key ], $args ); -
/** * Filters the Linguator cookie duration. */ apply_filters( 'lmat_cookie_expiration', YEAR_IN_SECONDS ); -
/** * This action is documented in include/choose-lang.php */ do_action( 'lmat_home_requested' ); -
/** * Filters the rewrite rules to modify. */ apply_filters( 'lmat_modify_rewrite_rule', true, array( $key => $rule ), $filter, false ); -
/** * Filter the post content for translation. */ apply_filters( 'lmat_post_content_for_translation', $content, $post_id ); -
/** * Fires after the post language and translations are saved. */ do_action( 'lmat_save_post', $post_id, $post, $this->model->post->get_translations( $post_id ) ); -
/** * Fires after the term language and translations are saved. */ do_action( 'lmat_save_term', $term_id, $taxonomy, $this->model->term->get_translations( $term_id ) ); -
/** * This filter is documented in include/filters-links.php */ apply_filters( 'lmat_term_link', $_link, $this->curlang, $term ); -
/** * This filter is documented in include/switcher.php */ apply_filters( 'lmat_the_languages_args', $options ); -
/** * This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ apply_filters( 'widget_title', $title, $instance, $this->id_base ); -
/** * This action is documented in wp-includes/class-wp-locale-switcher.php */ do_action( 'change_locale', $new_locale ); -
/** * Filter the class to instantiate when loading admin filters */ apply_filters( "linguator_{$obj}", 'Linguator_Admin_' . $class ); -
/** * Filters whether we should load the cache compatibility */ apply_filters( 'linguator_is_cache_active', ( defined( 'WP_CACHE' ) && WP_CACHE ) || defined( 'WPFC_MAIN_PATH' ) ); -
/** * Fires when a non default action has been sent to Linguator settings */ do_action( "lmat_action_{$action}" ); -
/** * Filters an url after the paged part has been added. */ apply_filters( 'lmat_add_paged_to_link', user_trailingslashit( trailingslashit( $url ) . 'page/' . $page, 'paged' ), $url, $page ); -
/** * Filters additional data to add to the language before it is created. */ apply_filters( 'lmat_additional_language_data', $additional_data, $data ); -
/** * Filters the list of parameters to add to the admin ajax request. */ apply_filters( 'lmat_admin_ajax_params', $params ); -
/** * Filters the current language used by Linguator in the admin context. */ apply_filters( 'lmat_admin_current_language', $this->curlang, $this ); -
/** * Filters the admin languages filter submenu items */ apply_filters( 'lmat_admin_languages_filter', $items, $all_items ); -
/** * Filters the preferred language on admin side. The preferred language is used * for example to determine the language of a new post. */ apply_filters( 'lmat_admin_preferred_language', $this->pref_lang ); -
/** * Filters the query args when auto suggesting untranslated posts in the * Languages metabox. */ apply_filters( 'lmat_ajax_posts_not_translated_args', $args ); -
/** * Fires before the translation column is outputted in the language metabox. * The dynamic portion of the hook name, `$lang`, refers to the language code. */ do_action( "lmat_before_post_translation_{$language->slug}", $post_type ); -
/** * Fires before displaying the list of translations in the Languages metabox * for posts */ do_action( 'lmat_before_post_translations', $post_type ); -
/** * Filters settings required by the UI. */ apply_filters( 'lmat_block_editor_plugin_settings', array( 'lang' => $editor_lang, 'nonce' => wp_create_nonce( 'lmat_language' ), 'translations_table' => $translations_table_data, ) ); -
/** * Filters admin notices which can be displayed. */ apply_filters( 'lmat_can_display_notice', in_array( $screen->id, $allowed_screens, true ), $notice ); -
/** * Filters the canonical url detected by Linguator. */ apply_filters( 'lmat_check_canonical_url', $redirect_url, $language ); -
/** * Filters the class to use to instantiate the $linguator object */ apply_filters( 'lmat_context', $class ); -
/** * Filters the Linguator cookie arguments. /!\ This filter may be fired * *before* the theme is loaded. */ apply_filters( 'lmat_cookie_args', $args ); -
/** * Filters the custom fields to copy or synchronize. */ apply_filters( "lmat_copy_{$this->meta_type}_metas", array(), $sync, $from, $to, $lang ); -
/** * This filter is documented in modules/sync/sync-metas.php */ apply_filters( 'lmat_copy_post_metas', $keys, $sync, $from, $to, $lang ); -
/** * Filters the taxonomies to copy or synchronize. */ apply_filters( 'lmat_copy_taxonomies', $taxonomies, $sync, $from, $to, $lang ); -
/** * Fires after a synchronized post has been created */ do_action( 'lmat_created_sync_post', $post_id, $tr_id, $target_language ); -
/** * Filters the custom flag information. */ apply_filters( 'lmat_custom_flag', empty( $flags['custom_flag'] ) ? null : $flags['custom_flag'], $flag_code ); -
/** * Filters the default language row action in the languages list table. */ apply_filters( 'lmat_default_lang_row_action', $s, $item ); -
/** * Fires after a term translation is automatically created when duplicating a * post. */ do_action( 'lmat_duplicate_term', $term->term_id, $tr_term_id, $lang ); -
/** * Filters REST routes filterable by languages. */ apply_filters( 'lmat_filtered_rest_routes', array_merge( $filtered_entities, array( 'search' => 'wp/v2/search' ) ) ); -
/** * Filters the list of taxonomies not translatable but filtered by language. * Includes only the post format by default The filter must be added soon in * the WordPress loading process: in a function hooked to βplugins_loadedβ * or directly in functions.php for themes. */ apply_filters( 'lmat_filtered_taxonomies', $taxonomies, false ); -
/** * Filters the output of the first language column in the terms list table. */ apply_filters( 'lmat_first_language_term_column', $out, $term_id, $lang->slug ); -
/** * Filters flag information: */ apply_filters( 'lmat_flag', $default_flag, $code ); -
/** * Filters the flag title attribute. Defaults to the language name. */ apply_filters( 'lmat_flag_title', $name, $slug, $locale ); -
/** * Filter the archive url */ apply_filters( 'lmat_get_archive_url', $url, $language ); -
/** * This filter is documented in wp-includes/general-template.php */ apply_filters( 'lmat_get_calendar_args', wp_parse_args( $args, $defaults ) ); -
/** * Filters the language before it is set from the content. */ apply_filters( 'lmat_get_current_language', $lang ?? false ); -
/** * Filters the html markup of a flag. */ apply_filters( 'lmat_get_flag', Linguator_Language::get_flag_html( $flag, $title, $name ), $slug ); -
/** * Filters the new post translation link. */ apply_filters( 'lmat_get_new_post_translation_link', $link, $language, $post_id ); -
/** * Filters the new term translation link. */ apply_filters( 'lmat_get_new_term_translation_link', $link, $language, $term_id, $taxonomy, $post_type ); -
/** * Filters the list of IDs of untranslated objects. */ apply_filters( 'lmat_get_objects_with_no_lang', $objects, $limit, $types ); -
/** * Filters the max number of IDs to return when searching objects with no * language. This filter can be used to decrease the memory usage in case the * number of objects without language is too big. Using a negative value is * equivalent to have no limit. */ apply_filters( 'lmat_get_objects_with_no_lang_limit', $limit, $types ); -
/** * Filter the list of strings registered for translation Mainly for use by our * Linguator_WPML_Compat class */ apply_filters( 'lmat_get_strings', self::$strings ); -
/** * Filters the black list of the Linguator 'home_url' filter. */ apply_filters( 'lmat_home_url_black_list', $black_list ); -
/** * Filters the white list of the Linguator 'home_url' filter. */ apply_filters( 'lmat_home_url_white_list', $white_list ); -
/** * Fires after the $linguator object and the API is loaded */ do_action_ref_array( 'lmat_init', array( &$linguator ) ); -
/** * Filters the subsequently inserted term language. */ apply_filters( 'lmat_inserted_term_language', null, $this->taxonomy, $this->slug ); -
/** * Filters the subsequently inserted term parent. */ apply_filters( 'lmat_inserted_term_parent', 0, $this->taxonomy, $this->slug ); -
/** * Filters whether the current request is an ajax request on front. */ apply_filters( 'lmat_is_ajax_on_front', $is_ajax_on_front ); -
/** * Fires after the Add Language form fields are displayed. */ do_action( 'lmat_language_add_form_fields' ); -
/** * Fires after the Edit Language form fields are displayed. */ do_action( 'lmat_language_edit_form_fields', $edit_lang ); -
/** * Filters `flag_url` property. */ apply_filters( 'lmat_language_flag_url', $flag_url, $this ); -
/** * Filters current `Linguator_Language` instance `home_url` property. */ apply_filters( 'lmat_language_home_url', $this->home_url, $this->to_array( 'db' ) ); -
/** * Allow to add data to store for a language. `$locale`, `$rtl`, and * `$flag_code` cannot be overwritten. */ apply_filters( 'lmat_language_metas', array(), $args, $new_data, $old_data ); -
/** * Filters current `Linguator_Language` instance `search_url` property. */ apply_filters( 'lmat_language_search_url', $this->search_url, $this->to_array( 'db' ) ); -
/** * Filters the list of languages to use to match the browser preferences. */ apply_filters( 'lmat_languages_for_browser_preferences', $languages ); -
/** * Filters the list of row actions in the languages list table. */ apply_filters( 'lmat_languages_row_actions', $actions, $item ); -
/** * Filter the list of classes assigned a row in the languages list table */ apply_filters( 'lmat_languages_row_classes', array(), $item ); -
/** * Filters the links model class to use. /!\ this filter is fired *before* the * $linguator object is available. */ apply_filters( 'lmat_links_model', $class ); -
/** * Raw JSON config loaded from `LMAT_LOCAL_DIR/lmat-config.json`. */ apply_filters( 'lmat_local_config', $lmat_config ); -
/** * Filter the translated term when a post translation is created or * synchronized */ apply_filters( 'lmat_maybe_translate_term', (int) $this->model->term->get_translation( $term, $lang ), $term, $lang ); -
/** * Filter the model class to use /!\ this filter is fired *before* the * $linguator object is available */ apply_filters( 'lmat_model', LMAT_SETTINGS || self::is_wizard() ? 'Linguator_Admin_Model' : 'Linguator_Model' ); -
/** * Fires after Linguator's model init. This is the best place to register a * custom table (see `Linguator_Model`'s constructor). /!\ This hook is fired * *before* the $linguator object is available. /!\ The languages are also not * available yet. */ do_action( 'lmat_model_init', $model ); -
/** * Fires after a post has been synchronized. */ do_action( 'lmat_post_synchronized', $post_id, $tr_id, $target_language, 'copy' ); -
/** * Filters a post or custom post type link. */ apply_filters( 'lmat_post_type_link', $link, $lang, $post ); -
/** * Filters whether a synchronization capability check should take place. */ apply_filters( "lmat_pre_current_user_can_synchronize_{$this->type}", true, $id ); -
/** * Fires after the $linguator object is created and before the API is loaded */ do_action_ref_array( 'lmat_pre_init', array( &$linguator ) ); -
/** * Filters the translation url before Linguator attempts to find one. * Internally used by Linguator for the static front page and posts page. */ apply_filters( 'lmat_pre_translation_url', '', $language, $queried_object_id ); -
/** * Filter the list of predefined flags */ apply_filters( 'lmat_predefined_flags', $flags ); -
/** * Filter the list of predefined languages */ apply_filters( 'lmat_predefined_languages', $languages ); -
/** * Filter the visitor's preferred language (normally set first by cookie if * this is not the first visit, then by the browser preferences). If no * preferred language has been found or set by this filter, Linguator fallbacks * to the default language */ apply_filters( 'lmat_preferred_language', $language, $cookie ); -
/** * Tells when Linguator is able to prepare rewrite rules filters. Action fired * right after `wp_loaded` and just before WordPress * `WP_Rewrite::flush_rules()` callback. */ do_action( 'lmat_prepare_rewrite_rules', $this ); -
/** * When a visitor reaches the site home, Linguator redirects to the home page * in the correct language. This filter allows plugins to modify the redirected * url or prevent this redirection /!\ this filter may be fired *before* the * theme is loaded */ apply_filters( 'lmat_redirect_home', $redirect ); -
/** * Filters the list of rel hreflang attributes */ apply_filters( 'lmat_rel_hreflang_attributes', $hreflangs ); -
/** * Filters an url after the paged part has been removed. */ apply_filters( 'lmat_remove_paged_from_link', preg_replace( '#/page/[0-9]+/?#', $this->use_trailing_slashes ? '/' : '', $url ), $url ); -
/** * Filters the object type of the current request. */ apply_filters( 'lmat_rest_request_object_type', null, $this->handler, $this->request ); -
/** * Filters the list of rewrite rules filters to be used by Linguator. */ apply_filters( 'lmat_rewrite_rules', $types ); -
/** * Filters the string translation before it is saved in DB. Allows to sanitize * strings registered with linguator_register_string(). */ apply_filters( 'lmat_sanitize_string_translation', $translation, $this->strings[ $key ]['name'], $this->strings[ $key ]['context'], $this->strings[ $key ]['string'] ); -
/** * Fires after the strings translations are saved in DB */ do_action( 'lmat_save_strings_translations' ); -
/** * This filter allows to set the language based on information contained in the * main query */ apply_filters( 'lmat_set_language_from_query', false, $query ); -
/** * Fires when loading the active Linguator settings tab Allows plugins to add * their own tab */ do_action( "lmat_settings_active_tab_{sanitize_key((string)$active_tab)}" ); -
/** * Filter the list of setting modules Allows external plugins/modules to add * their own settings modules */ apply_filters( 'lmat_settings_modules', $modules ); -
/** * Filter the list of sub-menu items in Linguator settings. */ apply_filters( 'lmat_settings_tabs', $tabs ); -
/** * Allows opting out of home_url language rewriting without stack inspection. */ apply_filters( 'lmat_should_rewrite_home_url', true, $url, $path ); -
/** * Fires when the language is switched. */ do_action( 'lmat_switch_language', $language ); -
/** * Filters the post fields to synchronize when synchronizing posts */ apply_filters( 'lmat_sync_post_fields', array_combine( $columns, $columns ), $post_id, $target_language, $save_group ); -
/** * Filter the link in the language switcher */ apply_filters( 'lmat_the_language_link', $url, $slug, $language->locale ); -
/** * Filter the whole html markup returned by the 'linguator_the_languages' * template tag */ apply_filters( 'lmat_the_languages', $walker->walk( $elements, -1, $args ), $args ); -
/** * Filter a meta value before is copied or synchronized */ apply_filters( "lmat_translate_{$this->meta_type}_meta", $value, $key, $lang, $from, $to ); -
/** * Filters parsed blocks after core blocks have been translated. */ apply_filters( 'lmat_translate_blocks', $blocks, $this->target_language->slug, $this->from_language->slug ); -
/** * Fires after a media translation is created */ do_action( 'lmat_translate_media', $post_id, $tr_id, $lang->slug ); -
/** * Filter the translation url of the current page before Linguator caches it */ apply_filters( 'lmat_translation_url', $url, $language->slug ); -
/** * Fires when a default language is updated. */ do_action( 'lmat_update_default_lang', $slug, $prev_default_lang ); -
/** * Fires after a language is updated. */ do_action( 'lmat_update_language', $args, $lang ); -
/** * Filters the unserialized translation group description before it is updated * when a language is deleted or a language slug is changed. */ apply_filters( 'lmat_update_translation_group', $tr, $old_slug, $new_slug, $term ); -
/** * Filters whether we should load the block editor plugin or the legacy * languages metabox. */ apply_filters( 'lmat_use_block_editor_plugin', ! defined( 'LMAT_USE_BLOCK_EDITOR_PLUGIN' ) || LMAT_USE_BLOCK_EDITOR_PLUGIN ); -
/** * This filter is documented in wp-admin/includes/meta-boxes.php */ apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); -
/** * This filter is documented in wp-includes/user.php */ apply_filters( 'pre_user_description', $description ); -
do_action( "cpfm_after_opt_in_{$plugin_name}", $category ); -
do_action( 'cpfm_register_notice' ); -
do_action( 'lmat_add_language', $args ); -
apply_filters( 'lmat_admin_settings_assets', true, $active_tab, $is_settings_tab ); -
apply_filters( 'lmat_bulk_post_language_link', true ); -
apply_filters( 'lmat_bulk_term_language_link', true ); -
apply_filters( 'lmat_frontend_settings_assets', true, $active_tab, $is_settings_tab ); -
apply_filters( 'lmat_render_languages_page', true, $this->selected_tab, $this->active_tab ); -
apply_filters( 'lmat_settings_header_tabs', $tabs ); -
do_action( 'lmat_translation_created', $new_post_id, $source_id, $target_lang_slug ); -
do_action( 'lmat_uninstall' ); -
lmat/bulk_translation/allowed_flex_styles
filter Used by 2 plugins β Copy link Customise this hookapply_filters( 'lmat/bulk_translation/allowed_flex_styles', array_unique(array_merge($styles, $extra_allowed)) ); -
apply_filters( 'lmat/bulk_translation/allowed_tags', array_merge($default_allowed_tags, $existing_allowed_tags) ); -
apply_filters( 'lmat/custom_fields/all_fields', $data ); -
apply_filters( 'lmat/custom_fields/allowed_fields', $allowed_custom_fields ); -
apply_filters( 'lmat/custom_fields/excluded_keys', $excluded_fields );
Generated from Multilingual AI Translator'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: