@@ -14,45 +14,45 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | $post_id = get_the_ID(); |
| 16 | 16 | |
| 17 | -$subscription = get_pronamic_subscription( $post_id ); |
|
| 17 | +$subscription = get_pronamic_subscription($post_id); |
|
| 18 | 18 | |
| 19 | 19 | ?> |
| 20 | 20 | <table class="form-table"> |
| 21 | 21 | <tr> |
| 22 | 22 | <th scope="row"> |
| 23 | - <?php esc_html_e( 'Date', 'pronamic_ideal' ); ?> |
|
| 23 | + <?php esc_html_e('Date', 'pronamic_ideal'); ?> |
|
| 24 | 24 | </th> |
| 25 | 25 | <td> |
| 26 | - <?php the_time( __( 'l jS \o\f F Y, h:ia', 'pronamic_ideal' ) ); ?> |
|
| 26 | + <?php the_time(__('l jS \o\f F Y, h:ia', 'pronamic_ideal')); ?> |
|
| 27 | 27 | </td> |
| 28 | 28 | </tr> |
| 29 | 29 | <tr> |
| 30 | 30 | <th scope="row"> |
| 31 | - <?php esc_html_e( 'ID', 'pronamic_ideal' ); ?> |
|
| 31 | + <?php esc_html_e('ID', 'pronamic_ideal'); ?> |
|
| 32 | 32 | </th> |
| 33 | 33 | <td> |
| 34 | - <?php echo esc_html( $post_id ); ?> |
|
| 34 | + <?php echo esc_html($post_id); ?> |
|
| 35 | 35 | </td> |
| 36 | 36 | </tr> |
| 37 | 37 | <tr> |
| 38 | 38 | <th scope="row"> |
| 39 | - <?php esc_html_e( 'Description', 'pronamic_ideal' ); ?> |
|
| 39 | + <?php esc_html_e('Description', 'pronamic_ideal'); ?> |
|
| 40 | 40 | </th> |
| 41 | 41 | <td> |
| 42 | - <?php echo esc_html( $subscription->get_description() ); ?> |
|
| 42 | + <?php echo esc_html($subscription->get_description()); ?> |
|
| 43 | 43 | </td> |
| 44 | 44 | </tr> |
| 45 | 45 | <tr> |
| 46 | 46 | <th scope="row"> |
| 47 | - <?php esc_html_e( 'Payment Method', 'pronamic_ideal' ); ?> |
|
| 47 | + <?php esc_html_e('Payment Method', 'pronamic_ideal'); ?> |
|
| 48 | 48 | </th> |
| 49 | 49 | <td> |
| 50 | - <?php echo esc_html( PaymentMethods::get_name( $subscription->payment_method ) ); ?> |
|
| 50 | + <?php echo esc_html(PaymentMethods::get_name($subscription->payment_method)); ?> |
|
| 51 | 51 | </td> |
| 52 | 52 | </tr> |
| 53 | 53 | <tr> |
| 54 | 54 | <th scope="row"> |
| 55 | - <?php esc_html_e( 'Amount', 'pronamic_ideal' ); ?> |
|
| 55 | + <?php esc_html_e('Amount', 'pronamic_ideal'); ?> |
|
| 56 | 56 | </th> |
| 57 | 57 | <td> |
| 58 | 58 | <?php |
@@ -60,56 +60,56 @@ discard block |
||
| 60 | 60 | $currency = $subscription->get_currency(); |
| 61 | 61 | $amount = $subscription->get_amount(); |
| 62 | 62 | |
| 63 | - echo esc_html( Util::format_price( $amount, $currency ) ); |
|
| 63 | + echo esc_html(Util::format_price($amount, $currency)); |
|
| 64 | 64 | |
| 65 | 65 | ?> |
| 66 | 66 | </td> |
| 67 | 67 | </tr> |
| 68 | 68 | <tr> |
| 69 | 69 | <th scope="row"> |
| 70 | - <?php echo esc_html_x( 'Interval', 'Recurring payment', 'pronamic_ideal' ); ?> |
|
| 70 | + <?php echo esc_html_x('Interval', 'Recurring payment', 'pronamic_ideal'); ?> |
|
| 71 | 71 | </th> |
| 72 | 72 | <td> |
| 73 | - <?php echo esc_html( Util::format_interval( $subscription->get_interval(), $subscription->get_interval_period() ) ); ?> |
|
| 73 | + <?php echo esc_html(Util::format_interval($subscription->get_interval(), $subscription->get_interval_period())); ?> |
|
| 74 | 74 | </td> |
| 75 | 75 | </tr> |
| 76 | 76 | <tr> |
| 77 | 77 | <th scope="row"> |
| 78 | - <?php echo esc_html_x( 'Frequency', 'Recurring payment', 'pronamic_ideal' ); ?> |
|
| 78 | + <?php echo esc_html_x('Frequency', 'Recurring payment', 'pronamic_ideal'); ?> |
|
| 79 | 79 | </th> |
| 80 | 80 | <td> |
| 81 | - <?php echo esc_html( Util::format_frequency( $subscription->get_frequency() ) ); ?> |
|
| 81 | + <?php echo esc_html(Util::format_frequency($subscription->get_frequency())); ?> |
|
| 82 | 82 | </td> |
| 83 | 83 | </tr> |
| 84 | 84 | <tr> |
| 85 | 85 | <th scope="row"> |
| 86 | - <?php esc_html_e( 'First payment', 'pronamic_ideal' ); ?> |
|
| 86 | + <?php esc_html_e('First payment', 'pronamic_ideal'); ?> |
|
| 87 | 87 | </th> |
| 88 | 88 | <td> |
| 89 | 89 | <?php |
| 90 | 90 | |
| 91 | - $first_date = get_date_from_gmt( $subscription->get_first_payment_date()->format( 'Y-m-d H:i:s' ) ); |
|
| 91 | + $first_date = get_date_from_gmt($subscription->get_first_payment_date()->format('Y-m-d H:i:s')); |
|
| 92 | 92 | |
| 93 | - echo esc_html( date_i18n( __( 'l jS \o\f F Y, h:ia', 'pronamic_ideal' ), strtotime( $first_date ) ) ); |
|
| 93 | + echo esc_html(date_i18n(__('l jS \o\f F Y, h:ia', 'pronamic_ideal'), strtotime($first_date))); |
|
| 94 | 94 | |
| 95 | 95 | ?> |
| 96 | 96 | </td> |
| 97 | 97 | </tr> |
| 98 | 98 | <tr> |
| 99 | 99 | <th scope="row"> |
| 100 | - <?php esc_html_e( 'Next payment', 'pronamic_ideal' ); ?> |
|
| 100 | + <?php esc_html_e('Next payment', 'pronamic_ideal'); ?> |
|
| 101 | 101 | </th> |
| 102 | 102 | <td> |
| 103 | 103 | <?php |
| 104 | 104 | |
| 105 | 105 | $next_payment = $subscription->get_next_payment_date(); |
| 106 | 106 | |
| 107 | - if ( $next_payment ) { |
|
| 108 | - $next_date = get_date_from_gmt( $next_payment->format( 'Y-m-d H:i:s' ) ); |
|
| 107 | + if ($next_payment) { |
|
| 108 | + $next_date = get_date_from_gmt($next_payment->format('Y-m-d H:i:s')); |
|
| 109 | 109 | |
| 110 | - echo esc_html( date_i18n( __( 'l jS \o\f F Y, h:ia', 'pronamic_ideal' ), strtotime( $next_date ) ) ); |
|
| 110 | + echo esc_html(date_i18n(__('l jS \o\f F Y, h:ia', 'pronamic_ideal'), strtotime($next_date))); |
|
| 111 | 111 | } else { |
| 112 | - echo esc_html( __( 'None', 'pronamic_ideal' ) ); |
|
| 112 | + echo esc_html(__('None', 'pronamic_ideal')); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | ?> |
@@ -117,17 +117,17 @@ discard block |
||
| 117 | 117 | </tr> |
| 118 | 118 | <tr> |
| 119 | 119 | <th scope="row"> |
| 120 | - <?php esc_html_e( 'Final payment', 'pronamic_ideal' ); ?> |
|
| 120 | + <?php esc_html_e('Final payment', 'pronamic_ideal'); ?> |
|
| 121 | 121 | </th> |
| 122 | 122 | <td> |
| 123 | 123 | <?php |
| 124 | 124 | |
| 125 | 125 | $final_payment = $subscription->get_final_payment_date(); |
| 126 | 126 | |
| 127 | - if ( $final_payment ) { |
|
| 128 | - $final_date = get_date_from_gmt( $final_payment->format( 'Y-m-d H:i:s' ) ); |
|
| 127 | + if ($final_payment) { |
|
| 128 | + $final_date = get_date_from_gmt($final_payment->format('Y-m-d H:i:s')); |
|
| 129 | 129 | |
| 130 | - echo esc_html( date_i18n( __( 'l jS \o\f F Y, h:ia', 'pronamic_ideal' ), strtotime( $final_date ) ) ); |
|
| 130 | + echo esc_html(date_i18n(__('l jS \o\f F Y, h:ia', 'pronamic_ideal'), strtotime($final_date))); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | ?> |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | </tr> |
| 136 | 136 | <tr> |
| 137 | 137 | <th scope="row"> |
| 138 | - <?php esc_html_e( 'Current period', 'pronamic_ideal' ); ?> |
|
| 138 | + <?php esc_html_e('Current period', 'pronamic_ideal'); ?> |
|
| 139 | 139 | </th> |
| 140 | 140 | <td> |
| 141 | 141 | <?php |
@@ -143,21 +143,21 @@ discard block |
||
| 143 | 143 | $start_date = $subscription->get_start_date(); |
| 144 | 144 | $expiry_date = $subscription->get_expiry_date(); |
| 145 | 145 | |
| 146 | - if ( $start_date && $expiry_date ) { |
|
| 147 | - $start_date = get_date_from_gmt( $start_date->format( 'Y-m-d H:i:s' ) ); |
|
| 148 | - $expiry_date = get_date_from_gmt( $expiry_date->format( 'Y-m-d H:i:s' ) ); |
|
| 146 | + if ($start_date && $expiry_date) { |
|
| 147 | + $start_date = get_date_from_gmt($start_date->format('Y-m-d H:i:s')); |
|
| 148 | + $expiry_date = get_date_from_gmt($expiry_date->format('Y-m-d H:i:s')); |
|
| 149 | 149 | |
| 150 | 150 | echo esc_html( |
| 151 | 151 | sprintf( |
| 152 | 152 | '%s – %s', |
| 153 | - date_i18n( __( 'l jS \o\f F Y, h:ia', 'pronamic_ideal' ), strtotime( $start_date ) ), |
|
| 154 | - date_i18n( __( 'l jS \o\f F Y, h:ia', 'pronamic_ideal' ), strtotime( $expiry_date ) ) |
|
| 153 | + date_i18n(__('l jS \o\f F Y, h:ia', 'pronamic_ideal'), strtotime($start_date)), |
|
| 154 | + date_i18n(__('l jS \o\f F Y, h:ia', 'pronamic_ideal'), strtotime($expiry_date)) |
|
| 155 | 155 | ) |
| 156 | 156 | ); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - if ( Statuses::COMPLETED === $subscription->get_status() ) { |
|
| 160 | - echo esc_html( sprintf( __( 'None (subscription completed)', 'pronamic_ideal' ) ) ); |
|
| 159 | + if (Statuses::COMPLETED === $subscription->get_status()) { |
|
| 160 | + echo esc_html(sprintf(__('None (subscription completed)', 'pronamic_ideal'))); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | ?> |
@@ -165,36 +165,36 @@ discard block |
||
| 165 | 165 | </tr> |
| 166 | 166 | <tr> |
| 167 | 167 | <th scope="row"> |
| 168 | - <?php esc_html_e( 'Consumer', 'pronamic_ideal' ); ?> |
|
| 168 | + <?php esc_html_e('Consumer', 'pronamic_ideal'); ?> |
|
| 169 | 169 | </th> |
| 170 | 170 | <td> |
| 171 | 171 | <?php |
| 172 | 172 | |
| 173 | - echo esc_html( get_post_meta( $post_id, '_pronamic_subscription_consumer_name', true ) ); |
|
| 173 | + echo esc_html(get_post_meta($post_id, '_pronamic_subscription_consumer_name', true)); |
|
| 174 | 174 | echo '<br />'; |
| 175 | - echo esc_html( get_post_meta( $post_id, '_pronamic_subscription_consumer_iban', true ) ); |
|
| 175 | + echo esc_html(get_post_meta($post_id, '_pronamic_subscription_consumer_iban', true)); |
|
| 176 | 176 | echo '<br />'; |
| 177 | - echo esc_html( get_post_meta( $post_id, '_pronamic_subscription_consumer_bic', true ) ); |
|
| 177 | + echo esc_html(get_post_meta($post_id, '_pronamic_subscription_consumer_bic', true)); |
|
| 178 | 178 | |
| 179 | 179 | ?> |
| 180 | 180 | </td> |
| 181 | 181 | </tr> |
| 182 | 182 | <tr> |
| 183 | 183 | <th scope="row"> |
| 184 | - <?php esc_html_e( 'Source', 'pronamic_ideal' ); ?> |
|
| 184 | + <?php esc_html_e('Source', 'pronamic_ideal'); ?> |
|
| 185 | 185 | </th> |
| 186 | 186 | <td> |
| 187 | 187 | <?php |
| 188 | 188 | |
| 189 | 189 | $first_payment = $subscription->get_first_payment(); |
| 190 | 190 | |
| 191 | - if ( $first_payment ) { |
|
| 191 | + if ($first_payment) { |
|
| 192 | 192 | echo $first_payment->get_source_text(); // WPCS: XSS ok. |
| 193 | 193 | } else { |
| 194 | 194 | printf( |
| 195 | 195 | '%s<br />%s', // WPCS: XSS ok. |
| 196 | - esc_html( $subscription->get_source() ), |
|
| 197 | - esc_html( $subscription->get_source_id() ) |
|
| 196 | + esc_html($subscription->get_source()), |
|
| 197 | + esc_html($subscription->get_source_id()) |
|
| 198 | 198 | ); |
| 199 | 199 | } |
| 200 | 200 | |
@@ -202,22 +202,22 @@ discard block |
||
| 202 | 202 | </td> |
| 203 | 203 | </tr> |
| 204 | 204 | |
| 205 | - <?php if ( 's2member' === $subscription->get_source() ) : ?> |
|
| 205 | + <?php if ('s2member' === $subscription->get_source()) : ?> |
|
| 206 | 206 | |
| 207 | 207 | <tr> |
| 208 | 208 | <th scope="row"> |
| 209 | - <?php esc_html_e( 'Period', 'pronamic_ideal' ); ?> |
|
| 209 | + <?php esc_html_e('Period', 'pronamic_ideal'); ?> |
|
| 210 | 210 | </th> |
| 211 | 211 | <td> |
| 212 | - <?php echo esc_html( get_post_meta( $subscription->get_id(), '_pronamic_subscription_s2member_period', true ) ); ?> |
|
| 212 | + <?php echo esc_html(get_post_meta($subscription->get_id(), '_pronamic_subscription_s2member_period', true)); ?> |
|
| 213 | 213 | </td> |
| 214 | 214 | </tr> |
| 215 | 215 | <tr> |
| 216 | 216 | <th scope="row"> |
| 217 | - <?php esc_html_e( 'Level', 'pronamic_ideal' ); ?> |
|
| 217 | + <?php esc_html_e('Level', 'pronamic_ideal'); ?> |
|
| 218 | 218 | </th> |
| 219 | 219 | <td> |
| 220 | - <?php echo esc_html( get_post_meta( $subscription->get_id(), '_pronamic_subscription_s2member_level', true ) ); ?> |
|
| 220 | + <?php echo esc_html(get_post_meta($subscription->get_id(), '_pronamic_subscription_s2member_level', true)); ?> |
|
| 221 | 221 | </td> |
| 222 | 222 | </tr> |
| 223 | 223 | |
@@ -8,14 +8,14 @@ discard block |
||
| 8 | 8 | * @package Pronamic\WordPress\Pay |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -if ( filter_has_var( INPUT_GET, 'message' ) ) { |
|
| 12 | - $message_id = filter_input( INPUT_GET, 'message', FILTER_SANITIZE_STRING ); |
|
| 11 | +if (filter_has_var(INPUT_GET, 'message')) { |
|
| 12 | + $message_id = filter_input(INPUT_GET, 'message', FILTER_SANITIZE_STRING); |
|
| 13 | 13 | |
| 14 | - switch ( $message_id ) { |
|
| 14 | + switch ($message_id) { |
|
| 15 | 15 | case 'pages-generated': |
| 16 | 16 | printf( |
| 17 | 17 | '<div id="message" class="updated"><p>%s</p></div>', |
| 18 | - esc_html__( 'The default payment status pages are created.', 'pronamic_ideal' ) |
|
| 18 | + esc_html__('The default payment status pages are created.', 'pronamic_ideal') |
|
| 19 | 19 | ); |
| 20 | 20 | |
| 21 | 21 | break; |
@@ -25,16 +25,16 @@ discard block |
||
| 25 | 25 | ?> |
| 26 | 26 | |
| 27 | 27 | <div class="wrap pronamic-pay-settings"> |
| 28 | - <h1 class="wp-heading-inline"><?php echo esc_html( get_admin_page_title() ); ?></h1> |
|
| 28 | + <h1 class="wp-heading-inline"><?php echo esc_html(get_admin_page_title()); ?></h1> |
|
| 29 | 29 | |
| 30 | 30 | <hr class="wp-header-end"> |
| 31 | 31 | |
| 32 | 32 | <form action="options.php" method="post"> |
| 33 | - <?php wp_nonce_field( 'pronamic_pay_settings', 'pronamic_pay_nonce' ); ?> |
|
| 33 | + <?php wp_nonce_field('pronamic_pay_settings', 'pronamic_pay_nonce'); ?> |
|
| 34 | 34 | |
| 35 | - <?php settings_fields( 'pronamic_pay' ); ?> |
|
| 35 | + <?php settings_fields('pronamic_pay'); ?> |
|
| 36 | 36 | |
| 37 | - <?php do_settings_sections( 'pronamic_pay' ); ?> |
|
| 37 | + <?php do_settings_sections('pronamic_pay'); ?> |
|
| 38 | 38 | |
| 39 | 39 | <?php submit_button(); ?> |
| 40 | 40 | </form> |
@@ -15,74 +15,74 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | $post_type = 'pronamic_payment'; |
| 17 | 17 | |
| 18 | -$payment = get_pronamic_payment( $post_id ); |
|
| 18 | +$payment = get_pronamic_payment($post_id); |
|
| 19 | 19 | |
| 20 | 20 | ?> |
| 21 | 21 | <table class="form-table"> |
| 22 | 22 | <tr> |
| 23 | 23 | <th scope="row"> |
| 24 | - <?php esc_html_e( 'Date', 'pronamic_ideal' ); ?> |
|
| 24 | + <?php esc_html_e('Date', 'pronamic_ideal'); ?> |
|
| 25 | 25 | </th> |
| 26 | 26 | <td> |
| 27 | - <?php the_time( __( 'l jS \o\f F Y, h:ia', 'pronamic_ideal' ) ); ?> |
|
| 27 | + <?php the_time(__('l jS \o\f F Y, h:ia', 'pronamic_ideal')); ?> |
|
| 28 | 28 | </td> |
| 29 | 29 | </tr> |
| 30 | 30 | <tr> |
| 31 | 31 | <th scope="row"> |
| 32 | - <?php esc_html_e( 'ID', 'pronamic_ideal' ); ?> |
|
| 32 | + <?php esc_html_e('ID', 'pronamic_ideal'); ?> |
|
| 33 | 33 | </th> |
| 34 | 34 | <td> |
| 35 | - <?php echo esc_html( $post_id ); ?> |
|
| 35 | + <?php echo esc_html($post_id); ?> |
|
| 36 | 36 | </td> |
| 37 | 37 | </tr> |
| 38 | 38 | <tr> |
| 39 | 39 | <th scope="row"> |
| 40 | - <?php esc_html_e( 'Description', 'pronamic_ideal' ); ?> |
|
| 40 | + <?php esc_html_e('Description', 'pronamic_ideal'); ?> |
|
| 41 | 41 | </th> |
| 42 | 42 | <td> |
| 43 | - <?php echo esc_html( get_post_meta( $post_id, '_pronamic_payment_description', true ) ); ?> |
|
| 43 | + <?php echo esc_html(get_post_meta($post_id, '_pronamic_payment_description', true)); ?> |
|
| 44 | 44 | </td> |
| 45 | 45 | </tr> |
| 46 | 46 | <tr> |
| 47 | 47 | <th scope="row"> |
| 48 | - <?php esc_html_e( 'Amount', 'pronamic_ideal' ); ?> |
|
| 48 | + <?php esc_html_e('Amount', 'pronamic_ideal'); ?> |
|
| 49 | 49 | </th> |
| 50 | 50 | <td> |
| 51 | 51 | <?php |
| 52 | 52 | |
| 53 | - $currency = get_post_meta( $post_id, '_pronamic_payment_currency', true ); |
|
| 54 | - $amount = get_post_meta( $post_id, '_pronamic_payment_amount', true ); |
|
| 53 | + $currency = get_post_meta($post_id, '_pronamic_payment_currency', true); |
|
| 54 | + $amount = get_post_meta($post_id, '_pronamic_payment_amount', true); |
|
| 55 | 55 | |
| 56 | - echo esc_html( Util::format_price( $amount, $currency ) ); |
|
| 56 | + echo esc_html(Util::format_price($amount, $currency)); |
|
| 57 | 57 | |
| 58 | 58 | ?> |
| 59 | 59 | </td> |
| 60 | 60 | </tr> |
| 61 | 61 | <tr> |
| 62 | 62 | <th scope="row"> |
| 63 | - <?php esc_html_e( 'Transaction ID', 'pronamic_ideal' ); ?> |
|
| 63 | + <?php esc_html_e('Transaction ID', 'pronamic_ideal'); ?> |
|
| 64 | 64 | </th> |
| 65 | 65 | <td> |
| 66 | - <?php do_action( 'manage_' . $post_type . '_posts_custom_column', 'pronamic_payment_transaction', $post_id ); ?> |
|
| 66 | + <?php do_action('manage_' . $post_type . '_posts_custom_column', 'pronamic_payment_transaction', $post_id); ?> |
|
| 67 | 67 | </td> |
| 68 | 68 | </tr> |
| 69 | 69 | <tr> |
| 70 | 70 | <th scope="row"> |
| 71 | - <?php esc_html_e( 'Payment Method', 'pronamic_ideal' ); ?> |
|
| 71 | + <?php esc_html_e('Payment Method', 'pronamic_ideal'); ?> |
|
| 72 | 72 | </th> |
| 73 | 73 | <td> |
| 74 | 74 | <?php |
| 75 | 75 | |
| 76 | - $method = $payment->get_meta( 'method' ); |
|
| 76 | + $method = $payment->get_meta('method'); |
|
| 77 | 77 | |
| 78 | - $name = PaymentMethods::get_name( $method ); |
|
| 78 | + $name = PaymentMethods::get_name($method); |
|
| 79 | 79 | |
| 80 | - echo esc_html( $name ); |
|
| 80 | + echo esc_html($name); |
|
| 81 | 81 | |
| 82 | - $issuer = $payment->get_meta( 'issuer' ); |
|
| 82 | + $issuer = $payment->get_meta('issuer'); |
|
| 83 | 83 | |
| 84 | - if ( $issuer ) { |
|
| 85 | - echo esc_html( sprintf( ' (`%s`)', $issuer ) ); |
|
| 84 | + if ($issuer) { |
|
| 85 | + echo esc_html(sprintf(' (`%s`)', $issuer)); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | ?> |
@@ -90,17 +90,17 @@ discard block |
||
| 90 | 90 | </tr> |
| 91 | 91 | <tr> |
| 92 | 92 | <th scope="row"> |
| 93 | - <?php esc_html_e( 'Action URL', 'pronamic_ideal' ); ?> |
|
| 93 | + <?php esc_html_e('Action URL', 'pronamic_ideal'); ?> |
|
| 94 | 94 | </th> |
| 95 | 95 | <td> |
| 96 | 96 | <?php |
| 97 | 97 | |
| 98 | - $url = get_post_meta( $post_id, '_pronamic_payment_action_url', true ); |
|
| 98 | + $url = get_post_meta($post_id, '_pronamic_payment_action_url', true); |
|
| 99 | 99 | |
| 100 | 100 | printf( |
| 101 | 101 | '<a href="%s" target="_blank">%s</a>', |
| 102 | - esc_attr( $url ), |
|
| 103 | - esc_html( $url ) |
|
| 102 | + esc_attr($url), |
|
| 103 | + esc_html($url) |
|
| 104 | 104 | ); |
| 105 | 105 | |
| 106 | 106 | ?> |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | </tr> |
| 109 | 109 | <tr> |
| 110 | 110 | <th scope="row"> |
| 111 | - <?php esc_html_e( 'Return URL', 'pronamic_ideal' ); ?> |
|
| 111 | + <?php esc_html_e('Return URL', 'pronamic_ideal'); ?> |
|
| 112 | 112 | </th> |
| 113 | 113 | <td> |
| 114 | 114 | <?php |
@@ -117,8 +117,8 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | printf( |
| 119 | 119 | '<a href="%s">%s</a>', |
| 120 | - esc_attr( $url ), |
|
| 121 | - esc_html( $url ) |
|
| 120 | + esc_attr($url), |
|
| 121 | + esc_html($url) |
|
| 122 | 122 | ); |
| 123 | 123 | |
| 124 | 124 | ?> |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | </tr> |
| 127 | 127 | <tr> |
| 128 | 128 | <th scope="row"> |
| 129 | - <?php esc_html_e( 'Redirect URL', 'pronamic_ideal' ); ?> |
|
| 129 | + <?php esc_html_e('Redirect URL', 'pronamic_ideal'); ?> |
|
| 130 | 130 | </th> |
| 131 | 131 | <td> |
| 132 | 132 | <?php |
@@ -135,8 +135,8 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | printf( |
| 137 | 137 | '<a href="%s">%s</a>', |
| 138 | - esc_attr( $url ), |
|
| 139 | - esc_html( $url ) |
|
| 138 | + esc_attr($url), |
|
| 139 | + esc_html($url) |
|
| 140 | 140 | ); |
| 141 | 141 | |
| 142 | 142 | ?> |
@@ -144,15 +144,15 @@ discard block |
||
| 144 | 144 | </tr> |
| 145 | 145 | <tr> |
| 146 | 146 | <th scope="row"> |
| 147 | - <?php esc_html_e( 'Status', 'pronamic_ideal' ); ?> |
|
| 147 | + <?php esc_html_e('Status', 'pronamic_ideal'); ?> |
|
| 148 | 148 | </th> |
| 149 | 149 | <td> |
| 150 | 150 | <?php |
| 151 | 151 | |
| 152 | - $status_object = get_post_status_object( get_post_status( $post_id ) ); |
|
| 152 | + $status_object = get_post_status_object(get_post_status($post_id)); |
|
| 153 | 153 | |
| 154 | - if ( isset( $status_object, $status_object->label ) ) { |
|
| 155 | - echo esc_html( $status_object->label ); |
|
| 154 | + if (isset($status_object, $status_object->label)) { |
|
| 155 | + echo esc_html($status_object->label); |
|
| 156 | 156 | } else { |
| 157 | 157 | echo '—'; |
| 158 | 158 | } |
@@ -162,61 +162,61 @@ discard block |
||
| 162 | 162 | </tr> |
| 163 | 163 | <tr> |
| 164 | 164 | <th scope="row"> |
| 165 | - <?php esc_html_e( 'First Name', 'pronamic_ideal' ); ?> |
|
| 165 | + <?php esc_html_e('First Name', 'pronamic_ideal'); ?> |
|
| 166 | 166 | </th> |
| 167 | 167 | <td> |
| 168 | 168 | <?php |
| 169 | 169 | |
| 170 | - echo esc_html( get_post_meta( $post_id, '_pronamic_payment_first_name', true ) ); |
|
| 170 | + echo esc_html(get_post_meta($post_id, '_pronamic_payment_first_name', true)); |
|
| 171 | 171 | |
| 172 | 172 | ?> |
| 173 | 173 | </td> |
| 174 | 174 | </tr> |
| 175 | 175 | <tr> |
| 176 | 176 | <th scope="row"> |
| 177 | - <?php esc_html_e( 'Last Name', 'pronamic_ideal' ); ?> |
|
| 177 | + <?php esc_html_e('Last Name', 'pronamic_ideal'); ?> |
|
| 178 | 178 | </th> |
| 179 | 179 | <td> |
| 180 | 180 | <?php |
| 181 | 181 | |
| 182 | - echo esc_html( get_post_meta( $post_id, '_pronamic_payment_last_name', true ) ); |
|
| 182 | + echo esc_html(get_post_meta($post_id, '_pronamic_payment_last_name', true)); |
|
| 183 | 183 | |
| 184 | 184 | ?> |
| 185 | 185 | </td> |
| 186 | 186 | </tr> |
| 187 | 187 | <tr> |
| 188 | 188 | <th scope="row"> |
| 189 | - <?php esc_html_e( 'Email', 'pronamic_ideal' ); ?> |
|
| 189 | + <?php esc_html_e('Email', 'pronamic_ideal'); ?> |
|
| 190 | 190 | </th> |
| 191 | 191 | <td> |
| 192 | 192 | <?php |
| 193 | 193 | |
| 194 | - echo esc_html( get_post_meta( $post_id, '_pronamic_payment_email', true ) ); |
|
| 194 | + echo esc_html(get_post_meta($post_id, '_pronamic_payment_email', true)); |
|
| 195 | 195 | |
| 196 | 196 | ?> |
| 197 | 197 | </td> |
| 198 | 198 | </tr> |
| 199 | 199 | <tr> |
| 200 | 200 | <th scope="row"> |
| 201 | - <?php esc_html_e( 'Consumer', 'pronamic_ideal' ); ?> |
|
| 201 | + <?php esc_html_e('Consumer', 'pronamic_ideal'); ?> |
|
| 202 | 202 | </th> |
| 203 | 203 | <td> |
| 204 | 204 | <?php |
| 205 | 205 | |
| 206 | - echo esc_html( get_post_meta( $post_id, '_pronamic_payment_consumer_name', true ) ); |
|
| 206 | + echo esc_html(get_post_meta($post_id, '_pronamic_payment_consumer_name', true)); |
|
| 207 | 207 | echo '<br />'; |
| 208 | - echo esc_html( get_post_meta( $post_id, '_pronamic_payment_consumer_account_number', true ) ); |
|
| 209 | - echo esc_html( get_post_meta( $post_id, '_pronamic_payment_consumer_iban', true ) ); |
|
| 210 | - echo esc_html( get_post_meta( $post_id, '_pronamic_payment_consumer_bic', true ) ); |
|
| 208 | + echo esc_html(get_post_meta($post_id, '_pronamic_payment_consumer_account_number', true)); |
|
| 209 | + echo esc_html(get_post_meta($post_id, '_pronamic_payment_consumer_iban', true)); |
|
| 210 | + echo esc_html(get_post_meta($post_id, '_pronamic_payment_consumer_bic', true)); |
|
| 211 | 211 | echo '<br />'; |
| 212 | - echo esc_html( get_post_meta( $post_id, '_pronamic_payment_consumer_city', true ) ); |
|
| 212 | + echo esc_html(get_post_meta($post_id, '_pronamic_payment_consumer_city', true)); |
|
| 213 | 213 | |
| 214 | 214 | ?> |
| 215 | 215 | </td> |
| 216 | 216 | </tr> |
| 217 | 217 | <tr> |
| 218 | 218 | <th scope="row"> |
| 219 | - <?php esc_html_e( 'Source', 'pronamic_ideal' ); ?> |
|
| 219 | + <?php esc_html_e('Source', 'pronamic_ideal'); ?> |
|
| 220 | 220 | </th> |
| 221 | 221 | <td> |
| 222 | 222 | <?php |
@@ -227,64 +227,64 @@ discard block |
||
| 227 | 227 | </td> |
| 228 | 228 | </tr> |
| 229 | 229 | |
| 230 | - <?php if ( 's2member' === $payment->get_source() ) : ?> |
|
| 230 | + <?php if ('s2member' === $payment->get_source()) : ?> |
|
| 231 | 231 | |
| 232 | 232 | <tr> |
| 233 | 233 | <th scope="row"> |
| 234 | - <?php esc_html_e( 'Period', 'pronamic_ideal' ); ?> |
|
| 234 | + <?php esc_html_e('Period', 'pronamic_ideal'); ?> |
|
| 235 | 235 | </th> |
| 236 | 236 | <td> |
| 237 | - <?php echo esc_html( get_post_meta( $payment->get_id(), '_pronamic_payment_s2member_period', true ) ); ?> |
|
| 237 | + <?php echo esc_html(get_post_meta($payment->get_id(), '_pronamic_payment_s2member_period', true)); ?> |
|
| 238 | 238 | </td> |
| 239 | 239 | </tr> |
| 240 | 240 | <tr> |
| 241 | 241 | <th scope="row"> |
| 242 | - <?php esc_html_e( 'Level', 'pronamic_ideal' ); ?> |
|
| 242 | + <?php esc_html_e('Level', 'pronamic_ideal'); ?> |
|
| 243 | 243 | </th> |
| 244 | 244 | <td> |
| 245 | - <?php echo esc_html( get_post_meta( $payment->get_id(), '_pronamic_payment_s2member_level', true ) ); ?> |
|
| 245 | + <?php echo esc_html(get_post_meta($payment->get_id(), '_pronamic_payment_s2member_level', true)); ?> |
|
| 246 | 246 | </td> |
| 247 | 247 | </tr> |
| 248 | 248 | |
| 249 | 249 | <?php endif; ?> |
| 250 | 250 | |
| 251 | - <?php if ( 'wp-e-commerce' === $payment->get_source() ) : ?> |
|
| 251 | + <?php if ('wp-e-commerce' === $payment->get_source()) : ?> |
|
| 252 | 252 | |
| 253 | 253 | <tr> |
| 254 | 254 | <th scope="row"> |
| 255 | - <?php esc_html_e( 'Purchase ID', 'pronamic_ideal' ); ?> |
|
| 255 | + <?php esc_html_e('Purchase ID', 'pronamic_ideal'); ?> |
|
| 256 | 256 | </th> |
| 257 | 257 | <td> |
| 258 | - <?php echo esc_html( get_post_meta( $payment->get_id(), '_pronamic_payment_wpsc_purchase_id', true ) ); ?> |
|
| 258 | + <?php echo esc_html(get_post_meta($payment->get_id(), '_pronamic_payment_wpsc_purchase_id', true)); ?> |
|
| 259 | 259 | </td> |
| 260 | 260 | </tr> |
| 261 | 261 | <tr> |
| 262 | 262 | <th scope="row"> |
| 263 | - <?php esc_html_e( 'Session ID', 'pronamic_ideal' ); ?> |
|
| 263 | + <?php esc_html_e('Session ID', 'pronamic_ideal'); ?> |
|
| 264 | 264 | </th> |
| 265 | 265 | <td> |
| 266 | - <?php echo esc_html( get_post_meta( $payment->get_id(), '_pronamic_payment_wpsc_session_id', true ) ); ?> |
|
| 266 | + <?php echo esc_html(get_post_meta($payment->get_id(), '_pronamic_payment_wpsc_session_id', true)); ?> |
|
| 267 | 267 | </td> |
| 268 | 268 | </tr> |
| 269 | 269 | |
| 270 | 270 | <?php endif; ?> |
| 271 | 271 | |
| 272 | - <?php if ( 'membership' === $payment->get_source() ) : ?> |
|
| 272 | + <?php if ('membership' === $payment->get_source()) : ?> |
|
| 273 | 273 | |
| 274 | 274 | <tr> |
| 275 | 275 | <th scope="row"> |
| 276 | - <?php esc_html_e( 'User ID', 'pronamic_ideal' ); ?> |
|
| 276 | + <?php esc_html_e('User ID', 'pronamic_ideal'); ?> |
|
| 277 | 277 | </th> |
| 278 | 278 | <td> |
| 279 | - <?php echo esc_html( get_post_meta( $payment->get_id(), '_pronamic_payment_membership_user_id', true ) ); ?> |
|
| 279 | + <?php echo esc_html(get_post_meta($payment->get_id(), '_pronamic_payment_membership_user_id', true)); ?> |
|
| 280 | 280 | </td> |
| 281 | 281 | </tr> |
| 282 | 282 | <tr> |
| 283 | 283 | <th scope="row"> |
| 284 | - <?php esc_html_e( 'Subscription ID', 'pronamic_ideal' ); ?> |
|
| 284 | + <?php esc_html_e('Subscription ID', 'pronamic_ideal'); ?> |
|
| 285 | 285 | </th> |
| 286 | 286 | <td> |
| 287 | - <?php echo esc_html( get_post_meta( $payment->get_id(), '_pronamic_payment_membership_subscription_id', true ) ); ?> |
|
| 287 | + <?php echo esc_html(get_post_meta($payment->get_id(), '_pronamic_payment_membership_subscription_id', true)); ?> |
|
| 288 | 288 | </td> |
| 289 | 289 | </tr> |
| 290 | 290 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | ?> |
| 14 | 14 | <div class="wrap"> |
| 15 | - <h1 class="wp-heading-inline"><?php echo esc_html( get_admin_page_title() ); ?></h1> |
|
| 15 | + <h1 class="wp-heading-inline"><?php echo esc_html(get_admin_page_title()); ?></h1> |
|
| 16 | 16 | |
| 17 | 17 | <hr class="wp-header-end"> |
| 18 | 18 | |
@@ -26,22 +26,22 @@ discard block |
||
| 26 | 26 | <div class="pronamic-pay-chart-sidebar"> |
| 27 | 27 | <ul class="pronamci-pay-chart-legend"> |
| 28 | 28 | |
| 29 | - <?php foreach ( $this->reports->get_reports() as $i => $serie ) : ?> |
|
| 29 | + <?php foreach ($this->reports->get_reports() as $i => $serie) : ?> |
|
| 30 | 30 | |
| 31 | - <li class="<?php echo esc_attr( $serie->class ); ?>" data-pronamic-pay-highlight-serie="<?php echo esc_attr( $i ); ?>"> |
|
| 31 | + <li class="<?php echo esc_attr($serie->class); ?>" data-pronamic-pay-highlight-serie="<?php echo esc_attr($i); ?>"> |
|
| 32 | 32 | <?php |
| 33 | 33 | |
| 34 | 34 | echo '<strong>'; |
| 35 | 35 | |
| 36 | - if ( isset( $serie->tooltipFormatter ) && 'money' === $serie->tooltipFormatter ) { |
|
| 37 | - echo esc_html( Util::format_price( $serie->legendValue ) ); |
|
| 36 | + if (isset($serie->tooltipFormatter) && 'money' === $serie->tooltipFormatter) { |
|
| 37 | + echo esc_html(Util::format_price($serie->legendValue)); |
|
| 38 | 38 | } else { |
| 39 | - echo esc_html( $serie->legendValue ); |
|
| 39 | + echo esc_html($serie->legendValue); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | echo '</strong>'; |
| 43 | 43 | |
| 44 | - echo esc_html( $serie->label ); |
|
| 44 | + echo esc_html($serie->label); |
|
| 45 | 45 | |
| 46 | 46 | ?> |
| 47 | 47 | </li> |
@@ -9,14 +9,14 @@ discard block |
||
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | // If this file is called directly, abort. |
| 12 | -if ( ! defined( 'WPINC' ) ) { |
|
| 12 | +if ( ! defined('WPINC')) { |
|
| 13 | 13 | die; |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | ?> |
| 17 | 17 | <div class="feature-section two-col"> |
| 18 | 18 | <div class="col"> |
| 19 | - <h3><?php esc_html_e( 'Step 1: open an account with a payment provider', 'pronamic_ideal' ); ?></h3> |
|
| 19 | + <h3><?php esc_html_e('Step 1: open an account with a payment provider', 'pronamic_ideal'); ?></h3> |
|
| 20 | 20 | |
| 21 | 21 | <p> |
| 22 | 22 | <?php |
@@ -42,10 +42,10 @@ discard block |
||
| 42 | 42 | array( |
| 43 | 43 | 'page' => 'pronamic_pay_tools', |
| 44 | 44 | 'tab' => 'gateways', |
| 45 | - ), admin_url( 'admin.php' ) |
|
| 45 | + ), admin_url('admin.php') |
|
| 46 | 46 | ) |
| 47 | 47 | ), |
| 48 | - esc_html__( 'View supported payment providers', 'pronamic_ideal' ) |
|
| 48 | + esc_html__('View supported payment providers', 'pronamic_ideal') |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | 51 | ?> |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | </div> |
| 64 | 64 | |
| 65 | 65 | <div class="col"> |
| 66 | - <h3><?php esc_html_e( 'Step 2: add payment provider configuration', 'pronamic_ideal' ); ?></h3> |
|
| 66 | + <h3><?php esc_html_e('Step 2: add payment provider configuration', 'pronamic_ideal'); ?></h3> |
|
| 67 | 67 | |
| 68 | 68 | <p> |
| 69 | 69 | <?php |
@@ -96,10 +96,10 @@ discard block |
||
| 96 | 96 | add_query_arg( |
| 97 | 97 | array( |
| 98 | 98 | 'post_type' => 'pronamic_gateway', |
| 99 | - ), admin_url( 'post-new.php' ) |
|
| 99 | + ), admin_url('post-new.php') |
|
| 100 | 100 | ) |
| 101 | 101 | ), |
| 102 | - esc_html__( 'Add new payment provider configuration', 'pronamic_ideal' ) |
|
| 102 | + esc_html__('Add new payment provider configuration', 'pronamic_ideal') |
|
| 103 | 103 | ); |
| 104 | 104 | |
| 105 | 105 | ?> |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | <div class="feature-section two-col"> |
| 111 | 111 | <div class="col"> |
| 112 | - <h3><?php esc_html_e( 'Step 3: test configuration', 'pronamic_ideal' ); ?></h3> |
|
| 112 | + <h3><?php esc_html_e('Step 3: test configuration', 'pronamic_ideal'); ?></h3> |
|
| 113 | 113 | |
| 114 | 114 | <p> |
| 115 | 115 | <?php |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | </div> |
| 148 | 148 | |
| 149 | 149 | <div class="col"> |
| 150 | - <h3><?php esc_html_e( 'Step 4: configure e-commerce plugin', 'pronamic_ideal' ); ?></h3> |
|
| 150 | + <h3><?php esc_html_e('Step 4: configure e-commerce plugin', 'pronamic_ideal'); ?></h3> |
|
| 151 | 151 | |
| 152 | 152 | <p> |
| 153 | 153 | <?php |
@@ -171,10 +171,10 @@ discard block |
||
| 171 | 171 | array( |
| 172 | 172 | 'page' => 'pronamic_pay_tools', |
| 173 | 173 | 'tab' => 'extensions', |
| 174 | - ), admin_url( 'admin.php' ) |
|
| 174 | + ), admin_url('admin.php') |
|
| 175 | 175 | ) |
| 176 | 176 | ), |
| 177 | - esc_html__( 'View supported e-commerce plugins', 'pronamic_ideal' ) |
|
| 177 | + esc_html__('View supported e-commerce plugins', 'pronamic_ideal') |
|
| 178 | 178 | ); |
| 179 | 179 | |
| 180 | 180 | ?> |
@@ -8,20 +8,20 @@ discard block |
||
| 8 | 8 | * @package Pronamic\WordPress\Pay |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -wp_nonce_field( 'pronamic_pay_save_form_options', 'pronamic_pay_nonce' ); |
|
| 11 | +wp_nonce_field('pronamic_pay_save_form_options', 'pronamic_pay_nonce'); |
|
| 12 | 12 | |
| 13 | 13 | ?> |
| 14 | 14 | <table class="form-table"> |
| 15 | 15 | <tr> |
| 16 | 16 | <th scope="row"> |
| 17 | 17 | <label for="_pronamic_payment_form_config_id"> |
| 18 | - <?php esc_html_e( 'Gateway', 'pronamic_ideal' ); ?> |
|
| 18 | + <?php esc_html_e('Gateway', 'pronamic_ideal'); ?> |
|
| 19 | 19 | </label> |
| 20 | 20 | </th> |
| 21 | 21 | <td> |
| 22 | 22 | <?php |
| 23 | 23 | |
| 24 | - $config_id = get_post_meta( $post->ID, '_pronamic_payment_form_config_id', true ); |
|
| 24 | + $config_id = get_post_meta($post->ID, '_pronamic_payment_form_config_id', true); |
|
| 25 | 25 | |
| 26 | 26 | \Pronamic\WordPress\Pay\Admin\AdminModule::dropdown_configs( |
| 27 | 27 | array( |
@@ -36,39 +36,39 @@ discard block |
||
| 36 | 36 | <tr> |
| 37 | 37 | <th scope="row"> |
| 38 | 38 | <label for="_pronamic_payment_form_button_text"> |
| 39 | - <?php esc_html_e( 'Button Text', 'pronamic_ideal' ); ?> |
|
| 39 | + <?php esc_html_e('Button Text', 'pronamic_ideal'); ?> |
|
| 40 | 40 | </label> |
| 41 | 41 | </th> |
| 42 | 42 | <td> |
| 43 | - <?php $button_text = get_post_meta( $post->ID, '_pronamic_payment_form_button_text', true ); ?> |
|
| 43 | + <?php $button_text = get_post_meta($post->ID, '_pronamic_payment_form_button_text', true); ?> |
|
| 44 | 44 | |
| 45 | - <input class="regular-text" type="text" name="_pronamic_payment_form_button_text" value="<?php echo esc_attr( $button_text ); ?>" placeholder="<?php esc_attr_e( 'Pay Now', 'pronamic_ideal' ); ?>" /> |
|
| 45 | + <input class="regular-text" type="text" name="_pronamic_payment_form_button_text" value="<?php echo esc_attr($button_text); ?>" placeholder="<?php esc_attr_e('Pay Now', 'pronamic_ideal'); ?>" /> |
|
| 46 | 46 | </td> |
| 47 | 47 | </tr> |
| 48 | 48 | <tr> |
| 49 | 49 | <th scope="row"> |
| 50 | 50 | <label for="_pronamic_payment_form_amount_method"> |
| 51 | - <?php esc_html_e( 'Amount', 'pronamic_ideal' ); ?> |
|
| 51 | + <?php esc_html_e('Amount', 'pronamic_ideal'); ?> |
|
| 52 | 52 | </label> |
| 53 | 53 | </th> |
| 54 | 54 | <td> |
| 55 | 55 | <select name="_pronamic_payment_form_amount_method"> |
| 56 | 56 | <?php |
| 57 | 57 | |
| 58 | - $amount_method = get_post_meta( $post->ID, '_pronamic_payment_form_amount_method', true ); |
|
| 58 | + $amount_method = get_post_meta($post->ID, '_pronamic_payment_form_amount_method', true); |
|
| 59 | 59 | |
| 60 | 60 | $options = array( |
| 61 | - \Pronamic\WordPress\Pay\Forms\FormPostType::AMOUNT_METHOD_INPUT_ONLY => __( 'Show as input field', 'pronamic_ideal' ), |
|
| 62 | - \Pronamic\WordPress\Pay\Forms\FormPostType::AMOUNT_METHOD_CHOICES_ONLY => __( 'Show as choices', 'pronamic_ideal' ), |
|
| 63 | - \Pronamic\WordPress\Pay\Forms\FormPostType::AMOUNT_METHOD_CHOICES_AND_INPUT => __( 'Show as choices with input field', 'pronamic_ideal' ), |
|
| 61 | + \Pronamic\WordPress\Pay\Forms\FormPostType::AMOUNT_METHOD_INPUT_ONLY => __('Show as input field', 'pronamic_ideal'), |
|
| 62 | + \Pronamic\WordPress\Pay\Forms\FormPostType::AMOUNT_METHOD_CHOICES_ONLY => __('Show as choices', 'pronamic_ideal'), |
|
| 63 | + \Pronamic\WordPress\Pay\Forms\FormPostType::AMOUNT_METHOD_CHOICES_AND_INPUT => __('Show as choices with input field', 'pronamic_ideal'), |
|
| 64 | 64 | ); |
| 65 | 65 | |
| 66 | - foreach ( $options as $value => $name ) { |
|
| 66 | + foreach ($options as $value => $name) { |
|
| 67 | 67 | printf( |
| 68 | 68 | '<option value="%s" %s>%s</option>', |
| 69 | - esc_attr( $value ), |
|
| 70 | - selected( $value, $amount_method, false ), |
|
| 71 | - esc_html( $name ) |
|
| 69 | + esc_attr($value), |
|
| 70 | + selected($value, $amount_method, false), |
|
| 71 | + esc_html($name) |
|
| 72 | 72 | ); |
| 73 | 73 | } |
| 74 | 74 | ?> |
@@ -81,21 +81,21 @@ discard block |
||
| 81 | 81 | <td> |
| 82 | 82 | <?php |
| 83 | 83 | |
| 84 | - $choices = get_post_meta( $post->ID, '_pronamic_payment_form_amount_choices', true ); |
|
| 84 | + $choices = get_post_meta($post->ID, '_pronamic_payment_form_amount_choices', true); |
|
| 85 | 85 | |
| 86 | 86 | // Start with an empty field. |
| 87 | - if ( empty( $choices ) ) { |
|
| 88 | - $choices = array( '' ); |
|
| 87 | + if (empty($choices)) { |
|
| 88 | + $choices = array(''); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | // Add empty input field. |
| 92 | 92 | $choices[] = ''; |
| 93 | 93 | |
| 94 | - foreach ( $choices as $i => $amount ) { |
|
| 95 | - if ( ! empty( $amount ) ) { |
|
| 96 | - $decimals = ( $amount % 100 > 0 ? 2 : 0 ); |
|
| 94 | + foreach ($choices as $i => $amount) { |
|
| 95 | + if ( ! empty($amount)) { |
|
| 96 | + $decimals = ($amount % 100 > 0 ? 2 : 0); |
|
| 97 | 97 | |
| 98 | - $amount = number_format( ( $amount / 100 ), $decimals, pronamic_pay_get_decimal_separator(), pronamic_pay_get_thousands_separator() ); |
|
| 98 | + $amount = number_format(($amount / 100), $decimals, pronamic_pay_get_decimal_separator(), pronamic_pay_get_thousands_separator()); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | printf( |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | € <input id="_pronamic_payment_form_amount_choice_%d" type="text" name="_pronamic_payment_form_amount_choices[]" value="%s" /> |
| 105 | 105 | </label> |
| 106 | 106 | </div>', |
| 107 | - esc_attr( $i ), |
|
| 108 | - esc_attr( $i ), |
|
| 109 | - esc_attr( $amount ) |
|
| 107 | + esc_attr($i), |
|
| 108 | + esc_attr($i), |
|
| 109 | + esc_attr($amount) |
|
| 110 | 110 | ); |
| 111 | 111 | } |
| 112 | 112 | ?> |
@@ -11,14 +11,14 @@ discard block |
||
| 11 | 11 | use Pronamic\WordPress\Pay\Plugin; |
| 12 | 12 | |
| 13 | 13 | $tabs = array( |
| 14 | - 'system_status' => __( 'System Status', 'pronamic_ideal' ), |
|
| 15 | - 'gateways' => __( 'Payment Gateways', 'pronamic_ideal' ), |
|
| 16 | - 'extensions' => __( 'Extensions', 'pronamic_ideal' ), |
|
| 17 | - 'documentation' => __( 'Documentation', 'pronamic_ideal' ), |
|
| 14 | + 'system_status' => __('System Status', 'pronamic_ideal'), |
|
| 15 | + 'gateways' => __('Payment Gateways', 'pronamic_ideal'), |
|
| 16 | + 'extensions' => __('Extensions', 'pronamic_ideal'), |
|
| 17 | + 'documentation' => __('Documentation', 'pronamic_ideal'), |
|
| 18 | 18 | ); |
| 19 | 19 | |
| 20 | -$current_tab = filter_input( INPUT_GET, 'tab', FILTER_SANITIZE_STRING ); |
|
| 21 | -$current_tab = empty( $current_tab ) ? key( $tabs ) : $current_tab; |
|
| 20 | +$current_tab = filter_input(INPUT_GET, 'tab', FILTER_SANITIZE_STRING); |
|
| 21 | +$current_tab = empty($current_tab) ? key($tabs) : $current_tab; |
|
| 22 | 22 | |
| 23 | 23 | ?> |
| 24 | 24 | |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | <h1 class="nav-tab-wrapper"> |
| 27 | 27 | <?php |
| 28 | 28 | |
| 29 | - foreach ( $tabs as $tab => $title ) { |
|
| 30 | - $classes = array( 'nav-tab' ); |
|
| 29 | + foreach ($tabs as $tab => $title) { |
|
| 30 | + $classes = array('nav-tab'); |
|
| 31 | 31 | |
| 32 | - if ( $current_tab === $tab ) { |
|
| 32 | + if ($current_tab === $tab) { |
|
| 33 | 33 | $classes[] = 'nav-tab-active'; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -37,14 +37,14 @@ discard block |
||
| 37 | 37 | array( |
| 38 | 38 | 'page' => 'pronamic_pay_tools', |
| 39 | 39 | 'tab' => $tab, |
| 40 | - ), admin_url( 'admin.php' ) |
|
| 40 | + ), admin_url('admin.php') |
|
| 41 | 41 | ); |
| 42 | 42 | |
| 43 | 43 | printf( |
| 44 | 44 | '<a class="nav-tab %s" href="%s">%s</a>', |
| 45 | - esc_attr( implode( ' ', $classes ) ), |
|
| 46 | - esc_attr( $url ), |
|
| 47 | - esc_html( $title ) |
|
| 45 | + esc_attr(implode(' ', $classes)), |
|
| 46 | + esc_attr($url), |
|
| 47 | + esc_html($title) |
|
| 48 | 48 | ); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | <?php |
| 57 | 57 | |
| 58 | - $file = plugin_dir_path( Plugin::$file ) . 'admin/tab-' . $current_tab . '.php'; |
|
| 58 | + $file = plugin_dir_path(Plugin::$file) . 'admin/tab-' . $current_tab . '.php'; |
|
| 59 | 59 | |
| 60 | - if ( is_readable( $file ) ) { |
|
| 60 | + if (is_readable($file)) { |
|
| 61 | 61 | include $file; |
| 62 | 62 | } |
| 63 | 63 | |
@@ -9,61 +9,61 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | ?> |
| 12 | -<h3><?php esc_html_e( 'Tools', 'pronamic_ideal' ); ?></h3> |
|
| 12 | +<h3><?php esc_html_e('Tools', 'pronamic_ideal'); ?></h3> |
|
| 13 | 13 | |
| 14 | 14 | <p> |
| 15 | - <?php esc_html_e( 'On the tools page you can find some additional features and information.', 'pronamic_ideal' ); ?> |
|
| 15 | + <?php esc_html_e('On the tools page you can find some additional features and information.', 'pronamic_ideal'); ?> |
|
| 16 | 16 | </p> |
| 17 | 17 | |
| 18 | 18 | <p> |
| 19 | - <strong><?php esc_html_e( 'System Status', 'pronamic_ideal' ); ?></strong><br /> |
|
| 20 | - <?php esc_html_e( 'The system status page gives you some basic information about your WordPress installation which come in handy if you are having issues.', 'pronamic_ideal' ); ?> |
|
| 19 | + <strong><?php esc_html_e('System Status', 'pronamic_ideal'); ?></strong><br /> |
|
| 20 | + <?php esc_html_e('The system status page gives you some basic information about your WordPress installation which come in handy if you are having issues.', 'pronamic_ideal'); ?> |
|
| 21 | 21 | </p> |
| 22 | 22 | |
| 23 | 23 | <p> |
| 24 | - <strong><?php esc_html_e( 'iDEAL Status', 'pronamic_ideal' ); ?></strong><br /> |
|
| 25 | - <?php esc_html_e( 'The iDEAL status page gives you information about the iDEAL status of the various banks who offer iDEAL.', 'pronamic_ideal' ); ?> |
|
| 24 | + <strong><?php esc_html_e('iDEAL Status', 'pronamic_ideal'); ?></strong><br /> |
|
| 25 | + <?php esc_html_e('The iDEAL status page gives you information about the iDEAL status of the various banks who offer iDEAL.', 'pronamic_ideal'); ?> |
|
| 26 | 26 | </p> |
| 27 | 27 | |
| 28 | 28 | <p> |
| 29 | - <strong><?php esc_html_e( 'Pages Generator', 'pronamic_ideal' ); ?></strong><br /> |
|
| 30 | - <?php esc_html_e( 'With the pages generator tool you can easily generate some optional payment status pages.', 'pronamic_ideal' ); ?> |
|
| 29 | + <strong><?php esc_html_e('Pages Generator', 'pronamic_ideal'); ?></strong><br /> |
|
| 30 | + <?php esc_html_e('With the pages generator tool you can easily generate some optional payment status pages.', 'pronamic_ideal'); ?> |
|
| 31 | 31 | </p> |
| 32 | 32 | |
| 33 | 33 | <p> |
| 34 | - <strong><?php esc_html_e( 'Gateways', 'pronamic_ideal' ); ?></strong><br /> |
|
| 35 | - <?php esc_html_e( 'The gateways page gives you an overview of all the gateways that er supported by the Pronamic Pay plugin.', 'pronamic_ideal' ); ?> |
|
| 34 | + <strong><?php esc_html_e('Gateways', 'pronamic_ideal'); ?></strong><br /> |
|
| 35 | + <?php esc_html_e('The gateways page gives you an overview of all the gateways that er supported by the Pronamic Pay plugin.', 'pronamic_ideal'); ?> |
|
| 36 | 36 | </p> |
| 37 | 37 | |
| 38 | 38 | <p> |
| 39 | - <strong><?php esc_html_e( 'Extensions', 'pronamic_ideal' ); ?></strong><br /> |
|
| 40 | - <?php esc_html_e( 'The extensions page gives you an overview of all the extensions that er supported by the Pronamic Pay plugin.', 'pronamic_ideal' ); ?> |
|
| 39 | + <strong><?php esc_html_e('Extensions', 'pronamic_ideal'); ?></strong><br /> |
|
| 40 | + <?php esc_html_e('The extensions page gives you an overview of all the extensions that er supported by the Pronamic Pay plugin.', 'pronamic_ideal'); ?> |
|
| 41 | 41 | </p> |
| 42 | 42 | |
| 43 | 43 | <p> |
| 44 | - <strong><?php esc_html_e( 'Methods', 'pronamic_ideal' ); ?></strong><br /> |
|
| 45 | - <?php esc_html_e( 'The methods page gives you an overview of all the methods that er supported by the Pronamic Pay plugin.', 'pronamic_ideal' ); ?> |
|
| 44 | + <strong><?php esc_html_e('Methods', 'pronamic_ideal'); ?></strong><br /> |
|
| 45 | + <?php esc_html_e('The methods page gives you an overview of all the methods that er supported by the Pronamic Pay plugin.', 'pronamic_ideal'); ?> |
|
| 46 | 46 | </p> |
| 47 | 47 | |
| 48 | 48 | <p> |
| 49 | - <strong><?php esc_html_e( 'Documentation', 'pronamic_ideal' ); ?></strong><br /> |
|
| 50 | - <?php esc_html_e( 'The documentation page has an overview of all kind of documentation files from different payment providers.', 'pronamic_ideal' ); ?> |
|
| 49 | + <strong><?php esc_html_e('Documentation', 'pronamic_ideal'); ?></strong><br /> |
|
| 50 | + <?php esc_html_e('The documentation page has an overview of all kind of documentation files from different payment providers.', 'pronamic_ideal'); ?> |
|
| 51 | 51 | </p> |
| 52 | 52 | |
| 53 | 53 | <p> |
| 54 | - <strong><?php esc_html_e( 'Brand', 'pronamic_ideal' ); ?></strong><br /> |
|
| 55 | - <?php esc_html_e( 'The brand page has some additional images and banners which you could add to your WordPress website.', 'pronamic_ideal' ); ?> |
|
| 54 | + <strong><?php esc_html_e('Brand', 'pronamic_ideal'); ?></strong><br /> |
|
| 55 | + <?php esc_html_e('The brand page has some additional images and banners which you could add to your WordPress website.', 'pronamic_ideal'); ?> |
|
| 56 | 56 | </p> |
| 57 | 57 | |
| 58 | 58 | <p> |
| 59 | - <strong><?php esc_html_e( 'License', 'pronamic_ideal' ); ?></strong><br /> |
|
| 60 | - <?php esc_html_e( 'The license page gives you additional information about your license and license key.', 'pronamic_ideal' ); ?> |
|
| 59 | + <strong><?php esc_html_e('License', 'pronamic_ideal'); ?></strong><br /> |
|
| 60 | + <?php esc_html_e('The license page gives you additional information about your license and license key.', 'pronamic_ideal'); ?> |
|
| 61 | 61 | </p> |
| 62 | 62 | |
| 63 | 63 | <div class="wp-pointer-buttons pp-pointer-buttons"> |
| 64 | - <a href="<?php echo esc_attr( add_query_arg( 'page', 'pronamic_pay_settings', admin_url( 'admin.php' ) ) ); ?>" class="button-secondary pp-pointer-button-prev"><?php esc_html_e( 'Previous', 'pronamic_ideal' ); ?></a> |
|
| 64 | + <a href="<?php echo esc_attr(add_query_arg('page', 'pronamic_pay_settings', admin_url('admin.php'))); ?>" class="button-secondary pp-pointer-button-prev"><?php esc_html_e('Previous', 'pronamic_ideal'); ?></a> |
|
| 65 | 65 | |
| 66 | 66 | <span class="pp-pointer-buttons-right"> |
| 67 | - <a href="<?php echo esc_attr( $this->get_close_url() ); ?>" class="button-secondary pp-pointer-button-close"><?php esc_html_e( 'Close', 'pronamic_ideal' ); ?></a> |
|
| 67 | + <a href="<?php echo esc_attr($this->get_close_url()); ?>" class="button-secondary pp-pointer-button-close"><?php esc_html_e('Close', 'pronamic_ideal'); ?></a> |
|
| 68 | 68 | </span> |
| 69 | 69 | </div> |
@@ -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 | ?> |