Skip to content

plugin_locale

github-actions[bot] edited this page Jun 25, 2026 · 5 revisions

Auto-generated Example

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

Parameters

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

Files

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

← All Hooks

Clone this wiki locally