- Timestamp:
- 12/10/2021 04:14:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-list-table.php
r12591 r13169 28 28 29 29 /** 30 * Signup profile fields. 31 * 32 * @since 10.0.0 33 * 34 * @var array 35 */ 36 public $signup_field_labels = array(); 37 38 /** 30 39 * Constructor. 31 40 * … … 139 148 public function get_columns() { 140 149 141 /** 142 * Filters the single site Members signup columns. 143 * 144 * @since 2.0.0 145 * 146 * @param array $value Array of columns to display. 147 */ 148 return apply_filters( 'bp_members_signup_columns', array( 150 $columns = array( 149 151 'cb' => '<input type="checkbox" />', 150 152 'username' => __( 'Username', 'buddypress' ), … … 154 156 'date_sent' => __( 'Last Sent', 'buddypress' ), 155 157 'count_sent' => __( 'Emails Sent', 'buddypress' ) 156 ) ); 158 ); 159 160 /** 161 * Filters the single site Members signup columns. 162 * 163 * @since 2.0.0 164 * 165 * @param array $value Array of columns to display. 166 */ 167 return apply_filters( 'bp_members_signup_columns', $columns ); 157 168 } 158 169 … … 172 183 } 173 184 174 return $actions; 185 /** 186 * Filters the bulk actions for signups. 187 * 188 * @since 10.0.0 189 * 190 * @param array $actions Array of actions and corresponding labels. 191 */ 192 return apply_filters( 'bp_members_ms_signup_bulk_actions', $actions ); 175 193 } 176 194 … … 184 202 public function no_items() { 185 203 186 if ( bp_get_signup_allowed() ) {204 if ( bp_get_signup_allowed() || bp_get_membership_requests_required() ) { 187 205 esc_html_e( 'No pending accounts found.', 'buddypress' ); 188 206 } else { … … 343 361 public function column_name( $signup_object = null ) { 344 362 echo esc_html( $signup_object->user_name ); 363 364 // Insert the extended profile modal content required by thickbox. 365 if ( ! bp_is_active( 'xprofile' ) ) { 366 return; 367 } 368 369 $profile_field_ids = array(); 370 371 // Fetch registration field data once only. 372 if ( ! $this->signup_field_labels ) { 373 $field_groups = bp_xprofile_get_groups( 374 array( 375 'fetch_fields' => true, 376 'signup_fields_only' => true, 377 ) 378 ); 379 380 foreach ( $field_groups as $field_group ) { 381 foreach ( $field_group->fields as $field ) { 382 $this->signup_field_labels[ $field->id ] = $field->name; 383 } 384 } 385 } 386 387 bp_members_admin_preview_signup_profile_info( $this->signup_field_labels, $signup_object ); 345 388 } 346 389 … … 364 407 */ 365 408 public function column_registered( $signup_object = null ) { 366 echo mysql2date( 'Y/m/d ', $signup_object->registered );409 echo mysql2date( 'Y/m/d g:i:s a', $signup_object->registered ); 367 410 } 368 411 … … 375 418 */ 376 419 public function column_date_sent( $signup_object = null ) { 377 echo mysql2date( 'Y/m/d', $signup_object->date_sent ); 378 } 379 380 /** 381 * Display number of time an activation email has been sent. 420 if ( $signup_object->count_sent > 0 ) { 421 echo mysql2date( 'Y/m/d g:i:s a', $signup_object->date_sent ); 422 } else { 423 $message = __( 'Not yet notified', 'buddypress' ); 424 425 /** 426 * Filters the "not yet sent" message for "Last Sent" 427 * column in Manage Signups list table. 428 * 429 * @since 10.0.0 430 * 431 * @param string $message "Not yet sent" message. 432 * @param object|null $signup_object Signup object instance. 433 */ 434 $message = apply_filters( 'bp_members_signup_date_sent_unsent_message', $message, $signup_object ); 435 436 echo esc_html( $message ); 437 } 438 } 439 440 /** 441 * Display number of times an activation email has been sent. 382 442 * 383 443 * @since 2.0.0
Note: See TracChangeset
for help on using the changeset viewer.