The gform_is_entry_detail Gravity Forms PHP filter allows the Entry Detail Edit page to be marked as a regular page, not an admin or edit page, or a regular page to be marked as an Entry Detail page.
Usage
add_filter('gform_is_entry_detail', 'your_function_name', 10, 1);
Parameters
- $is_entry_detail (bool): Whether the current page is the Entry Detail Edit (entry_detail_edit) page or the Entry Edit (entry_detail) page.
More information
See Gravity Forms Docs: gform_is_entry_detail
Examples
Mark Entry Detail Edit page as a regular page
This example will mark the Entry Detail Edit page as a regular page instead of an admin or edit page.
add_filter('gform_is_entry_detail', 'set_entry_edit', 10, 1); function set_entry_edit($is_entry_detail) { return false; }
Force Entry Detail Edit page to be marked as an admin page
This example will force the Entry Detail Edit page to be marked as an admin page, even if it’s a regular page.
add_filter('gform_is_entry_detail', 'force_admin_page', 10, 1); function force_admin_page($is_entry_detail) { return true; }
Mark a specific page as an Entry Detail Edit page
This example will mark a specific page with the ID 123 as an Entry Detail Edit page.
add_filter('gform_is_entry_detail', 'specific_page_as_entry_detail', 10, 1); function specific_page_as_entry_detail($is_entry_detail) { if (get_the_ID() == 123) { return true; } return $is_entry_detail; }
Mark all pages in a specific category as Entry Detail Edit pages
This example will mark all pages in a specific category with the ID 456 as Entry Detail Edit pages.
add_filter('gform_is_entry_detail', 'category_pages_as_entry_detail', 10, 1); function category_pages_as_entry_detail($is_entry_detail) { if (in_category(456)) { return true; } return $is_entry_detail; }
Conditional marking of pages as Entry Detail Edit pages
This example will mark a page as an Entry Detail Edit page if the current user has the “editor” role.
add_filter('gform_is_entry_detail', 'conditional_entry_detail_page', 10, 1); function conditional_entry_detail_page($is_entry_detail) { if (current_user_can('editor')) { return true; } return $is_entry_detail; }