Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/amnestywebsite/cmb2-message-field/releases/download/v1.0.0/cmb2-message-field.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
This plugin adds support for an informative message field to CMB2.
Usage
See the CMB2 Wiki for information on how to use CMB2.
This field supports HTML markup. By default, all output will be escaped using wp_kses with the 'post' context.
You can specify a different context by passing a value to the 'kses' key.
The message data will be wrapped in a <div> tag. You can declare attributes for this wrapper by passing an associative array of key=>value pairs in the 'attributes' key.
$metabox->add_field(
[
'id' => 'my-message',
'type' => 'message',
'message' => sprintf( '<p>%s</p>', __( 'My Message', 'textdomain' ) ),
'kses' => 'post',
'attributes' => [
'class' => 'my-message-field',
],
]
);Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.
Tag
Published
Assets
Downloads