DiviAreaItem.applyFilters()

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 string, required
The filter hook to call.
value mixed, required
The value to filter.
...params mixed, optional
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

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Get in touch with us