DiviAreaItem.applyFilters(hook, value, ...params)
Runs a JS filter via DiviArea.applyFilters()
with the given hook name.
This function will call two filters: One exactly as specified in the hook, and one with the Area-Key suffix. The filters are called in that order.
Params
hook
- The filter hook to call.
value
- The value to filter.
...params
- Additional parameters to send to the callback handler. If no params are specified, then a reference to this
DiviAreaItem
is sent to the callback.
Returns
The filtered value.
Examples
// Filter a value.
res = area.applyFilters( 'show_area', value );
// The above function is identical to the following code:
res = DiviArea.applyFilters( 'show_area', value, area );
res = DiviArea.applyFilters( 'show_area' + area.theKey(), res, area );
Notes
No notes