signup_get_available_languages WordPress Filter Hook

The signup_get_available_languages Wordpress hook is used to determine the available languages for new user signups. This hook is useful for multilingual sites that need to offer different language options to new users. The hook allows for custom language packs to be added and for the default language to be changed.

apply_filters( 'signup_get_available_languages', string[] $languages ) #

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


Description

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.


Top ↑

Parameters

$languages

(string[])Array of available language codes. Language codes are formed by stripping the .mo extension from the language file names.


Top ↑

Source

File: wp-signup.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.