|

srfm_parse_smart_tags

Description

Filters the parsed value of a smart tag. Return a non-null value to provide a custom smart-tag replacement.

Parameters

  • $value (mixed|null) – The parsed value (defaults to null).
  • $tag (string) – The smart tag being parsed.
  • $submission_data (array) – The submission data.
  • $form_data (array) – The form data.

Filter Source

PHP
/**
* filter source (Free) inc/smart-tags.php 
*/
$value = apply_filters( 'srfm_parse_smart_tags', null, $tag, $submission_data, $form_data );

Filter Usage

PHP
add_filter( 'srfm_parse_smart_tags', 'my_callback', 10, 4 ); 
function my_callback( $value, $tag, $submission_data, $form_data ) { 
if ( '{my_tag}' = = = $tag ) 
{ return 'custom'; 
} 
return $value; 
}

Filter Example

PHP
add_filter( 'srfm_parse_smart_tags', 'my_callback', 10, 4 ); function my_callback( $value, $tag, $submission_data, $form_data ) { 
if ( '{my_tag}' = = = $tag ) 
{ return 'custom'; 
} return $value; 
}
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top