|
@@ -46,10 +46,10 @@ discard block |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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
|
|