Skip to content

cmb2_get_rest_value

github-actions[bot] edited this page Jun 25, 2026 · 1 revision

Filter the value before it is sent to the REST request.

Auto-generated Example

add_filter(
   'cmb2_get_rest_value',
    function(
        mixed $value,
        CMB2_Field $field
    ) {
        // Your code here.
        return $value;
    },
    10,
    2
);

Parameters

  • mixed $value The value from CMB2_Field::get_data()
  • CMB2_Field $field This field object.

Files

apply_filters( 'cmb2_get_rest_value', $value, $this )

← All Hooks

Clone this wiki locally