@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | |
6 | 6 | class FrmFormTemplateApi extends FrmFormApi { |
7 | 7 | |
8 | - protected static $code_option_name = 'frm_free_license_code'; |
|
8 | + protected static $code_option_name = 'frm_free_license_code'; |
|
9 | 9 | |
10 | 10 | private static $base_api_url = 'https://formidableforms.com/wp-json/form-templates/v1/'; |
11 | 11 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | $templates = $this->get_api_info(); |
91 | 91 | $contact_form = 20872734; |
92 | - return isset( $templates[ $contact_form ] ) && ! empty( $templates[ $contact_form ]['url'] ); |
|
92 | + return isset( $templates[$contact_form] ) && ! empty( $templates[$contact_form]['url'] ); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -164,15 +164,15 @@ discard block |
||
164 | 164 | continue; |
165 | 165 | } |
166 | 166 | |
167 | - $data['urlByKey'][ $template['key'] ] = $template['url']; |
|
167 | + $data['urlByKey'][$template['key']] = $template['url']; |
|
168 | 168 | } |
169 | 169 | |
170 | - if ( ! isset( $data['urlByKey'][ $key ] ) ) { |
|
170 | + if ( ! isset( $data['urlByKey'][$key] ) ) { |
|
171 | 171 | $error = new WP_Error( 400, 'We were unable to retrieve the template' ); |
172 | 172 | wp_send_json_error( $error ); |
173 | 173 | } |
174 | 174 | |
175 | - $data['url'] = $data['urlByKey'][ $key ]; |
|
175 | + $data['url'] = $data['urlByKey'][$key]; |
|
176 | 176 | }//end if |
177 | 177 | |
178 | 178 | wp_send_json_success( $data ); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $to = $this->prepare_email_setting( $this->settings['email_to'], $user_id_args ); |
163 | 163 | $to = $this->explode_emails( $to ); |
164 | 164 | |
165 | - $where = array( |
|
165 | + $where = array( |
|
166 | 166 | 'it.field_id !' => 0, |
167 | 167 | 'it.item_id' => $this->entry->id, |
168 | 168 | ); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | 'entry' => $this->entry, |
173 | 173 | 'form' => $this->form, |
174 | 174 | ); |
175 | - $to = apply_filters( 'frm_to_email', $to, $values, $this->form->id, $args ); |
|
175 | + $to = apply_filters( 'frm_to_email', $to, $values, $this->form->id, $args ); |
|
176 | 176 | |
177 | 177 | $this->to = array_unique( (array) $to ); |
178 | 178 | |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | |
409 | 409 | // Add the user info if it isn't already included |
410 | 410 | if ( $this->include_user_info && $prev_mail_body === $mail_body ) { |
411 | - $data = $this->entry->description; |
|
411 | + $data = $this->entry->description; |
|
412 | 412 | $mail_body .= "\r\n\r\n" . __( 'User Information', 'formidable' ) . "\r\n"; |
413 | 413 | $this->maybe_add_ip( $mail_body ); |
414 | 414 | $mail_body .= __( 'User-Agent (Browser/OS)', 'formidable' ) . ': ' . FrmEntriesHelper::get_browser( $data['browser'] ) . "\r\n"; |
@@ -702,12 +702,12 @@ discard block |
||
702 | 702 | $name = trim( str_replace( $email, '', $val ) ); |
703 | 703 | } else { |
704 | 704 | // If user enters a name without an email |
705 | - unset( $recipients[ $key ] ); |
|
705 | + unset( $recipients[$key] ); |
|
706 | 706 | continue; |
707 | 707 | } |
708 | 708 | } |
709 | 709 | |
710 | - $recipients[ $key ] = $this->format_from_email( $name, $email ); |
|
710 | + $recipients[$key] = $this->format_from_email( $name, $email ); |
|
711 | 711 | }//end foreach |
712 | 712 | |
713 | 713 | return $recipients; |
@@ -857,7 +857,7 @@ discard block |
||
857 | 857 | ); |
858 | 858 | |
859 | 859 | // Remove phone number from to addresses |
860 | - unset( $this->to[ $key ] ); |
|
860 | + unset( $this->to[$key] ); |
|
861 | 861 | }//end if |
862 | 862 | }//end foreach |
863 | 863 | } |