diff --git wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php
index b6a9f8d..c481a97 100644
|
|
|
class WordCamp_Budgets { |
| 11 | 11 | * Constructor |
| 12 | 12 | */ |
| 13 | 13 | public function __construct() { |
| 14 | | add_action( 'init', array( __CLASS__, 'register_post_statuses' ) ); |
| 15 | | add_action( 'admin_menu', array( $this, 'register_budgets_menu' ) ); |
| 16 | | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_common_assets' ), 11 ); |
| | 14 | add_action( 'init', array( __CLASS__, 'register_post_statuses' ) ); |
| | 15 | add_action( 'admin_menu', array( $this, 'register_budgets_menu' ) ); |
| | 16 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_common_assets' ), 11 ); |
| 17 | 17 | add_filter( 'user_has_cap', array( __CLASS__, 'user_can_view_payment_details' ), 10, 4 ); |
| | 18 | add_filter( 'default_title', array( $this, 'set_default_payments_title'), 10, 2 ); |
| 18 | 19 | } |
| 19 | 20 | |
| 20 | 21 | /** |
| … |
… |
class WordCamp_Budgets { |
| 121 | 122 | } |
| 122 | 123 | |
| 123 | 124 | /** |
| | 125 | * Set default post title for reimbursments, vendor payment and sponsor invoices |
| | 126 | * |
| | 127 | * @param string $post_title Default post title |
| | 128 | * @param objext $post Current post object |
| | 129 | * |
| | 130 | * @return string $post_title Post title |
| | 131 | */ |
| | 132 | public function set_default_payments_title ( $post_title, $post ) { |
| | 133 | |
| | 134 | if( ! empty( $post->post_type ) ) { |
| | 135 | switch( $post->post_type ) { |
| | 136 | case 'wcb_reimbursement': $post_title = __( 'Reimbursement Request', 'wordcamporg' ); break; |
| | 137 | case 'wcp_payment_request': $post_title = __( 'Vendor Payment', 'wordcamporg' ); break; |
| | 138 | case 'wcb_sponsor_invoice': $post_title = __( 'Sponsor Invoice', 'wordcamporg' ); break; |
| | 139 | } |
| | 140 | } |
| | 141 | |
| | 142 | return $post_title; |
| | 143 | } |
| | 144 | |
| | 145 | /** |
| 124 | 146 | * Enqueue scripts and stylesheets common to all modules |
| 125 | 147 | */ |
| 126 | 148 | public function enqueue_common_assets() { |