emails in progress
This commit is contained in:
@@ -89,16 +89,6 @@ function replace_words($matches, $user_id = null) {
|
||||
function filter_email_wp($args) {
|
||||
// pattern : anything surrounded by '$$', ex : $$value$$
|
||||
$pattern = '/\$\$(.*?)\$\$/';
|
||||
error_log("email args: " . json_encode($args));
|
||||
/*
|
||||
email args: {
|
||||
"to":"ruknafetri@gufum.com",
|
||||
"subject":"My Custom Email Subject",
|
||||
"message":"Hello, This is a test email sent from my WordPress plugin!",
|
||||
"headers":["Content-Type: text\/html; charset=UTF-8"],
|
||||
"attachments":[]
|
||||
}
|
||||
*/
|
||||
|
||||
$old_to = $args['to'];
|
||||
$new_to = preg_replace_callback($pattern, __NAMESPACE__.'\replace_words', $old_to);
|
||||
|
||||
Reference in New Issue
Block a user