How can I filter the contents of a metafield before it’s displayed in the admin?
I have seen that CMB2 offers the possibility to create a custom escaping function with which the values are checked before they’re displayed. So I set the escape_cb parameter in the metafield this way: $cmb->add_field( array( ‘name’ => esc_html__( ‘Text Area for Code’, ‘cmb2’ ), ‘id’ => $prefix . ‘textarea_code’, ‘type’ => ‘textarea_code’, ‘sanitization_cb’ => … Read more