| @@ -60,8 +60,9 @@ | ||
| 60 | 60 | if ( FrmField::is_no_save_field( $f->type ) ) { |
| 61 | 61 | continue; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | + // phpcs:ignore Universal.Operators.StrictComparisons | |
| 64 | 65 | if ( $f->type === 'data' && ( ! isset( $f->field_options['data_type'] ) || $f->field_options['data_type'] === 'data' || $f->field_options['data_type'] == '' ) ) { |
| 65 | 66 | continue; |
| 66 | 67 | } |
| 67 | 68 | |
| @@ -205,11 +206,11 @@ | ||
| 205 | 206 | } |
| 206 | 207 | |
| 207 | 208 | $classes = 'frm-advanced-list'; |
| 208 | 209 | $classes .= in_array( $skey, array( 'siteurl', 'sitename', 'entry_count' ), true ) ? ' show_before_content show_after_content' : ''; |
| 209 | - $classes .= strpos( $skey, 'default-' ) === 0 ? ' hide_frm_not_email_subject' : ''; | |
| 210 | + $classes .= str_starts_with( $skey, 'default-' ) ? ' hide_frm_not_email_subject' : ''; | |
| 210 | 211 | |
| 211 | - if ( in_array( $skey, array_keys( $contextual_codes ), true ) ) { | |
| 212 | + if ( array_key_exists( $skey, $contextual_codes ) ) { | |
| 212 | 213 | $classes .= ' frm_hidden'; |
| 213 | 214 | } |
| 214 | 215 | |
| 215 | 216 | FrmFormsHelper::insert_code_html( |
| @@ -236,14 +237,9 @@ | ||
| 236 | 237 | <?php |
| 237 | 238 | } |
| 238 | 239 | |
| 239 | 240 | foreach ( $helper['codes'] as $code => $code_label ) { |
| 240 | - if ( isset( $uid ) ) { | |
| 241 | - $code = str_replace( '|user_id|', $uid, $code ); | |
| 242 | - } else { | |
| 243 | - $code = str_replace( '|user_id|', 'x', $code ); | |
| 244 | - } | |
| 245 | - | |
| 241 | + $code = isset( $uid ) ? str_replace( '|user_id|', $uid, $code ) : str_replace( '|user_id|', 'x', $code ); | |
| 246 | 242 | $include_x = strpos( $code, ' ' ) ? '' : 'x '; |
| 247 | 243 | |
| 248 | 244 | if ( ! is_array( $code_label ) ) { |
| 249 | 245 | $code_label = array( |