Deprecated and renamed hooks
Every GravityView hook that has been renamed is listed here with the name to use now. If a deprecation notice appeared in your WordPress dashboard, find the hook it named in the tables below.
Nothing breaks when a hook is deprecated. The old hook still fires, and GravityView passes its result straight into the new one, so existing code keeps working. Renaming is housekeeping, not an emergency. Old names may be removed in a future major release, so migrate when it suits you.
Looking up a hook #
Every hook name in the tables below links to its page on the GravityKit developer docs, where you get the parameters, the version it shipped in, the file and line it fires from, and a working example. That is the reference to keep open while you migrate.
If you write code with an AI assistant, connect the GravityKit Developer Docs MCP instead of pasting hook names into it. Your assistant then looks up the real signature rather than guessing at one, which matters here: a model trained before these renames will confidently hand you the deprecated name. It is free, hosted, and needs no API key.
claude mcp add --transport http gravitykit-docs https://mcp.gravitykit.dev/Cursor, VS Code and other MCP clients take the same server as a configuration entry. Setup for every client is here.
Why you are seeing a deprecation notice #
GravityView shows the notice only when WP_DEBUG is enabled, so it reaches developers rather than site owners. The notice names the hook, the file and line where your code hooks it, and the replacement:
The gravityview_fe_search_criteria hook used in themes/your-theme/functions.php:120 has been deprecated. Use gravityview/view/query instead.
Code inside GravityKit plugins is ignored, so a notice always points at code you or another developer control.
How the names changed #
Hook names have been through three generations. Which one you are looking at usually tells you how old a snippet is:
gravityview_entry_class. Underscores throughout, the original 1.x style.gravityview/template/list/entry/class. Slash-separated, introduced with the 2.0 rewrite.gk/gravityview/search/datepicker/format. Prefixed withgk/, the current convention shared across GravityKit products.
Two vocabulary changes also happened in 2.14: blacklist became blocklist and whitelist became allowlist, in both hook names and method names.
Renamed hooks #
Each row says whether the hook is a filter or an action, so you know whether to reach for add_filter() or add_action(), and the version that deprecated the old name. Both names link to their reference page.
Search Bar
| Deprecated hook | Use instead |
|---|---|
gk/gravityview/widget/search/visible_fields_onlyfilter, deprecated in 2.57 | gk/gravityview/search/visible-fields-onlyModifies whether “Search Everything” is limited to visible fields only. |
gravityview/search-all-split-wordsfilter, deprecated in 2.55 | gk/gravityview/search/field/all/split-wordsSearch for each word separately or the whole phrase? |
gravityview/search-trim-inputfilter, deprecated in 2.55 | gk/gravityview/search/value/trimWhether to remove leading/trailing whitespaces from search value. |
gravityview/search/ignore-empty-valuesfilter, deprecated in 2.55 | gk/gravityview/search/value/ignore-emptyWhether empty field values should be ignored or strictly matched. |
gravityview/search/modefilter, deprecated in 2.55 | gk/gravityview/search/criteria/modeModifies the search criteria mode. |
gravityview/search/operator_allowlistfilter, deprecated in 2.55 | gk/gravityview/search/operators/allowedModifies an array of allowed operators for a field. |
gravityview/search/operator_whitelistfilter, deprecated in 2.14 | gk/gravityview/search/operators/allowed (renamed twice)Modifies an array of allowed operators for a field. |
gravityview/search/searchable_fields/allowlistfilter, deprecated in 2.55 | gk/gravityview/search/searchable-fields/allowedModifies the fields able to be searched using the Search Bar. |
gravityview/search/searchable_fields/whitelistfilter, deprecated in 2.14 | gk/gravityview/search/searchable-fields/allowed (renamed twice)Modifies the fields able to be searched using the Search Bar. |
gravityview/widget/hide_until_searched/whitelistfilter, deprecated in 2.14 | gravityview/widget/hide_until_searched/allowlistSome widgets have got to stay shown. |
gravityview/widgets/search/datepicker/formatfilter, deprecated in 2.55 | gk/gravityview/search/datepicker/formatModifies the datepicker format. |
gravityview_fe_search_criteriafilter, deprecated in 2.55 | gravityview/view/queryOverride the \GF_Query before the get() call. |
Templates and layout
| Deprecated hook | Use instead |
|---|---|
gravitview_no_entries_textfilter, deprecated in 2.55 | gravityview/template/text/no_entriesModify the text displayed when there are no entries. |
gravityview_afteraction, deprecated in 2.55 | gravityview/template/afterAppend content to the View. |
gravityview_beforeaction, deprecated in 2.55 | gravityview/template/beforePrepend content to the View. |
gravityview_entry_classfilter, deprecated in 2.55 | Three replacements, one per layout The class applied to each entry row, now set per layout. |
gravityview_footeraction, deprecated in 2.55 | gravityview/template/footerRender content after the View, outside the container div. Used for footer widget areas. |
gravityview_go_back_labelfilter, deprecated in 2.55 | gravityview/template/links/back/labelModify the back link text. |
gravityview_go_back_urlfilter, deprecated in 2.55 | gravityview/template/links/back/urlModify the back link URL. |
gravityview_headeraction, deprecated in 2.55 | gravityview/template/headerPrepend content to the View container div. |
gravityview_list_body_afteraction, deprecated in 2.55 | gravityview/template/list/body/afterFires inside the body of the list, after all entries are rendered. |
gravityview_list_body_beforeaction, deprecated in 2.55 | gravityview/template/list/body/beforeFires inside the body of the list, before any entries are rendered. |
gravityview_table_body_afteraction, deprecated in 2.55 | gravityview/template/table/body/afterFires inside the `tbody` of the table, after all rows are rendered. |
gravityview_table_body_beforeaction, deprecated in 2.55 | gravityview/template/table/body/beforeFires inside the `tbody` of the table, before any rows are rendered. |
gravityview_table_cellsfilter, deprecated in 2.55 | gravityview/template/table/fieldsModify the fields displayed in this tables. |
gravityview_table_cells_afteraction, deprecated in 2.55 | gravityview/template/table/cells/afterFires while rendering each entry row, after the cells. Can be used to insert additional table cells. |
gravityview_table_cells_beforeaction, deprecated in 2.55 | gravityview/template/table/cells/beforeFires while rendering each entry row, before the cells. Can be used to insert additional table cells. |
gravityview_table_tr_afteraction, deprecated in 2.55 | gravityview/template/table/tr/afterFires inside the `tr` element of the table, after cell rendering completes. |
gravityview_table_tr_beforeaction, deprecated in 2.55 | gravityview/template/table/tr/beforeFires inside the `tr` element of the table, before cell rendering begins. |
gravityview_template_{$input_type}_optionsfilter, deprecated in 2.55 | gk/gravityview/template/optionsFilters the field options. |
The List layout also fires a before and after action inside each entry, once per zone:
| Deprecated action | Use instead |
|---|---|
gravityview_list_entry_beforeaction, deprecated in 2.55 | gravityview/template/list/entry/beforeFires inside the entry of the list, before the zone is rendered. |
gravityview_list_entry_afteraction, deprecated in 2.55 | gravityview/template/list/entry/afterFires inside the entry of the list, after the zone is rendered. |
gravityview_list_entry_title_beforeaction, deprecated in 2.55 | gravityview/template/list/entry/title/beforeFires inside the entry of the list, before the zone is rendered. |
gravityview_list_entry_title_afteraction, deprecated in 2.55 | gravityview/template/list/entry/title/afterFires inside the entry of the list, after the zone is rendered. |
gravityview_list_entry_content_beforeaction, deprecated in 2.55 | gravityview/template/list/entry/content/beforeFires inside the entry of the list, before the zone is rendered. |
gravityview_list_entry_content_afteraction, deprecated in 2.55 | gravityview/template/list/entry/content/afterFires inside the entry of the list, after the zone is rendered. |
gravityview_list_entry_footer_beforeaction, deprecated in 2.55 | gravityview/template/list/entry/footer/beforeFires inside the entry of the list, before the zone is rendered. |
gravityview_list_entry_footer_afteraction, deprecated in 2.55 | gravityview/template/list/entry/footer/afterFires inside the entry of the list, after the zone is rendered. |
Fields
| Deprecated hook | Use instead |
|---|---|
gravityview/configuration/fieldsfilter, deprecated in 2.55 | gravityview/view/configuration/fieldsFilter the View fields’ configuration array. |
gravityview/field_output/argsfilter, deprecated in 2.55 | gravityview/template/field_output/contextModify the context before generation begins. |
gravityview/setting/class/{$field_type}filter, deprecated in 3.0 | gk/gravityview/admin/field-type/classModifies the field type class name used to render a setting. |
gravityview/sortable/field_blacklistfilter, deprecated in 2.14 | gravityview/sortable/field_blocklistModify what fields should never be sortable. |
gravityview/template/field_labelfilter, deprecated in 2.55 | gravityview/template/field/labelOverride the field label. |
gravityview_blacklist_field_typesfilter, deprecated in 2.14 | gravityview_blocklist_field_typesModify the types of fields that shouldn’t be shown in a View. |
gravityview_empty_valuefilter, deprecated in 2.55 | gravityview/field/value/emptyWhat to display when this field is empty. |
gravityview_field_entry_linkfilter, deprecated in 2.55 | gravityview/template/field/entry_linkModify the link HTML. |
gravityview_field_entry_valuefilter, deprecated in 2.55 | gravityview/template/field/{$field->type}/outputModify the field output for a field type. |
gravityview_field_entry_value_{$field->type}filter, deprecated in 2.55 | gravityview/template/field/{$field->type}/outputModify the field output for a field type. |
gravityview_field_entry_value_{$field->type}_pre_linkfilter, deprecated in 2.55 | gravityview/template/field/{$field->type}/outputModify the field output for a field type. |
gravityview_field_outputfilter, deprecated in 2.55 | gravityview/field_output/htmlModify field HTML output. |
gravityview_template_{$field_type}_optionsfilter, deprecated in 2.55 | gk/gravityview/template/optionsFilters the field options. |
Edit Entry
| Deprecated hook | Use instead |
|---|---|
gravityview/edit_entry/field_blacklistfilter, deprecated in 2.14 | gravityview/edit_entry/field_blocklistArray of fields that should not be displayed in Edit Entry. |
gravityview_edit_entry_titlefilter, deprecated in 2.59 | gk/gravityview/edit-entry/titleThe title used on the Edit Entry screen. |
Delete Entry
| Deprecated hook | Use instead |
|---|---|
gravityview/delete-entry/delete-connected-postfilter, deprecated in 2.55 | gk/gravityview/delete-entry/delete-connected-postShould posts connected to an entry be deleted when the entry is deleted? |
gravityview/delete-entry/deletedaction, deprecated in 2.55 | gk/gravityview/delete-entry/deletedTriggered when an entry is deleted. |
gravityview/delete-entry/modefilter, deprecated in 2.55 | gk/gravityview/delete-entry/modeDelete mode: permanently delete, or move to trash? |
gravityview/delete-entry/trashedaction, deprecated in 2.55 | gk/gravityview/delete-entry/trashedTriggered when an entry is trashed. |
Widgets
| Deprecated hook | Use instead |
|---|---|
gravityview_register_directory_widgetsfilter, deprecated in 2.55 | gravityview/widgets/registerEach item is used to instantiate a GravityView_Admin_View_Widget object. |
gravityview_widget_active_areasfilter, deprecated in 2.55 | gravityview/widget/active_areasArray of zones available for widgets to be dropped into. |
Views and settings
| Deprecated hook | Use instead |
|---|---|
gravity_view_lightbox_scriptfilter, deprecated in 2.5.1 | gravityview_lightbox_scriptModify the CSS class used to trigger lightbox functionality. |
gravity_view_lightbox_stylefilter, deprecated in 2.5.1 | gravityview_lightbox_styleOverride the lightbox style to enqueue. Default: `thickbox`. |
gravityview/data/parse/meta_keysfilter, deprecated in 2.0.7 | gravityview/view_collection/from_post/meta_keysDefine meta keys to parse to check for GravityView shortcode content. |
gravityview_change_entry_creator_user_parametersfilter, deprecated in 2.55 | gravityview/get_users/{$context}Modify the settings used to fetch users. |
gravityview_date_created_adjust_timezonefilter, deprecated in 2.55 | gk/gravityview/search/date/adjust-timezoneWhether to adjust the timezone for entries. |
gravityview_default_argsfilter, deprecated in 2.55 | gravityview/view/settings/defaultsModify the default settings for new Views. |
gravityview_direct_accessfilter, deprecated in 2.55 | gravityview/view/output/directShould this View be directly accessible? |
gravityview_directory_linkfilter, deprecated in 2.55 | gravityview/view/links/directoryModify the URL to the View “directory” context. |
gravityview_include_frontend_actionsaction, deprecated in 2.55 | gravityview/loadedThe core has been loaded. |
gravityview_view_entriesfilter, deprecated in 2.55 | gravityview/view/entriesModify the entry fetching filters, sorts, offsets, limits. |
Hooks that need more than a rename #
Four cases where swapping the name is not enough.
gravityview_entry_class has three replacements
gravityview_entry_class applied to every layout. It was replaced by one hook per layout, so pick the one matching the layout your View uses, or add all three:
gravityview/template/table/entry/classfor the Table layoutgravityview/template/list/entry/classfor the List layoutgravityview/template/layout-builder/entry/classfor the Layout Builder layout
The replacements take $class and a \GV\Template_Context object, where the old hook took $class, the entry array and a GravityView_View object.
Two hooks were renamed twice
If you follow the replacement named in the dashboard notice for these, you land on a name that is itself deprecated. Go straight to the final name:
gravityview/search/operator_whitelist→gravityview/search/operator_allowlist(2.14) →gk/gravityview/search/operators/allowed(2.55)gravityview/search/searchable_fields/whitelist→gravityview/search/searchable_fields/allowlist(2.14) →gk/gravityview/search/searchable-fields/allowed(2.55)
Field value hooks collapsed into one
Three separate hooks now share a single replacement, gravityview/template/field/{$field->type}/output:
gravityview_field_entry_valuegravityview_field_entry_value_{$field->type}gravityview_field_entry_value_{$field->type}_pre_link
To change a field’s value rather than its markup, gravityview/field_output/context/{$tag} is usually the better hook. To change the finished HTML, use gravityview/field_output/html.
Hooks with a variable in the name
Some replacements contain a placeholder. Substitute the real value:
gravityview/get_users/{$context}takeschange_entry_creatororsearch_widget, so the full names aregravityview/get_users/change_entry_creatorandgravityview/get_users/search_widget.gravityview/template/field/{$field->type}/outputtakes a Gravity Forms field type, for examplegravityview/template/field/text/output.
Renamed methods #
Renamed in 2.14 alongside the hooks, when blacklist became blocklist throughout. The class never changes, only the method name. The old methods still work and call through to the new ones.
| Class | Deprecated method | Use instead |
|---|---|---|
GravityView_Admin_Views | default_field_blacklist() | default_field_blocklist() |
GravityView_Cache | blacklist_add() | blocklist_add() |
GravityView_Cache | blacklist_remove() | blocklist_remove() |
GravityView_Cache | in_blacklist() | in_blocklist() |
GravityView_Edit_Entry | get_field_blacklist() | get_field_blocklist() |
GravityView_Edit_Entry | modify_field_blacklist() | modify_field_blocklist() |
GravityView_Field_Calculation | blacklist_field_types() | blocklist_field_types() |
GravityView_Field_Product | edit_entry_field_blacklist() | edit_entry_field_blocklist() |
GravityView_Plugin_Hooks_Gravity_Forms_Coupon | edit_entry_field_blacklist() | edit_entry_field_blocklist() |
GravityView_Field_Total::add_to_blacklist() was removed rather than deprecated, so calling it is a fatal error rather than a notice. Use GravityView_Field_Total::add_to_blocklist().
Migrating a hook #
- Find the old name in the tables above and note whether it is a filter or an action.
- Open the replacement’s page from the link in that row. Several replacements pass a
\GV\Template_Contextobject where the old hook passed separate arrays, so the parameters usually change. - Change the hook name and adjust the callback to the new parameters.
- Reload a page that uses the View. The notice clears once nothing hooks the old name.
Do not leave both hooked at once “just in case”. Both still fire, so a callback registered on each runs twice.
Related #
- GravityKit Developer Docs MCP, for looking hooks up from your AI assistant
- GravityKit developer docs: every GravityView filter and action
- Where to put code samples
- GravityView CSS guide