mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
9 lines
332 B
Text
9 lines
332 B
Text
add_filter( 'gform_pre_replace_merge_tags', function ( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
|
|
$merge_tag = '{form_title}';
|
|
|
|
if ( strpos( $text, $merge_tag ) === false || empty( $form ) ) {
|
|
return $text;
|
|
}
|
|
|
|
return str_replace( $merge_tag, 'Your Custom Text', $text );
|
|
}, 10, 7 );
|