<?php
/*
Plugin Name: Ninja Forms - Change From_Rev1
*/
add_action( 'ninja_forms_email_admin', 'ninja_forms_change_from_address' );
function ninja_forms_change_from_address(){
global $ninja_forms_processing;
if( 2 == $ninja_forms_processing->get_form_ID() ) {
$user_email = $ninja_forms_processing->get_field_value( 10 );
$user_name = $ninja_forms_processing->get_field_value( 2 );
$user_email = $user_name." <".$user_email.">";
$ninja_forms_processing->update_form_setting( 'email_from', $user_email );
add_action( 'ninja_forms_email_admin', 'ninja_forms_change_from_address' );
function ninja_forms_change_from_address(){
global $ninja_forms_processing;
if( 1 == $ninja_forms_processing->get_form_ID() ) {
$user_email = $ninja_forms_processing->get_field_value( 24 );
$user_name = $ninja_forms_processing->get_field_value( 1 );
$user_email = $user_name." <".$user_email.">";
$ninja_forms_processing->update_form_setting( 'email_from', $user_email );
}
}
- Output for 5.4.0 - 5.4.29
- Parse error: syntax error, unexpected end of file in /in/VkjZf on line 26
Process exited with code 255. - Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected $end in /in/VkjZf on line 26
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
- Parse error: parse error, unexpected $ in /in/VkjZf on line 26
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error in /in/VkjZf on line 26
Process exited with code 255.
preferences:
199.49 ms | 1399 KiB | 119 Q