signup_get_available_languages() - WordPress 函数参考中文文档

返回介绍

signup_get_available_languages()

发布于 2017-09-11 字数1948 浏览 877 评论 0

signup_get_available_languages()

Retrieves languages available during the site/user signup process.


描述


返回值

(array) List of available languages.


源代码

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

更新日志

Version 描述
4.4.0 Introduced.

相关函数

Uses

  • wp-signup.php:
    signup_get_available_languages
  • wp-includes/l10n.php:
    get_available_languages()
  • wp-includes/plugin.php:
    apply_filters()

Used By

  • wp-signup.php:
    validate_another_blog_signup()
  • wp-signup.php:
    validate_blog_signup()
  • wp-signup.php:
    show_blog_form()

User Contributed Notes

上一篇:signup_blog()

下一篇:signup_nonce_check()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!