public function get_cmb_config()
{
if (isset($this->cmbmc)) {
return $this->cmbmc;
}
$this->cmbmc = false;
if (!empty($this->args['cmb_metabox_config'])) {
// Config can be passed as an array or a callback (which returns the array).
$this->cmbmc = is_callable($this->args['cmb_metabox_config']) ? call_user_func($this->args['cmb_metabox_config'], $this->button_data, $this->args) : (array) $this->args['cmb_metabox_config'];
}
if ($this->button_data['mceView'] && $this->button_data['include_close'] && is_array($this->cmbmc['fields'])) {
$this->cmbmc['fields'][] = array('name' => $this->button_data['l10nsccontents'], 'desc' => $this->button_data['l10nsccontents_desc'], 'id' => 'sccontent', 'type' => 'wysiwyg', 'options' => array('textarea_rows' => 5, 'teeny' => true));
}
self::$buttons_data[$this->index]['cmb'] = array('id' => $this->cmbmc['id'], 'fields' => $this->cmbmc['fields']);
return $this->cmbmc;
}