@@ -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> |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | <thead> |
16 | 16 | <tr> |
17 | 17 | <th scope="col"> |
18 | - <?php esc_html_e( 'Order', 'pronamic_ideal' ); ?> |
|
18 | + <?php esc_html_e('Order', 'pronamic_ideal'); ?> |
|
19 | 19 | </th> |
20 | 20 | <th scope="col"> |
21 | - <?php esc_html_e( 'Expected result if integration is correct', 'pronamic_ideal' ); ?> |
|
21 | + <?php esc_html_e('Expected result if integration is correct', 'pronamic_ideal'); ?> |
|
22 | 22 | </th> |
23 | 23 | </tr> |
24 | 24 | </thead> |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | <tbody> |
58 | 58 | |
59 | - <?php foreach ( $test_cases as $test_case => $data ) : ?> |
|
59 | + <?php foreach ($test_cases as $test_case => $data) : ?> |
|
60 | 60 | |
61 | 61 | <tr> |
62 | 62 | <td> |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | echo wp_kses( |
66 | 66 | sprintf( |
67 | 67 | /* translators: %s: formatted amount */ |
68 | - __( 'Transaction with <code>amount</code> = %s:', 'pronamic_ideal' ), |
|
69 | - esc_html( IDeal::format_amount( $data['amount'] ) ) |
|
68 | + __('Transaction with <code>amount</code> = %s:', 'pronamic_ideal'), |
|
69 | + esc_html(IDeal::format_amount($data['amount'])) |
|
70 | 70 | ), |
71 | 71 | array( |
72 | 72 | 'code' => array(), |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ?> |
77 | 77 | </td> |
78 | 78 | <td> |
79 | - <?php echo esc_html( $data['result'] ); ?> |
|
79 | + <?php echo esc_html($data['result']); ?> |
|
80 | 80 | </td> |
81 | 81 | </tr> |
82 | 82 |
@@ -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,18 +26,18 @@ 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( 'Redirecting…', 'pronamic_ideal' ); ?></title> |
|
31 | + <title><?php esc_html_e('Redirecting…', '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 | <?php |
37 | 37 | |
38 | 38 | $auto_submit = true; |
39 | 39 | |
40 | - if ( defined( 'PRONAMIC_PAY_DEBUG' ) && PRONAMIC_PAY_DEBUG ) { |
|
40 | + if (defined('PRONAMIC_PAY_DEBUG') && PRONAMIC_PAY_DEBUG) { |
|
41 | 41 | $auto_submit = false; |
42 | 42 | } |
43 | 43 | |
@@ -45,22 +45,22 @@ discard block |
||
45 | 45 | |
46 | 46 | ?> |
47 | 47 | |
48 | - <body onload="<?php esc_attr( $onload ); ?>"> |
|
48 | + <body onload="<?php esc_attr($onload); ?>"> |
|
49 | 49 | <div class="pronamic-pay-redirect-page"> |
50 | 50 | <div class="pronamic-pay-redirect-container"> |
51 | - <h1><?php esc_html_e( 'Redirecting…', 'pronamic_ideal' ); ?></h1> |
|
51 | + <h1><?php esc_html_e('Redirecting…', 'pronamic_ideal'); ?></h1> |
|
52 | 52 | |
53 | 53 | <p> |
54 | - <?php esc_html_e( 'You will be automatically redirected to the online payment environment.', 'pronamic_ideal' ); ?> |
|
54 | + <?php esc_html_e('You will be automatically redirected to the online payment environment.', 'pronamic_ideal'); ?> |
|
55 | 55 | </p> |
56 | 56 | |
57 | 57 | <p> |
58 | - <?php esc_html_e( 'Please click the button below if you are not automatically redirected.', 'pronamic_ideal' ); ?> |
|
58 | + <?php esc_html_e('Please click the button below if you are not automatically redirected.', 'pronamic_ideal'); ?> |
|
59 | 59 | </p> |
60 | 60 | |
61 | 61 | <?php |
62 | 62 | |
63 | - echo $this->get_form_html( $payment, $auto_submit ); // WPCS: XSS ok. |
|
63 | + echo $this->get_form_html($payment, $auto_submit); // WPCS: XSS ok. |
|
64 | 64 | |
65 | 65 | ?> |
66 | 66 | </div> |
@@ -8,45 +8,45 @@ discard block |
||
8 | 8 | * @package Pronamic\WordPress\Pay |
9 | 9 | */ |
10 | 10 | |
11 | -if ( is_wp_error( $error ) ) : ?> |
|
11 | +if (is_wp_error($error)) : ?> |
|
12 | 12 | |
13 | 13 | <div class="error"> |
14 | 14 | <?php |
15 | 15 | |
16 | - foreach ( $error->get_error_codes() as $code ) { |
|
16 | + foreach ($error->get_error_codes() as $code) { |
|
17 | 17 | ?> |
18 | 18 | <dl> |
19 | - <dt><?php esc_html_e( 'Code', 'pronamic_ideal' ); ?></dt> |
|
20 | - <dd><?php echo esc_html( $code ); ?></dd> |
|
19 | + <dt><?php esc_html_e('Code', 'pronamic_ideal'); ?></dt> |
|
20 | + <dd><?php echo esc_html($code); ?></dd> |
|
21 | 21 | |
22 | - <dt><?php esc_html_e( 'Message', 'pronamic_ideal' ); ?></dt> |
|
23 | - <dd><?php echo esc_html( $error->get_error_message( $code ) ); ?></dd> |
|
22 | + <dt><?php esc_html_e('Message', 'pronamic_ideal'); ?></dt> |
|
23 | + <dd><?php echo esc_html($error->get_error_message($code)); ?></dd> |
|
24 | 24 | </dl> |
25 | 25 | |
26 | 26 | <?php |
27 | 27 | |
28 | - if ( 'ideal_advanced_error' === $code ) { |
|
29 | - $ideal_error = $error->get_error_data( $code ); |
|
28 | + if ('ideal_advanced_error' === $code) { |
|
29 | + $ideal_error = $error->get_error_data($code); |
|
30 | 30 | |
31 | - if ( $ideal_error instanceof Pronamic_Gateways_IDealAdvanced_Error ) : |
|
31 | + if ($ideal_error instanceof Pronamic_Gateways_IDealAdvanced_Error) : |
|
32 | 32 | |
33 | 33 | ?> |
34 | 34 | |
35 | 35 | <dl> |
36 | - <dt><?php esc_html_e( 'Code', 'pronamic_ideal' ); ?></dt> |
|
37 | - <dd><?php echo esc_html( $ideal_error->get_code() ); ?></dd> |
|
36 | + <dt><?php esc_html_e('Code', 'pronamic_ideal'); ?></dt> |
|
37 | + <dd><?php echo esc_html($ideal_error->get_code()); ?></dd> |
|
38 | 38 | |
39 | - <dt><?php esc_html_e( 'Message', 'pronamic_ideal' ); ?></dt> |
|
40 | - <dd><?php echo esc_html( $ideal_error->get_message() ); ?></dd> |
|
39 | + <dt><?php esc_html_e('Message', 'pronamic_ideal'); ?></dt> |
|
40 | + <dd><?php echo esc_html($ideal_error->get_message()); ?></dd> |
|
41 | 41 | |
42 | - <dt><?php esc_html_e( 'Detail', 'pronamic_ideal' ); ?></dt> |
|
43 | - <dd><?php echo esc_html( $ideal_error->get_detail() ); ?></dd> |
|
42 | + <dt><?php esc_html_e('Detail', 'pronamic_ideal'); ?></dt> |
|
43 | + <dd><?php echo esc_html($ideal_error->get_detail()); ?></dd> |
|
44 | 44 | |
45 | - <dt><?php esc_html_e( 'Suggested Action', 'pronamic_ideal' ); ?></dt> |
|
46 | - <dd><?php echo esc_html( $ideal_error->get_suggested_action() ); ?></dd> |
|
45 | + <dt><?php esc_html_e('Suggested Action', 'pronamic_ideal'); ?></dt> |
|
46 | + <dd><?php echo esc_html($ideal_error->get_suggested_action()); ?></dd> |
|
47 | 47 | |
48 | - <dt><?php esc_html_e( 'Consumer Message', 'pronamic_ideal' ); ?></dt> |
|
49 | - <dd><?php echo esc_html( $ideal_error->get_consumer_message() ); ?></dd> |
|
48 | + <dt><?php esc_html_e('Consumer Message', 'pronamic_ideal'); ?></dt> |
|
49 | + <dd><?php echo esc_html($ideal_error->get_consumer_message()); ?></dd> |
|
50 | 50 | </dl> |
51 | 51 | |
52 | 52 | <?php |
@@ -54,28 +54,28 @@ discard block |
||
54 | 54 | endif; |
55 | 55 | } |
56 | 56 | |
57 | - if ( 'ideal_advanced_v3_error' === $code ) { |
|
58 | - $ideal_error = $error->get_error_data( $code ); |
|
57 | + if ('ideal_advanced_v3_error' === $code) { |
|
58 | + $ideal_error = $error->get_error_data($code); |
|
59 | 59 | |
60 | - if ( $ideal_error instanceof Pronamic_Gateways_IDealAdvancedV3_Error ) : |
|
60 | + if ($ideal_error instanceof Pronamic_Gateways_IDealAdvancedV3_Error) : |
|
61 | 61 | |
62 | 62 | ?> |
63 | 63 | |
64 | 64 | <dl> |
65 | - <dt><?php esc_html_e( 'Code', 'pronamic_ideal' ); ?></dt> |
|
66 | - <dd><?php echo esc_html( $ideal_error->get_code() ); ?></dd> |
|
65 | + <dt><?php esc_html_e('Code', 'pronamic_ideal'); ?></dt> |
|
66 | + <dd><?php echo esc_html($ideal_error->get_code()); ?></dd> |
|
67 | 67 | |
68 | - <dt><?php esc_html_e( 'Message', 'pronamic_ideal' ); ?></dt> |
|
69 | - <dd><?php echo esc_html( $ideal_error->get_message() ); ?></dd> |
|
68 | + <dt><?php esc_html_e('Message', 'pronamic_ideal'); ?></dt> |
|
69 | + <dd><?php echo esc_html($ideal_error->get_message()); ?></dd> |
|
70 | 70 | |
71 | - <dt><?php esc_html_e( 'Detail', 'pronamic_ideal' ); ?></dt> |
|
72 | - <dd><?php echo esc_html( $ideal_error->get_detail() ); ?></dd> |
|
71 | + <dt><?php esc_html_e('Detail', 'pronamic_ideal'); ?></dt> |
|
72 | + <dd><?php echo esc_html($ideal_error->get_detail()); ?></dd> |
|
73 | 73 | |
74 | - <dt><?php esc_html_e( 'Suggested Action', 'pronamic_ideal' ); ?></dt> |
|
75 | - <dd><?php echo esc_html( $ideal_error->get_suggested_action() ); ?></dd> |
|
74 | + <dt><?php esc_html_e('Suggested Action', 'pronamic_ideal'); ?></dt> |
|
75 | + <dd><?php echo esc_html($ideal_error->get_suggested_action()); ?></dd> |
|
76 | 76 | |
77 | - <dt><?php esc_html_e( 'Consumer Message', 'pronamic_ideal' ); ?></dt> |
|
78 | - <dd><?php echo esc_html( $ideal_error->get_consumer_message() ); ?></dd> |
|
77 | + <dt><?php esc_html_e('Consumer Message', 'pronamic_ideal'); ?></dt> |
|
78 | + <dd><?php echo esc_html($ideal_error->get_consumer_message()); ?></dd> |
|
79 | 79 | </dl> |
80 | 80 | |
81 | 81 | <?php |