@@ -69,7 +69,7 @@ |
||
| 69 | 69 | 'canceled' => __( 'Canceled', 'formidable' ), |
| 70 | 70 | 'confirm' => __( 'Are you sure you want to cancel that subscription?', 'formidable' ), |
| 71 | 71 | ); |
| 72 | - $atts = array_merge( $defaults, $atts ); |
|
| 72 | + $atts = array_merge( $defaults, $atts ); |
|
| 73 | 73 | |
| 74 | 74 | if ( $sub->status === 'active' ) { |
| 75 | 75 | $link = admin_url( 'admin-ajax.php?action=frm_trans_cancel&sub=' . $sub->id . '&nonce=' . wp_create_nonce( 'frm_trans_ajax' ) ); |
@@ -16,10 +16,10 @@ |
||
| 16 | 16 | public static function get_currency( $currency ) { |
| 17 | 17 | $currency = strtoupper( $currency ); |
| 18 | 18 | $currencies = self::get_currencies(); |
| 19 | - if ( isset( $currencies[ $currency ] ) ) { |
|
| 20 | - $currency = $currencies[ $currency ]; |
|
| 21 | - } elseif ( isset( $currencies[ strtolower( $currency ) ] ) ) { |
|
| 22 | - $currency = $currencies[ strtolower( $currency ) ]; |
|
| 19 | + if ( isset( $currencies[$currency] ) ) { |
|
| 20 | + $currency = $currencies[$currency]; |
|
| 21 | + } elseif ( isset( $currencies[strtolower( $currency )] ) ) { |
|
| 22 | + $currency = $currencies[strtolower( $currency )]; |
|
| 23 | 23 | } else { |
| 24 | 24 | $currency = $currencies['USD']; |
| 25 | 25 | } |
@@ -126,11 +126,11 @@ |
||
| 126 | 126 | foreach ( $payments as $payment ) { |
| 127 | 127 | list( $amount, $currency ) = FrmTransLiteAppHelper::get_amount_and_currency_from_payment( $payment ); |
| 128 | 128 | |
| 129 | - if ( ! isset( $data[ $currency ] ) ) { |
|
| 130 | - $data[ $currency ] = 0; |
|
| 129 | + if ( ! isset( $data[$currency] ) ) { |
|
| 130 | + $data[$currency] = 0; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - $data[ $currency ] += floatval( $amount ); |
|
| 133 | + $data[$currency] += floatval( $amount ); |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | return $data; |
@@ -236,11 +236,11 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | public static function get_last_sent_date( $type ) { |
| 238 | 238 | $options = self::get_options(); |
| 239 | - if ( empty( $options[ 'last_' . $type ] ) ) { |
|
| 239 | + if ( empty( $options['last_' . $type] ) ) { |
|
| 240 | 240 | return false; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | - return $options[ 'last_' . $type ]; |
|
| 243 | + return $options['last_' . $type]; |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | /** |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | public static function set_last_sent_date( $type, $value = null ) { |
| 253 | 253 | $options = self::get_options(); |
| 254 | 254 | |
| 255 | - $options[ 'last_' . $type ] = null === $value ? self::get_date_from_today() : ''; |
|
| 255 | + $options['last_' . $type] = null === $value ? self::get_date_from_today() : ''; |
|
| 256 | 256 | self::save_options( $options ); |
| 257 | 257 | } |
| 258 | 258 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'user_id' => get_current_user_id(), |
| 109 | 109 | 'frm_strp_connect_mode' => $mode, |
| 110 | 110 | ); |
| 111 | - $data = self::post_to_connect_server( 'initialize', $additional_body ); |
|
| 111 | + $data = self::post_to_connect_server( 'initialize', $additional_body ); |
|
| 112 | 112 | |
| 113 | 113 | if ( is_string( $data ) ) { |
| 114 | 114 | return $data; |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * @return object|string |
| 144 | 144 | */ |
| 145 | 145 | private static function post_to_connect_server( $action, $additional_body = array() ) { |
| 146 | - $body = array( |
|
| 146 | + $body = array( |
|
| 147 | 147 | 'frm_strp_connect_action' => $action, |
| 148 | 148 | 'frm_strp_connect_mode' => FrmStrpLiteAppHelper::active_mode(), |
| 149 | 149 | ); |
@@ -87,6 +87,6 @@ |
||
| 87 | 87 | |
| 88 | 88 | ?></div> |
| 89 | 89 | <?php |
| 90 | - ++$option_index; |
|
| 90 | + ++ $option_index; |
|
| 91 | 91 | }//end foreach |
| 92 | 92 | }//end if |
@@ -145,7 +145,8 @@ |
||
| 145 | 145 | |
| 146 | 146 | if ( $posted_field->required == '1' && FrmAppHelper::is_empty_value( $value ) ) { |
| 147 | 147 | $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $posted_field, 'blank' ); |
| 148 | - } elseif ( ! isset( $_POST['item_name'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 148 | + } elseif ( ! isset( $_POST['item_name'] ) ) { |
|
| 149 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 149 | 150 | self::maybe_add_item_name( $value, $posted_field ); |
| 150 | 151 | } |
| 151 | 152 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | return $errors; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if ( FrmAppHelper::is_admin() && is_user_logged_in() && ( ! isset( $values[ 'frm_submit_entry_' . $values['form_id'] ] ) || ! wp_verify_nonce( $values[ 'frm_submit_entry_' . $values['form_id'] ], 'frm_submit_entry_nonce' ) ) ) { |
|
| 30 | + if ( FrmAppHelper::is_admin() && is_user_logged_in() && ( ! isset( $values['frm_submit_entry_' . $values['form_id']] ) || ! wp_verify_nonce( $values['frm_submit_entry_' . $values['form_id']], 'frm_submit_entry_nonce' ) ) ) { |
|
| 31 | 31 | $frm_settings = FrmAppHelper::get_settings(); |
| 32 | 32 | $errors['form'] = $frm_settings->admin_permission; |
| 33 | 33 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $args = wp_parse_args( $args, $defaults ); |
| 150 | 150 | |
| 151 | 151 | if ( empty( $args['parent_field_id'] ) ) { |
| 152 | - $value = $values['item_meta'][ $args['id'] ] ?? ''; |
|
| 152 | + $value = $values['item_meta'][$args['id']] ?? ''; |
|
| 153 | 153 | } else { |
| 154 | 154 | // value is from a nested form |
| 155 | 155 | $value = $values; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | if ( $posted_field->required == '1' && FrmAppHelper::is_empty_value( $value ) ) { |
| 173 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $posted_field, 'blank' ); |
|
| 173 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $posted_field, 'blank' ); |
|
| 174 | 174 | } elseif ( ! isset( $_POST['item_name'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 175 | 175 | self::maybe_add_item_name( $value, $posted_field ); |
| 176 | 176 | } |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $option_is_valid = (bool) apply_filters( 'frm_option_is_valid', $option_is_valid, $value, $posted_field ); |
| 224 | 224 | |
| 225 | 225 | if ( ! $option_is_valid ) { |
| 226 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $posted_field, 'invalid' ); |
|
| 226 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $posted_field, 'invalid' ); |
|
| 227 | 227 | } |
| 228 | 228 | } |
| 229 | 229 | |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | FrmFieldsHelper::prepare_new_front_field( $values, $field_object ); |
| 351 | 351 | |
| 352 | 352 | $separate_value = FrmField::get_option( $field_object, 'separate_value' ); |
| 353 | - $map_callback = function ( $option ) use ( $separate_value ) { |
|
| 353 | + $map_callback = function( $option ) use ( $separate_value ) { |
|
| 354 | 354 | if ( is_array( $option ) ) { |
| 355 | 355 | $option_value = $separate_value ? $option['value'] : $option['label']; |
| 356 | 356 | } else { |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | $pattern = self::phone_format( $field ); |
| 441 | 441 | |
| 442 | 442 | if ( ! preg_match( $pattern, $value ) ) { |
| 443 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $field, 'invalid' ); |
|
| 443 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $field, 'invalid' ); |
|
| 444 | 444 | } |
| 445 | 445 | } |
| 446 | 446 | } |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | */ |
| 568 | 568 | private static function form_is_in_progress( $values ) { |
| 569 | 569 | return FrmAppHelper::pro_is_installed() && |
| 570 | - ( isset( $values[ 'frm_page_order_' . $values['form_id'] ] ) || FrmAppHelper::get_post_param( 'frm_next_page' ) ) && |
|
| 570 | + ( isset( $values['frm_page_order_' . $values['form_id']] ) || FrmAppHelper::get_post_param( 'frm_next_page' ) ) && |
|
| 571 | 571 | FrmField::get_all_types_in_form( $values['form_id'], 'break' ); |
| 572 | 572 | } |
| 573 | 573 | |
@@ -793,9 +793,9 @@ discard block |
||
| 793 | 793 | foreach ( $datas['missing_keys'] as $key_index => $key ) { |
| 794 | 794 | $found = self::is_akismet_guest_info_value( $key, $value, $field_id, $datas['name_field_ids'], $values ); |
| 795 | 795 | if ( $found ) { |
| 796 | - $datas[ $key ] = $value; |
|
| 796 | + $datas[$key] = $value; |
|
| 797 | 797 | $datas['frm_duplicated'][] = $field_id; |
| 798 | - unset( $datas['missing_keys'][ $key_index ] ); |
|
| 798 | + unset( $datas['missing_keys'][$key_index] ); |
|
| 799 | 799 | } |
| 800 | 800 | } |
| 801 | 801 | }//end foreach |
@@ -838,11 +838,11 @@ discard block |
||
| 838 | 838 | if ( 'Name' !== $field->name ) { |
| 839 | 839 | continue; |
| 840 | 840 | } |
| 841 | - if ( isset( $fields[ $index + 1 ] ) && 'Last' === $fields[ $index + 1 ]->name ) { |
|
| 842 | - if ( empty( $values[ absint( $fields[ $index + 1 ]->id ) ] ) ) { |
|
| 841 | + if ( isset( $fields[$index + 1] ) && 'Last' === $fields[$index + 1]->name ) { |
|
| 842 | + if ( empty( $values[absint( $fields[$index + 1]->id )] ) ) { |
|
| 843 | 843 | continue; |
| 844 | 844 | } |
| 845 | - $value .= ' ' . $values[ $fields[ $index + 1 ]->id ]; |
|
| 845 | + $value .= ' ' . $values[$fields[$index + 1]->id]; |
|
| 846 | 846 | return true; |
| 847 | 847 | } |
| 848 | 848 | } |
@@ -861,13 +861,13 @@ discard block |
||
| 861 | 861 | */ |
| 862 | 862 | private static function get_name_text_fields( $form_id ) { |
| 863 | 863 | $name_text_fields_is_initialized = is_array( self::$name_text_fields ); |
| 864 | - if ( $name_text_fields_is_initialized && isset( self::$name_text_fields[ $form_id ] ) ) { |
|
| 865 | - return self::$name_text_fields[ $form_id ]; |
|
| 864 | + if ( $name_text_fields_is_initialized && isset( self::$name_text_fields[$form_id] ) ) { |
|
| 865 | + return self::$name_text_fields[$form_id]; |
|
| 866 | 866 | } |
| 867 | 867 | if ( ! $name_text_fields_is_initialized ) { |
| 868 | 868 | self::$name_text_fields = array(); |
| 869 | 869 | } |
| 870 | - self::$name_text_fields[ $form_id ] = FrmDb::get_results( |
|
| 870 | + self::$name_text_fields[$form_id] = FrmDb::get_results( |
|
| 871 | 871 | 'frm_fields', |
| 872 | 872 | array( |
| 873 | 873 | 'form_id' => $form_id, |
@@ -878,7 +878,7 @@ discard block |
||
| 878 | 878 | array( 'order_by' => 'field_order ASC' ) |
| 879 | 879 | ); |
| 880 | 880 | |
| 881 | - return self::$name_text_fields[ $form_id ]; |
|
| 881 | + return self::$name_text_fields[$form_id]; |
|
| 882 | 882 | } |
| 883 | 883 | |
| 884 | 884 | /** |
@@ -892,7 +892,7 @@ discard block |
||
| 892 | 892 | |
| 893 | 893 | // Send any potentially useful $_SERVER vars, but avoid sending junk we don't need. |
| 894 | 894 | if ( $include_value ) { |
| 895 | - $datas[ $key ] = $value; |
|
| 895 | + $datas[$key] = $value; |
|
| 896 | 896 | } |
| 897 | 897 | unset( $key, $value ); |
| 898 | 898 | } |
@@ -909,10 +909,10 @@ discard block |
||
| 909 | 909 | private static function add_comment_content_to_akismet( &$datas, $values ) { |
| 910 | 910 | if ( isset( $datas['frm_duplicated'] ) ) { |
| 911 | 911 | foreach ( $datas['frm_duplicated'] as $index ) { |
| 912 | - if ( isset( $values['item_meta'][ $index ] ) ) { |
|
| 913 | - unset( $values['item_meta'][ $index ] ); |
|
| 912 | + if ( isset( $values['item_meta'][$index] ) ) { |
|
| 913 | + unset( $values['item_meta'][$index] ); |
|
| 914 | 914 | } else { |
| 915 | - unset( $values[ $index ] ); |
|
| 915 | + unset( $values[$index] ); |
|
| 916 | 916 | } |
| 917 | 917 | } |
| 918 | 918 | unset( $datas['frm_duplicated'] ); |
@@ -931,14 +931,14 @@ discard block |
||
| 931 | 931 | private static function skip_adding_values_to_akismet( &$values ) { |
| 932 | 932 | $skipped_fields = self::get_akismet_skipped_field_ids( $values ); |
| 933 | 933 | foreach ( $skipped_fields as $skipped_field ) { |
| 934 | - if ( ! isset( $values['item_meta'][ $skipped_field->id ] ) ) { |
|
| 934 | + if ( ! isset( $values['item_meta'][$skipped_field->id] ) ) { |
|
| 935 | 935 | continue; |
| 936 | 936 | } |
| 937 | 937 | |
| 938 | 938 | if ( self::should_really_skip_field( $skipped_field, $values ) ) { |
| 939 | - unset( $values['item_meta'][ $skipped_field->id ] ); |
|
| 940 | - if ( isset( $values['item_meta']['other'][ $skipped_field->id ] ) ) { |
|
| 941 | - unset( $values['item_meta']['other'][ $skipped_field->id ] ); |
|
| 939 | + unset( $values['item_meta'][$skipped_field->id] ); |
|
| 940 | + if ( isset( $values['item_meta']['other'][$skipped_field->id] ) ) { |
|
| 941 | + unset( $values['item_meta']['other'][$skipped_field->id] ); |
|
| 942 | 942 | } |
| 943 | 943 | } |
| 944 | 944 | } |
@@ -974,14 +974,14 @@ discard block |
||
| 974 | 974 | } |
| 975 | 975 | |
| 976 | 976 | // If a choice field has Other option, but Other is not selected. |
| 977 | - if ( empty( $values['item_meta']['other'][ $field_data->id ] ) ) { |
|
| 977 | + if ( empty( $values['item_meta']['other'][$field_data->id] ) ) { |
|
| 978 | 978 | return true; |
| 979 | 979 | } |
| 980 | 980 | |
| 981 | 981 | // Check if submitted value is same as one of field option. |
| 982 | 982 | foreach ( $field_data->options as $option ) { |
| 983 | 983 | $option_value = ! is_array( $option ) ? $option : ( $option['value'] ?? '' ); |
| 984 | - if ( $values['item_meta']['other'][ $field_data->id ] === $option_value ) { |
|
| 984 | + if ( $values['item_meta']['other'][$field_data->id] === $option_value ) { |
|
| 985 | 985 | return true; |
| 986 | 986 | } |
| 987 | 987 | } |
@@ -1053,7 +1053,7 @@ discard block |
||
| 1053 | 1053 | |
| 1054 | 1054 | // Convert name array to string. |
| 1055 | 1055 | if ( isset( $value['first'] ) && isset( $value['last'] ) ) { |
| 1056 | - $values['item_meta'][ $field_id ] = trim( implode( ' ', $value ) ); |
|
| 1056 | + $values['item_meta'][$field_id] = trim( implode( ' ', $value ) ); |
|
| 1057 | 1057 | $values['name_field_ids'][] = $field_id; |
| 1058 | 1058 | continue; |
| 1059 | 1059 | } |
@@ -1074,8 +1074,8 @@ discard block |
||
| 1074 | 1074 | continue; |
| 1075 | 1075 | } |
| 1076 | 1076 | |
| 1077 | - if ( ! isset( $values['item_meta'][ $subsubindex ] ) ) { |
|
| 1078 | - $values['item_meta'][ $subsubindex ] = array(); |
|
| 1077 | + if ( ! isset( $values['item_meta'][$subsubindex] ) ) { |
|
| 1078 | + $values['item_meta'][$subsubindex] = array(); |
|
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 1081 | 1081 | // Convert name array to string. |
@@ -1085,13 +1085,13 @@ discard block |
||
| 1085 | 1085 | $values['name_field_ids'][] = $subsubindex; |
| 1086 | 1086 | } |
| 1087 | 1087 | |
| 1088 | - if ( is_array( $values['item_meta'][ $subsubindex ] ) ) { |
|
| 1089 | - $values['item_meta'][ $subsubindex ][] = $subsubvalue; |
|
| 1088 | + if ( is_array( $values['item_meta'][$subsubindex] ) ) { |
|
| 1089 | + $values['item_meta'][$subsubindex][] = $subsubvalue; |
|
| 1090 | 1090 | } |
| 1091 | 1091 | } |
| 1092 | 1092 | }//end foreach |
| 1093 | 1093 | |
| 1094 | - unset( $values['item_meta'][ $field_id ] ); |
|
| 1094 | + unset( $values['item_meta'][$field_id] ); |
|
| 1095 | 1095 | }//end foreach |
| 1096 | 1096 | |
| 1097 | 1097 | return $form_ids; |
@@ -465,7 +465,8 @@ |
||
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | private function is_license_revoked() { |
| 468 | - if ( empty( $this->license ) || empty( $this->plugin_slug ) || isset( $_POST['license'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 468 | + if ( empty( $this->license ) || empty( $this->plugin_slug ) || isset( $_POST['license'] ) ) { |
|
| 469 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 469 | 470 | return; |
| 470 | 471 | } |
| 471 | 472 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * @return array |
| 76 | 76 | */ |
| 77 | 77 | public function insert_installed_addon( $plugins ) { |
| 78 | - $plugins[ $this->plugin_slug ] = $this; |
|
| 78 | + $plugins[$this->plugin_slug] = $this; |
|
| 79 | 79 | |
| 80 | 80 | return $plugins; |
| 81 | 81 | } |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | public static function get_addon( $plugin_slug ) { |
| 89 | 89 | $plugins = apply_filters( 'frm_installed_addons', array() ); |
| 90 | 90 | $plugin = false; |
| 91 | - if ( isset( $plugins[ $plugin_slug ] ) ) { |
|
| 92 | - $plugin = $plugins[ $plugin_slug ]; |
|
| 91 | + if ( isset( $plugins[$plugin_slug] ) ) { |
|
| 92 | + $plugin = $plugins[$plugin_slug]; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | return $plugin; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | } else { |
| 150 | 150 | $api = new FrmFormApi( $this->license ); |
| 151 | 151 | $plugins = $api->get_api_info(); |
| 152 | - $_data = $plugins[ $item_id ]; |
|
| 152 | + $_data = $plugins[$item_id]; |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | $_data['sections'] = array( |
@@ -417,19 +417,19 @@ discard block |
||
| 417 | 417 | |
| 418 | 418 | if ( $this->is_current_version( $transient ) ) { |
| 419 | 419 | // Make sure it doesn't show there is an update if plugin is up-to-date. |
| 420 | - if ( isset( $transient->response[ $this->plugin_folder ] ) ) { |
|
| 421 | - unset( $transient->response[ $this->plugin_folder ] ); |
|
| 420 | + if ( isset( $transient->response[$this->plugin_folder] ) ) { |
|
| 421 | + unset( $transient->response[$this->plugin_folder] ); |
|
| 422 | 422 | } |
| 423 | - } elseif ( isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) ) { |
|
| 424 | - $this->prepare_update_details( $transient->response[ $this->plugin_folder ] ); |
|
| 423 | + } elseif ( isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) ) { |
|
| 424 | + $this->prepare_update_details( $transient->response[$this->plugin_folder] ); |
|
| 425 | 425 | |
| 426 | 426 | // if the transient has expired, clear the update and trigger it again |
| 427 | - if ( $transient->response[ $this->plugin_folder ] === false ) { |
|
| 427 | + if ( $transient->response[$this->plugin_folder] === false ) { |
|
| 428 | 428 | if ( ! $this->has_been_cleared() ) { |
| 429 | 429 | $this->cleared_plugins(); |
| 430 | 430 | $this->manually_queue_update(); |
| 431 | 431 | } |
| 432 | - unset( $transient->response[ $this->plugin_folder ] ); |
|
| 432 | + unset( $transient->response[$this->plugin_folder] ); |
|
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | * @return bool |
| 534 | 534 | */ |
| 535 | 535 | private function is_current_version( $transient ) { |
| 536 | - if ( empty( $transient->checked ) || ! isset( $transient->checked[ $this->plugin_folder ] ) ) { |
|
| 536 | + if ( empty( $transient->checked ) || ! isset( $transient->checked[$this->plugin_folder] ) ) { |
|
| 537 | 537 | return false; |
| 538 | 538 | } |
| 539 | 539 | |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | return true; |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | - return isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) && $transient->checked[ $this->plugin_folder ] === $transient->response[ $this->plugin_folder ]->new_version; |
|
| 545 | + return isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) && $transient->checked[$this->plugin_folder] === $transient->response[$this->plugin_folder]->new_version; |
|
| 546 | 546 | } |
| 547 | 547 | |
| 548 | 548 | /** |
@@ -694,8 +694,8 @@ discard block |
||
| 694 | 694 | $response['message'] = $response['status']; |
| 695 | 695 | } else { |
| 696 | 696 | $messages = $this->get_messages(); |
| 697 | - if ( is_string( $response['status'] ) && isset( $messages[ $response['status'] ] ) ) { |
|
| 698 | - $response['message'] = $messages[ $response['status'] ]; |
|
| 697 | + if ( is_string( $response['status'] ) && isset( $messages[$response['status']] ) ) { |
|
| 698 | + $response['message'] = $messages[$response['status']]; |
|
| 699 | 699 | } else { |
| 700 | 700 | $response['message'] = FrmAppHelper::kses( $response['status'], array( 'a' ) ); |
| 701 | 701 | } |
@@ -859,7 +859,7 @@ discard block |
||
| 859 | 859 | 'user-agent' => $this->plugin_slug . '/' . $this->version . '; ' . get_bloginfo( 'url' ), |
| 860 | 860 | ); |
| 861 | 861 | |
| 862 | - $resp = wp_remote_post( |
|
| 862 | + $resp = wp_remote_post( |
|
| 863 | 863 | $this->store_url . '?l=' . urlencode( base64_encode( $this->license ) ), |
| 864 | 864 | $arg_array |
| 865 | 865 | ); |
@@ -164,8 +164,8 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | $conditionally_add = array( 'include_fields', 'fields', 'exclude_fields', 'entry' ); |
| 166 | 166 | foreach ( $conditionally_add as $index ) { |
| 167 | - if ( isset( $atts[ $index ] ) ) { |
|
| 168 | - $entry_atts[ $index ] = $atts[ $index ]; |
|
| 167 | + if ( isset( $atts[$index] ) ) { |
|
| 168 | + $entry_atts[$index] = $atts[$index]; |
|
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | |
@@ -351,8 +351,8 @@ discard block |
||
| 351 | 351 | |
| 352 | 352 | $unset = array( 'id', 'form_id', 'format' ); |
| 353 | 353 | foreach ( $unset as $param ) { |
| 354 | - if ( isset( $atts[ $param ] ) ) { |
|
| 355 | - unset( $atts[ $param ] ); |
|
| 354 | + if ( isset( $atts[$param] ) ) { |
|
| 355 | + unset( $atts[$param] ); |
|
| 356 | 356 | } |
| 357 | 357 | } |
| 358 | 358 | |
@@ -523,11 +523,11 @@ discard block |
||
| 523 | 523 | |
| 524 | 524 | $displayed_value = $this->prepare_display_value_for_array( $field_value->get_displayed_value() ); |
| 525 | 525 | |
| 526 | - $output[ $this->get_key_or_id( $field_value ) ] = $displayed_value; |
|
| 526 | + $output[$this->get_key_or_id( $field_value )] = $displayed_value; |
|
| 527 | 527 | |
| 528 | 528 | $has_separate_value = (bool) $field_value->get_field_option( 'separate_value' ); |
| 529 | 529 | if ( $has_separate_value || $displayed_value !== $field_value->get_saved_value() ) { |
| 530 | - $output[ $this->get_key_or_id( $field_value ) . '-value' ] = $field_value->get_saved_value(); |
|
| 530 | + $output[$this->get_key_or_id( $field_value ) . '-value'] = $field_value->get_saved_value(); |
|
| 531 | 531 | } |
| 532 | 532 | } |
| 533 | 533 | } |
@@ -917,7 +917,7 @@ discard block |
||
| 917 | 917 | |
| 918 | 918 | if ( is_array( $value ) ) { |
| 919 | 919 | foreach ( $value as $key => $single_value ) { |
| 920 | - $value[ $key ] = $this->strip_html( $single_value ); |
|
| 920 | + $value[$key] = $this->strip_html( $single_value ); |
|
| 921 | 921 | } |
| 922 | 922 | } elseif ( $this->is_plain_text && ! is_array( $value ) ) { |
| 923 | 923 | if ( strpos( $value, '<img' ) !== false ) { |