Changeset 2632 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-list-table.php
- Timestamp:
- 02/26/2016 12:56:15 AM (10 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
includes/payment-requests-list-table.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network
-
Property
svn:mergeinfo
set to
/sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network merged eligible
-
Property
svn:mergeinfo
set to
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-list-table.php
r2538 r2632 77 77 78 78 if ( 'overdue' == $view ) { 79 $where .= $wpdb->prepare( " AND `status` = 'unpaid' AND `due` > 0 AND `due` <= %d ", time() ); 80 } elseif ( 'pending' == $view ) { 81 $where .= " AND `status` = 'unpaid' "; 79 $where .= $wpdb->prepare( " AND `status` = 'wcb-pending-approval' AND `due` > 0 AND `due` <= %d ", time() ); 80 } elseif ( 'pending-approval' == $view ) { 81 $where .= " AND `status` = 'wcb-pending-approval' "; 82 } elseif ( 'approved' == $view ) { 83 $where .= " AND `status` = 'wcb-approved' "; 84 } elseif ( 'pending-payment' == $view ) { 85 $where .= " AND `status` = 'wcb-pending-payment' "; 82 86 } elseif ( 'paid' == $view ) { 83 $where .= " AND `status` = ' paid' ";84 $orderby = ' created';87 $where .= " AND `status` = 'wcb-paid' "; 88 $orderby = 'updated'; 85 89 $order = 'desc'; 86 } elseif( 'incomplete' == $view ) { 87 $where .= " AND `status` = 'incomplete' "; 90 } elseif ( 'incomplete' == $view ) { 91 $where .= " AND `status` = 'wcb-incomplete' "; 92 } elseif ( 'cancelled-failed' == $view ) { 93 $where .= " AND `status` IN ( 'wcb-failed', 'wcb-cancelled' ) "; 88 94 } 89 95 … … 136 142 */ 137 143 public function column_payment( $request ) { 138 $title = empty( $request->post_title ) ? '(no title)' : $request->post_title; 144 $blog_id = get_current_blog_id(); 145 $title = empty( $request->post_title ) ? '(no title)' : $request->post_title; 139 146 $edit_post_link = add_query_arg( array( 'post' => $request->ID, 'action' => 'edit' ), admin_url( 'post.php' ) ); 140 147 $actions = array( 141 148 'view-all' => sprintf( '<a href="%s" target="_blank">View All</a>', esc_url( admin_url( 'edit.php?post_type=wcp_payment_request' ) ) ), 142 149 ); 150 151 if ( $request->post_status == 'wcb-pending-approval' ) { 152 $approve_url = wp_nonce_url( add_query_arg( array( 153 'wcb-approve' => sprintf( '%d-%d', $blog_id, $request->ID ), 154 ) ), sprintf( 'wcb-approve-%d-%d', $blog_id, $request->ID ) ); 155 156 $actions['wcb-approve'] = sprintf( '<a style="color: green;" onclick="return confirm(\'Approve this payment request?\');" href="%s">Approve</a>', esc_url( $approve_url ) ); 157 } 143 158 144 159 return sprintf( '<a href="%s" class="row-title" target="_blank">%s</a>%s', … … 153 168 */ 154 169 public function column_status( $request ) { 155 return esc_html( ucwords( $request->post_status ) ); 170 $status = get_post_status_object( $request->post_status ); 171 return esc_html( $status->label ); 156 172 } 157 173
Note: See TracChangeset
for help on using the changeset viewer.