mu_dropdown_languages

Filters the languages available in the dropdown.

Description

apply_filters( 'mu_dropdown_languages', (array) $output, (array) $lang_files, (string) $current ); 

Parameters (3)

0. $output (array)
HTML output of the dropdown.
1. $lang_files (array)
Available language files.
2. $current (string)
The current language code.

Usage

To run the hook, copy the example below.
  1. $output = apply_filters( 'mu_dropdown_languages', $output, $lang_files, $current ); 
  2.  
  3. if ( !empty( $output ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the mu_dropdown_languages callback 
  2. function filter_mu_dropdown_languages( $output, $lang_files, $current ) { 
  3. // make filter magic happen here... 
  4. return $output
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'mu_dropdown_languages', 'filter_mu_dropdown_languages', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'mu_dropdown_languages', 'filter_mu_dropdown_languages', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/ms.php  
  1. $output = apply_filters( 'mu_dropdown_languages', $output, $lang_files, $current );