Filename: gw-merge-tag-blog-id.php
gw-merge-tag-blog-id.php
<?php /** * Gravity Forms // Merge Tag: Blog ID * https://gravitywiz.com/s */ add_filter( 'gform_pre_replace_merge_tags', function( $text, $form, $lead, $url_encode, $esc_html, $nl2br, $format ) { if ( strpos( $text, '{blog_id}' ) !== false ) { $text = str_replace( '{blog_id}', get_current_blog_id(), $text ); } return $text; }, 10, 7 );
Your email address will not be published. Required fields are marked *
Comment *
Notify me of followup comments via e-mail
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.
Δ