@@ -14,35 +14,35 @@ discard block |
||
| 14 | 14 | use Pronamic\WordPress\Pay\Gateways\IDeal_Basic\Gateway as IDeal_Basic_Gateway; |
| 15 | 15 | use Pronamic\WordPress\Pay\Plugin; |
| 16 | 16 | |
| 17 | -$gateway = Plugin::get_gateway( get_the_ID() ); |
|
| 17 | +$gateway = Plugin::get_gateway(get_the_ID()); |
|
| 18 | 18 | |
| 19 | -if ( $gateway ) { |
|
| 20 | - wp_nonce_field( 'test_pay_gateway', 'pronamic_pay_test_nonce' ); |
|
| 19 | +if ($gateway) { |
|
| 20 | + wp_nonce_field('test_pay_gateway', 'pronamic_pay_test_nonce'); |
|
| 21 | 21 | |
| 22 | 22 | $is_ideal = false; |
| 23 | 23 | $is_ideal |= $gateway instanceof IDeal_Basic_Gateway; |
| 24 | 24 | $is_ideal |= $gateway instanceof IDeal_Advanced_V3_Gateway; |
| 25 | 25 | |
| 26 | 26 | // Payment method selector. |
| 27 | - $payment_methods = $gateway->get_payment_method_field( true ); |
|
| 27 | + $payment_methods = $gateway->get_payment_method_field(true); |
|
| 28 | 28 | |
| 29 | 29 | $inputs = array(); |
| 30 | 30 | |
| 31 | - foreach ( $payment_methods['choices'][0]['options'] as $payment_method => $method_name ) { |
|
| 32 | - $gateway->set_payment_method( $payment_method ); |
|
| 31 | + foreach ($payment_methods['choices'][0]['options'] as $payment_method => $method_name) { |
|
| 32 | + $gateway->set_payment_method($payment_method); |
|
| 33 | 33 | |
| 34 | 34 | // Payment method input HTML. |
| 35 | 35 | $html = $gateway->get_input_html(); |
| 36 | 36 | |
| 37 | - if ( ! empty( $html ) ) { |
|
| 38 | - $inputs[ $payment_method ] = array( |
|
| 37 | + if ( ! empty($html)) { |
|
| 38 | + $inputs[$payment_method] = array( |
|
| 39 | 39 | 'label' => $method_name, |
| 40 | 40 | 'html' => $html, |
| 41 | 41 | ); |
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if ( $gateway->has_error() ) { |
|
| 45 | + if ($gateway->has_error()) { |
|
| 46 | 46 | $pronamic_ideal_errors[] = $gateway->get_error(); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -53,18 +53,18 @@ discard block |
||
| 53 | 53 | <tr> |
| 54 | 54 | <th scope="row"> |
| 55 | 55 | <label for="pronamic-pay-test-payment-methods"> |
| 56 | - <?php esc_html_e( 'Payment Method', 'pronamic_ideal' ); ?> |
|
| 56 | + <?php esc_html_e('Payment Method', 'pronamic_ideal'); ?> |
|
| 57 | 57 | </label> |
| 58 | 58 | </th> |
| 59 | 59 | <td> |
| 60 | 60 | <select id="pronamic-pay-test-payment-methods" name="pronamic_pay_test_payment_method"> |
| 61 | 61 | <?php |
| 62 | 62 | |
| 63 | - foreach ( $payment_methods['choices'][0]['options'] as $payment_method => $method_name ) { |
|
| 63 | + foreach ($payment_methods['choices'][0]['options'] as $payment_method => $method_name) { |
|
| 64 | 64 | printf( |
| 65 | 65 | '<option value="%s">%s</option>', |
| 66 | - esc_attr( $payment_method ), |
|
| 67 | - esc_html( $method_name ) |
|
| 66 | + esc_attr($payment_method), |
|
| 67 | + esc_html($method_name) |
|
| 68 | 68 | ); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -73,11 +73,11 @@ discard block |
||
| 73 | 73 | </td> |
| 74 | 74 | </tr> |
| 75 | 75 | |
| 76 | - <?php foreach ( $inputs as $method => $input ) : ?> |
|
| 76 | + <?php foreach ($inputs as $method => $input) : ?> |
|
| 77 | 77 | |
| 78 | - <tr class="pronamic-pay-cloack pronamic-pay-test-payment-method <?php echo esc_attr( $method ); ?>"> |
|
| 78 | + <tr class="pronamic-pay-cloack pronamic-pay-test-payment-method <?php echo esc_attr($method); ?>"> |
|
| 79 | 79 | <th scope="row"> |
| 80 | - <?php echo esc_html( $input['label'] ); ?> |
|
| 80 | + <?php echo esc_html($input['label']); ?> |
|
| 81 | 81 | </th> |
| 82 | 82 | <td> |
| 83 | 83 | <?php |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | <tr> |
| 94 | 94 | <th scope="row"> |
| 95 | - <?php esc_html_e( 'Amount', 'pronamic_ideal' ); ?> |
|
| 95 | + <?php esc_html_e('Amount', 'pronamic_ideal'); ?> |
|
| 96 | 96 | </th> |
| 97 | 97 | <td> |
| 98 | 98 | <label for="test_amount">€</label> |
@@ -101,39 +101,39 @@ discard block |
||
| 101 | 101 | </td> |
| 102 | 102 | </tr> |
| 103 | 103 | |
| 104 | - <?php if ( $gateway->supports( 'recurring' ) ) : ?> |
|
| 104 | + <?php if ($gateway->supports('recurring')) : ?> |
|
| 105 | 105 | |
| 106 | 106 | <?php |
| 107 | 107 | |
| 108 | 108 | $options = array( |
| 109 | - '' => __( '— Select Repeat —', 'pronamic_ideal' ), |
|
| 110 | - 'daily' => __( 'Daily', 'pronamic_ideal' ), |
|
| 111 | - 'weekly' => __( 'Weekly', 'pronamic_ideal' ), |
|
| 112 | - 'monthly' => __( 'Monthly', 'pronamic_ideal' ), |
|
| 113 | - 'annually' => __( 'Annually', 'pronamic_ideal' ), |
|
| 109 | + '' => __('— Select Repeat —', 'pronamic_ideal'), |
|
| 110 | + 'daily' => __('Daily', 'pronamic_ideal'), |
|
| 111 | + 'weekly' => __('Weekly', 'pronamic_ideal'), |
|
| 112 | + 'monthly' => __('Monthly', 'pronamic_ideal'), |
|
| 113 | + 'annually' => __('Annually', 'pronamic_ideal'), |
|
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | 116 | $options_interval_suffix = array( |
| 117 | - 'daily' => __( 'days', 'pronamic_ideal' ), |
|
| 118 | - 'weekly' => __( 'weeks', 'pronamic_ideal' ), |
|
| 119 | - 'monthly' => __( 'months', 'pronamic_ideal' ), |
|
| 120 | - 'annually' => __( 'year', 'pronamic_ideal' ), |
|
| 117 | + 'daily' => __('days', 'pronamic_ideal'), |
|
| 118 | + 'weekly' => __('weeks', 'pronamic_ideal'), |
|
| 119 | + 'monthly' => __('months', 'pronamic_ideal'), |
|
| 120 | + 'annually' => __('year', 'pronamic_ideal'), |
|
| 121 | 121 | ); |
| 122 | 122 | |
| 123 | 123 | ?> |
| 124 | 124 | <tr> |
| 125 | 125 | <th scope="row"> |
| 126 | 126 | <label for="pronamic-pay-test-subscription"> |
| 127 | - <?php esc_html_e( 'Subscription', 'pronamic_ideal' ); ?> |
|
| 127 | + <?php esc_html_e('Subscription', 'pronamic_ideal'); ?> |
|
| 128 | 128 | </label> |
| 129 | 129 | </th> |
| 130 | 130 | <td> |
| 131 | 131 | <fieldset> |
| 132 | - <legend class="screen-reader-text"><span><?php esc_html_e( 'Test Subscription', 'pronamic_ideal' ); ?></span></legend> |
|
| 132 | + <legend class="screen-reader-text"><span><?php esc_html_e('Test Subscription', 'pronamic_ideal'); ?></span></legend> |
|
| 133 | 133 | |
| 134 | 134 | <label for="pronamic-pay-test-subscription"> |
| 135 | 135 | <input name="pronamic_pay_test_subscription" id="pronamic-pay-test-subscription" value="1" type="checkbox" /> |
| 136 | - <?php esc_html_e( 'Start a subscription for this payment.', 'pronamic_ideal' ); ?> |
|
| 136 | + <?php esc_html_e('Start a subscription for this payment.', 'pronamic_ideal'); ?> |
|
| 137 | 137 | </label> |
| 138 | 138 | </fieldset> |
| 139 | 139 | |
@@ -148,24 +148,24 @@ discard block |
||
| 148 | 148 | </tr> |
| 149 | 149 | <tr class="pronamic-pay-cloack pronamic-pay-test-subscription"> |
| 150 | 150 | <th scope="row"> |
| 151 | - <label for="pronamic_pay_test_repeat_frequency"><?php esc_html_e( 'Frequency', 'pronamic_ideal' ); ?></label> |
|
| 151 | + <label for="pronamic_pay_test_repeat_frequency"><?php esc_html_e('Frequency', 'pronamic_ideal'); ?></label> |
|
| 152 | 152 | </th> |
| 153 | 153 | <td> |
| 154 | 154 | <select id="pronamic_pay_test_repeat_frequency" name="pronamic_pay_test_repeat_frequency"> |
| 155 | 155 | <?php |
| 156 | 156 | |
| 157 | - foreach ( $options as $key => $label ) { |
|
| 157 | + foreach ($options as $key => $label) { |
|
| 158 | 158 | $interval_suffix = ''; |
| 159 | 159 | |
| 160 | - if ( isset( $options_interval_suffix[ $key ] ) ) { |
|
| 161 | - $interval_suffix = $options_interval_suffix[ $key ]; |
|
| 160 | + if (isset($options_interval_suffix[$key])) { |
|
| 161 | + $interval_suffix = $options_interval_suffix[$key]; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | printf( |
| 165 | 165 | '<option value="%s" data-interval-suffix="%s">%s</option>', |
| 166 | - esc_attr( $key ), |
|
| 167 | - esc_attr( $interval_suffix ), |
|
| 168 | - esc_html( $label ) |
|
| 166 | + esc_attr($key), |
|
| 167 | + esc_attr($interval_suffix), |
|
| 168 | + esc_html($label) |
|
| 169 | 169 | ); |
| 170 | 170 | } |
| 171 | 171 | |
@@ -175,40 +175,40 @@ discard block |
||
| 175 | 175 | </tr> |
| 176 | 176 | <tr class="pronamic-pay-cloack pronamic-pay-test-subscription"> |
| 177 | 177 | <th scope="row"> |
| 178 | - <label for="pronamic_pay_test_repeat_interval"><?php esc_html_e( 'Repeat every', 'pronamic_ideal' ); ?></label> |
|
| 178 | + <label for="pronamic_pay_test_repeat_interval"><?php esc_html_e('Repeat every', 'pronamic_ideal'); ?></label> |
|
| 179 | 179 | </th> |
| 180 | 180 | <td> |
| 181 | 181 | <select id="pronamic_pay_test_repeat_interval" name="pronamic_pay_test_repeat_interval"> |
| 182 | 182 | <?php |
| 183 | 183 | |
| 184 | - foreach ( range( 1, 30 ) as $value ) { |
|
| 184 | + foreach (range(1, 30) as $value) { |
|
| 185 | 185 | printf( |
| 186 | 186 | '<option value="%s">%s</option>', |
| 187 | - esc_attr( $value ), |
|
| 188 | - esc_html( $value ) |
|
| 187 | + esc_attr($value), |
|
| 188 | + esc_html($value) |
|
| 189 | 189 | ); |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | ?> |
| 193 | 193 | </select> |
| 194 | 194 | |
| 195 | - <span id="pronamic_pay_test_repeat_interval_suffix"><?php esc_html_e( 'days/weeks/months/year', 'pronamic_ideal' ); ?></span> |
|
| 195 | + <span id="pronamic_pay_test_repeat_interval_suffix"><?php esc_html_e('days/weeks/months/year', 'pronamic_ideal'); ?></span> |
|
| 196 | 196 | </td> |
| 197 | 197 | </tr> |
| 198 | 198 | <tr class="pronamic-pay-cloack pronamic-pay-test-subscription"> |
| 199 | 199 | <th scope="row"> |
| 200 | - <?php esc_html_e( 'Ends On', 'pronamic_ideal' ); ?> |
|
| 200 | + <?php esc_html_e('Ends On', 'pronamic_ideal'); ?> |
|
| 201 | 201 | </th> |
| 202 | 202 | <td> |
| 203 | 203 | <div> |
| 204 | - <input type="radio" name="pronamic_pay_ends_on" value="never" <?php checked( 'never', '' ); ?> /> |
|
| 204 | + <input type="radio" name="pronamic_pay_ends_on" value="never" <?php checked('never', ''); ?> /> |
|
| 205 | 205 | |
| 206 | - <?php esc_html_e( 'Never', 'pronamic_ideal' ); ?> |
|
| 206 | + <?php esc_html_e('Never', 'pronamic_ideal'); ?> |
|
| 207 | 207 | |
| 208 | 208 | <input type="number" name="pronamic_pay_ends_on_never" value="1" style="visibility: hidden;" /> |
| 209 | 209 | </div> |
| 210 | 210 | <div> |
| 211 | - <input type="radio" name="pronamic_pay_ends_on" value="count" <?php checked( 'count', '' ); ?> /> |
|
| 211 | + <input type="radio" name="pronamic_pay_ends_on" value="count" <?php checked('count', ''); ?> /> |
|
| 212 | 212 | |
| 213 | 213 | <?php |
| 214 | 214 | |
@@ -225,8 +225,8 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | echo wp_kses( |
| 227 | 227 | sprintf( |
| 228 | - __( 'After %s times', 'pronamic_ideal' ), |
|
| 229 | - sprintf( '<input type="number" name="pronamic_pay_ends_on_count" value="%s" min="1" />', esc_attr( '' ) ) |
|
| 228 | + __('After %s times', 'pronamic_ideal'), |
|
| 229 | + sprintf('<input type="number" name="pronamic_pay_ends_on_count" value="%s" min="1" />', esc_attr('')) |
|
| 230 | 230 | ), |
| 231 | 231 | $allowed_html |
| 232 | 232 | ); |
@@ -240,8 +240,8 @@ discard block |
||
| 240 | 240 | <?php |
| 241 | 241 | echo wp_kses( |
| 242 | 242 | sprintf( |
| 243 | - __( 'On %s', 'pronamic_ideal' ), |
|
| 244 | - sprintf( '<input type="date" id="pronamic_pay_ends_on_date" name="pronamic_pay_ends_on_date" value="%s" />', esc_attr( '' ) ) |
|
| 243 | + __('On %s', 'pronamic_ideal'), |
|
| 244 | + sprintf('<input type="date" id="pronamic_pay_ends_on_date" name="pronamic_pay_ends_on_date" value="%s" />', esc_attr('')) |
|
| 245 | 245 | ), |
| 246 | 246 | $allowed_html |
| 247 | 247 | ); |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | |
| 258 | 258 | </td> |
| 259 | 259 | <td> |
| 260 | - <?php submit_button( __( 'Test', 'pronamic_ideal' ), 'secondary', 'test_pay_gateway', false ); ?> |
|
| 260 | + <?php submit_button(__('Test', 'pronamic_ideal'), 'secondary', 'test_pay_gateway', false); ?> |
|
| 261 | 261 | </td> |
| 262 | 262 | </tr> |
| 263 | 263 | |
@@ -280,12 +280,12 @@ discard block |
||
| 280 | 280 | |
| 281 | 281 | <?php |
| 282 | 282 | |
| 283 | - if ( $is_ideal || $gateway instanceof \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Gateway ) { |
|
| 283 | + if ($is_ideal || $gateway instanceof \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Gateway) { |
|
| 284 | 284 | include Plugin::$dirname . '/views/ideal-test-cases.php'; |
| 285 | 285 | } |
| 286 | 286 | } else { |
| 287 | 287 | printf( |
| 288 | 288 | '<em>%s</em>', |
| 289 | - esc_html( __( 'Please save the entered account details of your payment provider, to make a test payment.', 'pronamic_ideal' ) ) |
|
| 289 | + esc_html(__('Please save the entered account details of your payment provider, to make a test payment.', 'pronamic_ideal')) |
|
| 290 | 290 | ); |
| 291 | 291 | } |
@@ -16,24 +16,24 @@ |
||
| 16 | 16 | 'page' => 'pronamic_ideal', |
| 17 | 17 | 'pronamic_pay_update_db' => true, |
| 18 | 18 | ), |
| 19 | - admin_url( 'admin.php' ) |
|
| 19 | + admin_url('admin.php') |
|
| 20 | 20 | ), 'pronamic_pay_update_db', 'pronamic_pay_nonce' |
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | 23 | ?> |
| 24 | 24 | <div class="updated"> |
| 25 | 25 | <p> |
| 26 | - <strong><?php esc_html_e( 'Pronamic Pay Data Update Required', 'pronamic_ideal' ); ?></strong> – |
|
| 27 | - <?php esc_html_e( 'We just need to update your install to the latest version', 'pronamic_ideal' ); ?> |
|
| 26 | + <strong><?php esc_html_e('Pronamic Pay Data Update Required', 'pronamic_ideal'); ?></strong> – |
|
| 27 | + <?php esc_html_e('We just need to update your install to the latest version', 'pronamic_ideal'); ?> |
|
| 28 | 28 | </p> |
| 29 | 29 | |
| 30 | 30 | <p class="submit"> |
| 31 | - <a href="<?php echo esc_attr( $update_link ); ?>" class="pp-update-now button-primary"><?php esc_html_e( 'Run the updater', 'pronamic_ideal' ); ?></a> |
|
| 31 | + <a href="<?php echo esc_attr($update_link); ?>" class="pp-update-now button-primary"><?php esc_html_e('Run the updater', 'pronamic_ideal'); ?></a> |
|
| 32 | 32 | </p> |
| 33 | 33 | </div> |
| 34 | 34 | |
| 35 | 35 | <script type="text/javascript"> |
| 36 | 36 | jQuery( '.pp-update-now' ).click( 'click', function() { |
| 37 | - return window.confirm( '<?php echo esc_js( __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'pronamic_ideal' ) ); ?>' ); |
|
| 37 | + return window.confirm( '<?php echo esc_js(__('It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'pronamic_ideal')); ?>' ); |
|
| 38 | 38 | }); |
| 39 | 39 | </script> |
@@ -19,39 +19,39 @@ |
||
| 19 | 19 | <table class="widefat fixed comments comments-box" cellspacing="0"> |
| 20 | 20 | <tbody> |
| 21 | 21 | |
| 22 | - <?php if ( empty( $comments ) ) : ?> |
|
| 22 | + <?php if (empty($comments)) : ?> |
|
| 23 | 23 | |
| 24 | 24 | <tr class="no-items"> |
| 25 | 25 | <td> |
| 26 | - <?php esc_html_e( 'No logs found.', 'pronamic_ideal' ); ?> |
|
| 26 | + <?php esc_html_e('No logs found.', 'pronamic_ideal'); ?> |
|
| 27 | 27 | </td> |
| 28 | 28 | </tr> |
| 29 | 29 | |
| 30 | 30 | <?php else : ?> |
| 31 | 31 | |
| 32 | - <?php foreach ( $comments as $comment ) : ?> |
|
| 32 | + <?php foreach ($comments as $comment) : ?> |
|
| 33 | 33 | |
| 34 | 34 | <?php |
| 35 | 35 | |
| 36 | 36 | $html_id = 'comment-' . $comment->comment_ID; |
| 37 | - $html_class = join( ' ', get_comment_class( wp_get_comment_status( $comment->comment_ID ) ) ); |
|
| 37 | + $html_class = join(' ', get_comment_class(wp_get_comment_status($comment->comment_ID))); |
|
| 38 | 38 | |
| 39 | 39 | ?> |
| 40 | - <tr id="<?php esc_attr( $html_id ); ?>" class="<?php esc_attr( $html_class ); ?>"> |
|
| 40 | + <tr id="<?php esc_attr($html_id); ?>" class="<?php esc_attr($html_class); ?>"> |
|
| 41 | 41 | <td> |
| 42 | 42 | <?php |
| 43 | 43 | |
| 44 | 44 | printf( |
| 45 | - esc_html__( '%1$s at %2$s', 'pronamic_ideal' ), |
|
| 45 | + esc_html__('%1$s at %2$s', 'pronamic_ideal'), |
|
| 46 | 46 | /* translators: comment date format. See http://php.net/date */ |
| 47 | - esc_html( get_comment_date( __( 'Y/m/d', 'pronamic_ideal' ), $comment->comment_ID ) ), |
|
| 48 | - esc_html( get_comment_date( get_option( 'time_format' ), $comment->comment_ID ) ) |
|
| 47 | + esc_html(get_comment_date(__('Y/m/d', 'pronamic_ideal'), $comment->comment_ID)), |
|
| 48 | + esc_html(get_comment_date(get_option('time_format'), $comment->comment_ID)) |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | 51 | ?> |
| 52 | 52 | </td> |
| 53 | 53 | <td> |
| 54 | - <?php comment_text( $comment ); ?> |
|
| 54 | + <?php comment_text($comment); ?> |
|
| 55 | 55 | </td> |
| 56 | 56 | </tr> |
| 57 | 57 | |
@@ -27,13 +27,15 @@ |
||
| 27 | 27 | </td> |
| 28 | 28 | </tr> |
| 29 | 29 | |
| 30 | - <?php else : ?> |
|
| 30 | + <?php else { |
|
| 31 | + : ?> |
|
| 31 | 32 | |
| 32 | 33 | <?php foreach ( $comments as $comment ) : ?> |
| 33 | 34 | |
| 34 | 35 | <?php |
| 35 | 36 | |
| 36 | 37 | $html_id = 'comment-' . $comment->comment_ID; |
| 38 | +} |
|
| 37 | 39 | $html_class = join( ' ', get_comment_class( wp_get_comment_status( $comment->comment_ID ) ) ); |
| 38 | 40 | |
| 39 | 41 | ?> |
@@ -8,12 +8,12 @@ discard block |
||
| 8 | 8 | * @package Pronamic\WordPress\Pay |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -?><h2><?php esc_html_e( 'Supported extensions', 'pronamic_ideal' ); ?></h2> |
|
| 11 | +?><h2><?php esc_html_e('Supported extensions', 'pronamic_ideal'); ?></h2> |
|
| 12 | 12 | |
| 13 | 13 | <?php |
| 14 | 14 | |
| 15 | -$data = file_get_contents( __DIR__ . '/../other/extensions.json' ); |
|
| 16 | -$extensions = json_decode( $data ); |
|
| 15 | +$data = file_get_contents(__DIR__ . '/../other/extensions.json'); |
|
| 16 | +$extensions = json_decode($data); |
|
| 17 | 17 | |
| 18 | 18 | ?> |
| 19 | 19 | |
@@ -21,16 +21,16 @@ discard block |
||
| 21 | 21 | <thead> |
| 22 | 22 | <tr> |
| 23 | 23 | <th scope="col"> |
| 24 | - <?php esc_html_e( 'Name', 'pronamic_ideal' ); ?> |
|
| 24 | + <?php esc_html_e('Name', 'pronamic_ideal'); ?> |
|
| 25 | 25 | </th> |
| 26 | 26 | <th scope="col"> |
| 27 | - <?php esc_html_e( 'Author', 'pronamic_ideal' ); ?> |
|
| 27 | + <?php esc_html_e('Author', 'pronamic_ideal'); ?> |
|
| 28 | 28 | </th> |
| 29 | 29 | <th scope="col"> |
| 30 | - <?php esc_html_e( 'WordPress.org', 'pronamic_ideal' ); ?> |
|
| 30 | + <?php esc_html_e('WordPress.org', 'pronamic_ideal'); ?> |
|
| 31 | 31 | </th> |
| 32 | 32 | <th scope="col"> |
| 33 | - <?php esc_html_e( 'Requires at least', 'pronamic_ideal' ); ?> |
|
| 33 | + <?php esc_html_e('Requires at least', 'pronamic_ideal'); ?> |
|
| 34 | 34 | </th> |
| 35 | 35 | </tr> |
| 36 | 36 | </thead> |
@@ -41,26 +41,26 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $alternate = false; |
| 43 | 43 | |
| 44 | - foreach ( $extensions as $extension ) : |
|
| 44 | + foreach ($extensions as $extension) : |
|
| 45 | 45 | |
| 46 | 46 | ?> |
| 47 | 47 | |
| 48 | 48 | <?php $alternate = ! $alternate; ?> |
| 49 | 49 | |
| 50 | - <tr<?php if ( $alternate ) : ?> class="alternate"<?php endif; ?>> |
|
| 50 | + <tr<?php if ($alternate) : ?> class="alternate"<?php endif; ?>> |
|
| 51 | 51 | <td> |
| 52 | - <a href="<?php echo esc_attr( $extension->url ); ?>" target="_blank"> |
|
| 53 | - <?php echo esc_html( $extension->name ); ?> |
|
| 52 | + <a href="<?php echo esc_attr($extension->url); ?>" target="_blank"> |
|
| 53 | + <?php echo esc_html($extension->name); ?> |
|
| 54 | 54 | </a> |
| 55 | 55 | </td> |
| 56 | 56 | <td> |
| 57 | 57 | <?php |
| 58 | 58 | |
| 59 | - if ( isset( $extension->author, $extension->author_url ) ) { |
|
| 59 | + if (isset($extension->author, $extension->author_url)) { |
|
| 60 | 60 | printf( |
| 61 | 61 | '<a href="%s" target="_blank">%s</a>', |
| 62 | - esc_attr( $extension->author_url ), |
|
| 63 | - esc_html( $extension->author ) |
|
| 62 | + esc_attr($extension->author_url), |
|
| 63 | + esc_html($extension->author) |
|
| 64 | 64 | ); |
| 65 | 65 | } |
| 66 | 66 | |
@@ -69,11 +69,11 @@ discard block |
||
| 69 | 69 | <td> |
| 70 | 70 | <?php |
| 71 | 71 | |
| 72 | - if ( isset( $extension->wp_org_url ) ) { |
|
| 72 | + if (isset($extension->wp_org_url)) { |
|
| 73 | 73 | printf( |
| 74 | 74 | '<a href="%s" target="_blank">%s</a>', |
| 75 | - esc_attr( $extension->wp_org_url ), |
|
| 76 | - esc_html( $extension->wp_org_url ) |
|
| 75 | + esc_attr($extension->wp_org_url), |
|
| 76 | + esc_html($extension->wp_org_url) |
|
| 77 | 77 | ); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | <td> |
| 83 | 83 | <?php |
| 84 | 84 | |
| 85 | - if ( isset( $extension->requires_at_least ) ) { |
|
| 86 | - echo esc_html( $extension->requires_at_least ); |
|
| 85 | + if (isset($extension->requires_at_least)) { |
|
| 86 | + echo esc_html($extension->requires_at_least); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | ?> |
@@ -8,100 +8,100 @@ |
||
| 8 | 8 | * @package Pronamic\WordPress\Pay |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
|
| 11 | +if ( ! defined('WP_UNINSTALL_PLUGIN')) { |
|
| 12 | 12 | exit; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | global $wpdb; |
| 16 | 16 | |
| 17 | -if ( '1' !== get_option( 'pronamic_pay_uninstall_clear_data', false ) ) { |
|
| 17 | +if ('1' !== get_option('pronamic_pay_uninstall_clear_data', false)) { |
|
| 18 | 18 | return; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | // Delete tables. |
| 22 | -$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}pronamic_ideal_configurations" ); |
|
| 23 | -$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}pronamic_ideal_payments" ); |
|
| 24 | -$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}rg_ideal_feeds" ); |
|
| 22 | +$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}pronamic_ideal_configurations"); |
|
| 23 | +$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}pronamic_ideal_payments"); |
|
| 24 | +$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}rg_ideal_feeds"); |
|
| 25 | 25 | |
| 26 | 26 | // Delete posts. |
| 27 | -$wpdb->query( "DELETE FROM wp_posts WHERE post_type = 'pronamic_gateway';" ); |
|
| 28 | -$wpdb->query( "DELETE FROM wp_posts WHERE post_type = 'pronamic_payment';" ); |
|
| 29 | -$wpdb->query( "DELETE FROM wp_posts WHERE post_type = 'pronamic_pay_gf';" ); |
|
| 27 | +$wpdb->query("DELETE FROM wp_posts WHERE post_type = 'pronamic_gateway';"); |
|
| 28 | +$wpdb->query("DELETE FROM wp_posts WHERE post_type = 'pronamic_payment';"); |
|
| 29 | +$wpdb->query("DELETE FROM wp_posts WHERE post_type = 'pronamic_pay_gf';"); |
|
| 30 | 30 | |
| 31 | -$wpdb->query( 'DELETE FROM wp_postmeta WHERE post_id NOT IN ( SELECT ID FROM wp_posts );' ); |
|
| 31 | +$wpdb->query('DELETE FROM wp_postmeta WHERE post_id NOT IN ( SELECT ID FROM wp_posts );'); |
|
| 32 | 32 | |
| 33 | 33 | // Delete general options. |
| 34 | -delete_option( 'pronamic_pay_version' ); |
|
| 35 | -delete_option( 'pronamic_pay_db_version' ); |
|
| 34 | +delete_option('pronamic_pay_version'); |
|
| 35 | +delete_option('pronamic_pay_db_version'); |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * Delete extension options. |
| 39 | 39 | */ |
| 40 | 40 | |
| 41 | 41 | // Event Espresso. |
| 42 | -delete_option( 'pronamic_pay_ideal_event_espreso_config_id' ); |
|
| 42 | +delete_option('pronamic_pay_ideal_event_espreso_config_id'); |
|
| 43 | 43 | |
| 44 | 44 | // Gravity Forms. |
| 45 | 45 | // There are options for Gravity Forms. |
| 46 | -delete_option( '' ); |
|
| 46 | +delete_option(''); |
|
| 47 | 47 | |
| 48 | 48 | // Jigoshop. |
| 49 | 49 | // Set default Jigoshop variables, load them form the WordPress options. |
| 50 | -delete_option( 'pronamic_pay_ideal_jigoshop_enabled' ); |
|
| 51 | -delete_option( 'pronamic_pay_ideal_jigoshop_title' ); |
|
| 52 | -delete_option( 'pronamic_pay_ideal_jigoshop_description' ); |
|
| 53 | -delete_option( 'pronamic_pay_ideal_jigoshop_config_id' ); |
|
| 50 | +delete_option('pronamic_pay_ideal_jigoshop_enabled'); |
|
| 51 | +delete_option('pronamic_pay_ideal_jigoshop_title'); |
|
| 52 | +delete_option('pronamic_pay_ideal_jigoshop_description'); |
|
| 53 | +delete_option('pronamic_pay_ideal_jigoshop_config_id'); |
|
| 54 | 54 | |
| 55 | 55 | // Membership. |
| 56 | -delete_option( 'pronamic_pay_ideal_membership_config_id' ); |
|
| 56 | +delete_option('pronamic_pay_ideal_membership_config_id'); |
|
| 57 | 57 | |
| 58 | 58 | // s2Member®. |
| 59 | -delete_option( 'pronamic_pay_ideal_s2member_config_id' ); |
|
| 59 | +delete_option('pronamic_pay_ideal_s2member_config_id'); |
|
| 60 | 60 | |
| 61 | 61 | // Shopp. |
| 62 | 62 | // Shopp options are stored in the Shopp meta table, we don't touch this. |
| 63 | -delete_option( '' ); |
|
| 63 | +delete_option(''); |
|
| 64 | 64 | |
| 65 | 65 | // WooCommerce. |
| 66 | -delete_option( 'woocommerce_pronamic_pay_ideal_settings' ); |
|
| 66 | +delete_option('woocommerce_pronamic_pay_ideal_settings'); |
|
| 67 | 67 | |
| 68 | 68 | // WP e-Commerce. |
| 69 | -delete_option( 'pronamic_pay_ideal_wpsc_config_id' ); |
|
| 69 | +delete_option('pronamic_pay_ideal_wpsc_config_id'); |
|
| 70 | 70 | |
| 71 | 71 | // ClassiPress. |
| 72 | -delete_option( '' ); |
|
| 72 | +delete_option(''); |
|
| 73 | 73 | |
| 74 | 74 | // JobRoller. |
| 75 | -delete_option( '' ); |
|
| 75 | +delete_option(''); |
|
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | 78 | * Delete legacy options. |
| 79 | 79 | */ |
| 80 | 80 | |
| 81 | 81 | // General. |
| 82 | -delete_option( 'pronamic_ideal_version' ); |
|
| 83 | -delete_option( 'pronamic_ideal_key' ); |
|
| 84 | -delete_option( 'gf_ideal_version' ); |
|
| 82 | +delete_option('pronamic_ideal_version'); |
|
| 83 | +delete_option('pronamic_ideal_key'); |
|
| 84 | +delete_option('gf_ideal_version'); |
|
| 85 | 85 | |
| 86 | 86 | // Event Espresso. |
| 87 | -delete_option( 'pronamic_ideal_event_espresso_configuration_id' ); |
|
| 87 | +delete_option('pronamic_ideal_event_espresso_configuration_id'); |
|
| 88 | 88 | |
| 89 | 89 | // Jigoshop. |
| 90 | -delete_option( 'jigoshop_pronamic_ideal_enabled' ); |
|
| 91 | -delete_option( 'jigoshop_pronamic_ideal_title' ); |
|
| 92 | -delete_option( 'jigoshop_pronamic_ideal_description' ); |
|
| 93 | -delete_option( 'jigoshop_pronamic_ideal_configuration_id' ); |
|
| 90 | +delete_option('jigoshop_pronamic_ideal_enabled'); |
|
| 91 | +delete_option('jigoshop_pronamic_ideal_title'); |
|
| 92 | +delete_option('jigoshop_pronamic_ideal_description'); |
|
| 93 | +delete_option('jigoshop_pronamic_ideal_configuration_id'); |
|
| 94 | 94 | |
| 95 | 95 | // Membership. |
| 96 | -delete_option( 'pronamic_ideal_membership_enabled' ); |
|
| 97 | -delete_option( 'pronamic_ideal_membership_chosen_configuration' ); |
|
| 96 | +delete_option('pronamic_ideal_membership_enabled'); |
|
| 97 | +delete_option('pronamic_ideal_membership_chosen_configuration'); |
|
| 98 | 98 | |
| 99 | 99 | // s2Member®. |
| 100 | -delete_option( 'pronamic_ideal_s2member_enabled' ); |
|
| 101 | -delete_option( 'pronamic_ideal_s2member_chosen_configuration' ); |
|
| 100 | +delete_option('pronamic_ideal_s2member_enabled'); |
|
| 101 | +delete_option('pronamic_ideal_s2member_chosen_configuration'); |
|
| 102 | 102 | |
| 103 | 103 | // WooCommerce. |
| 104 | -delete_option( 'woocommerce_pronamic_ideal_settings' ); |
|
| 104 | +delete_option('woocommerce_pronamic_ideal_settings'); |
|
| 105 | 105 | |
| 106 | 106 | // WP e-Commerce. |
| 107 | -delete_option( 'pronamic_ideal_wpsc_configuration_id' ); |
|
| 107 | +delete_option('pronamic_ideal_wpsc_configuration_id'); |
|
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * Dependency-checking. |
| 28 | 28 | */ |
| 29 | 29 | function pronamic_pay_deactivate() { |
| 30 | - deactivate_plugins( plugin_basename( __FILE__ ) ); |
|
| 30 | + deactivate_plugins(plugin_basename(__FILE__)); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -36,23 +36,23 @@ discard block |
||
| 36 | 36 | function pronamic_pay_block_activation() { |
| 37 | 37 | $message = sprintf( |
| 38 | 38 | /* translators: 1: http://www.wpupdatephp.com/update/, 2: _blank */ |
| 39 | - __( 'Unfortunately the Pronamic Pay plugin will no longer work correctly in PHP versions older than 5.3. Read more information about <a href="%1$s" target="%2$s">how you can update</a>.', 'pronamic_ideal' ), |
|
| 40 | - esc_attr__( 'http://www.wpupdatephp.com/update/', 'pronamic_ideal' ), |
|
| 41 | - esc_attr( '_blank' ) |
|
| 39 | + __('Unfortunately the Pronamic Pay plugin will no longer work correctly in PHP versions older than 5.3. Read more information about <a href="%1$s" target="%2$s">how you can update</a>.', 'pronamic_ideal'), |
|
| 40 | + esc_attr__('http://www.wpupdatephp.com/update/', 'pronamic_ideal'), |
|
| 41 | + esc_attr('_blank') |
|
| 42 | 42 | ); |
| 43 | 43 | |
| 44 | - wp_die( wp_kses( $message, array( |
|
| 44 | + wp_die(wp_kses($message, array( |
|
| 45 | 45 | 'a' => array( |
| 46 | 46 | 'href' => true, |
| 47 | 47 | 'target' => true, |
| 48 | 48 | ), |
| 49 | - ) ) ); |
|
| 49 | + ))); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | -if ( version_compare( PHP_VERSION, '5.3', '<' ) ) { |
|
| 53 | - register_activation_hook( __FILE__, 'pronamic_pay_block_activation' ); |
|
| 52 | +if (version_compare(PHP_VERSION, '5.3', '<')) { |
|
| 53 | + register_activation_hook(__FILE__, 'pronamic_pay_block_activation'); |
|
| 54 | 54 | |
| 55 | - add_action( 'admin_init', 'pronamic_pay_deactivate' ); |
|
| 55 | + add_action('admin_init', 'pronamic_pay_deactivate'); |
|
| 56 | 56 | |
| 57 | 57 | return; |
| 58 | 58 | } |
@@ -60,19 +60,19 @@ discard block |
||
| 60 | 60 | /** |
| 61 | 61 | * Autoload. |
| 62 | 62 | */ |
| 63 | -$loader = require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; |
|
| 63 | +$loader = require_once plugin_dir_path(__FILE__) . 'vendor/autoload.php'; |
|
| 64 | 64 | |
| 65 | -if ( defined( 'PRONAMIC_PAY_DEBUG' ) && PRONAMIC_PAY_DEBUG ) { |
|
| 66 | - foreach ( glob( __DIR__ . '/repositories/*/*/composer.json' ) as $file ) { |
|
| 67 | - $content = file_get_contents( $file ); |
|
| 65 | +if (defined('PRONAMIC_PAY_DEBUG') && PRONAMIC_PAY_DEBUG) { |
|
| 66 | + foreach (glob(__DIR__ . '/repositories/*/*/composer.json') as $file) { |
|
| 67 | + $content = file_get_contents($file); |
|
| 68 | 68 | |
| 69 | - $object = json_decode( $content ); |
|
| 69 | + $object = json_decode($content); |
|
| 70 | 70 | |
| 71 | - if ( isset( $object->autoload ) ) { |
|
| 72 | - foreach ( $object->autoload as $type => $map ) { |
|
| 73 | - if ( 'psr-4' === $type ) { |
|
| 74 | - foreach ( $map as $prefix => $path ) { |
|
| 75 | - $loader->addPsr4( $prefix, dirname( $file ) . '/' . $path, true ); |
|
| 71 | + if (isset($object->autoload)) { |
|
| 72 | + foreach ($object->autoload as $type => $map) { |
|
| 73 | + if ('psr-4' === $type) { |
|
| 74 | + foreach ($map as $prefix => $path) { |
|
| 75 | + $loader->addPsr4($prefix, dirname($file) . '/' . $path, true); |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * Bootstrap. |
| 85 | 85 | */ |
| 86 | -\Pronamic\WordPress\Pay\Plugin::instance( __FILE__ ); |
|
| 86 | +\Pronamic\WordPress\Pay\Plugin::instance(__FILE__); |
|
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | 89 | * Pronamic Pay plugin. |
@@ -10,6 +10,6 @@ |
||
| 10 | 10 | |
| 11 | 11 | global $pronamic_ideal_errors; |
| 12 | 12 | |
| 13 | -foreach ( $pronamic_ideal_errors as $error ) { |
|
| 13 | +foreach ($pronamic_ideal_errors as $error) { |
|
| 14 | 14 | include 'error.php'; |
| 15 | 15 | } |
@@ -12,26 +12,26 @@ |
||
| 12 | 12 | |
| 13 | 13 | ?> |
| 14 | 14 | <fieldset> |
| 15 | - <?php $eshop_metabox_plugin->show_img( 'pronamic_ideal' ); ?> |
|
| 15 | + <?php $eshop_metabox_plugin->show_img('pronamic_ideal'); ?> |
|
| 16 | 16 | |
| 17 | 17 | <p class="cbox"> |
| 18 | - <input id="eshop_method_pronamic_ideal" name="eshop_method[]" type="checkbox" value="pronamic_ideal" <?php checked( in_array( 'pronamic_ideal', (array) $eshopoptions['method'], true ) ); ?> /> |
|
| 18 | + <input id="eshop_method_pronamic_ideal" name="eshop_method[]" type="checkbox" value="pronamic_ideal" <?php checked(in_array('pronamic_ideal', (array) $eshopoptions['method'], true)); ?> /> |
|
| 19 | 19 | |
| 20 | 20 | <label for="eshop_method_pronamic_ideal" class="eshopmethod"> |
| 21 | - <?php esc_html_e( 'Accept payment by iDEAL', 'pronamic_ideal' ); ?> |
|
| 21 | + <?php esc_html_e('Accept payment by iDEAL', 'pronamic_ideal'); ?> |
|
| 22 | 22 | </label> |
| 23 | 23 | </p> |
| 24 | 24 | |
| 25 | 25 | <label for="eshop_pronamic_ideal_config_id"> |
| 26 | - <?php esc_html_e( 'Configuration', 'pronamic_ideal' ); ?> |
|
| 26 | + <?php esc_html_e('Configuration', 'pronamic_ideal'); ?> |
|
| 27 | 27 | </label> |
| 28 | 28 | |
| 29 | 29 | <?php |
| 30 | 30 | |
| 31 | - \Pronamic\WordPress\Pay\Admin\AdminModule::dropdown_configs( array( |
|
| 31 | + \Pronamic\WordPress\Pay\Admin\AdminModule::dropdown_configs(array( |
|
| 32 | 32 | 'name' => 'eshop_pronamic_ideal_config_id', |
| 33 | 33 | 'selected' => @$eshopoptions['pronamic_ideal']['config_id'], |
| 34 | - ) ); |
|
| 34 | + )); |
|
| 35 | 35 | |
| 36 | 36 | ?> |
| 37 | 37 | </fieldset> |
@@ -12,11 +12,11 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | use Pronamic\WordPress\Pay\Plugin; |
| 14 | 14 | |
| 15 | -$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; |
|
| 15 | +$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; |
|
| 16 | 16 | |
| 17 | 17 | wp_register_style( |
| 18 | 18 | 'pronamic-pay-redirect', |
| 19 | - plugins_url( 'css/redirect' . $min . '.css', Plugin::$file ), |
|
| 19 | + plugins_url('css/redirect' . $min . '.css', Plugin::$file), |
|
| 20 | 20 | array(), |
| 21 | 21 | $pronamic_ideal->get_version() |
| 22 | 22 | ); |
@@ -26,11 +26,11 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | <html <?php language_attributes(); ?>> |
| 28 | 28 | <head> |
| 29 | - <meta charset="<?php bloginfo( 'charset' ); ?>" /> |
|
| 29 | + <meta charset="<?php bloginfo('charset'); ?>" /> |
|
| 30 | 30 | |
| 31 | - <title><?php esc_html_e( 'Payment notice', 'pronamic_ideal' ); ?></title> |
|
| 31 | + <title><?php esc_html_e('Payment notice', 'pronamic_ideal'); ?></title> |
|
| 32 | 32 | |
| 33 | - <?php wp_print_styles( 'pronamic-pay-redirect' ); ?> |
|
| 33 | + <?php wp_print_styles('pronamic-pay-redirect'); ?> |
|
| 34 | 34 | </head> |
| 35 | 35 | |
| 36 | 36 | <body> |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | <p> |
| 40 | 40 | <?php |
| 41 | 41 | |
| 42 | - echo wpautop( $redirect_message ); // WPCS: XSS ok. |
|
| 42 | + echo wpautop($redirect_message); // WPCS: XSS ok. |
|
| 43 | 43 | |
| 44 | 44 | ?> |
| 45 | 45 | </p> |