You appear to be a bot. Output may be restricted
Description
Perform symbolic substitution of the fields in the body
Usage
oiku_replace_fields( $body, $fields );
Parameters
- $body
- ( string ) optional – the body of the message
- $fields
- ( array ) optional – array of key value pairs This code allows for a variety of field delimeters: %name% {name} what else At the end of the processing there may be some %var%'s remaining That's not our problem; another routine could be used to clear up the mess
Returns
voidSource
File name: oik-user/includes/oik-user-email.incLines:
1 to 9 of 9
function oiku_replace_fields( $body=null, $fields=array() ) { if ( $body ) { foreach ( $fields as $name => $value ) { $body = str_replace( "%${name}%", $value, $body ); } } return( $body ); }View on GitHub