pfeifferNet

Ingredients
in package

Class to provide ingredients custom post type admin functionality.

Adds metabox for extended data.

Tags
since
5.4.0
since
5.5.0

Inherit standard singleton class.

since
5.11.0

Deprecated global singleton.

Table of Contents

Constants

METADATA_CONTAINER  = 'table-ingredient-meta.php'
Ingredient metadata container partial.
NONCE_ACTION  = 'update_ingredient'
The nonce action.
NONCE_NAME  = 'token'
The nonce name.

Properties

$cpt_definition  : Ingredients
The instance of the Ingredients CPT definition class.
$instances  : array<string|int, object>
The array of instances of this class and sub-classes.
$metadata_container  : string
Fully qualified path to ingredient metadata container partial.

Methods

add_metabox()  : void
Add the metabox to custom post edit screens.
get_instance()  : object
Creates and/or returns the instance of this class.
render_metabox()  : void
Render the metabox on custom post edit screens.
save_metabox()  : void
Save the metabox data.
__construct()  : void
Initialise the class and set its properties.

Constants

METADATA_CONTAINER

Ingredient metadata container partial.

protected string METADATA_CONTAINER = 'table-ingredient-meta.php'
Tags
since
5.4.0

NONCE_ACTION

The nonce action.

protected string NONCE_ACTION = 'update_ingredient'
Tags
since
5.4.0

NONCE_NAME

The nonce name.

protected string NONCE_NAME = 'token'
Tags
since
5.4.0

Properties

$instances

The array of instances of this class and sub-classes.

protected static array<string|int, object> $instances = array()
Tags
since
5.11.0

$metadata_container

Fully qualified path to ingredient metadata container partial.

protected string $metadata_container
Tags
since
5.4.0

Methods

add_metabox()

Add the metabox to custom post edit screens.

public add_metabox() : void
Tags
since
5.4.0

get_instance()

Creates and/or returns the instance of this class.

public static get_instance() : object
Tags
since
5.11.0
Return values
object

The instance of this class.

render_metabox()

Render the metabox on custom post edit screens.

public render_metabox(WP_Post $post) : void
Parameters
$post : WP_Post

The post object.

Tags
since
5.4.0

save_metabox()

Save the metabox data.

public save_metabox(int $post_id, WP_Post $post, bool $update) : void
Parameters
$post_id : int

The post ID.

$post : WP_Post

The post object.

$update : bool

Whether this is an existing post being updated or not.

Tags
since
5.4.0

__construct()

Initialise the class and set its properties.

protected __construct() : void
Tags
since
5.4.0

        
On this page

Search results