3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function add_action() in /in/vDTii:6 Stack trace: #0 {main} thrown in /in/vDTii on line 6
Process exited with code 255.
Output for 5.0.0 - 5.6.21
Fatal error: Call to undefined function add_action() in /in/vDTii on line 6
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: add_action() in /in/vDTii on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: add_action() in /in/vDTii on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: add_action() in /in/vDTii on line 6