ColorPickerField extends TextField
in package

Tags
since
1.1.0

Table of Contents

TYPE  = 'color-picker'
$colorpickerType  : string
$description  : string
$hideAfterPaletteSelect  : bool
$isDisabled  : bool
$isInline  : bool
$isReadonly  : bool
$label  : string
$palette  : array<string|int, mixed>
$placeholder  : string
$showPalette  : bool
$showPaletteOnly  : bool
$togglePaletteOnly  : bool
$atts  : array<string|int, mixed>
$class  : string
$default  : mixed
$inputId  : string
$inputName  : string
$name  : string
$sizeClass  : string
$value  : mixed
__construct()  : mixed
getType()  : string
getValue()  : mixed
hasDescription()  : string
hasLabel()  : string
isSingle()  : bool
renderBody()  : string
renderDescription()  : string
renderInput()  : string
renderLabel()  : string
setDefault()  : mixed
setName()  : mixed
setSize()  : mixed
setValue()  : mixed
controlAtts()  : array<string|int, mixed>
convertPalleteArrayToString()  : string
getSpectrumAtts()  : mixed
getSpectrumDefaultAtts()  : mixed
getWrapperTag()  : string
inputAtts()  : array<string|int, mixed>
mapFields()  : array<string|int, mixed>
setupArgs()  : mixed
validateValue()  : mixed

Constants

TYPE

public mixed TYPE = 'color-picker'
Tags
since
1.1.0

Properties

$colorpickerType

public string $colorpickerType = 'color'

$description

public string $description = ''
Tags
since
1.0

$hideAfterPaletteSelect

public bool $hideAfterPaletteSelect = false

$isDisabled

public bool $isDisabled = false
Tags
since
1.7.0

$isInline

public bool $isInline = false
Tags
since
1.3

$isReadonly

public bool $isReadonly = false
Tags
since
1.7.0

$label

public string $label = ''
Tags
since
1.0

$palette

public array<string|int, mixed> $palette = []

$placeholder

public string $placeholder = ''
Tags
since
1.1.0

$showPalette

public bool $showPalette = false

$showPaletteOnly

public bool $showPaletteOnly = false

$togglePaletteOnly

public bool $togglePaletteOnly = false

$atts

protected array<string|int, mixed> $atts = []
Tags
since
1.0

$class

protected string $class = ''
Tags
since
1.0

$default

protected mixed $default = ''
Tags
since
1.0

$inputId

protected string $inputId = ''
Tags
since
1.0

$inputName

protected string $inputName = ''
Tags
since
1.0

$name

protected string $name = ''
Tags
since
1.0

$sizeClass

protected string $sizeClass = ''
Tags
since
1.0

$value

protected mixed $value = ''
Tags
since
1.0

Methods

__construct()

public __construct(string $inputName, array<string|int, mixed> $args[, mixed $value = null ]) : mixed
Parameters
$inputName : string

Prefixed name.

$args : array<string|int, mixed>
$value : mixed = null

Optional. Null by default.

Tags
since
1.0
Return values
mixed

getType()

public getType() : string
Tags
since
1.2
Return values
string

getValue()

public getValue([string $context = 'internal' ]) : mixed
Parameters
$context : string = 'internal'

Optional. 'internal' by default. Variants: 'internal' - for internal use (in the functions of the plugin); 'save' - prepare the value for the database.

Tags
since
1.0
Return values
mixed

hasDescription()

public hasDescription() : string
Tags
since
1.1.0
Return values
string

hasLabel()

public hasLabel() : string
Tags
since
1.0
Return values
string

isSingle()

public isSingle() : bool
Tags
since
1.0
Return values
bool

Uses single or multiple postmetas.

renderBody()

public renderBody() : string
Tags
since
1.0
Return values
string

renderDescription()

public renderDescription() : string
Tags
since
1.1.0
Return values
string

renderInput()

public abstract renderInput() : string
Tags
since
1.0
Return values
string

renderLabel()

public renderLabel() : string
Tags
since
1.0
Return values
string

setDefault()

public setDefault(mixed $default) : mixed
Parameters
$default : mixed
Tags
since
1.0
Return values
mixed

setName()

public setName(string $inputName) : mixed
Parameters
$inputName : string

Prefixed name.

Tags
since
1.0
Return values
mixed

setSize()

public setSize(string $size) : mixed
Parameters
$size : string

small|regular|mild|large|half|wide

Tags
since
1.0
Return values
mixed

setValue()

public setValue(mixed $value[, mixed $validate = false ]) : mixed
Parameters
$value : mixed
$validate : mixed = false

Optional. False by default.

Tags
since
1.0
Return values
mixed

controlAtts()

protected controlAtts() : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

convertPalleteArrayToString()

protected convertPalleteArrayToString() : string
Return values
string

getSpectrumAtts()

protected getSpectrumAtts() : mixed
Return values
mixed

getSpectrumDefaultAtts()

protected getSpectrumDefaultAtts() : mixed
Return values
mixed

getWrapperTag()

protected getWrapperTag([string $blockTag = 'div' ][, string $inlineTag = 'span' ]) : string
Parameters
$blockTag : string = 'div'

Optional. 'div' by default.

$inlineTag : string = 'span'

Optional. 'span' by default.

Tags
since
1.3
Return values
string

inputAtts()

protected inputAtts() : array<string|int, mixed>
Return values
array<string|int, mixed>

mapFields()

protected mapFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

setupArgs()

protected setupArgs(array<string|int, mixed> $args) : mixed
Parameters
$args : array<string|int, mixed>
Tags
since
1.0
Return values
mixed

validateValue()

protected validateValue(mixed $value) : mixed
Parameters
$value : mixed
Tags
since
1.0
Return values
mixed

Search results