@@ -20,12 +20,15 @@ |
||
| 20 | 20 | |
| 21 | 21 | <?php esc_html_e( 'No notes found.', 'pronamic_ideal' ); ?> |
| 22 | 22 | |
| 23 | -<?php else : ?> |
|
| 23 | +<?php else { |
|
| 24 | + : ?> |
|
| 24 | 25 | |
| 25 | 26 | <table class="pronamic-pay-table widefat"> |
| 26 | 27 | <thead> |
| 27 | 28 | <tr> |
| 28 | - <th scope="col"><?php esc_html_e( 'Date', 'pronamic_ideal' ); ?></th> |
|
| 29 | + <th scope="col"><?php esc_html_e( 'Date', 'pronamic_ideal' ); |
|
| 30 | +} |
|
| 31 | +?></th> |
|
| 29 | 32 | <th scope="col"><?php esc_html_e( 'Note', 'pronamic_ideal' ); ?></th> |
| 30 | 33 | <th scope="col"><?php esc_html_e( 'User', 'pronamic_ideal' ); ?></th> |
| 31 | 34 | </tr> |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | public function get_and_set_provider() { |
| 47 | 47 | return array( |
| 48 | - array( 'set_id', 'get_id', uniqid() ), |
|
| 49 | - array( 'set_transaction_id', 'get_transaction_id', uniqid() ), |
|
| 50 | - array( 'set_status', 'get_status', 'completed' ), |
|
| 48 | + array( 'set_id', 'get_id', uniqid() ), |
|
| 49 | + array( 'set_transaction_id', 'get_transaction_id', uniqid() ), |
|
| 50 | + array( 'set_status', 'get_status', 'completed' ), |
|
| 51 | 51 | ); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -66,11 +66,11 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | public function set_provider() { |
| 68 | 68 | return array( |
| 69 | - array( 'set_consumer_name', 'consumer_name', 'John Doe' ), |
|
| 69 | + array( 'set_consumer_name', 'consumer_name', 'John Doe' ), |
|
| 70 | 70 | array( 'set_consumer_account_number', 'consumer_account_number', '1086.34.779' ), |
| 71 | - array( 'set_consumer_iban', 'consumer_iban', 'NL56 RABO 0108 6347 79' ), |
|
| 72 | - array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ), |
|
| 73 | - array( 'set_consumer_city', 'consumer_city', 'Drachten' ), |
|
| 71 | + array( 'set_consumer_iban', 'consumer_iban', 'NL56 RABO 0108 6347 79' ), |
|
| 72 | + array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ), |
|
| 73 | + array( 'set_consumer_city', 'consumer_city', 'Drachten' ), |
|
| 74 | 74 | ); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -89,25 +89,25 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | public function get_provider() { |
| 91 | 91 | return array( |
| 92 | - array( 'order_id', 'get_order_id', 1234 ), |
|
| 93 | - array( 'amount', 'get_amount', 89.95 ), |
|
| 94 | - array( 'currency', 'get_currency', 'EUR' ), |
|
| 95 | - array( 'method', 'get_method', 'ideal' ), |
|
| 96 | - array( 'issuer', 'get_issuer', 'ideal_KNABNL2H' ), |
|
| 97 | - array( 'language', 'get_language', 'nl' ), |
|
| 98 | - array( 'locale', 'get_locale', 'nl_NL' ), |
|
| 99 | - array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ), |
|
| 100 | - array( 'email', 'get_email', '[email protected]' ), |
|
| 101 | - array( 'first_name', 'get_first_name', 'John' ), |
|
| 102 | - array( 'last_name', 'get_last_name', 'Doe' ), |
|
| 103 | - array( 'customer_name', 'get_customer_name', 'John Doe' ), |
|
| 104 | - array( 'address', 'get_address', 'Burgemeester Wuiteweg 39b' ), |
|
| 105 | - array( 'city', 'get_city', 'Drachten' ), |
|
| 106 | - array( 'zip', 'get_zip', '9203 KA' ), |
|
| 107 | - array( 'country', 'get_country', 'NL' ), |
|
| 108 | - array( 'telephone_number', 'get_telephone_number', '1234567890' ), |
|
| 92 | + array( 'order_id', 'get_order_id', 1234 ), |
|
| 93 | + array( 'amount', 'get_amount', 89.95 ), |
|
| 94 | + array( 'currency', 'get_currency', 'EUR' ), |
|
| 95 | + array( 'method', 'get_method', 'ideal' ), |
|
| 96 | + array( 'issuer', 'get_issuer', 'ideal_KNABNL2H' ), |
|
| 97 | + array( 'language', 'get_language', 'nl' ), |
|
| 98 | + array( 'locale', 'get_locale', 'nl_NL' ), |
|
| 99 | + array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ), |
|
| 100 | + array( 'email', 'get_email', '[email protected]' ), |
|
| 101 | + array( 'first_name', 'get_first_name', 'John' ), |
|
| 102 | + array( 'last_name', 'get_last_name', 'Doe' ), |
|
| 103 | + array( 'customer_name', 'get_customer_name', 'John Doe' ), |
|
| 104 | + array( 'address', 'get_address', 'Burgemeester Wuiteweg 39b' ), |
|
| 105 | + array( 'city', 'get_city', 'Drachten' ), |
|
| 106 | + array( 'zip', 'get_zip', '9203 KA' ), |
|
| 107 | + array( 'country', 'get_country', 'NL' ), |
|
| 108 | + array( 'telephone_number', 'get_telephone_number', '1234567890' ), |
|
| 109 | 109 | array( 'analytics_client_id', 'get_analytics_client_id', 'GA1.2.1234567890.1234567890' ), |
| 110 | - array( 'entrance_code', 'get_entrance_code', uniqid() ), |
|
| 110 | + array( 'entrance_code', 'get_entrance_code', uniqid() ), |
|
| 111 | 111 | ); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | public function get_and_set_provider() { |
| 45 | 45 | return array( |
| 46 | - array( 'set_id', 'get_id', uniqid() ), |
|
| 47 | - array( 'set_status', 'get_status', 'completed' ), |
|
| 48 | - array( 'set_transaction_id', 'get_transaction_id', uniqid() ), |
|
| 46 | + array( 'set_id', 'get_id', uniqid() ), |
|
| 47 | + array( 'set_status', 'get_status', 'completed' ), |
|
| 48 | + array( 'set_transaction_id', 'get_transaction_id', uniqid() ), |
|
| 49 | 49 | ); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | return array( |
| 67 | 67 | array( 'set_consumer_name', 'consumer_name', 'John Doe' ), |
| 68 | 68 | array( 'set_consumer_iban', 'consumer_iban', 'NL56 RABO 0108 6347 79' ), |
| 69 | - array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ), |
|
| 69 | + array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ), |
|
| 70 | 70 | ); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -85,15 +85,15 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | public function get_provider() { |
| 87 | 87 | return array( |
| 88 | - array( 'key', 'get_key', uniqid() ), |
|
| 89 | - array( 'source', 'get_source', 'woocommerce' ), |
|
| 90 | - array( 'source_id', 'get_source_id', '1234' ), |
|
| 91 | - array( 'frequency', 'get_frequency', 'daily' ), |
|
| 92 | - array( 'interval', 'get_interval', '1' ), |
|
| 93 | - array( 'interval_period', 'get_interval_period', 'Y' ), |
|
| 94 | - array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ), |
|
| 95 | - array( 'currency', 'get_currency', 'EUR' ), |
|
| 96 | - array( 'amount', 'get_amount', 89.95 ), |
|
| 88 | + array( 'key', 'get_key', uniqid() ), |
|
| 89 | + array( 'source', 'get_source', 'woocommerce' ), |
|
| 90 | + array( 'source_id', 'get_source_id', '1234' ), |
|
| 91 | + array( 'frequency', 'get_frequency', 'daily' ), |
|
| 92 | + array( 'interval', 'get_interval', '1' ), |
|
| 93 | + array( 'interval_period', 'get_interval_period', 'Y' ), |
|
| 94 | + array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ), |
|
| 95 | + array( 'currency', 'get_currency', 'EUR' ), |
|
| 96 | + array( 'amount', 'get_amount', 89.95 ), |
|
| 97 | 97 | ); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -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="row"> |
| 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 | 261 | if ( ! empty( $classes ) ) { |
| 262 | - $attributes['class'] = implode( ' ', $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 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | if ( $gateway->has_error() ) { |
| 55 | - $pronamic_ideal_errors[] = $gateway->get_error(); |
|
| 55 | + $pronamic_ideal_errors[ ] = $gateway->get_error(); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | require Plugin::$dirname . '/views/errors.php'; |
@@ -87,12 +87,12 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | <tr class="pronamic-pay-cloack pronamic-pay-test-payment-method <?php echo esc_attr( $method ); ?>"> |
| 89 | 89 | <th scope="row"> |
| 90 | - <?php echo esc_html( $input['label'] ); ?> |
|
| 90 | + <?php echo esc_html( $input[ 'label' ] ); ?> |
|
| 91 | 91 | </th> |
| 92 | 92 | <td> |
| 93 | 93 | <?php |
| 94 | 94 | |
| 95 | - echo $input['html']; // WPCS: XSS ok. |
|
| 95 | + echo $input[ 'html' ]; // WPCS: XSS ok. |
|
| 96 | 96 | |
| 97 | 97 | ?> |
| 98 | 98 | </td> |
@@ -66,11 +66,11 @@ |
||
| 66 | 66 | * @return array |
| 67 | 67 | */ |
| 68 | 68 | public function exclude_payment_comment_notes( $clauses, $query ) { |
| 69 | - $type = $query->query_vars['type']; |
|
| 69 | + $type = $query->query_vars[ 'type' ]; |
|
| 70 | 70 | |
| 71 | 71 | // Ignore payment notes comments if it's not specifically requested. |
| 72 | 72 | if ( 'payment_note' !== $type ) { |
| 73 | - $clauses['where'] .= " AND comment_type != 'payment_note'"; |
|
| 73 | + $clauses[ 'where' ] .= " AND comment_type != 'payment_note'"; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | return $clauses; |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | $post_status = $this->get_post_status( $payment->status ); |
| 116 | 116 | |
| 117 | 117 | if ( ! empty( $post_status ) ) { |
| 118 | - $data['post_status'] = $post_status; |
|
| 118 | + $data[ 'post_status' ] = $post_status; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | wp_update_post( $data ); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $classes = apply_filters( 'pronamic_pay_gateway_settings', array() ); |
| 40 | 40 | |
| 41 | 41 | foreach ( $classes as $class ) { |
| 42 | - $this->settings[] = new $class(); |
|
| 42 | + $this->settings[ ] = new $class(); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $gateway_id = get_post_meta( $config_id, '_pronamic_gateway_id', true ); |
| 66 | 66 | |
| 67 | 67 | // Payment methods. |
| 68 | - $sections['payment_methods'] = array( |
|
| 68 | + $sections[ 'payment_methods' ] = array( |
|
| 69 | 69 | 'title' => __( 'Payment Methods', 'pronamic_ideal' ), |
| 70 | 70 | 'methods' => array( |
| 71 | 71 | $gateway_id, |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | ); |
| 107 | 107 | |
| 108 | 108 | // Payment methods. |
| 109 | - $fields[] = array( |
|
| 109 | + $fields[ ] = array( |
|
| 110 | 110 | 'section' => 'payment_methods', |
| 111 | 111 | 'type' => 'html', |
| 112 | 112 | 'callback' => array( $this, 'gateway_payment_methods' ), |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function bulk_actions( $bulk_actions ) { |
| 63 | 63 | // Don't allow edit in bulk. |
| 64 | - unset( $bulk_actions['edit'] ); |
|
| 64 | + unset( $bulk_actions[ 'edit' ] ); |
|
| 65 | 65 | |
| 66 | 66 | // Bulk check payment status. |
| 67 | - $bulk_actions['pronamic_payment_check_status'] = __( 'Check Payment Status', 'pronamic_ideal' ); |
|
| 67 | + $bulk_actions[ 'pronamic_payment_check_status' ] = __( 'Check Payment Status', 'pronamic_ideal' ); |
|
| 68 | 68 | |
| 69 | 69 | return $bulk_actions; |
| 70 | 70 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $gateways[ $config_id ] = \Pronamic\WordPress\Pay\Plugin::get_gateway( $config_id ); |
| 107 | 107 | |
| 108 | 108 | if ( $gateways[ $config_id ] && ! $gateways[ $config_id ]->supports( 'payment_status_request' ) ) { |
| 109 | - $unsupported_gateways[] = $config_id; |
|
| 109 | + $unsupported_gateways[ ] = $config_id; |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |