Filter hook 'mu_dropdown_languages'

in WP Core File wp-admin/includes/ms.php at line 670

View Source

mu_dropdown_languages

Filter Hook
Description
Filters the languages available in the dropdown.

Hook Information

File Location wp-admin/includes/ms.php View on GitHub
Hook Type Filter
Line Number 670

Hook Parameters

Type Name Description
string[] $output Array of HTML output for the dropdown.
string[] $lang_files Array of available language files.
string $current The current language code.

Usage Examples

Basic Usage
<?php
// Hook into mu_dropdown_languages
add_filter('mu_dropdown_languages', 'my_custom_filter', 10, 3);

function my_custom_filter($output, $lang_files, $current) {
    // Your custom filtering logic here
    return $output;
}

Source Code Context

wp-admin/includes/ms.php:670 - How this hook is used in WordPress core
<?php
 665  	 *
 666  	 * @param string[] $output     Array of HTML output for the dropdown.
 667  	 * @param string[] $lang_files Array of available language files.
 668  	 * @param string   $current    The current language code.
 669  	 */
 670  	$output = apply_filters( 'mu_dropdown_languages', $output, $lang_files, $current );
 671  
 672  	echo implode( "\n\t", $output );
 673  }
 674  
 675  /**

PHP Documentation

<?php
/**
	 * Filters the languages available in the dropdown.
	 *
	 * @since MU (3.0.0)
	 *
	 * @param string[] $output     Array of HTML output for the dropdown.
	 * @param string[] $lang_files Array of available language files.
	 * @param string   $current    The current language code.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-admin/includes/ms.php
Related Hooks

Related hooks will be displayed here in future updates.