signup_get_available_languages

Filters the list of available languages for front-end site signups.

Description

apply_filters( 'signup_get_available_languages', (array) $get_available_languages ); 

Passing an empty array to this hook will disable output of the setting on the signup form, and the default language will be used when creating the site.

Languages not already installed will be stripped.

Parameters (1)

0. $get_available_languages (array) => get_available_languages()
The get available languages.

Usage

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

Defined (1)

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

/wp-signup.php  
  1. $languages = (array) apply_filters( 'signup_get_available_languages', get_available_languages() );