Skip to content

Commit af1887c

Browse files
committed
Update example-functions.php w/ more info about rest api
1 parent 3d86282 commit af1887c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎example-functions.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function yourprefix_register_demo_metabox() {
124124
// 'closed' => true, // true to keep the metabox closed by default
125125
// 'classes' => 'extra-class', // Extra cmb2-wrap classes
126126
// 'classes_cb' => 'yourprefix_add_some_classes', // Add classes through a callback.
127-
// 'show_in_rest' => true, // true to show fields in the WP-API. More here: <docs link>
127+
// 'show_in_rest' => true|'read_and_write'\'write_only', // true to show fields in the WP-API. write is disabled by default. More here: https://github.com/WebDevStudios/CMB2/wiki/REST-API
128128
) );
129129

130130
$cmb_demo->add_field( array(
@@ -138,7 +138,7 @@ function yourprefix_register_demo_metabox() {
138138
// 'on_front' => false, // Optionally designate a field to wp-admin only
139139
// 'repeatable' => true,
140140
// 'column' => true, // Display field value in the admin post-listing columns
141-
// 'show_in_rest' => false, // false to remove field from WP-API, if cmb 'show_in_rest' is true. More here: <docs link>
141+
// 'show_in_rest' => false, // false to remove field from WP-API, if cmb 'show_in_rest' is true. More here: https://github.com/WebDevStudios/CMB2/wiki/REST-API
142142
) );
143143

144144
$cmb_demo->add_field( array(

0 commit comments

Comments
 (0)