jaredatch/Custom-Metaboxes-and-Fields-for-WordPress — Issue #117: Error in Adding Your Own Field Types documentation
Author: stvwlf
Created: 2012-02-16 21:07:40+00:00
State: open

error in the CMB wiki documentation on page Adding Your Own Field Types

In below code
he add_filter callback is rrh_person_meta_boxes
the function name below it is rrh_book_meta_boxes
--------------------------------------------------------------------------------------------------
add_filter( 'cmb_meta_boxes', 'rrh_person_meta_boxes' );
function rrh_book_meta_boxes( $meta_boxes ) {
$meta_boxes[] = array(
'id' => 'rrh_person_metabox',
'title' => 'Person Information',
'pages' => array('rrh_person'),
'context' => 'normal',
'priority' => 'high',
'show_names' => true, // Show field names on the left
'fields' => array(
array(
'name' => 'Email',
'id' => 'rrh_person_email',
'type' => 'text_email',
'desc' => 'Invalid email addresses will be wiped out.'
)
)
);
return $meta_boxes;
}