Changeset 8141 for sites/trunk/wordcamp.org/public_html/wp-content/plugins
- Timestamp:
- 01/25/2019 03:51:59 AM (6 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-loader.php
r8139 r8141 251 251 252 252 /** 253 * Get all the status that occur after a camp has a signed contract. 254 * 255 * @return array 256 */ 257 public static function get_after_contract_statuses() { 258 return array( 259 'wcpt-needs-fill-list', 260 'wcpt-needs-schedule', 261 'wcpt-scheduled', 262 'wcpt-closed', 263 ); 264 } 265 266 /** 253 267 * Get the milestones that correspond to each status 254 268 * -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/sponsor-invoice.php
r6067 r8141 6 6 7 7 namespace WordCamp\Budgets\Sponsor_Invoices; 8 use WP_Post; 9 use WordCamp_Loader; 8 10 9 11 defined( 'WPINC' ) or die(); … … 244 246 * Render the Status metabox 245 247 * 246 * @param \WP_Post $post248 * @param WP_Post $post The invoice post 247 249 */ 248 250 function render_status_metabox( $post ) { 251 require_once( WP_PLUGIN_DIR . '/wcpt/wcpt-event/class-event-loader.php' ); 252 require_once( WP_PLUGIN_DIR . '/wcpt/wcpt-wordcamp/wordcamp-loader.php' ); 253 249 254 wp_nonce_field( 'status', 'status_nonce' ); 250 255 251 256 $delete_text = EMPTY_TRASH_DAYS ? esc_html__( 'Move to Trash' ) : esc_html__( 'Delete Permanently' ); 257 $wordcamp = get_wordcamp_post(); 252 258 253 259 /* … … 269 275 } 270 276 277 $allowed_submit_statuses = WordCamp_Loader::get_after_contract_statuses(); 271 278 $current_user_can_edit_request = in_array( $post->post_status, $allowed_edit_statuses, true ); 279 $current_user_can_submit_request = $wordcamp && in_array( $wordcamp->post_status, $allowed_submit_statuses, true ); 272 280 273 281 require_once( dirname( __DIR__ ) . '/views/sponsor-invoice/metabox-status.php' ); -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/sponsor-invoice/metabox-status.php
r4967 r8141 2 2 3 3 namespace WordCamp\Budgets\Sponsor_Invoices; 4 use WP_Post; 5 4 6 defined( 'WPINC' ) or die(); 7 8 /** 9 * @var WP_Post $post 10 * @var string $delete_text 11 * @var array $allowed_edit_statuses 12 * @var bool $current_user_can_edit_request 13 * @var bool $current_user_can_submit_request 14 */ 5 15 6 16 ?> … … 41 51 42 52 <div id="major-publishing-actions"> 43 <?php if ( $current_user_can_edit_request ) : ?>53 <?php if ( $current_user_can_edit_request && $current_user_can_submit_request ) : ?> 44 54 45 55 <div id="delete-action"> … … 64 74 <div class="clear"></div> 65 75 76 <?php elseif ( ! $current_user_can_submit_request ) : ?> 77 78 <p> 79 <?php _e( "Invoices can't be submitted until your venue contract has been signed.", 'wordcamporg' ); ?> 80 </p> 81 66 82 <?php else : ?> 67 83
Note: See TracChangeset
for help on using the changeset viewer.