public function getRender() { ob_start(); // Now display the settings editing screen echo '<div class="wrap">'; // header echo "<h2>" . __('Hw2 Contract Form Settings', Opts::I()->hw2cf_page_alias) . "</h2>"; // settings form ?> <form name="form-hw2cf-settings" method="post" action=""> <p>Email for contract form: <input type="email" name="hw2cf_email" value="<?php echo Opts::I()->hw2cf_email; ?> " size="20" required> </p><hr /> <p class="submit"> <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes'); ?> " /> </p> </form> </div> <?php return ob_get_clean(); }
function hw2contracts_nua_custom_email_admins_hw2($to, $user_email) { $user = get_user_by('email', $user_email); $role = \Hw2CF\FormHelper::getUserFirstRole($user->ID); if ($role == "hw2_contributor" || $role == "hw2_partner") { $to = array(\Hw2CF\Opts::I()->hw2cf_email); } return $to; }