Description
The gravityflowparentchild_child_entry_url filter allows developers to modify the URL for child entries displayed in the parent-child forms relationship panel.
Usage
add_filter( 'gravityflowparentchild_child_entry_url', 'custom_function', 10, 5 );
Parameters
| Parameter | Type | Details |
|---|---|---|
| $entry_url | String | The child entry URL |
| $entry | Array | The child entry |
| $child_form_id | Int | The child form ID |
| $parent_entry_id | Int | The parent entry ID |
| $parent_form_id | Int | The parent form ID |
Examples
Modify the child entry URL to include custom parameters.
add_filter( 'gravityflowparentchild_child_entry_url', 'gfw_custom_child_entry_url', 10, 5 );
function gfw_custom_child_entry_url( $entry_url, $entry, $child_form_id, $parent_entry_id, $parent_form_id ) {
// Add custom parameter to the URL
$entry_url = add_query_arg( 'custom_param', 'value', $entry_url );
return $entry_url;
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This filter is located in gravityflowparentchild/class-parent-child.php