‘textarea_code’ field type now uses CodeMirror that is used by WordPress (#1096). A field can opt-out to return to the previous behavior by specifying an ‘options’ parameter:
‘options’ => array( ‘disable_codemirror’ => true )
As with the other javascript-enabled fields, the code-editor defaults can be overridden via a data-codeeditor attribute. E.g:
‘attributes’ => array(
‘data-codeeditor’ => json_encode( array(
‘codemirror’ => array(
‘mode’ => ‘css’,
),
) ),
),
`
Allow outputting CMB2 boxes/fields in additional locations in the post-editor.
The new locations are: form_top, before_permalink, after_title, and after_editor
These would be defined by setting the context property for your box:
`php$cmb_demo = new_cmb2_box( array(
…
‘context’ => ‘before_permalink’,
) );
`
If it is preferred that the fields are output without the metabox, then omit the ‘title’ property from the metabox registration array, and instead add ‘remove_box_wrap’ => true,.
Plugin Website
Visit website
Share Post
Get insights into what’s happening at ChangelogWP right in your inbox. We don’t believe in spam.