BookingCustomerMetabox extends FieldsMetabox
in package

Tags
since
1.0

Table of Contents

$context  : string
$priority  : string
$capability  : string
$entityType  : string
$fields  : array<string|int, AbstractField>
$id  : string
$isLoaded  : bool
$isSaved  : bool
$name  : string
$nonceField  : string
$postType  : string
$saveAction  : string
__construct()  : mixed
display()  : mixed
getField()  : AbstractField|null
getLabel()  : string
load()  : mixed
register()  : mixed
save()  : mixed
addActions()  : mixed
canSave()  : bool
loadMetabox()  : mixed
loadValue()  : mixed
parseValues()  : array<string|int, mixed>
renderRegular()  : string
renderSide()  : string
saveValues()  : mixed
theFields()  : array<string|int, mixed>
theName()  : string

Properties

$context

public string $context
Tags
since
1.0

$priority

public string $priority
Tags
since
1.0

$capability

protected string $capability = 'edit_post'
Tags
since
1.0

$entityType

protected string $entityType
Tags
since
1.0

$id

protected string $id
Tags
since
1.0

$isLoaded

protected bool $isLoaded = false
Tags
since
1.0

$isSaved

protected bool $isSaved = false
Tags
since
1.0

$nonceField

protected string $nonceField
Tags
since
1.0

$postType

protected string $postType
Tags
since
1.0

$saveAction

protected string $saveAction
Tags
since
1.0

Methods

__construct()

public __construct(string $postType[, string $context = 'normal' ][, string $priority = 'default' ]) : mixed
Parameters
$postType : string
$context : string = 'normal'

Optional. 'side', 'normal' or 'advanced'. 'normal' by default.

$priority : string = 'default'

Optional. 'low', 'default' or 'high'. 'default' by default.

Tags
since
1.0
Return values
mixed

display()

public display() : mixed
Tags
access

protected

since
1.0
Return values
mixed

getField()

public getField(string $fieldName) : AbstractField|null
Parameters
$fieldName : string

Field name, like "total_price". Prefixed or unprefixed.

Return values
AbstractField|null

getLabel()

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

load()

public load() : mixed
Tags
access

protected

since
1.0
Return values
mixed

register()

public register() : mixed
Tags
access

protected

since
1.0
Return values
mixed

save()

public save(int $postId, WP_Post $post) : mixed
Parameters
$postId : int
$post : WP_Post
Tags
access

protected

since
1.0
Return values
mixed

addActions()

protected addActions() : mixed
Tags
since
1.0
Return values
mixed

canSave()

protected canSave(int $postId, WP_Post $post) : bool
Parameters
$postId : int
$post : WP_Post
Tags
since
1.0
Return values
bool

loadMetabox()

protected loadMetabox() : mixed
Tags
since
1.0
Return values
mixed

loadValue()

protected loadValue(int $postId, string $metaName) : mixed
Parameters
$postId : int
$metaName : string
Tags
since
1.5.0
Return values
mixed

parseValues()

protected abstract parseValues(int $postId, WP_Post $post) : array<string|int, mixed>
Parameters
$postId : int
$post : WP_Post
Tags
since
1.0
Return values
array<string|int, mixed>

See the exact format in the child classes.

renderRegular()

protected abstract renderRegular() : string
Tags
since
1.0
Return values
string

renderSide()

protected abstract renderSide() : string
Tags
since
1.0
Return values
string

saveValues()

protected abstract saveValues(array<string|int, mixed> $values, int $postId, WP_Post $post) : mixed
Parameters
$values : array<string|int, mixed>
$postId : int
$post : WP_Post
Tags
since
1.0
Return values
mixed

theFields()

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

theName()

protected theName() : string
Tags
since
1.0
Return values
string

Search results