Omnalingo exposes WordPress filters and actions for developers, all namespaced
under omnalingo/…. Use them with add_filter() and add_action() as usual.
// Add a CSS selector to the translation exclusion list
add_filter ( ' omnalingo/exclusions/selectors ' , function ( $ selectors ) {
$ selectors [] = ' .my-widget ' ;
// Translate an HTML string on demand, using Omnalingo's engine
$german = apply_filters ( ' omnalingo/translate/html ' , $ html , ' de ' );
Hook Type Signature Purpose omnalingo/translate/htmlfilter ($html, $langCode)Translate a raw HTML string into a language with Omnalingo’s engine; returns the translated HTML. omnalingo/render/set_target_languageaction ($langCode)Set the active render target language (null/'' clears it). omnalingo/render/target_languagefilter (null)Read the current render target language. omnalingo/render/enable_gettext_wrappingaction ()Enable gettext wrapping for the current render. omnalingo/render/disable_gettext_wrappingaction ()Disable gettext wrapping. omnalingo/render/wrapping_enabledfilter (false)Read whether gettext wrapping is on. omnalingo/gettext/skip_wrapfilter (false)Return true to skip wrapping gettext strings this request. omnalingo/gettext/backtrace_unsafefilter ($functions)Adjust the list of calling functions for which gettext wrapping is skipped. omnalingo/buffer/skipfilter (false)Return true to skip the output-buffer translation pass this request.
Hook Type Signature Purpose omnalingo/slug/translate_urlfilter ($url, $langCode, $postId, $termId)Return the translated-slug URL for an object in a language. The central slug hook. omnalingo/slug/resolve_pathfilter ($path, $langCode)Map an incoming translated path back to its canonical path. omnalingo/slug/translationsfilter ([], $objectId, $objectType)Per-language slug translations for one object. omnalingo/slug/mapfilter ([], $items)Bulk slug map for a set of content items. omnalingo/slug/batch_sizefilter (200)Batch size for slug operations. omnalingo/slug/original_changedaction ($id, $type, $newSlug)An object’s original slug changed ($type = post or term). omnalingo/slug/object_deletedaction ($id, $type)An object was deleted. omnalingo/editor/build_urlfilter ($url, $targetUrl)The URL used to load a page in the editor frame. omnalingo/editor/language_urlsfilter ($urls, $baseUrl)Per-language URLs offered in the editor. omnalingo/editor/title_translatedaction ($contentId, $type)A title was translated (e.g. to refresh its slug).
Hook Type Signature Purpose omnalingo/sitemap/enabledfilter (true)Enable or disable Omnalingo’s sitemap output. omnalingo/sitemap/urlfilter ('')Provide the sitemap URL (used by SEO-plugin integrations). omnalingo/sitemap/alternatesfilter ([], $entryId, $objectType)hreflang alternates for a sitemap entry. omnalingo/sitemap/exclude_objectfilter (false, $objectId, $objectType)Exclude an object from the sitemap.
Hook Type Signature Purpose omnalingo/content_typesfilter ([])Register custom translatable content types (e.g. emails). omnalingo/content_settings/presetsfilter ($presets, $context)Adjust the Sitemap content-type presets. omnalingo/content_settings/default_selectionsfilter ($defaults)Default selected content types. omnalingo/content_settings/default_presetfilter ('wordpress_default')The default content preset slug. omnalingo/scan/translatable_meta_tagsfilter ($metaTags)Which meta tags are extracted for translation. omnalingo/scan/url_scannedaction ($urlId)Fired after a URL is scanned. omnalingo/scan/gathering_completeaction ($trigger)Fired when content gathering finishes. omnalingo/exclusions/selectorsfilter ($selectors)The CSS-selector exclusion list.
Hook Type Signature Purpose omnalingo/settings/tabsfilter ([])Register extra settings tabs. omnalingo/settings/groupsfilter ($groups)Per-tab settings group definitions. omnalingo/admin/hydration_datafilter ($data)The data object passed to the admin interface.
Hook Type Signature Purpose omnalingo/db/table_prefixfilter ($prefix)The table prefix for Omnalingo’s tables. omnalingo/db/resetaction ()Fired on factory reset. omnalingo/client/refreshedaction ($clientData)Fired when license/client data is refreshed. omnalingo/fixture/capturedaction ($name, $dir, $mode)Fired when a support fixture is captured. omnalingo/containerfilter (null)Returns the plugin’s dependency-injection container — advanced; lets you reach internal services.
These are added by the Omnalingo Pro plugin (on top of the shared hooks above, which
Pro also uses):
Hook Type Signature Purpose omnalingo/email/providersfilter ([])Register e-commerce email providers for translation. omnalingo/email/preview_capabilityfilter ('edit_posts')Capability required to use the email preview. omnalingo/xliff/importedaction ($langCode, $languageData)Fired after an XLIFF file is imported for a language.