wp-papi / papi

:rocket: WordPress Page Type API with custom fields
https://wp-papi.github.io
MIT License
263 stars 32 forks source link

Add support for turning off property cache and introduce a new filter #195

Closed frozzare closed 8 years ago

frozzare commented 8 years ago

Description

Adds cache option to each property where you can turn off the cache for that property. Repeaters in flexible uses this internally since repeaters otherwise will be cached in a bad way when you have to child repeaters of the same type with the same slug.

The new filter is papi/get_property which can modify the property after is loaded from the page type but before it's returned into Papi. papi/get_boxes was added to 3.2.0 so I think it's just a good way forward buy adding this filter

Checklist

codecov-io commented 8 years ago

Current coverage is 93.07% (diff: 94.44%)

Merging #195 into master will increase coverage by 0.05%

@@             master       #195   diff @@
==========================================
  Files            88         88          
  Lines          5376       5389    +13   
  Methods         492        493     +1   
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           5001       5016    +15   
+ Misses          375        373     -2   
  Partials          0          0          

Powered by Codecov. Last update ef57135...b3d07f6