Universally icon
Multilingual & Translation

Universally hooks reference

  • By Syed Balkhi
  • v1.0.11
  • Updated

Universally 1.0.11 has 0 actions and 20 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.

functions.phpyour child theme
// Change a value Universally is about to use
add_filter( 'universally_config', function( $base_config ) {
	// Change $base_config here.
	return $base_config;
}, 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

  • includes/util.php line 24
    /**
     * Filter the config array
     */
    apply_filters( 'universally_config', $base_config );
  • includes/helpers.php line 388
    /**
     * Filter the exclude-pages patterns.
     */
    apply_filters( 'universally_exclude_pages', is_array($pages) ? $pages : [] );
  • includes/helpers.php line 518
    /**
     * Filter the hreflang code emitted for a single language.
     */
    apply_filters( 'universally_hreflang_code', $hreflangCodes[$key] ?? '', $lang );
  • includes/helpers.php line 620
    /**
     * Filter the hreflang code format, overriding the setting.
     */
    apply_filters( 'universally_hreflang_format', $format );
  • includes/helpers.php line 837
    /**
     * Filter the complete hreflang tag markup before it is printed.
     */
    apply_filters( 'universally_hreflang_tags', $output, $links );
  • includes/helpers.php line 541
    /**
     * Filter the URL for a single language.
     */
    apply_filters( 'universally_language_url', $lang['url'], $lang, $basePath );
  • includes/helpers.php line 312
    /**
     * Filter the site's language set (source + targets).
     */
    apply_filters( 'universally_languages', $languages, $forceRefresh );
  • includes/settings.php line 68
    /**
     * Filter the notices shown at the top of the settings panel
     */
    apply_filters( 'universally_panel_notices', $universally_panel_notices );
  • includes/helpers.php line 456
    /**
     * Filter whether a path is excluded from translation.
     */
    apply_filters( 'universally_path_is_excluded', $excluded, $normalized, $excludePages );
  • includes/helpers.php line 1038
    /**
     * Filter whether a path is excluded from translated routing.
     */
    apply_filters( 'universally_path_is_non_translatable', $isNonTranslatable, $path );
  • includes/helpers.php line 659
    /**
     * Filter whether the visitor's language is remembered, overriding the setting.
     */
    apply_filters( 'universally_remember_language', $enabled );
  • includes/helpers.php line 957
    /**
     * Filter the URL of the Universally browser runtime script.
     */
    apply_filters( 'universally_runtime_script_url', $url, $publicKey );
  • includes/helpers.php line 918
    /**
     * Filter whether the notranslate tags are emitted for this request.
     */
    apply_filters( 'universally_should_emit_notranslate', $should );
  • includes/helpers.php line 370
    /**
     * Filter the site config fetched from the API (excludePages, siteId, …).
     */
    apply_filters( 'universally_site_config', is_array($config) ? $config : [] );
  • app/LanguageSwitcher.php line 187
    /**
     * Filter the language switcher config before it is rendered.
     */
    apply_filters( 'universally_switcher_config', $config, $fixed, $overrides );
  • app/LanguageSwitcher.php line 210
    /**
     * Filter the language switcher markup.
     */
    apply_filters( 'universally_switcher_html', $html, $config );
  • includes/helpers.php line 556
    /**
     * Filter the language set with URLs resolved for the current request.
     */
    apply_filters( 'universally_switcher_urls', $languages );
  • panel/src/Sanitizer.php line 35
    apply_filters( 'universally_sanitization_rules', $this->rules );
  • panel/src/Validator.php line 94
    apply_filters( 'universally_validation_rules', $this->rules );

Generated from Universally'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: