%s', $field['field_name'], $field['id'], $meta ); } else { // Using output buffering because wp_editor() echos directly ob_start(); $field['options']['textarea_name'] = $field['field_name']; // Use new wp_editor() since WP 3.3 wp_editor( $meta, $field['id'], $field['options'] ); return ob_get_clean(); } } /** * Normalize parameters for field * * @param array $field * * @return array */ static function normalize_field( $field ) { $field = wp_parse_args( $field, array( 'raw' => false, 'options' => array(), ) ); $field['options'] = wp_parse_args( $field['options'], array( 'editor_class' => 'rwmb-wysiwyg', 'dfw' => true, // Use default WordPress full screen UI ) ); // Keep the filter to be compatible with previous versions $field['options'] = apply_filters( 'rwmb_wysiwyg_settings', $field['options'] ); return $field; } } }