Skip to content

plugin_locale

github-actions[bot] edited this page Sep 2, 2026 · 4 revisions

Auto-generated Example

add_filter(
   'plugin_locale',
    function(
        $function_exists_get_user_locale_get_locale,
        string $domain
    ) {
        // Your code here.
        return $function_exists_get_user_locale_get_locale;
    },
    10,
    2
);

Parameters

  • $function_exists_get_user_locale_get_locale Other variable names: $function_exists_determine_locale_get_locale
  • string $domain Other variable names: $cmb2

Files

apply_filters(
				'plugin_locale',
				(is_admin() && function_exists('get_user_locale')) ? get_user_locale() : get_locale(),
				$domain
			)
apply_filters( 'plugin_locale', function_exists( 'determine_locale' ) ? determine_locale() : get_locale(), 'cmb2' )

← All Hooks

Clone this wiki locally