PHP 클래스 Theme_Mod_command, wp-cli

## EXAMPLES # Set the 'background_color' theme mod to '000000'. $ wp theme mod set background_color 000000 Success: Theme mod background_color set to 000000 # Get single theme mod in JSON format. $ wp theme mod get background_color --format=json [{"key":"background_color","value":"dd3333"}] # Remove all theme mods. $ wp theme mod remove --all Success: Theme mods removed.
상속: extends WP_CLI_Command
파일 보기 프로젝트 열기: wp-cli/wp-cli

공개 메소드들

메소드 설명
get ( $args = [], $assoc_args = [] ) Get one or more theme mods.
remove ( $args = [], $assoc_args = [] ) Remove one or more theme mods.
set ( $args = [], $assoc_args = [] ) Set the value of a theme mod.

메소드 상세

get() 공개 메소드

## OPTIONS [...] : One or more mods to get. [--all] : List all theme mods [--format=] : Render output in a particular format. --- default: table options: - table - json - csv - yaml --- ## EXAMPLES # Get all theme mods $ wp theme mod get --all +------------------+---------+ | key | value | +------------------+---------+ | background_color | dd3333 | | link_color | #dd9933 | | main_text_color | #8224e3 | +------------------+---------+ # Get single theme mod in JSON format $ wp theme mod get background_color --format=json [{"key":"background_color","value":"dd3333"}] # Get multiple theme mods $ wp theme mod get background_color header_textcolor +------------------+--------+ | key | value | +------------------+--------+ | background_color | dd3333 | | header_textcolor | | +------------------+--------+
public get ( $args = [], $assoc_args = [] )

remove() 공개 메소드

## OPTIONS [...] : One or more mods to remove. [--all] : Remove all theme mods. ## EXAMPLES # Remove all theme mods. $ wp theme mod remove --all Success: Theme mods removed. # Remove single theme mod. $ wp theme mod remove background_color Success: 1 mod removed. # Remove multiple theme mods. $ wp theme mod remove background_color header_textcolor Success: 2 mods removed.
public remove ( $args = [], $assoc_args = [] )

set() 공개 메소드

## OPTIONS : The name of the theme mod to set or update. : The new value. ## EXAMPLES # Set theme mod $ wp theme mod set background_color 000000 Success: Theme mod background_color set to 000000
public set ( $args = [], $assoc_args = [] )