Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Commit

Permalink
add example taxonomies (category, post_tag) so that users can see it …
Browse files Browse the repository at this point in the history
…in action
  • Loading branch information
jtsternberg committed Nov 30, 2013
1 parent 4211859 commit 7520796
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions example-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function cmb_sample_metaboxes( array $meta_boxes ) {
// Start with an underscore to hide fields from custom fields list
$prefix = '_cmb_';

$meta_boxes[] = array(
$meta_boxes['test_metabox'] = array(
'id' => 'test_metabox',
'title' => __( 'Test Metabox', 'cmb' ),
'pages' => array( 'page', ), // Post type
Expand Down Expand Up @@ -180,21 +180,21 @@ function cmb_sample_metaboxes( array $meta_boxes ) {
'desc' => __( 'field description (optional)', 'cmb' ),
'id' => $prefix . 'text_taxonomy_radio',
'type' => 'taxonomy_radio',
'taxonomy' => '', // Taxonomy Slug
'taxonomy' => 'category', // Taxonomy Slug
),
array(
'name' => __( 'Test Taxonomy Select', 'cmb' ),
'desc' => __( 'field description (optional)', 'cmb' ),
'id' => $prefix . 'text_taxonomy_select',
'type' => 'taxonomy_select',
'taxonomy' => '', // Taxonomy Slug
'taxonomy' => 'category', // Taxonomy Slug
),
array(
'name' => __( 'Test Taxonomy Multi Checkbox', 'cmb' ),
'desc' => __( 'field description (optional)', 'cmb' ),
'id' => $prefix . 'test_multitaxonomy',
'type' => 'taxonomy_multicheck',
'taxonomy' => '', // Taxonomy Slug
'taxonomy' => 'post_tag', // Taxonomy Slug
),
array(
'name' => __( 'Test Checkbox', 'cmb' ),
Expand Down Expand Up @@ -241,7 +241,7 @@ function cmb_sample_metaboxes( array $meta_boxes ) {
),
);

$meta_boxes[] = array(
$meta_boxes['about_page_metabox'] = array(
'id' => 'about_page_metabox',
'title' => __( 'About Page Metabox', 'cmb' ),
'pages' => array( 'page', ), // Post type
Expand Down

0 comments on commit 7520796

Please sign in to comment.