{"action":"created","issue":{"url":"https://api.github.com/repos/jtsternberg/Taxonomy_MetaData/issues/25","labels_url":"https://api.github.com/repos/jtsternberg/Taxonomy_MetaData/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/jtsternberg/Taxonomy_MetaData/issues/25/comments","events_url":"https://api.github.com/repos/jtsternberg/Taxonomy_MetaData/issues/25/events","html_url":"https://github.com/jtsternberg/Taxonomy_MetaData/issues/25","id":71391315,"number":25,"title":"Documentation still shows old way of adding fields?","user":{"login":"austinjreilly","id":494217,"avatar_url":"https://avatars.githubusercontent.com/u/494217?v=3","gravatar_id":"","url":"https://api.github.com/users/austinjreilly","html_url":"https://github.com/austinjreilly","followers_url":"https://api.github.com/users/austinjreilly/followers","following_url":"https://api.github.com/users/austinjreilly/following{/other_user}","gists_url":"https://api.github.com/users/austinjreilly/gists{/gist_id}","starred_url":"https://api.github.com/users/austinjreilly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinjreilly/subscriptions","organizations_url":"https://api.github.com/users/austinjreilly/orgs","repos_url":"https://api.github.com/users/austinjreilly/repos","events_url":"https://api.github.com/users/austinjreilly/events{/privacy}","received_events_url":"https://api.github.com/users/austinjreilly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-27T20:23:48Z","updated_at":"2015-05-01T21:45:02Z","closed_at":null,"body":"Per the [gitter chat exchange](https://gitter.im/WebDevStudios/CMB2?at=55105acac57069db7e0a71d2) we had a little while ago, fields should be added using a method instead of as an array. I think this implies that the syntax for registering a metabox should be:\r\n\r\n```php\r\nfunction cmb2_taxonomy_meta_initiate() {\r\n\r\n    require_once( 'CMB2/init.php' );\r\n    require_once( 'Taxonomy_MetaData/Taxonomy_MetaData_CMB2.php' );\r\n\r\n    $prefix = '_cat_options_';\r\n\r\n    /**\r\n     * Semi-standard CMB2 metabox/fields array\r\n     */\r\n    $cat_options_meta_box = new_cmb2_box(array(\r\n        'id'         => $prefix . 'metabox',\r\n        // 'key' and 'value' should be exactly as follows\r\n        'show_on'    => array( 'key' => 'options-page', 'value' => array( 'unknown', ), ),\r\n        'show_names' => true, // Show field names on the left\r\n    ));\r\n\r\n    $cat_options_meta_box->add_field(array(\r\n        'name' => __( 'Category Archive Featured Post', 'taxonomy-metadata' ),\r\n        'desc' => __( 'Enter Post ID', 'taxonomy-metadata' ),\r\n        'id'   => 'feat_post', // no prefix needed since the options are one option array.\r\n        'type' => 'text',\r\n    ));\r\n\r\n    $cat_options_meta_box->add_field(array(\r\n        'name' => __( 'Test Checkbox', 'taxonomy-metadata' ),\r\n        'desc' => __( 'field description (optional)', 'taxonomy-metadata' ),\r\n        'id'   => 'test_checkbox',\r\n        'type' => 'checkbox',\r\n    ));\r\n\r\n    $cat_options_meta_box->add_field(array(\r\n        'name' => __( 'Test Text Small', 'taxonomy-metadata' ),\r\n        'desc' => __( 'field description (optional)', 'taxonomy-metadata' ),\r\n        'id'   => 'test_textsmall',\r\n        'type' => 'text_small',\r\n        // 'repeatable' => true,\r\n    ));\r\n\r\n    $cat_options_meta_box->add_field(array(\r\n        'name'    => __( 'Test wysiwyg', 'taxonomy-metadata' ),\r\n        'desc'    => __( 'field description (optional)', 'taxonomy-metadata' ),\r\n        'id'      => 'test_wysiwyg',\r\n        'type'    => 'wysiwyg',\r\n        'options' => array( 'textarea_rows' => 5, ),\r\n    ));\r\n     \r\n    // (Recommended) Use wp-large-options\r\n    require_once( 'wp-large-options/wp-large-options.php' );\r\n    $overrides = array(\r\n        'get_option'    => 'wlo_get_option',\r\n        'update_option' => 'wlo_update_option',\r\n        'delete_option' => 'wlo_delete_option',\r\n    );\r\n\r\n    /**\r\n     * Instantiate our taxonomy meta class\r\n     */\r\n    $cats = new Taxonomy_MetaData_CMB2( 'category', $cat_options_meta_box->metabox, __( 'Category Settings', 'taxonomy-metadata' ), $overrides );\r\n}\r\ncmb2_taxonomy_meta_initiate();\r\n```\r\n\r\nIs that correct?"},"comment":{"url":"https://api.github.com/repos/jtsternberg/Taxonomy_MetaData/issues/comments/98247213","html_url":"https://github.com/jtsternberg/Taxonomy_MetaData/issues/25#issuecomment-98247213","issue_url":"https://api.github.com/repos/jtsternberg/Taxonomy_MetaData/issues/25","id":98247213,"user":{"login":"mrtwebdesign","id":1224579,"avatar_url":"https://avatars.githubusercontent.com/u/1224579?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtwebdesign","html_url":"https://github.com/mrtwebdesign","followers_url":"https://api.github.com/users/mrtwebdesign/followers","following_url":"https://api.github.com/users/mrtwebdesign/following{/other_user}","gists_url":"https://api.github.com/users/mrtwebdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtwebdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtwebdesign/subscriptions","organizations_url":"https://api.github.com/users/mrtwebdesign/orgs","repos_url":"https://api.github.com/users/mrtwebdesign/repos","events_url":"https://api.github.com/users/mrtwebdesign/events{/privacy}","received_events_url":"https://api.github.com/users/mrtwebdesign/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T21:45:02Z","updated_at":"2015-05-01T21:45:02Z","body":"I would love to see an update for this. I tried my own conversion to the new method, but it's not working. I'm still getting errors.\r\n[01-May-2015 21:40:42 UTC] PHP Fatal error:  Uncaught exception 'Exception' with message 'Invalid CMB2 property: metabox' in /Users/Nomad/htdocs/beast/wp-content/themes/beast.tv/cmb2/includes/CMB2.php:941"}}