@@ -35,7 +35,7 @@ |
||
| 35 | 35 | foreach ( $options as $key_old => $key_new ) { |
| 36 | 36 | $value = get_option( $key_old ); |
| 37 | 37 | |
| 38 | - if ( ! empty( $value ) ) { |
|
| 38 | + if ( !empty( $value ) ) { |
|
| 39 | 39 | update_option( $key_new, $value ); |
| 40 | 40 | } |
| 41 | 41 | } |
@@ -8,4 +8,4 @@ |
||
| 8 | 8 | * @package Pronamic\WordPress\Pay |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -require dirname( __FILE__ ) . '/update-3.7.0.php'; |
|
| 11 | +require dirname( __FILE__ ).'/update-3.7.0.php'; |
|
@@ -25,14 +25,14 @@ discard block |
||
| 25 | 25 | // Upgrade |
| 26 | 26 | global $wpdb; |
| 27 | 27 | |
| 28 | -require_once ABSPATH . '/wp-admin/includes/upgrade.php'; |
|
| 28 | +require_once ABSPATH.'/wp-admin/includes/upgrade.php'; |
|
| 29 | 29 | |
| 30 | 30 | $charset_collate = ''; |
| 31 | -if ( ! empty( $wpdb->charset ) ) { |
|
| 32 | - $charset_collate = 'DEFAULT CHARACTER SET ' . $wpdb->charset; |
|
| 31 | +if ( !empty( $wpdb->charset ) ) { |
|
| 32 | + $charset_collate = 'DEFAULT CHARACTER SET '.$wpdb->charset; |
|
| 33 | 33 | } |
| 34 | -if ( ! empty( $wpdb->collate ) ) { |
|
| 35 | - $charset_collate .= ' COLLATE ' . $wpdb->collate; |
|
| 34 | +if ( !empty( $wpdb->collate ) ) { |
|
| 35 | + $charset_collate .= ' COLLATE '.$wpdb->collate; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /* |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | global $pronamic_ideal; |
| 62 | 62 | |
| 63 | -$config_table = $wpdb->prefix . 'pronamic_ideal_configurations'; |
|
| 63 | +$config_table = $wpdb->prefix.'pronamic_ideal_configurations'; |
|
| 64 | 64 | |
| 65 | 65 | $sql = "CREATE TABLE $config_table ( |
| 66 | 66 | id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | while ( $have_configs ) { |
| 98 | 98 | $configs = $wpdb->get_results( $query ); // WPCS: unprepared SQL ok. |
| 99 | 99 | |
| 100 | - $have_configs = ! empty( $configs ); |
|
| 100 | + $have_configs = !empty( $configs ); |
|
| 101 | 101 | |
| 102 | 102 | foreach ( $configs as $config ) { |
| 103 | 103 | $title = sprintf( __( 'Configuration %d', 'pronamic_ideal' ), $config->id ); |
@@ -130,80 +130,80 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | $meta = array(); |
| 132 | 132 | |
| 133 | - $meta['legacy_id'] = $config->id; |
|
| 134 | - $meta['id'] = $config->variant_id; |
|
| 135 | - $meta['mode'] = $config->mode; |
|
| 133 | + $meta[ 'legacy_id' ] = $config->id; |
|
| 134 | + $meta[ 'id' ] = $config->variant_id; |
|
| 135 | + $meta[ 'mode' ] = $config->mode; |
|
| 136 | 136 | |
| 137 | 137 | // iDEAL |
| 138 | - $meta['ideal_merchant_id'] = $config->merchant_id; |
|
| 139 | - $meta['ideal_sub_id'] = $config->sub_id; |
|
| 138 | + $meta[ 'ideal_merchant_id' ] = $config->merchant_id; |
|
| 139 | + $meta[ 'ideal_sub_id' ] = $config->sub_id; |
|
| 140 | 140 | |
| 141 | 141 | // iDEAL Basic |
| 142 | - $meta['ideal_hash_key'] = $config->hash_key; |
|
| 142 | + $meta[ 'ideal_hash_key' ] = $config->hash_key; |
|
| 143 | 143 | |
| 144 | 144 | // iDEAL Advanced |
| 145 | - $meta['ideal_private_key'] = $config->private_key; |
|
| 146 | - $meta['ideal_private_key_password'] = $config->private_key_password; |
|
| 147 | - $meta['ideal_private_certificate'] = $config->private_certificate; |
|
| 145 | + $meta[ 'ideal_private_key' ] = $config->private_key; |
|
| 146 | + $meta[ 'ideal_private_key_password' ] = $config->private_key_password; |
|
| 147 | + $meta[ 'ideal_private_certificate' ] = $config->private_certificate; |
|
| 148 | 148 | |
| 149 | 149 | // OmniKassa |
| 150 | 150 | if ( 'rabobank-omnikassa' === $config->variant_id ) { |
| 151 | - $meta['omnikassa_merchant_id'] = $config->merchant_id; |
|
| 152 | - $meta['omnikassa_secret_key'] = $config->hash_key; |
|
| 151 | + $meta[ 'omnikassa_merchant_id' ] = $config->merchant_id; |
|
| 152 | + $meta[ 'omnikassa_secret_key' ] = $config->hash_key; |
|
| 153 | 153 | |
| 154 | 154 | $key_version = @$config_meta->keyVersion; |
| 155 | 155 | // In Pronamic iDEAL v1.0 we stored the key version in the iDEAL sub ID |
| 156 | 156 | $key_version = empty( $key_version ) ? $config->sub_id : $key_version; |
| 157 | 157 | |
| 158 | - $meta['omnikassa_key_version'] = $key_version; |
|
| 158 | + $meta[ 'omnikassa_key_version' ] = $key_version; |
|
| 159 | 159 | |
| 160 | - unset( $meta['ideal_merchant_id'] ); |
|
| 161 | - unset( $meta['ideal_hash_key'] ); |
|
| 160 | + unset( $meta[ 'ideal_merchant_id' ] ); |
|
| 161 | + unset( $meta[ 'ideal_hash_key' ] ); |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | // Buckaroo |
| 165 | - $meta['buckaroo_website_key'] = @$config_meta->buckarooWebsiteKey; |
|
| 166 | - $meta['buckaroo_secret_key'] = @$config_meta->buckarooSecretKey; |
|
| 165 | + $meta[ 'buckaroo_website_key' ] = @$config_meta->buckarooWebsiteKey; |
|
| 166 | + $meta[ 'buckaroo_secret_key' ] = @$config_meta->buckarooSecretKey; |
|
| 167 | 167 | |
| 168 | 168 | // Icepay |
| 169 | - $meta['icepay_merchant_id'] = @$config_meta->icepayMerchantId; |
|
| 170 | - $meta['icepay_secret_code'] = @$config_meta->icepaySecretCode; |
|
| 169 | + $meta[ 'icepay_merchant_id' ] = @$config_meta->icepayMerchantId; |
|
| 170 | + $meta[ 'icepay_secret_code' ] = @$config_meta->icepaySecretCode; |
|
| 171 | 171 | |
| 172 | 172 | // Mollie |
| 173 | - $meta['mollie_partner_id'] = @$config_meta->molliePartnerId; |
|
| 174 | - $meta['mollie_profile_key'] = @$config_meta->mollieProfileKey; |
|
| 173 | + $meta[ 'mollie_partner_id' ] = @$config_meta->molliePartnerId; |
|
| 174 | + $meta[ 'mollie_profile_key' ] = @$config_meta->mollieProfileKey; |
|
| 175 | 175 | |
| 176 | 176 | // Sisow |
| 177 | - $meta['sisow_merchant_id'] = @$config_meta->sisowMerchantId; |
|
| 178 | - $meta['sisow_merchant_key'] = @$config_meta->sisowMerchantKey; |
|
| 177 | + $meta[ 'sisow_merchant_id' ] = @$config_meta->sisowMerchantId; |
|
| 178 | + $meta[ 'sisow_merchant_key' ] = @$config_meta->sisowMerchantKey; |
|
| 179 | 179 | |
| 180 | 180 | // TargetPay |
| 181 | - $meta['targetpay_layout_code'] = @$config_meta->targetPayLayoutCode; |
|
| 181 | + $meta[ 'targetpay_layout_code' ] = @$config_meta->targetPayLayoutCode; |
|
| 182 | 182 | |
| 183 | 183 | // Qantani |
| 184 | - $meta['qantani_merchant_id'] = @$config_meta->qantani_merchant_id; |
|
| 185 | - $meta['qantani_merchant_key'] = @$config_meta->qantani_merchant_key; |
|
| 186 | - $meta['qantani_merchant_secret'] = @$config_meta->qantani_merchant_secret; |
|
| 184 | + $meta[ 'qantani_merchant_id' ] = @$config_meta->qantani_merchant_id; |
|
| 185 | + $meta[ 'qantani_merchant_key' ] = @$config_meta->qantani_merchant_key; |
|
| 186 | + $meta[ 'qantani_merchant_secret' ] = @$config_meta->qantani_merchant_secret; |
|
| 187 | 187 | |
| 188 | 188 | // Ogone |
| 189 | - $meta['ogone_psp_id'] = @$config_meta->pspId; |
|
| 190 | - $meta['ogone_sha_in_pass_phrase'] = @$config_meta->shaInPassPhrase; |
|
| 191 | - $meta['ogone_sha_out_pass_phrase'] = @$config_meta->shaOutPassPhrase; |
|
| 192 | - $meta['ogone_user_id'] = @$config_meta->ogone_user_id; |
|
| 193 | - $meta['ogone_password'] = @$config_meta->ogone_password; |
|
| 189 | + $meta[ 'ogone_psp_id' ] = @$config_meta->pspId; |
|
| 190 | + $meta[ 'ogone_sha_in_pass_phrase' ] = @$config_meta->shaInPassPhrase; |
|
| 191 | + $meta[ 'ogone_sha_out_pass_phrase' ] = @$config_meta->shaOutPassPhrase; |
|
| 192 | + $meta[ 'ogone_user_id' ] = @$config_meta->ogone_user_id; |
|
| 193 | + $meta[ 'ogone_password' ] = @$config_meta->ogone_password; |
|
| 194 | 194 | |
| 195 | 195 | // Other |
| 196 | - $meta['country'] = @$config_meta->country; |
|
| 197 | - $meta['state_or_province'] = @$config_meta->stateOrProvince; |
|
| 198 | - $meta['locality'] = @$config_meta->locality; |
|
| 199 | - $meta['organization'] = @$config_meta->organization; |
|
| 200 | - $meta['organization_unit'] = @$config_meta->organizationUnit; |
|
| 201 | - $meta['common_name'] = @$config_meta->commonName; |
|
| 202 | - $meta['email'] = @$config_meta->eMailAddress; |
|
| 196 | + $meta[ 'country' ] = @$config_meta->country; |
|
| 197 | + $meta[ 'state_or_province' ] = @$config_meta->stateOrProvince; |
|
| 198 | + $meta[ 'locality' ] = @$config_meta->locality; |
|
| 199 | + $meta[ 'organization' ] = @$config_meta->organization; |
|
| 200 | + $meta[ 'organization_unit' ] = @$config_meta->organizationUnit; |
|
| 201 | + $meta[ 'common_name' ] = @$config_meta->commonName; |
|
| 202 | + $meta[ 'email' ] = @$config_meta->eMailAddress; |
|
| 203 | 203 | |
| 204 | 204 | foreach ( $meta as $key => $value ) { |
| 205 | - if ( ! empty( $value ) ) { |
|
| 206 | - $meta_key = '_pronamic_gateway_' . $key; |
|
| 205 | + if ( !empty( $value ) ) { |
|
| 206 | + $meta_key = '_pronamic_gateway_'.$key; |
|
| 207 | 207 | |
| 208 | 208 | update_post_meta( $post_id, $meta_key, $value ); |
| 209 | 209 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | /** |
| 236 | 236 | * Gravity Forms payment feeds |
| 237 | 237 | */ |
| 238 | -$feeds_table = $wpdb->prefix . 'rg_ideal_feeds'; |
|
| 238 | +$feeds_table = $wpdb->prefix.'rg_ideal_feeds'; |
|
| 239 | 239 | |
| 240 | 240 | $sql = "CREATE TABLE $feeds_table ( |
| 241 | 241 | id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | while ( $have_feeds ) { |
| 270 | 270 | $feeds = $wpdb->get_results( $query ); // WPCS: unprepared SQL ok. |
| 271 | 271 | |
| 272 | - $have_feeds = ! empty( $feeds ); |
|
| 272 | + $have_feeds = !empty( $feeds ); |
|
| 273 | 273 | |
| 274 | 274 | foreach ( $feeds as $feed ) { |
| 275 | 275 | // Post |
@@ -300,33 +300,33 @@ discard block |
||
| 300 | 300 | |
| 301 | 301 | $feed_meta = json_decode( $feed->meta, true ); |
| 302 | 302 | |
| 303 | - $meta['form_id'] = $feed->form_id; |
|
| 304 | - $meta['config_id'] = @$config_ids_map[ $feed->configuration_id ]; |
|
| 305 | - $meta['is_active'] = $feed->is_active; |
|
| 306 | - $meta['transaction_description'] = @$feed_meta['transactionDescription']; |
|
| 307 | - $meta['delay_notification_ids'] = @$feed_meta['delayNotificationIds']; |
|
| 308 | - $meta['delay_admin_notification'] = @$feed_meta['delayAdminNotification']; |
|
| 309 | - $meta['delay_user_notification'] = @$feed_meta['delayUserNotification']; |
|
| 310 | - $meta['delay_post_creation'] = @$feed_meta['delayPostCreation']; |
|
| 311 | - $meta['condition_enabled'] = @$feed_meta['conditionEnabled']; |
|
| 312 | - $meta['condition_field_id'] = @$feed_meta['conditionFieldId']; |
|
| 313 | - $meta['condition_operator'] = @$feed_meta['conditionOperator']; |
|
| 314 | - $meta['condition_value'] = @$feed_meta['conditionValue']; |
|
| 315 | - $meta['user_role_field_id'] = @$feed_meta['userRoleFieldId']; |
|
| 316 | - $meta['fields'] = @$feed_meta['fields']; |
|
| 317 | - $meta['links'] = @$feed_meta['links']; |
|
| 318 | - |
|
| 319 | - if ( is_array( $meta['links'] ) ) { |
|
| 320 | - foreach ( $meta['links'] as &$link ) { |
|
| 321 | - if ( isset( $link['pageId'] ) ) { |
|
| 322 | - $link['page_id'] = $link['pageId']; |
|
| 303 | + $meta[ 'form_id' ] = $feed->form_id; |
|
| 304 | + $meta[ 'config_id' ] = @$config_ids_map[ $feed->configuration_id ]; |
|
| 305 | + $meta[ 'is_active' ] = $feed->is_active; |
|
| 306 | + $meta[ 'transaction_description' ] = @$feed_meta[ 'transactionDescription' ]; |
|
| 307 | + $meta[ 'delay_notification_ids' ] = @$feed_meta[ 'delayNotificationIds' ]; |
|
| 308 | + $meta[ 'delay_admin_notification' ] = @$feed_meta[ 'delayAdminNotification' ]; |
|
| 309 | + $meta[ 'delay_user_notification' ] = @$feed_meta[ 'delayUserNotification' ]; |
|
| 310 | + $meta[ 'delay_post_creation' ] = @$feed_meta[ 'delayPostCreation' ]; |
|
| 311 | + $meta[ 'condition_enabled' ] = @$feed_meta[ 'conditionEnabled' ]; |
|
| 312 | + $meta[ 'condition_field_id' ] = @$feed_meta[ 'conditionFieldId' ]; |
|
| 313 | + $meta[ 'condition_operator' ] = @$feed_meta[ 'conditionOperator' ]; |
|
| 314 | + $meta[ 'condition_value' ] = @$feed_meta[ 'conditionValue' ]; |
|
| 315 | + $meta[ 'user_role_field_id' ] = @$feed_meta[ 'userRoleFieldId' ]; |
|
| 316 | + $meta[ 'fields' ] = @$feed_meta[ 'fields' ]; |
|
| 317 | + $meta[ 'links' ] = @$feed_meta[ 'links' ]; |
|
| 318 | + |
|
| 319 | + if ( is_array( $meta[ 'links' ] ) ) { |
|
| 320 | + foreach ( $meta[ 'links' ] as &$link ) { |
|
| 321 | + if ( isset( $link[ 'pageId' ] ) ) { |
|
| 322 | + $link[ 'page_id' ] = $link[ 'pageId' ]; |
|
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | foreach ( $meta as $key => $value ) { |
| 328 | - if ( ! empty( $value ) ) { |
|
| 329 | - $meta_key = '_pronamic_pay_gf_' . $key; |
|
| 328 | + if ( !empty( $value ) ) { |
|
| 329 | + $meta_key = '_pronamic_pay_gf_'.$key; |
|
| 330 | 330 | |
| 331 | 331 | update_post_meta( $post_id, $meta_key, $value ); |
| 332 | 332 | } |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | /** |
| 339 | 339 | * Payments. |
| 340 | 340 | */ |
| 341 | -$payments_table = $wpdb->prefix . 'pronamic_ideal_payments'; |
|
| 341 | +$payments_table = $wpdb->prefix.'pronamic_ideal_payments'; |
|
| 342 | 342 | |
| 343 | 343 | $sql = "CREATE TABLE $payments_table ( |
| 344 | 344 | id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | while ( $have_payments ) { |
| 387 | 387 | $payments = $wpdb->get_results( $query ); // WPCS: unprepared SQL ok. |
| 388 | 388 | |
| 389 | - $have_payments = ! empty( $payments ); |
|
| 389 | + $have_payments = !empty( $payments ); |
|
| 390 | 390 | |
| 391 | 391 | foreach ( $payments as $payment ) { |
| 392 | 392 | // Post |
@@ -436,8 +436,8 @@ discard block |
||
| 436 | 436 | ); |
| 437 | 437 | |
| 438 | 438 | foreach ( $meta as $key => $value ) { |
| 439 | - if ( ! empty( $value ) ) { |
|
| 440 | - $meta_key = '_pronamic_payment_' . $key; |
|
| 439 | + if ( !empty( $value ) ) { |
|
| 440 | + $meta_key = '_pronamic_payment_'.$key; |
|
| 441 | 441 | |
| 442 | 442 | update_post_meta( $post_id, $meta_key, $value ); |
| 443 | 443 | } |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | foreach ( $options as $key_old => $key_new ) { |
| 474 | 474 | $value = get_option( $key_old ); |
| 475 | 475 | |
| 476 | - if ( ! empty( $value ) ) { |
|
| 476 | + if ( !empty( $value ) ) { |
|
| 477 | 477 | $value_new = @$config_ids_map[ $value ]; |
| 478 | 478 | |
| 479 | 479 | update_option( $key_new, $value_new ); |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | |
| 487 | 487 | // Shopp |
| 488 | 488 | // @see https://github.com/pronamic/wp-pronamic-ideal/blob/1.3.4/classes/Pronamic/Shopp/IDeal/GatewayModule.php#L72 |
| 489 | -$shopp_meta_table = $wpdb->prefix . 'shopp_meta'; |
|
| 489 | +$shopp_meta_table = $wpdb->prefix.'shopp_meta'; |
|
| 490 | 490 | |
| 491 | 491 | // @see http://cube3x.com/2013/04/how-to-check-if-table-exists-in-wordpress-database/ |
| 492 | 492 | if ( $shopp_meta_table === $wpdb->get_var( "SHOW TABLES LIKE '$shopp_meta_table';" ) ) { // WPCS: unprepared SQL ok. |
@@ -497,10 +497,10 @@ discard block |
||
| 497 | 497 | if ( $row ) { |
| 498 | 498 | $settings = maybe_unserialize( $row->value ); |
| 499 | 499 | |
| 500 | - if ( is_array( $settings ) && isset( $settings['pronamic_shopp_ideal_configuration'] ) ) { |
|
| 501 | - $value = $settings['pronamic_shopp_ideal_configuration']; |
|
| 500 | + if ( is_array( $settings ) && isset( $settings[ 'pronamic_shopp_ideal_configuration' ] ) ) { |
|
| 501 | + $value = $settings[ 'pronamic_shopp_ideal_configuration' ]; |
|
| 502 | 502 | |
| 503 | - $settings['config_id'] = @$config_ids_map[ $value ]; |
|
| 503 | + $settings[ 'config_id' ] = @$config_ids_map[ $value ]; |
|
| 504 | 504 | |
| 505 | 505 | $wpdb->update( |
| 506 | 506 | $shopp_meta_table, |
@@ -519,12 +519,12 @@ discard block |
||
| 519 | 519 | // @see https://github.com/pronamic/wp-pronamic-ideal/blob/1.3.4/classes/Pronamic/WooCommerce/IDeal/IDealGateway.php#L42 |
| 520 | 520 | $settings = get_option( 'woocommerce_pronamic_ideal_settings' ); |
| 521 | 521 | |
| 522 | -if ( is_array( $settings ) && isset( $settings['configuration_id'] ) ) { |
|
| 523 | - $value = $settings['configuration_id']; |
|
| 522 | +if ( is_array( $settings ) && isset( $settings[ 'configuration_id' ] ) ) { |
|
| 523 | + $value = $settings[ 'configuration_id' ]; |
|
| 524 | 524 | |
| 525 | - $settings['config_id'] = @$config_ids_map[ $value ]; |
|
| 525 | + $settings[ 'config_id' ] = @$config_ids_map[ $value ]; |
|
| 526 | 526 | |
| 527 | - unset( $settings['configuration_id'] ); |
|
| 527 | + unset( $settings[ 'configuration_id' ] ); |
|
| 528 | 528 | |
| 529 | 529 | update_option( 'woocommerce_pronamic_pay_ideal_settings', $settings ); |
| 530 | 530 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $results = $wpdb->get_results( $db_query ); // WPCS: unprepared SQL ok. |
| 86 | 86 | |
| 87 | 87 | foreach ( $results as $result ) { |
| 88 | - $payments[] = new Payment( $result->post_id ); |
|
| 88 | + $payments[ ] = new Payment( $result->post_id ); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | return $payments; |
@@ -167,13 +167,13 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | foreach ( $pronamic_ideal->gateway_integrations as $integration ) { |
| 169 | 169 | if ( isset( $pronamic_pay_providers[ $integration->provider ] ) ) { |
| 170 | - $provider =& $pronamic_pay_providers[ $integration->provider ]; |
|
| 170 | + $provider = & $pronamic_pay_providers[ $integration->provider ]; |
|
| 171 | 171 | |
| 172 | - if ( ! isset( $provider['integrations'] ) ) { |
|
| 173 | - $provider['integrations'] = array(); |
|
| 172 | + if ( !isset( $provider[ 'integrations' ] ) ) { |
|
| 173 | + $provider[ 'integrations' ] = array(); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $provider['integrations'][] = $integration; |
|
| 176 | + $provider[ 'integrations' ][ ] = $integration; |
|
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | } |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | if ( false === $separator ) { |
| 229 | 229 | // WordPress locale number format was introduced in WordPress version 2.3. |
| 230 | 230 | // @see https://github.com/WordPress/WordPress/blob/2.3/wp-includes/locale.php#L90-L100. |
| 231 | - $separator = $wp_locale->number_format['thousands_sep']; |
|
| 231 | + $separator = $wp_locale->number_format[ 'thousands_sep' ]; |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | return $separator; |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | if ( false === $separator ) { |
| 250 | 250 | // WordPress locale number format was introduced in WordPress version 2.3. |
| 251 | 251 | // @see https://github.com/WordPress/WordPress/blob/2.3/wp-includes/locale.php#L90-L100. |
| 252 | - $separator = $wp_locale->number_format['decimal_point']; |
|
| 252 | + $separator = $wp_locale->number_format[ 'decimal_point' ]; |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | return $separator ? $separator : '.'; |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | // If this file is called directly, abort. |
| 18 | -if ( ! defined( 'WPINC' ) ) { |
|
| 18 | +if ( !defined( 'WPINC' ) ) { |
|
| 19 | 19 | die; |
| 20 | 20 | } |
| 21 | 21 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $classes = array( 'nav-tab' ); |
| 61 | 61 | |
| 62 | 62 | if ( $current_tab === $tab ) { |
| 63 | - $classes[] = 'nav-tab-active'; |
|
| 63 | + $classes[ ] = 'nav-tab-active'; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | $url = add_query_arg( 'tab', $tab ); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | <?php |
| 80 | 80 | |
| 81 | - $file = plugin_dir_path( Plugin::$file ) . 'admin/tab-' . $current_tab . '.php'; |
|
| 81 | + $file = plugin_dir_path( Plugin::$file ).'admin/tab-'.$current_tab.'.php'; |
|
| 82 | 82 | |
| 83 | 83 | if ( is_readable( $file ) ) { |
| 84 | 84 | include $file; |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | <?php foreach ( $states as $status => $label ) : ?> |
| 16 | 16 | |
| 17 | - <li class="<?php echo esc_attr( 'payment_status-' . $status ); ?>"> |
|
| 17 | + <li class="<?php echo esc_attr( 'payment_status-'.$status ); ?>"> |
|
| 18 | 18 | <a href="<?php echo esc_attr( add_query_arg( 'post_status', $status, $url ) ); ?>"> |
| 19 | 19 | <?php |
| 20 | 20 | |
@@ -22,10 +22,10 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | printf( // WPCS: XSS ok. |
| 24 | 24 | $label, |
| 25 | - '<strong>' . sprintf( |
|
| 25 | + '<strong>'.sprintf( |
|
| 26 | 26 | esc_html( _n( '%s payment', '%s payments', $count, 'pronamic_ideal' ) ), |
| 27 | 27 | esc_html( number_format_i18n( $count ) ) |
| 28 | - ) . '</strong>' |
|
| 28 | + ).'</strong>' |
|
| 29 | 29 | ); |
| 30 | 30 | |
| 31 | 31 | ?> |
@@ -245,8 +245,8 @@ discard block |
||
| 245 | 245 | $version = curl_version(); |
| 246 | 246 | // @codingStandardsIgnoreEnd |
| 247 | 247 | |
| 248 | - if ( isset( $version['version'] ) ) { |
|
| 249 | - echo esc_html( $version['version'] ); |
|
| 248 | + if ( isset( $version[ 'version' ] ) ) { |
|
| 249 | + echo esc_html( $version[ 'version' ] ); |
|
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | |
| 337 | 337 | $data = get_transient( 'pronamic_pay_ideal_issuers_status' ); |
| 338 | 338 | |
| 339 | -if ( ! $data ) { |
|
| 339 | +if ( !$data ) { |
|
| 340 | 340 | |
| 341 | 341 | $url = 'http://www.ideal-status.nl/static/issuers_current.json'; |
| 342 | 342 | |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | |
| 345 | 345 | $status_data = null; |
| 346 | 346 | |
| 347 | - if ( ! is_wp_error( $response ) ) { |
|
| 347 | + if ( !is_wp_error( $response ) ) { |
|
| 348 | 348 | if ( 200 === wp_remote_retrieve_response_code( $response ) ) { |
| 349 | 349 | $body = wp_remote_retrieve_body( $response ); |
| 350 | 350 | |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | |
| 410 | 410 | <?php foreach ( $data as $status ) : ?> |
| 411 | 411 | |
| 412 | - <?php $alternate = ! $alternate; ?> |
|
| 412 | + <?php $alternate = !$alternate; ?> |
|
| 413 | 413 | |
| 414 | 414 | <tr<?php if ( $alternate ) : ?> class="alternate"<?php endif; ?>> |
| 415 | 415 | <td> |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | * @package Pronamic\WordPress\Pay |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -if ( ! defined( 'WPINC' ) ) { |
|
| 11 | +if ( !defined( 'WPINC' ) ) { |
|
| 12 | 12 | die; |
| 13 | 13 | } |
| 14 | 14 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | foreach ( $fields as $id => $field ) { |
| 23 | - $section = $field['section']; |
|
| 23 | + $section = $field[ 'section' ]; |
|
| 24 | 24 | |
| 25 | 25 | $sections_fields[ $section ][ $id ] = $field; |
| 26 | 26 | } |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | <?php |
| 51 | 51 | |
| 52 | 52 | foreach ( $pronamic_pay_providers as $provider ) { |
| 53 | - if ( isset( $provider['integrations'] ) && is_array( $provider['integrations'] ) ) { |
|
| 54 | - printf( '<optgroup label="%s">', esc_attr( $provider['name'] ) ); |
|
| 53 | + if ( isset( $provider[ 'integrations' ] ) && is_array( $provider[ 'integrations' ] ) ) { |
|
| 54 | + printf( '<optgroup label="%s">', esc_attr( $provider[ 'name' ] ) ); |
|
| 55 | 55 | |
| 56 | - foreach ( $provider['integrations'] as $integration ) { |
|
| 56 | + foreach ( $provider[ 'integrations' ] as $integration ) { |
|
| 57 | 57 | $id = $integration->get_id(); |
| 58 | 58 | $name = $integration->get_name(); |
| 59 | 59 | $classes = array(); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $links = array(); |
| 62 | 62 | |
| 63 | 63 | if ( isset( $integration->deprecated ) && $integration->deprecated ) { |
| 64 | - $classes[] = 'deprecated'; |
|
| 64 | + $classes[ ] = 'deprecated'; |
|
| 65 | 65 | |
| 66 | 66 | $name = sprintf( __( '%s (obsoleted)', 'pronamic_ideal' ), $name ); |
| 67 | 67 | |
@@ -74,23 +74,23 @@ discard block |
||
| 74 | 74 | $dashboards = $integration->get_dashboard_url(); |
| 75 | 75 | |
| 76 | 76 | if ( 1 === count( $dashboards ) ) { |
| 77 | - $links[] = sprintf( |
|
| 77 | + $links[ ] = sprintf( |
|
| 78 | 78 | '<a href="%s" title="%s">%2$s</a>', |
| 79 | - esc_attr( $dashboards[0] ), |
|
| 79 | + esc_attr( $dashboards[ 0 ] ), |
|
| 80 | 80 | __( 'Dashboard', 'pronamic_ideal' ) |
| 81 | 81 | ); |
| 82 | 82 | } elseif ( count( $dashboards ) > 1 ) { |
| 83 | 83 | $dashboard_urls = array(); |
| 84 | 84 | |
| 85 | 85 | foreach ( $dashboards as $dashboard_name => $dashboard_url ) { |
| 86 | - $dashboard_urls[] = sprintf( |
|
| 86 | + $dashboard_urls[ ] = sprintf( |
|
| 87 | 87 | '<a href="%s" title="%s">%2$s</a>', |
| 88 | 88 | esc_attr( $dashboard_url ), |
| 89 | 89 | esc_html( ucfirst( $dashboard_name ) ) |
| 90 | 90 | ); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - $links[] = sprintf( |
|
| 93 | + $links[ ] = sprintf( |
|
| 94 | 94 | '%s: %s', |
| 95 | 95 | __( 'Dashboards', 'pronamic_ideal' ), |
| 96 | 96 | strtolower( implode( ', ', $dashboard_urls ) ) |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | // Product link. |
| 101 | 101 | if ( $integration->get_product_url() ) { |
| 102 | - $links[] = sprintf( |
|
| 102 | + $links[ ] = sprintf( |
|
| 103 | 103 | '<a href="%s" target="_blank" title="%s">%2$s</a>', |
| 104 | 104 | $integration->get_product_url(), |
| 105 | 105 | __( 'Product information', 'pronamic_ideal' ) |
@@ -139,34 +139,34 @@ discard block |
||
| 139 | 139 | <?php |
| 140 | 140 | |
| 141 | 141 | $classes = array(); |
| 142 | - if ( isset( $section['methods'] ) ) { |
|
| 143 | - $classes[] = 'pronamic-pay-tab'; |
|
| 144 | - $classes[] = 'pronamic-pay-cloack'; |
|
| 145 | - $classes[] = 'extra-settings'; |
|
| 142 | + if ( isset( $section[ 'methods' ] ) ) { |
|
| 143 | + $classes[ ] = 'pronamic-pay-tab'; |
|
| 144 | + $classes[ ] = 'pronamic-pay-cloack'; |
|
| 145 | + $classes[ ] = 'extra-settings'; |
|
| 146 | 146 | |
| 147 | - foreach ( $section['methods'] as $method ) { |
|
| 148 | - $classes[] = 'setting-' . $method; |
|
| 147 | + foreach ( $section[ 'methods' ] as $method ) { |
|
| 148 | + $classes[ ] = 'setting-'.$method; |
|
| 149 | 149 | } |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | ?> |
| 153 | 153 | |
| 154 | 154 | <div class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>"> |
| 155 | - <?php if ( ! empty( $section['title'] ) || ! empty( $section['description'] ) ) : ?> |
|
| 155 | + <?php if ( !empty( $section[ 'title' ] ) || !empty( $section[ 'description' ] ) ) : ?> |
|
| 156 | 156 | |
| 157 | 157 | <div class="pronamic-pay-tab-block gateway-config-section-header"> |
| 158 | - <?php if ( ! empty( $section['title'] ) ) : ?> |
|
| 158 | + <?php if ( !empty( $section[ 'title' ] ) ) : ?> |
|
| 159 | 159 | |
| 160 | - <h4 class="pronamic-pay-cloack"><?php echo esc_html( $section['title'] ); ?></h4> |
|
| 160 | + <h4 class="pronamic-pay-cloack"><?php echo esc_html( $section[ 'title' ] ); ?></h4> |
|
| 161 | 161 | |
| 162 | 162 | <?php endif; ?> |
| 163 | 163 | |
| 164 | - <?php if ( ! empty( $section['description'] ) ) : ?> |
|
| 164 | + <?php if ( !empty( $section[ 'description' ] ) ) : ?> |
|
| 165 | 165 | |
| 166 | 166 | <p> |
| 167 | 167 | <?php |
| 168 | 168 | |
| 169 | - echo $section['description']; // WPCS: XSS ok. |
|
| 169 | + echo $section[ 'description' ]; // WPCS: XSS ok. |
|
| 170 | 170 | |
| 171 | 171 | ?> |
| 172 | 172 | </p> |
@@ -183,23 +183,23 @@ discard block |
||
| 183 | 183 | foreach ( $sections_fields[ $id ] as $field ) : |
| 184 | 184 | |
| 185 | 185 | $classes = array(); |
| 186 | - if ( isset( $field['methods'] ) ) { |
|
| 187 | - $classes[] = 'pronamic-pay-cloack'; |
|
| 188 | - $classes[] = 'extra-settings'; |
|
| 186 | + if ( isset( $field[ 'methods' ] ) ) { |
|
| 187 | + $classes[ ] = 'pronamic-pay-cloack'; |
|
| 188 | + $classes[ ] = 'extra-settings'; |
|
| 189 | 189 | |
| 190 | - foreach ( $field['methods'] as $method ) { |
|
| 191 | - $classes[] = 'setting-' . $method; |
|
| 190 | + foreach ( $field[ 'methods' ] as $method ) { |
|
| 191 | + $classes[ ] = 'setting-'.$method; |
|
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - if ( isset( $field['group'] ) ) { |
|
| 196 | - $classes[] = $field['group']; |
|
| 195 | + if ( isset( $field[ 'group' ] ) ) { |
|
| 196 | + $classes[ ] = $field[ 'group' ]; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - if ( isset( $field['id'] ) ) { |
|
| 200 | - $id = $field['id']; |
|
| 201 | - } elseif ( isset( $field['meta_key'] ) ) { |
|
| 202 | - $id = $field['meta_key']; |
|
| 199 | + if ( isset( $field[ 'id' ] ) ) { |
|
| 200 | + $id = $field[ 'id' ]; |
|
| 201 | + } elseif ( isset( $field[ 'meta_key' ] ) ) { |
|
| 202 | + $id = $field[ 'meta_key' ]; |
|
| 203 | 203 | } else { |
| 204 | 204 | $id = uniqid(); |
| 205 | 205 | } |
@@ -207,19 +207,19 @@ discard block |
||
| 207 | 207 | ?> |
| 208 | 208 | <tr class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>"> |
| 209 | 209 | |
| 210 | - <?php if ( 'html' !== $field['type'] ) { ?> |
|
| 210 | + <?php if ( 'html' !== $field[ 'type' ] ) { ?> |
|
| 211 | 211 | |
| 212 | 212 | <th scope="col"> |
| 213 | 213 | <label for="<?php echo esc_attr( $id ); ?>"> |
| 214 | - <?php echo esc_html( $field['title'] ); ?> |
|
| 214 | + <?php echo esc_html( $field[ 'title' ] ); ?> |
|
| 215 | 215 | </label> |
| 216 | 216 | |
| 217 | 217 | <?php |
| 218 | 218 | |
| 219 | - if ( isset( $field['tooltip'] ) && ! empty( $field['tooltip'] ) ) { |
|
| 219 | + if ( isset( $field[ 'tooltip' ] ) && !empty( $field[ 'tooltip' ] ) ) { |
|
| 220 | 220 | printf( |
| 221 | 221 | '<span class="dashicons dashicons-editor-help pronamic-pay-tip" title="%s"></span>', |
| 222 | - esc_attr( $field['tooltip'] ) |
|
| 222 | + esc_attr( $field[ 'tooltip' ] ) |
|
| 223 | 223 | ); |
| 224 | 224 | } |
| 225 | 225 | |
@@ -228,59 +228,59 @@ discard block |
||
| 228 | 228 | |
| 229 | 229 | <?php } ?> |
| 230 | 230 | |
| 231 | - <td <?php if ( 'html' === $field['type'] ) : ?>colspan="2"<?php endif; ?>> |
|
| 231 | + <td <?php if ( 'html' === $field[ 'type' ] ) : ?>colspan="2"<?php endif; ?>> |
|
| 232 | 232 | <?php |
| 233 | 233 | |
| 234 | 234 | $attributes = array(); |
| 235 | - $attributes['id'] = $id; |
|
| 236 | - $attributes['name'] = $id; |
|
| 235 | + $attributes[ 'id' ] = $id; |
|
| 236 | + $attributes[ 'name' ] = $id; |
|
| 237 | 237 | |
| 238 | 238 | $classes = array(); |
| 239 | - if ( isset( $field['classes'] ) ) { |
|
| 240 | - $classes = $field['classes']; |
|
| 239 | + if ( isset( $field[ 'classes' ] ) ) { |
|
| 240 | + $classes = $field[ 'classes' ]; |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | - if ( isset( $field['readonly'] ) && $field['readonly'] ) { |
|
| 244 | - $attributes['readonly'] = 'readonly'; |
|
| 243 | + if ( isset( $field[ 'readonly' ] ) && $field[ 'readonly' ] ) { |
|
| 244 | + $attributes[ 'readonly' ] = 'readonly'; |
|
| 245 | 245 | |
| 246 | - $classes[] = 'readonly'; |
|
| 246 | + $classes[ ] = 'readonly'; |
|
| 247 | 247 | } |
| 248 | 248 | |
| 249 | - if ( isset( $field['size'] ) ) { |
|
| 250 | - $attributes['size'] = $field['size']; |
|
| 249 | + if ( isset( $field[ 'size' ] ) ) { |
|
| 250 | + $attributes[ 'size' ] = $field[ 'size' ]; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | - if ( in_array( $field['type'], array( 'text', 'password', 'textarea', 'select' ), true ) ) { |
|
| 254 | - $classes[] = 'pronamic-pay-form-control'; |
|
| 253 | + if ( in_array( $field[ 'type' ], array( 'text', 'password', 'textarea', 'select' ), true ) ) { |
|
| 254 | + $classes[ ] = 'pronamic-pay-form-control'; |
|
| 255 | 255 | } |
| 256 | 256 | |
| 257 | - if ( in_array( $field['type'], array( 'textarea' ), true ) ) { |
|
| 258 | - $classes[] = 'pronamic-pay-form-control-lg'; |
|
| 257 | + if ( in_array( $field[ 'type' ], array( 'textarea' ), true ) ) { |
|
| 258 | + $classes[ ] = 'pronamic-pay-form-control-lg'; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | - if ( ! empty( $classes ) ) { |
|
| 262 | - $attributes['class'] = implode( ' ', $classes ); |
|
| 261 | + if ( !empty( $classes ) ) { |
|
| 262 | + $attributes[ 'class' ] = implode( ' ', $classes ); |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | $value = ''; |
| 266 | - if ( isset( $field['meta_key'] ) ) { |
|
| 267 | - $attributes['name'] = $field['meta_key']; |
|
| 266 | + if ( isset( $field[ 'meta_key' ] ) ) { |
|
| 267 | + $attributes[ 'name' ] = $field[ 'meta_key' ]; |
|
| 268 | 268 | |
| 269 | - $value = get_post_meta( get_the_ID(), $field['meta_key'], true ); |
|
| 270 | - } elseif ( isset( $field['value'] ) ) { |
|
| 271 | - $value = $field['value']; |
|
| 269 | + $value = get_post_meta( get_the_ID(), $field[ 'meta_key' ], true ); |
|
| 270 | + } elseif ( isset( $field[ 'value' ] ) ) { |
|
| 271 | + $value = $field[ 'value' ]; |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | // Set default. |
| 275 | - if ( empty( $value ) && isset( $field['default'] ) ) { |
|
| 276 | - $value = $field['default']; |
|
| 275 | + if ( empty( $value ) && isset( $field[ 'default' ] ) ) { |
|
| 276 | + $value = $field[ 'default' ]; |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | - switch ( $field['type'] ) { |
|
| 279 | + switch ( $field[ 'type' ] ) { |
|
| 280 | 280 | case 'text': |
| 281 | 281 | case 'password': |
| 282 | - $attributes['type'] = $field['type']; |
|
| 283 | - $attributes['value'] = $value; |
|
| 282 | + $attributes[ 'type' ] = $field[ 'type' ]; |
|
| 283 | + $attributes[ 'value' ] = $value; |
|
| 284 | 284 | |
| 285 | 285 | printf( |
| 286 | 286 | '<input %s />', |
@@ -291,8 +291,8 @@ discard block |
||
| 291 | 291 | |
| 292 | 292 | break; |
| 293 | 293 | case 'checkbox': |
| 294 | - $attributes['type'] = $field['type']; |
|
| 295 | - $attributes['value'] = '1'; |
|
| 294 | + $attributes[ 'type' ] = $field[ 'type' ]; |
|
| 295 | + $attributes[ 'value' ] = '1'; |
|
| 296 | 296 | |
| 297 | 297 | printf( |
| 298 | 298 | '<input %s %s />', |
@@ -306,14 +306,14 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | printf( |
| 308 | 308 | '<label for="%s">%s</label>', |
| 309 | - esc_attr( $attributes['id'] ), |
|
| 310 | - esc_html( $field['label'] ) |
|
| 309 | + esc_attr( $attributes[ 'id' ] ), |
|
| 310 | + esc_html( $field[ 'label' ] ) |
|
| 311 | 311 | ); |
| 312 | 312 | |
| 313 | 313 | break; |
| 314 | 314 | case 'textarea': |
| 315 | - $attributes['rows'] = 4; |
|
| 316 | - $attributes['cols'] = 65; |
|
| 315 | + $attributes[ 'rows' ] = 4; |
|
| 316 | + $attributes[ 'cols' ] = 65; |
|
| 317 | 317 | |
| 318 | 318 | printf( |
| 319 | 319 | '<textarea %s />%s</textarea>', |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | |
| 326 | 326 | break; |
| 327 | 327 | case 'file': |
| 328 | - $attributes['type'] = 'file'; |
|
| 328 | + $attributes[ 'type' ] = 'file'; |
|
| 329 | 329 | |
| 330 | 330 | printf( |
| 331 | 331 | '<input %s />', |
@@ -340,22 +340,22 @@ discard block |
||
| 340 | 340 | '<select %s>%s</select>', |
| 341 | 341 | // @codingStandardsIgnoreStart |
| 342 | 342 | Util::array_to_html_attributes( $attributes ), |
| 343 | - Util::select_options_grouped( $field['options'], $value ) |
|
| 343 | + Util::select_options_grouped( $field[ 'options' ], $value ) |
|
| 344 | 344 | // @codingStandardsIgnoreEnd |
| 345 | 345 | ); |
| 346 | 346 | |
| 347 | 347 | break; |
| 348 | 348 | case 'optgroup': |
| 349 | 349 | printf( '<fieldset>' ); |
| 350 | - printf( '<legend class="screen-reader-text">%s</legend>', esc_html( $field['title'] ) ); |
|
| 350 | + printf( '<legend class="screen-reader-text">%s</legend>', esc_html( $field[ 'title' ] ) ); |
|
| 351 | 351 | |
| 352 | - foreach ( $field['options'] as $key => $label ) { |
|
| 352 | + foreach ( $field[ 'options' ] as $key => $label ) { |
|
| 353 | 353 | printf( |
| 354 | 354 | '<label>%s %s</label><br />', |
| 355 | 355 | sprintf( |
| 356 | 356 | '<input type="radio" value="%s" name="%s" %s />', |
| 357 | 357 | esc_attr( $key ), |
| 358 | - esc_attr( $attributes['name'] ), |
|
| 358 | + esc_attr( $attributes[ 'name' ] ), |
|
| 359 | 359 | checked( $value, $key, false ) |
| 360 | 360 | ), |
| 361 | 361 | esc_html( $label ) |
@@ -365,26 +365,26 @@ discard block |
||
| 365 | 365 | break; |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | - if ( isset( $field['html'] ) ) { |
|
| 369 | - if ( 'description' !== $field['type'] && isset( $field['title'] ) && ! empty( $field['title'] ) ) { |
|
| 368 | + if ( isset( $field[ 'html' ] ) ) { |
|
| 369 | + if ( 'description' !== $field[ 'type' ] && isset( $field[ 'title' ] ) && !empty( $field[ 'title' ] ) ) { |
|
| 370 | 370 | printf( |
| 371 | 371 | '<strong>%s</strong><br>', |
| 372 | - esc_html( $field['title'] ) |
|
| 372 | + esc_html( $field[ 'title' ] ) |
|
| 373 | 373 | ); |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | - echo $field['html']; // WPCS: XSS ok. |
|
| 376 | + echo $field[ 'html' ]; // WPCS: XSS ok. |
|
| 377 | 377 | } |
| 378 | 378 | |
| 379 | - if ( isset( $field['description'] ) ) { |
|
| 379 | + if ( isset( $field[ 'description' ] ) ) { |
|
| 380 | 380 | printf( // WPCS: XSS ok. |
| 381 | 381 | '<p class="pronamic-pay-description description">%s</p>', |
| 382 | - $field['description'] |
|
| 382 | + $field[ 'description' ] |
|
| 383 | 383 | ); |
| 384 | 384 | } |
| 385 | 385 | |
| 386 | - if ( isset( $field['callback'] ) ) { |
|
| 387 | - $callback = $field['callback']; |
|
| 386 | + if ( isset( $field[ 'callback' ] ) ) { |
|
| 387 | + $callback = $field[ 'callback' ]; |
|
| 388 | 388 | |
| 389 | 389 | call_user_func( $callback, $field ); |
| 390 | 390 | } |