@@ -46,15 +46,15 @@ discard block |
||
46 | 46 | $this->plugin = $plugin; |
47 | 47 | $this->admin = $admin; |
48 | 48 | |
49 | - add_filter( 'manage_edit-' . self::POST_TYPE . '_columns', array( $this, 'edit_columns' ) ); |
|
49 | + add_filter( 'manage_edit-'.self::POST_TYPE.'_columns', array( $this, 'edit_columns' ) ); |
|
50 | 50 | |
51 | - add_action( 'manage_' . self::POST_TYPE . '_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 ); |
|
51 | + add_action( 'manage_'.self::POST_TYPE.'_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 ); |
|
52 | 52 | |
53 | 53 | add_action( 'post_edit_form_tag', array( $this, 'post_edit_form_tag' ) ); |
54 | 54 | |
55 | 55 | add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) ); |
56 | 56 | |
57 | - add_action( 'save_post_' . self::POST_TYPE, array( $this, 'save_post' ) ); |
|
57 | + add_action( 'save_post_'.self::POST_TYPE, array( $this, 'save_post' ) ); |
|
58 | 58 | |
59 | 59 | add_action( 'display_post_states', array( $this, 'display_post_states' ), 10, 2 ); |
60 | 60 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $name = __( 'Dashboard', 'pronamic_ideal' ); |
153 | 153 | } |
154 | 154 | |
155 | - $content[] = sprintf( |
|
155 | + $content[ ] = sprintf( |
|
156 | 156 | '<a href="%s" target="_blank">%s</a>', |
157 | 157 | esc_attr( $url ), |
158 | 158 | esc_html( ucfirst( $name ) ) |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | |
180 | 180 | if ( intval( get_option( 'pronamic_pay_config_id' ) ) === $post->ID ) { |
181 | - $post_states['pronamic_pay_config_default'] = __( 'Default', 'pronamic_ideal' ); |
|
181 | + $post_states[ 'pronamic_pay_config_default' ] = __( 'Default', 'pronamic_ideal' ); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | return $post_states; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | public function meta_box_config( $post ) { |
240 | 240 | wp_nonce_field( 'pronamic_pay_save_gateway', 'pronamic_pay_nonce' ); |
241 | 241 | |
242 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-gateway-config.php'; |
|
242 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-gateway-config.php'; |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | /** |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * @param WP_Post $post The object for the current post/page. |
249 | 249 | */ |
250 | 250 | public function meta_box_test( $post ) { |
251 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-gateway-test.php'; |
|
251 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-gateway-test.php'; |
|
252 | 252 | } |
253 | 253 | |
254 | 254 | /** |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | public function save_post( $post_id ) { |
260 | 260 | // Nonce. |
261 | - if ( ! filter_has_var( INPUT_POST, 'pronamic_pay_nonce' ) ) { |
|
261 | + if ( !filter_has_var( INPUT_POST, 'pronamic_pay_nonce' ) ) { |
|
262 | 262 | return $post_id; |
263 | 263 | } |
264 | 264 | |
@@ -278,9 +278,9 @@ discard block |
||
278 | 278 | ); |
279 | 279 | |
280 | 280 | foreach ( $fields as $field ) { |
281 | - if ( isset( $field['meta_key'], $field['filter'] ) ) { |
|
282 | - $name = $field['meta_key']; |
|
283 | - $filter = $field['filter']; |
|
281 | + if ( isset( $field[ 'meta_key' ], $field[ 'filter' ] ) ) { |
|
282 | + $name = $field[ 'meta_key' ]; |
|
283 | + $filter = $field[ 'filter' ]; |
|
284 | 284 | |
285 | 285 | $definition[ $name ] = $filter; |
286 | 286 | } |
@@ -288,28 +288,28 @@ discard block |
||
288 | 288 | |
289 | 289 | $data = filter_input_array( INPUT_POST, $definition ); |
290 | 290 | |
291 | - if ( ! empty( $data['_pronamic_gateway_id'] ) ) { |
|
291 | + if ( !empty( $data[ '_pronamic_gateway_id' ] ) ) { |
|
292 | 292 | $integrations = $this->admin->plugin->gateway_integrations; |
293 | 293 | |
294 | - if ( isset( $integrations[ $data['_pronamic_gateway_id'] ] ) ) { |
|
295 | - $integration = $integrations[ $data['_pronamic_gateway_id'] ]; |
|
294 | + if ( isset( $integrations[ $data[ '_pronamic_gateway_id' ] ] ) ) { |
|
295 | + $integration = $integrations[ $data[ '_pronamic_gateway_id' ] ]; |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | if ( $integration ) { |
299 | 299 | $settings = $integration->get_settings(); |
300 | 300 | |
301 | 301 | foreach ( $fields as $field ) { |
302 | - if ( isset( $field['default'], $field['meta_key'], $data[ $field['meta_key'] ] ) ) { |
|
302 | + if ( isset( $field[ 'default' ], $field[ 'meta_key' ], $data[ $field[ 'meta_key' ] ] ) ) { |
|
303 | 303 | // Remove default value if not applicable to the selected gateway. |
304 | - if ( isset( $field['methods'] ) ) { |
|
305 | - $clean_default = array_intersect( $settings, $field['methods'] ); |
|
304 | + if ( isset( $field[ 'methods' ] ) ) { |
|
305 | + $clean_default = array_intersect( $settings, $field[ 'methods' ] ); |
|
306 | 306 | |
307 | 307 | if ( empty( $clean_default ) ) { |
308 | - $meta_value = get_post_meta( $post_id, $field['meta_key'], true ); |
|
308 | + $meta_value = get_post_meta( $post_id, $field[ 'meta_key' ], true ); |
|
309 | 309 | |
310 | 310 | // Only remove value if not saved before. |
311 | 311 | if ( empty( $meta_value ) ) { |
312 | - $data[ $field['meta_key'] ] = null; |
|
312 | + $data[ $field[ 'meta_key' ] ] = null; |
|
313 | 313 | |
314 | 314 | continue; |
315 | 315 | } |
@@ -317,13 +317,13 @@ discard block |
||
317 | 317 | } |
318 | 318 | |
319 | 319 | // Set the default value if empty. |
320 | - if ( empty( $data[ $field['meta_key'] ] ) ) { |
|
321 | - $default = $field['default']; |
|
320 | + if ( empty( $data[ $field[ 'meta_key' ] ] ) ) { |
|
321 | + $default = $field[ 'default' ]; |
|
322 | 322 | |
323 | - if ( is_array( $default ) && 2 === count( $default ) && Util::class_method_exists( $default[0], $default[1] ) ) { |
|
324 | - $data[ $field['meta_key'] ] = call_user_func( $default, $field ); |
|
323 | + if ( is_array( $default ) && 2 === count( $default ) && Util::class_method_exists( $default[ 0 ], $default[ 1 ] ) ) { |
|
324 | + $data[ $field[ 'meta_key' ] ] = call_user_func( $default, $field ); |
|
325 | 325 | } else { |
326 | - $data[ $field['meta_key'] ] = $default; |
|
326 | + $data[ $field[ 'meta_key' ] ] = $default; |
|
327 | 327 | } |
328 | 328 | } |
329 | 329 | } |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | // Filter data through gateway integration settings. |
333 | 333 | $settings_classes = $integration->get_settings_class(); |
334 | 334 | |
335 | - if ( ! is_array( $settings_classes ) ) { |
|
335 | + if ( !is_array( $settings_classes ) ) { |
|
336 | 336 | $settings_classes = array( $settings_classes ); |
337 | 337 | } |
338 | 338 | |
@@ -348,8 +348,8 @@ discard block |
||
348 | 348 | pronamic_pay_update_post_meta_data( $post_id, $data ); |
349 | 349 | |
350 | 350 | // Transient. |
351 | - delete_transient( 'pronamic_pay_issuers_' . $post_id ); |
|
352 | - delete_transient( 'pronamic_gateway_payment_methods_' . $post_id ); |
|
351 | + delete_transient( 'pronamic_pay_issuers_'.$post_id ); |
|
352 | + delete_transient( 'pronamic_gateway_payment_methods_'.$post_id ); |
|
353 | 353 | |
354 | 354 | PaymentMethods::update_active_payment_methods(); |
355 | 355 | } |
@@ -373,14 +373,14 @@ discard block |
||
373 | 373 | 0 => '', // Unused. Messages start at index 1. |
374 | 374 | 1 => __( 'Configuration updated.', 'pronamic_ideal' ), |
375 | 375 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352799&filters[translation_id]=37947229 |
376 | - 2 => $messages['post'][2], |
|
376 | + 2 => $messages[ 'post' ][ 2 ], |
|
377 | 377 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352800&filters[translation_id]=37947870 |
378 | - 3 => $messages['post'][3], |
|
378 | + 3 => $messages[ 'post' ][ 3 ], |
|
379 | 379 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352798&filters[translation_id]=37947230 |
380 | 380 | 4 => __( 'Configuration updated.', 'pronamic_ideal' ), |
381 | 381 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352801&filters[translation_id]=37947231 |
382 | 382 | // translators: %s: date and time of the revision. |
383 | - 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Configuration restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // WPCS: CSRF ok. |
|
383 | + 5 => isset( $_GET[ 'revision' ] ) ? sprintf( __( 'Configuration restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET[ 'revision' ], false ) ) : false, // WPCS: CSRF ok. |
|
384 | 384 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352802&filters[translation_id]=37949178 |
385 | 385 | 6 => __( 'Configuration published.', 'pronamic_ideal' ), |
386 | 386 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352803&filters[translation_id]=37947232 |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352804&filters[translation_id]=37949303 |
389 | 389 | 8 => __( 'Configuration submitted.', 'pronamic_ideal' ), |
390 | 390 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352805&filters[translation_id]=37949302 |
391 | - 9 => sprintf( __( 'Configuration scheduled for: %s.', 'pronamic_ideal' ), '<strong>' . $scheduled_date . '</strong>' ), |
|
391 | + 9 => sprintf( __( 'Configuration scheduled for: %s.', 'pronamic_ideal' ), '<strong>'.$scheduled_date.'</strong>' ), |
|
392 | 392 | // @https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352806&filters[translation_id]=37949301 |
393 | 393 | 10 => __( 'Configuration draft updated.', 'pronamic_ideal' ), |
394 | 394 | ); |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | |
47 | 47 | add_filter( 'request', array( $this, 'request' ) ); |
48 | 48 | |
49 | - add_filter( 'manage_edit-' . self::POST_TYPE . '_columns', array( $this, 'columns' ) ); |
|
50 | - add_filter( 'manage_edit-' . self::POST_TYPE . '_sortable_columns', array( $this, 'sortable_columns' ) ); |
|
49 | + add_filter( 'manage_edit-'.self::POST_TYPE.'_columns', array( $this, 'columns' ) ); |
|
50 | + add_filter( 'manage_edit-'.self::POST_TYPE.'_sortable_columns', array( $this, 'sortable_columns' ) ); |
|
51 | 51 | |
52 | - add_action( 'manage_' . self::POST_TYPE . '_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 ); |
|
52 | + add_action( 'manage_'.self::POST_TYPE.'_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 ); |
|
53 | 53 | |
54 | 54 | add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) ); |
55 | 55 | |
@@ -71,10 +71,10 @@ discard block |
||
71 | 71 | $screen = get_current_screen(); |
72 | 72 | |
73 | 73 | if ( self::POST_TYPE === $screen->post_type ) { |
74 | - if ( ! isset( $vars['post_status'] ) ) { |
|
75 | - $vars['post_status'] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_subscription_states() ); |
|
74 | + if ( !isset( $vars[ 'post_status' ] ) ) { |
|
75 | + $vars[ 'post_status' ] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_subscription_states() ); |
|
76 | 76 | |
77 | - $vars['post_status'][] = 'publish'; |
|
77 | + $vars[ 'post_status' ][ ] = 'publish'; |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | * @return array |
113 | 113 | */ |
114 | 114 | public function sortable_columns( $sortable_columns ) { |
115 | - $sortable_columns['pronamic_subscription_title'] = 'ID'; |
|
116 | - $sortable_columns['pronamic_subscription_date'] = 'date'; |
|
115 | + $sortable_columns[ 'pronamic_subscription_title' ] = 'ID'; |
|
116 | + $sortable_columns[ 'pronamic_subscription_date' ] = 'date'; |
|
117 | 117 | |
118 | 118 | return $sortable_columns; |
119 | 119 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $source_id = $subscription->get_source_id(); |
157 | 157 | $source_description = $subscription->get_source_description(); |
158 | 158 | |
159 | - $source_id_text = '#' . $source_id; |
|
159 | + $source_id_text = '#'.$source_id; |
|
160 | 160 | |
161 | 161 | $source_link = $subscription->get_source_link(); |
162 | 162 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $config_id = get_post_meta( $payment->get_id(), '_pronamic_payment_config_id', true ); |
197 | 197 | } |
198 | 198 | |
199 | - if ( isset( $config_id ) && ! empty( $config_id ) ) { |
|
199 | + if ( isset( $config_id ) && !empty( $config_id ) ) { |
|
200 | 200 | echo get_the_title( $config_id ); |
201 | 201 | } else { |
202 | 202 | echo '—'; |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | * @param WP_Post $post The object for the current post/page. |
321 | 321 | */ |
322 | 322 | public function meta_box_info( $post ) { |
323 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-subscription-info.php'; |
|
323 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-subscription-info.php'; |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | /** |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | ) |
338 | 338 | ); |
339 | 339 | |
340 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-notes.php'; |
|
340 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-notes.php'; |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | /** |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | * @param WP_Post $post The object for the current post/page. |
347 | 347 | */ |
348 | 348 | public function meta_box_payments( $post ) { |
349 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-subscription-payments.php'; |
|
349 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-subscription-payments.php'; |
|
350 | 350 | } |
351 | 351 | |
352 | 352 | /** |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | public function meta_box_update( $post ) { |
358 | 358 | wp_nonce_field( 'pronamic_subscription_update', 'pronamic_subscription_update_nonce' ); |
359 | 359 | |
360 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-subscription-update.php'; |
|
360 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-subscription-update.php'; |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | /** |
@@ -406,11 +406,11 @@ discard block |
||
406 | 406 | * @param \WP_Post $post WordPress post. |
407 | 407 | */ |
408 | 408 | public function transition_post_status( $new_status, $old_status, $post ) { |
409 | - if ( ! filter_has_var( INPUT_POST, 'pronamic_subscription_update_nonce' ) ) { |
|
409 | + if ( !filter_has_var( INPUT_POST, 'pronamic_subscription_update_nonce' ) ) { |
|
410 | 410 | return; |
411 | 411 | } |
412 | 412 | |
413 | - if ( ! check_admin_referer( 'pronamic_subscription_update', 'pronamic_subscription_update_nonce' ) ) { |
|
413 | + if ( !check_admin_referer( 'pronamic_subscription_update', 'pronamic_subscription_update_nonce' ) ) { |
|
414 | 414 | return; |
415 | 415 | } |
416 | 416 |
@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | |
53 | 53 | add_filter( 'request', array( $this, 'request' ) ); |
54 | 54 | |
55 | - add_filter( 'manage_edit-' . self::POST_TYPE . '_columns', array( $this, 'columns' ) ); |
|
56 | - add_filter( 'manage_edit-' . self::POST_TYPE . '_sortable_columns', array( $this, 'sortable_columns' ) ); |
|
55 | + add_filter( 'manage_edit-'.self::POST_TYPE.'_columns', array( $this, 'columns' ) ); |
|
56 | + add_filter( 'manage_edit-'.self::POST_TYPE.'_sortable_columns', array( $this, 'sortable_columns' ) ); |
|
57 | 57 | |
58 | - add_action( 'manage_' . self::POST_TYPE . '_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 ); |
|
58 | + add_action( 'manage_'.self::POST_TYPE.'_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 ); |
|
59 | 59 | |
60 | 60 | add_action( 'load-post.php', array( $this, 'maybe_check_status' ) ); |
61 | 61 | |
@@ -90,10 +90,10 @@ discard block |
||
90 | 90 | $screen = get_current_screen(); |
91 | 91 | |
92 | 92 | if ( self::POST_TYPE === $screen->post_type ) { |
93 | - if ( ! isset( $vars['post_status'] ) ) { |
|
94 | - $vars['post_status'] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_payment_states() ); |
|
93 | + if ( !isset( $vars[ 'post_status' ] ) ) { |
|
94 | + $vars[ 'post_status' ] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_payment_states() ); |
|
95 | 95 | |
96 | - $vars['post_status'][] = 'publish'; |
|
96 | + $vars[ 'post_status' ][ ] = 'publish'; |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | |
@@ -105,25 +105,25 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function maybe_check_status() { |
107 | 107 | // Current user. |
108 | - if ( ! current_user_can( 'edit_payments' ) ) { |
|
108 | + if ( !current_user_can( 'edit_payments' ) ) { |
|
109 | 109 | return; |
110 | 110 | } |
111 | 111 | |
112 | 112 | // Screen. |
113 | 113 | $screen = get_current_screen(); |
114 | 114 | |
115 | - if ( ! ( 'post' === $screen->base && 'pronamic_payment' === $screen->post_type ) ) { |
|
115 | + if ( !( 'post' === $screen->base && 'pronamic_payment' === $screen->post_type ) ) { |
|
116 | 116 | return; |
117 | 117 | } |
118 | 118 | |
119 | 119 | $post_id = filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT ); |
120 | 120 | |
121 | - if ( filter_has_var( INPUT_GET, 'pronamic_pay_check_status' ) && check_admin_referer( 'pronamic_payment_check_status_' . $post_id ) ) { |
|
121 | + if ( filter_has_var( INPUT_GET, 'pronamic_pay_check_status' ) && check_admin_referer( 'pronamic_payment_check_status_'.$post_id ) ) { |
|
122 | 122 | $payment = get_pronamic_payment( $post_id ); |
123 | 123 | |
124 | 124 | \Pronamic\WordPress\Pay\Plugin::update_payment( $payment, false ); |
125 | 125 | |
126 | - $this->admin_notices[] = array( |
|
126 | + $this->admin_notices[ ] = array( |
|
127 | 127 | 'type' => 'info', |
128 | 128 | 'message' => __( 'Payment status updated.', 'pronamic_ideal' ), |
129 | 129 | ); |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | foreach ( $this->admin_notices as $notice ) { |
138 | 138 | printf( |
139 | 139 | '<div class="notice notice-%1$s"><p>%2$s</p></div>', |
140 | - esc_attr( $notice['type'] ), |
|
141 | - esc_html( $notice['message'] ) |
|
140 | + esc_attr( $notice[ 'type' ] ), |
|
141 | + esc_html( $notice[ 'message' ] ) |
|
142 | 142 | ); |
143 | 143 | } |
144 | 144 | } |
@@ -193,8 +193,8 @@ discard block |
||
193 | 193 | * @return array |
194 | 194 | */ |
195 | 195 | public function default_hidden_columns( $hidden ) { |
196 | - $hidden[] = 'pronamic_payment_gateway'; |
|
197 | - $hidden[] = 'pronamic_payment_description'; |
|
196 | + $hidden[ ] = 'pronamic_payment_gateway'; |
|
197 | + $hidden[ ] = 'pronamic_payment_description'; |
|
198 | 198 | |
199 | 199 | return $hidden; |
200 | 200 | } |
@@ -206,9 +206,9 @@ discard block |
||
206 | 206 | * @return array |
207 | 207 | */ |
208 | 208 | public function sortable_columns( $sortable_columns ) { |
209 | - $sortable_columns['pronamic_payment_title'] = 'ID'; |
|
210 | - $sortable_columns['pronamic_payment_amount'] = 'pronamic_payment_amount'; |
|
211 | - $sortable_columns['pronamic_payment_date'] = 'date'; |
|
209 | + $sortable_columns[ 'pronamic_payment_title' ] = 'ID'; |
|
210 | + $sortable_columns[ 'pronamic_payment_amount' ] = 'pronamic_payment_amount'; |
|
211 | + $sortable_columns[ 'pronamic_payment_date' ] = 'date'; |
|
212 | 212 | |
213 | 213 | return $sortable_columns; |
214 | 214 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | |
256 | 256 | $recurring = get_post_meta( $post_id, '_pronamic_payment_recurring', true ); |
257 | 257 | |
258 | - if ( ! $recurring ) { |
|
258 | + if ( !$recurring ) { |
|
259 | 259 | $label = __( 'First of recurring payment', 'pronamic_ideal' ); |
260 | 260 | $class = ' pronamic-pay-icon-recurring-first'; |
261 | 261 | } |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $source_id = $payment->get_source_id(); |
275 | 275 | $source_description = $payment->get_source_description(); |
276 | 276 | |
277 | - $source_id_text = '#' . $source_id; |
|
277 | + $source_id_text = '#'.$source_id; |
|
278 | 278 | |
279 | 279 | $source_link = $payment->get_source_link(); |
280 | 280 | |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | case 'pronamic_payment_gateway': |
311 | 311 | $config_id = get_post_meta( $post_id, '_pronamic_payment_config_id', true ); |
312 | 312 | |
313 | - if ( ! empty( $config_id ) ) { |
|
313 | + if ( !empty( $config_id ) ) { |
|
314 | 314 | echo get_the_title( $config_id ); |
315 | 315 | } else { |
316 | 316 | echo '—'; |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | * @param WP_Post $post The object for the current post/page. |
424 | 424 | */ |
425 | 425 | public function meta_box_info( $post ) { |
426 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-payment-info.php'; |
|
426 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-payment-info.php'; |
|
427 | 427 | } |
428 | 428 | |
429 | 429 | /** |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | ) |
441 | 441 | ); |
442 | 442 | |
443 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-notes.php'; |
|
443 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-notes.php'; |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | /** |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | * @param WP_Post $post The object for the current post/page. |
450 | 450 | */ |
451 | 451 | public function meta_box_subscription( $post ) { |
452 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-payment-subscription.php'; |
|
452 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-payment-subscription.php'; |
|
453 | 453 | } |
454 | 454 | |
455 | 455 | /** |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | public function meta_box_update( $post ) { |
461 | 461 | wp_nonce_field( 'pronamic_payment_update', 'pronamic_payment_update_nonce' ); |
462 | 462 | |
463 | - include plugin_dir_path( $this->plugin->get_file() ) . 'admin/meta-box-payment-update.php'; |
|
463 | + include plugin_dir_path( $this->plugin->get_file() ).'admin/meta-box-payment-update.php'; |
|
464 | 464 | } |
465 | 465 | |
466 | 466 | /** |
@@ -548,14 +548,14 @@ discard block |
||
548 | 548 | 0 => '', // Unused. Messages start at index 1. |
549 | 549 | 1 => __( 'Payment updated.', 'pronamic_ideal' ), |
550 | 550 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352799&filters[translation_id]=37947229. |
551 | - 2 => $messages['post'][2], |
|
551 | + 2 => $messages[ 'post' ][ 2 ], |
|
552 | 552 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352800&filters[translation_id]=37947870. |
553 | - 3 => $messages['post'][3], |
|
553 | + 3 => $messages[ 'post' ][ 3 ], |
|
554 | 554 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352798&filters[translation_id]=37947230. |
555 | 555 | 4 => __( 'Payment updated.', 'pronamic_ideal' ), |
556 | 556 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352801&filters[translation_id]=37947231. |
557 | 557 | // translators: %s: date and time of the revision |
558 | - 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Payment restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // WPCS: CSRF ok. |
|
558 | + 5 => isset( $_GET[ 'revision' ] ) ? sprintf( __( 'Payment restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET[ 'revision' ], false ) ) : false, // WPCS: CSRF ok. |
|
559 | 559 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352802&filters[translation_id]=37949178. |
560 | 560 | 6 => __( 'Payment published.', 'pronamic_ideal' ), |
561 | 561 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352803&filters[translation_id]=37947232. |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352804&filters[translation_id]=37949303. |
564 | 564 | 8 => __( 'Payment submitted.', 'pronamic_ideal' ), |
565 | 565 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352805&filters[translation_id]=37949302. |
566 | - 9 => sprintf( __( 'Payment scheduled for: %s.', 'pronamic_ideal' ), '<strong>' . $scheduled_date . '</strong>' ), |
|
566 | + 9 => sprintf( __( 'Payment scheduled for: %s.', 'pronamic_ideal' ), '<strong>'.$scheduled_date.'</strong>' ), |
|
567 | 567 | // @https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352806&filters[translation_id]=37949301. |
568 | 568 | 10 => __( 'Payment draft updated.', 'pronamic_ideal' ), |
569 | 569 | ); |