Ticket #8144: 8144.3.patch
File 8144.3.patch, 5.3 KB (added by , 5 years ago) |
---|
-
src/bp-members/bp-members-functions.php
1760 1760 'meta' => $usermeta, 1761 1761 ); 1762 1762 1763 BP_Signup::add( $args );1763 $signup_id = BP_Signup::add( $args ); 1764 1764 1765 1765 /** 1766 1766 * Filters if BuddyPress should send an activation key for a new signup. … … 1781 1781 } 1782 1782 1783 1783 bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key, $salutation ); 1784 } elseif ( $signup_id ) { 1785 // Trace the fact this signup email was not sent. 1786 $usermeta['sent_date'] = '0000-00-00 00:00:00'; 1787 1788 BP_Signup::update( array( 1789 'signup_id' => $signup_id, 1790 'meta' => $usermeta, 1791 ) ); 1784 1792 } 1785 1793 } 1786 1794 -
src/bp-members/classes/class-bp-members-admin.php
2118 2118 2119 2119 <ol class="bp-signups-list"> 2120 2120 <?php foreach ( $signups as $signup ) : 2121 $last_notified = mysql2date( 'Y/m/d g:i:s a', $signup->date_sent );2122 2121 $profile_field_ids = array(); 2123 2122 2123 if ( ! $signup->sent_date || '0000-00-00 00:00:00' === $signup->sent_date ) { 2124 $last_notified = __( 'Unsent', 'buddypress' ); 2125 } else { 2126 $last_notified = mysql2date( 'Y/m/d g:i:s a', $signup->sent_date ); 2127 } 2128 2124 2129 // Get all xprofile field IDs except field 1. 2125 2130 if ( ! empty( $signup->meta['profile_field_ids'] ) ) { 2126 2131 $profile_field_ids = array_flip( explode( ',', $signup->meta['profile_field_ids'] ) ); -
src/bp-members/classes/class-bp-members-list-table.php
313 313 $actions = array(); 314 314 315 315 $actions['activate'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $activate_link ), __( 'Activate', 'buddypress' ) ); 316 $actions['resend'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $email_link ), _ _( 'Email', 'buddypress' ) );316 $actions['resend'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $email_link ), _x( 'Email', 'Resend signup activation key', 'buddypress' ) ); 317 317 318 318 if ( current_user_can( 'delete_users' ) ) { 319 319 $actions['delete'] = sprintf( '<a href="%1$s" class="delete">%2$s</a>', esc_url( $delete_link ), __( 'Delete', 'buddypress' ) ); … … 373 373 * @param object|null $signup_object The signup data object. 374 374 */ 375 375 public function column_date_sent( $signup_object = null ) { 376 echo mysql2date( 'Y/m/d', $signup_object->date_sent ); 376 if ( ! $signup_object->sent_date || '0000-00-00 00:00:00' === $signup_object->sent_date ) { 377 $sent_date = __( 'Unsent', 'buddypress' ); 378 } else { 379 $sent_date = mysql2date( 'Y/m/d', $signup_object->sent_date ); 380 } 381 382 echo esc_html( $sent_date ); 377 383 } 378 384 379 385 /** -
src/bp-members/classes/class-bp-members-ms-list-table.php
306 306 $actions = array(); 307 307 308 308 $actions['activate'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $activate_link ), __( 'Activate', 'buddypress' ) ); 309 $actions['resend'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $email_link ), __( 'Email','buddypress' ) );309 $actions['resend'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $email_link ), _x( 'Email', 'Resend signup activation key', 'buddypress' ) ); 310 310 311 311 if ( current_user_can( 'delete_users' ) ) { 312 312 $actions['delete'] = sprintf( '<a href="%1$s" class="delete">%2$s</a>', esc_url( $delete_link ), __( 'Delete', 'buddypress' ) ); … … 375 375 $date = 'Y/m/d \<\b\r \/\> g:i:s a'; 376 376 } 377 377 378 echo mysql2date( $date, $signup_object->date_sent ); 378 if ( ! $signup_object->sent_date || '0000-00-00 00:00:00' === $signup_object->sent_date ) { 379 $sent_date = __( 'Unsent', 'buddypress' ); 380 } else { 381 $sent_date = mysql2date( $date, $signup_object->sent_date ); 382 } 383 384 echo esc_html( $sent_date ); 379 385 } 380 386 381 387 /** -
src/bp-members/classes/class-bp-signup.php
240 240 if ( ! empty( $signup->meta['sent_date'] ) ) { 241 241 $signup->date_sent = $signup->meta['sent_date']; 242 242 } else { 243 $signup->date_sent = $signup->registered;243 $signup->date_sent = __( 'Unsent', 'buddypress' ); 244 244 } 245 245 246 246 $sent_at = mysql2date('U', $signup->date_sent ); … … 256 256 257 257 if ( ! empty( $signup->meta['count_sent'] ) ) { 258 258 $signup->count_sent = absint( $signup->meta['count_sent'] ); 259 } elseif ( isset( $signup->meta['sent_date'] ) && '0000-00-00 00:00:00' === $signup->meta['sent_date'] ) { 260 $signup->count_sent = 0; 261 } elseif ( ! isset( $signup->meta['sent_date'] ) ) { 262 $signup->count_sent = 0; 259 263 } else { 260 264 $signup->count_sent = 1; 261 265 }