EPL_METABOX class
Can also be used by extensions to handle all the metabox functionality it adds metabox wrapper & renders metabox fields and finally save it on save_post hook the constructor of the class accepts one or more array of metabox to be rendered the structure of the metabox array should be similar to make it work
| Since | |
|---|---|
2.0 |
|
| Methods | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public
|
__construct(mixed $epl_meta_boxes, string $prefix = 'epl_', string $text_domain = 'easy-property-listings')
Constructor
Constructor Register a mea box. Parameters
|
# | ||||||||||||||
public
|
add_action(string $action, string $callback_function, int $priority = 10, integer $accepted_args = 1)
Add Action
Add Action Helper function to add add_action WordPress filters. Parameters
|
# | ||||||||||||||
public
|
add_filter(string $action, string $callback_function, int $priority = 10, int $accepted_args = 1)
Add Filter
Add Filter Create add_filter WordPress filter. Parameters
|
# | ||||||||||||||
public
|
add_meta_boxes()
Add metaboxes
Add metaboxes See how to register custom field metaboxes to listings here. |
# | ||||||||||||||
public
|
add_meta_box(
string $id = '',
string $label = '',
string $func = 'inner_meta_box',
array $post_type = [],
string $context = 'normal',
string $priority = 'default',
array $args = null,
)
Class wrapper for WordPress function add_meta_box
Class wrapper for WordPress function add_meta_box Parameters
|
# | ||||||||||||||
public
|
inner_meta_box(array $post, array $args)
Used to render the metabox fields
Used to render the metabox fields Parameters
Since
|
# | ||||||||||||||
public
|
save_meta_box(int $post_ID): int
Callback function hooked on WordPress save_post hook
used to save all the meta fields
Callback function hooked on WordPress save_post hook used to save all the meta fields Parameters
Since
|
# | ||||||||||||||
| Properties | |||
|---|---|---|---|
protected
|
array
|
$epl_meta_boxes
|
# |
protected
|
array
|
$prefix
|
# |
protected
|
array
|
$text_domain
|
# |