• About WordPress
    • About WordPress
    • WordPress.org
    • Documentation
    • Support
    • Feedback
  • Log In
  • Register

WordPress.org

  • Showcase
  • Learn
  • Themes
  • Plugins
  • Mobile
  • Support
    • Documentation
    • Forums
  • Get Involved
    • Five for the Future
  • About
  • Blog
  • Hosting
  • Get WordPress

Code Reference

Skip to content
Filter by type:
Search
Browse: Home / Reference / Functions / signup_get_available_languages()

signup_get_available_languages()

Retrieves languages available during the site/user signup process.

Contents

  • Description
    • See also
  • Return
  • Source
  • Related
    • Uses
    • Used By
  • Changelog
  • User Contributed Notes

Description #Description

See also #See also

  • get_available_languages()

Top ↑

Return #Return

(array) List of available languages.


Top ↑

Source #Source

File: wp-signup.php

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() );
}

Expand full source code Collapse full source code View on Trac


Top ↑

Related #Related

Top ↑

Uses #Uses

Uses
Uses Description
wp-signup.php: signup_get_available_languages

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

wp-includes/l10n.php: get_available_languages()

Get all available languages based on the presence of *.mo files in a given directory.

wp-includes/plugin.php: apply_filters()

Calls the callback functions that have been added to a filter hook.

Top ↑

Used By #Used By

Used By
Used By Description
wp-signup.php: validate_another_blog_signup()

Validate a new site signup for an existing user.

wp-signup.php: validate_blog_signup()

Validate new site signup

wp-signup.php: show_blog_form()

Generates and displays the Signup and Create Site forms


Top ↑

Changelog #Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

You must log in before being able to contribute a note or feedback.

  • About
  • Blog
  • Hosting
  • Donate
  • Support
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
  • @WordPress
  • WordPress

Code is Poetry.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.