diff --git wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/reimbursement-request.php wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/reimbursement-request.php
index 0cd5f6c2..d6064f32 100644
|
|
add_action( 'transition_post_status', __NAMESPACE__ . '\transition_post_status', |
26 | 26 | // Miscellaneous |
27 | 27 | add_filter( 'map_meta_cap', __NAMESPACE__ . '\modify_capabilities', 10, 4 ); |
28 | 28 | add_filter( 'display_post_states', __NAMESPACE__ . '\display_post_states' ); |
| 29 | add_action( 'admin_init', __NAMESPACE__ . '\maybe_display_admin_notices' ); |
29 | 30 | |
30 | 31 | /** |
31 | 32 | * Register the custom post type |
… |
… |
function display_post_states( $states ) { |
404 | 405 | } |
405 | 406 | |
406 | 407 | /** |
| 408 | * Maybe display admin notices |
| 409 | */ |
| 410 | function maybe_display_admin_notices() { |
| 411 | // Display notice when viewing listing of reimbursement requests or creating new |
| 412 | if ( isset( $_GET['post_type'] ) && POST_TYPE === $_GET['post_type'] ) { |
| 413 | add_action( 'admin_notices', __NAMESPACE__ . '\display_notice_group_expenses' ); |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * Display admin notice reminding about grouping expenses |
| 419 | */ |
| 420 | function display_notice_group_expenses() { |
| 421 | $class = 'notice notice-warning'; |
| 422 | $message = esc_html__( 'Each wire transfer and check costs us processing fees, so if you have multiple out-of-pocket expenses, please try to group them into one reimbursement request.', 'wordcamporg' ); |
| 423 | |
| 424 | printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), $message ); |
| 425 | } |
| 426 | |
| 427 | /** |
407 | 428 | * Set the status when reimbursements are submitted. |
408 | 429 | * |
409 | 430 | * @param array $post_data |
… |
… |
function _generate_payment_report_jpm_wires( $args ) { |
1552 | 1573 | // JPM chokes on accents and non-latin characters. |
1553 | 1574 | $results = remove_accents( $results ); |
1554 | 1575 | return $results; |
1555 | | } |
1556 | | No newline at end of file |
| 1576 | } |