Description
The gform_embed_edit_post_link filter is used to customize the edit post link template for the Embed Form flyout.
Usage
The filter which runs for all would be used like so:
add_filter( 'gform_embed_edit_post_link', 'your_function_name' );
Parameters
- $edit_link string
The edit link. Use%1$s
as the placeholder for the page/post ID.
$edit_link = 'https://example.com/wp-admin/post.php?post=%1$s&action=edit';
Example
This example shows how you can change the page and post query argument name.
add_filter( 'gform_embed_edit_post_link', function ( $edit_link ) {
$edit_link = str_replace( 'post.php?post=', 'custom-page.php?something=', $edit_link );
return $edit_link;
} );
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?
Since
This filter was added in Gravity Forms v2.6.2.
Source Code
This filter is located in \Gravity_Forms\Gravity_Forms\Embed_Form\Config\GF_Embed_Config::get_urls() in includes/embed-form/config/class-gf-embed-config.php.