signup_get_available_languages

The timeline below displays how wordpress function signup_get_available_languages has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.9

/**
 * Retrieves languages available during the site/user sign-up process.
 *
 * @since 4.4.0
 *
 * @see get_available_languages()
 *
 * @return string[] Array of available language codes. Language codes are formed by
 *                  stripping the .mo extension from the language file names.
 */
function signup_get_available_languages()
{
    /**
     * Filters the list of available languages for front-end site sign-ups.
     *
     * Passing an empty array to this hook will disable output of the setting on the
     * sign-up form, and the default language will be used when creating the site.
     *
     * Languages not already installed will be stripped.
     *
     * @since 4.4.0
     *
     * @param string[] $languages Array of available language codes. Language codes are formed by
     *                            stripping the .mo extension from the language file names.
     */
    $languages = (array) apply_filters('signup_get_available_languages', get_available_languages());
    /*
     * Strip any non-installed languages and return.
     *
     * Re-call get_available_languages() here in case a language pack was installed
     * in a callback hooked to the 'signup_get_available_languages' filter before this point.
     */
    return array_intersect_assoc($languages, get_available_languages());
}

WordPress Version: 5.8

/**
 * Retrieves languages available during the site/user signup process.
 *
 * @since 4.4.0
 *
 * @see get_available_languages()
 *
 * @return string[] Array of available language codes. Language codes are formed by
 *                  stripping the .mo extension from the language file names.
 */
function signup_get_available_languages()
{
    /**
     * Filters the list of available languages for front-end site signups.
     *
     * 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.
     *
     * @since 4.4.0
     *
     * @param string[] $languages Array of available language codes. Language codes are formed by
     *                            stripping the .mo extension from the language file names.
     */
    $languages = (array) apply_filters('signup_get_available_languages', get_available_languages());
    /*
     * Strip any non-installed languages and return.
     *
     * Re-call get_available_languages() here in case a language pack was installed
     * in a callback hooked to the 'signup_get_available_languages' filter before this point.
     */
    return array_intersect_assoc($languages, get_available_languages());
}

WordPress Version: 4.6

/**
 * Retrieves languages available during the site/user signup process.
 *
 * @since 4.4.0
 *
 * @see get_available_languages()
 *
 * @return array List of available languages.
 */
function signup_get_available_languages()
{
    /**
     * Filters the list of available languages for front-end site signups.
     *
     * 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.
     *
     * @since 4.4.0
     *
     * @param array $available_languages Available languages.
     */
    $languages = (array) apply_filters('signup_get_available_languages', get_available_languages());
    /*
     * Strip any non-installed languages and return.
     *
     * Re-call get_available_languages() here in case a language pack was installed
     * in a callback hooked to the 'signup_get_available_languages' filter before this point.
     */
    return array_intersect_assoc($languages, get_available_languages());
}

WordPress Version: 4.4

/**
 * Retrieves languages available during the site/user signup process.
 *
 * @since 4.4.0
 *
 * @see get_available_languages()
 *
 * @return array List of available languages.
 */
function signup_get_available_languages()
{
    /**
     * Filter the list of available languages for front-end site signups.
     *
     * 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.
     *
     * @since 4.4.0
     *
     * @param array $available_languages Available languages.
     */
    $languages = (array) apply_filters('signup_get_available_languages', get_available_languages());
    /*
     * Strip any non-installed languages and return.
     *
     * Re-call get_available_languages() here in case a language pack was installed
     * in a callback hooked to the 'signup_get_available_languages' filter before this point.
     */
    return array_intersect_assoc($languages, get_available_languages());
}