| CARVIEW |
Select Language
HTTP/2 301
date: Sun, 28 Dec 2025 07:14:20 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gf_has_filters/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: MISS
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=QE3Y81tSxGwU%2Fj9qy2%2Fw%2BP76kEVv8aG563pYQbd%2BuW83TDPoxUMvqFKHEOKfoErK%2BcOanpl74i5l3o3I5A%2FoGM1igzEPCyr3sh9XDGCiwyqbbVn1"}]}
cf-ray: 9b4f429d7a47c1bd-BLR
HTTP/2 200
date: Sun, 28 Dec 2025 07:14:21 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: MISS
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=V7imgQhA%2BKHEfoi9PszmvPGzswVH1zihIxl6P7rOzxW4xJIpD4iht4JAbB8ZyEm2ocMLXuFdt54l0R2L9%2Fyg4waPCaiKNBI3UG542hMNh%2Fs4WGS8"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b4f42a07bc4c1bd-BLR
gf_has_filters - Gravity Forms Documentation
gf_has_filters
Description
The function gf_has_filters() determines if a callback has been registered for the specified filter.
Usage
gf_has_filters( array( 'filter_name', $modifier1 ) );
This helper function also has an alias, gf_has_filter(), which can be used like so:
gf_has_filter( array( 'filter_name', $modifier1 ) );
Parameters
| Parameter | Type | Description |
|---|---|---|
| $filter | array | Array containing the filter tag as well as the possible modifiers. |
| $function_to_check | bool|callable | The optional callback to check for. |
Returns
Returns boolean for whether the hook has any callbacks registered or if a specific callback is registered.
Examples
$result = gf_has_filters( array( 'gform_pre_render', $form_id ) );
$result = gf_has_filter( array( 'gform_pre_render', $form_id ) );
$result = gf_has_filters( array( 'gform_disable_view_counter', $form_id ), '__return_true' );
Since
The gf_has_filters and gf_has_filter functions were added in Gravity Forms version 2.4.18.
Source Code
These helper functions are located in gravityforms.php