Skip to content

Instantly share code, notes, and snippets.

  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save spivurno/07554aabad84c550593ecff959b0fe6c to your computer and use it in GitHub Desktop.
Gravity Perks // GP Post Content Merge Tags // Support Plus Signs when Populating a Form
<?php
/**
* Gravity Perks // GP Post Content Merge Tags // Support Plus Signs when Populating a Form
* https://gravitywiz.com/documentation/gravity-forms-post-content-merge-tags/
*/
add_filter( 'shortcode_atts_gravityforms', function( $out, $pairs, $atts, $shortcode ) {
if( isset( $out['field_values'] ) ) {
$out['field_values'] = str_replace( '+', '%2B', $out['field_values'] );
}
return $out;
}, 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment