Last active
August 29, 2015 14:09
-
-
Save schurpf/b2b61ba51975e28e2b0c to your computer and use it in GitHub Desktop.
php: cmb2 text only metabox to display data, add 'type' => 'text_only' to use hook.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'cmb2_render_text_only', 'sch_cmb_render_text_only', 10, 5 ); | |
function sch_cmb_render_text_only( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) { | |
echo $escaped_value; //unescaped value: echo $field_object->value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment