TestNotificationMetabox
extends CustomMetabox
in package
Tags
Table of Contents
- $context : string
- $priority : string
- $capability : string
- $entityType : string
- $id : string
- $isLoaded : bool
- $isSaved : bool
- $name : string
- $nonceField : string
- $postType : string
- $saveAction : string
- __construct() : mixed
- display() : mixed
- getLabel() : string
- load() : mixed
- register() : mixed
- save() : mixed
- addActions() : mixed
- canSave() : bool
- loadMetabox() : mixed
- parseValues() : array<string|int, mixed>
- renderMetabox() : string
- renderRegular() : string
- renderSide() : string
- saveValues() : mixed
- theName() : string
Properties
$context
public
string
$context
Tags
$priority
public
string
$priority
Tags
$capability
protected
string
$capability
= 'edit_post'
Tags
$entityType
protected
string
$entityType
Tags
$id
protected
string
$id
Tags
$isLoaded
protected
bool
$isLoaded
= false
Tags
$isSaved
protected
bool
$isSaved
= false
Tags
$name
protected
string
$name
Tags
$nonceField
protected
string
$nonceField
Tags
$postType
protected
string
$postType
Tags
$saveAction
protected
string
$saveAction
Tags
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
Return values
mixed —display()
public
display() : mixed
Tags
Return values
mixed —getLabel()
public
getLabel() : string
Return values
string —load()
public
load() : mixed
Tags
Return values
mixed —register()
public
register() : mixed
Tags
Return values
mixed —save()
public
save(int $postId, WP_Post $post) : mixed
Parameters
- $postId : int
- $post : WP_Post
Tags
Return values
mixed —addActions()
protected
addActions() : mixed
Tags
Return values
mixed —canSave()
protected
canSave(int $postId, WP_Post $post) : bool
Parameters
- $postId : int
- $post : WP_Post
Tags
Return values
bool —loadMetabox()
protected
loadMetabox() : mixed
Tags
Return values
mixed —parseValues()
protected
abstract parseValues(int $postId, WP_Post $post) : array<string|int, mixed>
Parameters
- $postId : int
- $post : WP_Post
Tags
Return values
array<string|int, mixed> —See the exact format in the child classes.
renderMetabox()
protected
renderMetabox() : string
Return values
string —renderRegular()
protected
abstract renderRegular() : string
Tags
Return values
string —renderSide()
protected
abstract renderSide() : string
Tags
Return values
string —saveValues()
protected
saveValues(array<string|int, mixed> $values, int $postId, WP_Post $post) : mixed
Parameters
- $values : array<string|int, mixed>
- $postId : int
- $post : WP_Post
Return values
mixed —theName()
protected
theName() : string