Chapter_Meta
in package
Chapter taxonomy meta data admin functionality.
- Create or extend admin screens to add whether chapter has recipes.
Tags
Table of Contents
Constants
- CREATE_META_CONTAINER = 'create-chapter-meta.php'
- Create screen partial.
- EDIT_META_CONTAINER = 'edit-chapter-meta.php'
- Edit screen partial.
Properties
- $create_meta_container : string
- The fully qualified path to create screen partial.
- $edit_meta_container : string
- The fully qualified path to edit screen partial.
- $instances : array<string|int, object>
- The array of instances of this class and sub-classes.
Methods
- get_instance() : object
- Creates and/or returns the instance of this class.
- render_create_fields() : void
- Render the extra metadata fields on the create chapter screen.
- render_edit_fields() : void
- Render the extra metadata fields on the edit chapter screen.
- save() : void
- Save the term metadata.
- __construct() : void
- Initialise the class.
Constants
CREATE_META_CONTAINER
Create screen partial.
protected
string
CREATE_META_CONTAINER
= 'create-chapter-meta.php'
Tags
EDIT_META_CONTAINER
Edit screen partial.
protected
string
EDIT_META_CONTAINER
= 'edit-chapter-meta.php'
Tags
Properties
$create_meta_container
The fully qualified path to create screen partial.
protected
string
$create_meta_container
= ''
Tags
$edit_meta_container
The fully qualified path to edit screen partial.
protected
string
$edit_meta_container
= ''
Tags
$instances
The array of instances of this class and sub-classes.
protected
static array<string|int, object>
$instances
= array()
Tags
Methods
get_instance()
Creates and/or returns the instance of this class.
public
static get_instance() : object
Tags
Return values
object —The instance of this class.
render_create_fields()
Render the extra metadata fields on the create chapter screen.
public
render_create_fields(string $taxonomy) : void
- This is hooked before the default tax meta fields so that it appears above them.
Parameters
- $taxonomy : string
-
The taxonomy slug.
Tags
render_edit_fields()
Render the extra metadata fields on the edit chapter screen.
public
render_edit_fields(WP_Term $term, string $taxonomy) : void
- This is hooked before the default tax meta fields so that it appears above them.
Parameters
- $term : WP_Term
-
The taxonomy term object.
- $taxonomy : string
-
The taxonomy slug.
Tags
save()
Save the term metadata.
public
save(int $term_id) : void
Parameters
- $term_id : int
-
The taxonomy term id.
Tags
__construct()
Initialise the class.
protected
__construct() : void