Metabox Component
-
Class:
WPPTD\Components\Metabox
- Slug must be: unique among all metabox instances within the same post type
-
Possible parents:
WPPTD\Components\PostType
-
Possible children:
WPPTD\Components\Field
This component represents a metabox in a post editing screen of a specific post type. A metabox can group meta fields together and is draggable and toggable.
- Type: string
- Default: 'Metabox title'
- (required)
This defines the heading which will be displayed at the top of the metabox.
- Type: string
- Default: empty string
- (optional)
This description will be shown right below the metabox title.
- Type: string
- Default: 'advanced'
- (optional)
This property works like the $context
parameter in the add_meta_box()
function. It must be set to either 'normal', 'advanced' or 'side'.
- Type: string
- Default: 'default'
- (optional)
This property works like the $priority
parameter in the add_meta_box()
function. It must be set to either 'high', 'core', 'default' or 'low'.
- Type: callable
- Default: false
- (optional)
This can be a function which is called if the metabox does not contain any fields. You can use it to create metaboxes with custom content. Note that this callback is not executed if there are fields in the metabox. However, if you don't include any fields, this property is required.
- Type: number
- Default: null
- (optional)
A number that specifies the position of the metabox among the post type metaboxes with the same context and priority. Components with lower positions are displayed before components with higher positions.
Post Types Definitely is just one among a group of Definitely plugins which allow developers to build their admin interfaces more quickly. You might also wanna check out: