Car Demon Code Docs

  1. Home
  2. Car Demon Code Docs
  3. Display Filters
  4. cd_get_car_filter


This filter can be used to filter the vehicle item array returned by the cd_get_car( $post_id ) function.

The following example will add all vehicle post meta to the vehicle array:

function my_cd_get_car_filter( $car_array, $post_id ) {

    /* Add all Meta fields to the $car_array
    $car_array['meta'] = array();
    $x['car_array']['meta'] = get_post_meta( $post_id );

add_filters( 'cd_get_car_filter', 'my_cd_get_car_filter' 10, 2 );
Was this article helpful to you? Yes No

How can we help?