patric-boehner
7/28/2016 - 8:40 PM

snippet of striped down CMB2 WYSIWYG meta field options

snippet of striped down CMB2 WYSIWYG meta field options

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

// WYSIWYG Minimal Field
//* https://github.com/WebDevStudios/CMB2/wiki/Field-Types#wysiwyg
$cmb2->add_field( array(
	'name'		=> 'Field Name',
	'desc'		=> 'Add a description(optional)',
	'id'		=> $prefix . 'wysiwyg-text',
	'type'		=> 'wysiwyg',
	'options'	=> array(
		'wpautop'	=> true,
		'media_buttons'	=> false,
		'teeny'		=> true,
		'textarea_rows' => get_option('default_post_edit_rows', 8),
		'quicktags'	=> false,
	),
) );