Skip to content

cmb2_rest_prepare

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

Filter the prepared CMB2 item response.

Auto-generated Example

add_filter(
   'cmb2_rest_prepare',
    function(
        mixed $data,
        object $request,
        object $cmb2_endpoints
    ) {
        // Your code here.
        return $data;
    },
    10,
    3
);

Parameters

  • mixed $data Prepared data
  • object $request The WP_REST_Request object
  • object $cmb2_endpoints This endpoints object

Files

apply_filters( 'cmb2_rest_prepare', rest_ensure_response( $data ), $this->request, $this )

← All Hooks

Clone this wiki locally