PHP 클래스 WP_CLI\CommandWithTranslation

상속: extends WP_CLI_Command
파일 보기 프로젝트 열기: wp-cli/wp-cli

보호된 프로퍼티들

프로퍼티 타입 설명
$obj_fields
$obj_type

공개 메소드들

메소드 설명
activate ( $args, $assoc_args ) Activate a given language.
install ( $args, $assoc_args ) Install a given language.
list_ ( $args, $assoc_args ) List all available languages.
uninstall ( $args, $assoc_args ) Uninstall a given language.
update ( $args, $assoc_args ) Update installed languages.

보호된 메소드들

메소드 설명
get_all_languages ( ) : array Return a list of all languages
get_formatter ( array &$assoc_args ) : Formatter Get Formatter object based on supplied parameters.
get_installed_languages ( ) : array Return a list of installed languages.
sort_translations_callback ( $a, $b ) Callback to sort array by a 'language' key.

비공개 메소드들

메소드 설명
download_language_pack ( string $download ) : string | WP_Error Download a language pack.
get_translation_updates ( ) : array Get all updates available for all translations
wp_clean_update_cache ( ) Replicates wp_clean_update_cache() for use in WP 4.0

메소드 상세

activate() 공개 메소드

: Language code to activate. ## EXAMPLES $ wp core language activate ja Success: Language activated.
public activate ( $args, $assoc_args )

get_all_languages() 보호된 메소드

Return a list of all languages
protected get_all_languages ( ) : array
리턴 array

get_formatter() 보호된 메소드

Get Formatter object based on supplied parameters.
protected get_formatter ( array &$assoc_args ) : Formatter
$assoc_args array Parameters passed to command. Determines formatting.
리턴 Formatter

get_installed_languages() 보호된 메소드

Return a list of installed languages.
protected get_installed_languages ( ) : array
리턴 array

install() 공개 메소드

Downloads the language pack from WordPress.org. : Language code to install. [--activate] : If set, the language will be activated immediately after install. ## EXAMPLES # Install the Japanese language. $ wp core language install ja Success: Language installed.
public install ( $args, $assoc_args )

list_() 공개 메소드

[--field=] : Display the value of a single field [--=] : Filter results by key=value pairs. [--fields=] : Limit the output to specific fields. [--format=] : Accepted values: table, csv, json. Default: table ## AVAILABLE FIELDS These fields will be displayed by default for each translation: * language * english_name * native_name * status * update * updated These fields are optionally available: * version * package ## EXAMPLES # List language,english_name,status fields of available languages. $ wp core language list --fields=language,english_name,status +----------------+-------------------------+-------------+ | language | english_name | status | +----------------+-------------------------+-------------+ | ar | Arabic | uninstalled | | ary | Moroccan Arabic | uninstalled | | az | Azerbaijani | uninstalled |
public list_ ( $args, $assoc_args )

sort_translations_callback() 보호된 메소드

Callback to sort array by a 'language' key.
protected sort_translations_callback ( $a, $b )

uninstall() 공개 메소드

: Language code to uninstall. ## EXAMPLES $ wp core language uninstall ja Success: Language uninstalled.
public uninstall ( $args, $assoc_args )

update() 공개 메소드

Updates installed languages for core, plugins and themes. [--dry-run] : Preview which translations would be updated. ## EXAMPLES $ wp core language update Updating 'Japanese' translation for Akismet 3.1.11... Downloading translation from https://downloads.wordpress.org/translation/plugin/akismet/3.1.11/ja.zip... Translation updated successfully. Updating 'Japanese' translation for Twenty Fifteen 1.5... Downloading translation from https://downloads.wordpress.org/translation/theme/twentyfifteen/1.5/ja.zip... Translation updated successfully. Success: Updated 2/2 translations.
public update ( $args, $assoc_args )

프로퍼티 상세

$obj_fields 보호되어 있는 프로퍼티

protected $obj_fields

$obj_type 보호되어 있는 프로퍼티

protected $obj_type