Changeset 2516
- Timestamp:
- 02/16/2016 10:01:52 PM (11 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-dashboard.php
r2500 r2516 144 144 'post_id' => $request->ID, 145 145 'created' => get_post_time( 'U', true, $request->ID ), 146 // todo Sometimes this is empty. Core normally catches this (r8636), but misses in our case because we don't use drafts. #1350-meta might have the side-effect of solving this.147 146 'paid' => absint( get_post_meta( $request->ID, '_camppayments_date_vendor_paid', true ) ), 148 147 'due' => absint( get_post_meta( $request->ID, '_camppayments_due_by', true ) ), -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php
r2515 r2516 21 21 // Saving posts 22 22 add_filter( 'wp_insert_post_data', array( $this, 'update_request_status' ), 10, 2 ); 23 add_filter( 'wp_insert_post_data', array( $this, 'ensure_post_date_gmt_set' ), 10, 2 ); 23 24 add_action( 'save_post', array( $this, 'save_payment' ), 10, 2 ); 24 25 add_filter( 'map_meta_cap', array( $this, 'modify_capabilities' ), 10, 4 ); … … 514 515 $this->notify_requester_payment_made( $post_data_raw['ID'], $post_data ); 515 516 } 517 } 518 } 519 520 return $post_data; 521 } 522 523 /** 524 * Ensure that new posts have the `post_date_gmt` field populated. 525 * 526 * Core only handles this for post types that use the `draft` status (see r8636). 527 * 528 * @param array $post_data 529 * @param array $post_data_raw 530 * 531 * @return array 532 */ 533 public function ensure_post_date_gmt_set( $post_data, $post_data_raw ) { 534 if ( 'auto-draft' !== $post_data['post_status'] ) { 535 if ( '0000-00-00 00:00:00' === $post_data['post_date_gmt'] ) { 536 $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] ); 516 537 } 517 538 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)