| @@ -41,8 +41,10 @@ | ||
| 41 | 41 | public $no_ips; |
| 42 | 42 | public $custom_header_ip; |
| 43 | 43 | public $current_form = 0; |
| 44 | 44 | public $tracking; |
| 45 | + public $summary_emails; | |
| 46 | + public $summary_emails_recipients; | |
| 45 | 47 | |
| 46 | 48 | public $currency; |
| 47 | 49 | |
| 48 | 50 | /** |
| @@ -73,9 +75,10 @@ | ||
| 73 | 75 | $this->maybe_filter_for_form( $args ); |
| 74 | 76 | } |
| 75 | 77 | |
| 76 | 78 | private function translate_settings( $settings ) { |
| 77 | - if ( $settings ) { //workaround for W3 total cache conflict | |
| 79 | + if ( $settings ) { | |
| 80 | + // Workaround for W3 total cache conflict. | |
| 78 | 81 | return unserialize( serialize( $settings ) ); |
| 79 | 82 | } |
| 80 | 83 | |
| 81 | 84 | $settings = get_option( $this->option_name ); |
| @@ -85,9 +88,10 @@ | ||
| 85 | 88 | return $settings; |
| 86 | 89 | } |
| 87 | 90 | |
| 88 | 91 | // If unserializing didn't work |
| 89 | - if ( $settings ) { //workaround for W3 total cache conflict | |
| 92 | + if ( $settings ) { | |
| 93 | + // Workaround for W3 total cache conflict. | |
| 90 | 94 | $settings = unserialize( serialize( $settings ) ); |
| 91 | 95 | } else { |
| 92 | 96 | $settings = $this; |
| 93 | 97 | } |
| @@ -125,10 +129,13 @@ | ||
| 125 | 129 | 'new_tab_msg' => __( 'The page has been opened in a new tab.', 'formidable' ), |
| 126 | 130 | |
| 127 | 131 | 'email_to' => '[admin_email]', |
| 128 | 132 | 'no_ips' => 0, |
| 129 | - 'custom_header_ip' => false, // Use false by default. We show a warning when this is unset. Once global settings have been saved, this gets saved | |
| 133 | + // Use false by default. We show a warning when this is unset. Once global settings have been saved, this gets saved. | |
| 134 | + 'custom_header_ip' => false, | |
| 130 | 135 | 'tracking' => FrmAppHelper::pro_is_installed(), |
| 136 | + 'summary_emails' => 1, | |
| 137 | + 'summary_emails_recipients' => '[admin_email]', | |
| 131 | 138 | |
| 132 | 139 | // Normally custom CSS is a string. A false value is used when nothing has been set. |
| 133 | 140 | // When it is false, we try to use the old custom_key value from the default style's post_content array. |
| 134 | 141 | 'custom_css' => false, |
| @@ -356,9 +363,9 @@ | ||
| 356 | 363 | $this->load_style = $params['frm_load_style']; |
| 357 | 364 | $this->custom_css = $params['frm_custom_css']; |
| 358 | 365 | $this->currency = $params['frm_currency']; |
| 359 | 366 | |
| 360 | - $checkboxes = array( 'mu_menu', 're_multi', 'use_html', 'jquery_css', 'accordion_js', 'fade_form', 'no_ips', 'custom_header_ip', 'tracking', 'admin_bar' ); | |
| 367 | + $checkboxes = array( 'mu_menu', 're_multi', 'use_html', 'jquery_css', 'accordion_js', 'fade_form', 'no_ips', 'custom_header_ip', 'tracking', 'admin_bar', 'summary_emails' ); | |
| 361 | 368 | foreach ( $checkboxes as $set ) { |
| 362 | 369 | $this->$set = isset( $params[ 'frm_' . $set ] ) ? absint( $params[ 'frm_' . $set ] ) : 0; |
| 363 | 370 | } |
| 364 | 371 | } |