Changeset 2396
- Timestamp:
- 01/28/2016 03:59:51 PM (8 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/reimbursement-request.php
r2395 r2396 223 223 224 224 /** 225 * Get the name of the requester226 *227 * @param int $post_author_id228 *229 * @return string230 */231 function get_requester_name( $post_author_id ) {232 $requester_name = '';233 234 $author = get_user_by( 'id', $post_author_id );235 236 if ( is_a( $author, 'WP_User' ) ) {237 $requester_name = $author->get( 'display_name' );238 }239 240 return $requester_name;241 }242 243 /**244 225 * Determine if the current user can submit changes to the given Reimbursement Request 245 226 * … … 271 252 $status_name = get_status_name( $post->post_status ); 272 253 $request_id = get_current_blog_id() . '-' . $post->ID; 273 $requested_by = get_requester_name( $post->post_author );254 $requested_by = \WordCamp_Budgets::get_requester_name( $post->post_author ); 274 255 $delete_text = EMPTY_TRASH_DAYS ? __( 'Move to Trash' ) : __( 'Delete Permanently' ); 275 256 $update_text = current_user_can( 'manage_network' ) ? __( 'Update Request', 'wordcamporg' ) : __( 'Send Request', 'wordcamporg' ); … … 338 319 339 320 if ( empty ( $name_of_payer ) ) { 340 $name_of_payer = get_requester_name( $post->post_author );321 $name_of_payer = \WordCamp_Budgets::get_requester_name( $post->post_author ); 341 322 } 342 323 … … 602 583 603 584 $subject = 'New note on ' . sanitize_text_field( $request->post_title ); 604 $note_author_name = get_requester_name( $note['author_id'] );585 $note_author_name = \WordCamp_Budgets::get_requester_name( $note['author_id'] ); 605 586 $request_url = admin_url( sprintf( 'post.php?post=%s&action=edit', $request->ID ) ); 606 587 $headers = array( 'Reply-To: support@wordcamp.org' ); -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php
r2395 r2396 369 369 370 370 /** 371 * Get the name of the requester 372 * 373 * @param int $post_author_id 374 * 375 * @return string 376 */ 377 public static function get_requester_name( $post_author_id ) { 378 $requester_name = ''; 379 380 $author = get_user_by( 'id', $post_author_id ); 381 382 if ( is_a( $author, 'WP_User' ) ) { 383 $requester_name = $author->get( 'display_name' ); 384 } 385 386 return $requester_name; 387 } 388 389 /** 371 390 * Get the e-mail address of the requester in `Name <address>` format 372 391 * -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/reimbursement-request/metabox-notes.php
r2392 r2396 16 16 <span class="wcbrr-note-meta"> 17 17 <?php echo esc_html( date( 'Y-m-d', $note['timestamp'] ) ); ?> 18 <?php echo esc_html( get_requester_name( $note['author_id'] ) ); ?>:18 <?php echo esc_html( \WordCamp_Budgets::get_requester_name( $note['author_id'] ) ); ?>: 19 19 </span> 20 20
Note: See TracChangeset
for help on using the changeset viewer.