PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.21
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.21
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / helpers / FrmEmailHelper.php

FrmEmailHelper.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.21, at classes/helpers/FrmEmailHelper.php

59 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 /**
7 * @since 2.03.04
8 */
9 class FrmEmailHelper {
10
11 /**
12 * Get the userID field from a form
13 * This will not get repeating or embedded userID fields
14 *
15 * @since 2.03.04
16 *
17 * @param int $form_id
18 *
19 * @return int
20 */
21 public static function get_user_id_field_for_form( $form_id ) {
22 $where = array(
23 'type' => 'user_id',
24 'form_id' => $form_id,
25 );
26
27 $user_id_field = FrmDb::get_var( 'frm_fields', $where, 'id' );
28
29 return (int) $user_id_field;
30 }
31
32 /**
33 * This function should only be fired when Mandrill is sending an HTML email
34 * This will make sure Mandrill doesn't mess with our HTML emails
35 *
36 * @since 2.03.04
37 *
38 * @return bool
39 */
40 public static function remove_mandrill_br() {
41 return false;
42 }
43
44 /**
45 * Gets default from email address in header for emails.
46 *
47 * @since 6.15
48 *
49 * @return string
50 */
51 public static function get_default_from_email() {
52 $settings = FrmAppHelper::get_settings();
53 if ( $settings->from_email && is_email( $settings->from_email ) ) {
54 return $settings->from_email;
55 }
56 return get_option( 'admin_email' );
57 }
58 }
59