TypeRocket / core

TypeRocket core source files where all the magic lives.
https://typerocket.com
36 stars 21 forks source link

Add filter when casting properties in model #29

Closed nebulousGirl closed 5 years ago

nebulousGirl commented 5 years ago

In the base model, the provisionFields method has a filter at the end:

 return apply_filters( 'tr_model_provision_fields', $fields, $this );

It would useful to have the same kind of filter in the castProperties method.

kevindees commented 5 years ago

@nebulousGirl

This feature has now been added to core. Great request.

https://github.com/TypeRocket/core/commit/35bd581173762ed17e8cde9398b6a5506590e7c6