Last active
January 17, 2021 05:32
-
-
Save hirozed/a67c9f71eb4b4e34e8fcf3ef24e40768 to your computer and use it in GitHub Desktop.
WordPress CMB2 Rich Text Field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cmb->add_field( | |
array( | |
'name' => __( '[CHANGEME-name]', '[CHANGEME-localization]' ), | |
'id' => '[CHANGEME-id]', | |
'desc' => __( '[CHANGEME-description]', '[CHANGEME-localization]' ), | |
'type' => 'wysiwyg', | |
'options' => array( | |
'textarea_rows' => 1, | |
'media_buttons' => false, | |
'teeny' => true, | |
'quicktags' => false, | |
'tinymce' => array( | |
'toolbar1' => 'bold,italic,link,unlink,undo,redo', | |
'valid_elements' => 'a[href],strong,em', | |
), | |
), | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment