Skip to content

Commit

Permalink
Create gppcmt-default-message.php
Browse files Browse the repository at this point in the history
  • Loading branch information
spivurno authored Mar 7, 2022
1 parent 9251ba5 commit 126e360
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gp-post-content-merge-tags/gppcmt-default-message.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Gravity Wiz // Post Content Merge Tags // Display a Default Message When Merge Tags Are Not Replaced
* https://gravitywiz.com/documentation/gravity-forms-post-content-merge-tags/
*/
add_filter( 'the_content', function( $content ) {
if ( GFCommon::has_merge_tag( $content ) ) {
$content = 'Default message.';
}
return $content;
} );

0 comments on commit 126e360

Please sign in to comment.