diff --git src/bp-activity/classes/class-bp-activity-list-table.php src/bp-activity/classes/class-bp-activity-list-table.php
index c581905e7..e7d023969 100644
|
|
class BP_Activity_List_Table extends WP_List_Table { |
338 | 338 | * |
339 | 339 | * @return array Key/value pairs for the bulk actions dropdown. |
340 | 340 | */ |
341 | | function get_bulk_actions() { |
342 | | $actions = array(); |
343 | | $actions['bulk_spam'] = __( 'Mark as Spam', 'buddypress' ); |
344 | | $actions['bulk_ham'] = __( 'Not Spam', 'buddypress' ); |
345 | | $actions['bulk_delete'] = __( 'Delete Permanently', 'buddypress' ); |
| 341 | public function get_bulk_actions() { |
346 | 342 | |
347 | 343 | /** |
348 | 344 | * Filters the default bulk actions so plugins can add custom actions. |
… |
… |
class BP_Activity_List_Table extends WP_List_Table { |
351 | 347 | * |
352 | 348 | * @param array $actions Default available actions for bulk operations. |
353 | 349 | */ |
354 | | return apply_filters( 'bp_activity_list_table_get_bulk_actions', $actions ); |
| 350 | return apply_filters( 'bp_activity_list_table_get_bulk_actions', array( |
| 351 | 'bulk_spam' => __( 'Mark as Spam', 'buddypress' ), |
| 352 | 'bulk_ham' => __( 'Not Spam', 'buddypress' ), |
| 353 | 'bulk_delete' => __( 'Delete Permanently', 'buddypress' ), |
| 354 | ) ); |
355 | 355 | } |
356 | 356 | |
357 | 357 | /** |
… |
… |
class BP_Activity_List_Table extends WP_List_Table { |
364 | 364 | * @return array The columns to appear in the Activity list table. |
365 | 365 | */ |
366 | 366 | function get_columns() { |
| 367 | |
367 | 368 | /** |
368 | 369 | * Filters the titles for the columns for the activity list table. |
369 | 370 | * |
… |
… |
class BP_Activity_List_Table extends WP_List_Table { |
373 | 374 | */ |
374 | 375 | return apply_filters( 'bp_activity_list_table_get_columns', array( |
375 | 376 | 'cb' => '<input name type="checkbox" />', |
376 | | 'author' => _x('Author', 'Admin SWA column header', 'buddypress' ), |
| 377 | 'author' => _x( 'Author', 'Admin SWA column header', 'buddypress' ), |
377 | 378 | 'comment' => _x( 'Activity', 'Admin SWA column header', 'buddypress' ), |
378 | 379 | 'action' => _x( 'Action', 'Admin SWA column header', 'buddypress' ), |
379 | 380 | 'response' => _x( 'In Response To', 'Admin SWA column header', 'buddypress' ), |
… |
… |
class BP_Activity_List_Table extends WP_List_Table { |
383 | 384 | /** |
384 | 385 | * Get the column names for sortable columns. |
385 | 386 | * |
386 | | * Currently, returns an empty array (no columns are sortable). |
387 | | * |
388 | 387 | * @since 1.6.0 |
389 | | * @todo For this to work, BP_Activity_Activity::get() needs updating |
390 | | * to support ordering by specific fields. |
391 | 388 | * |
392 | 389 | * @return array The columns that can be sorted on the Activity screen. |
393 | 390 | */ |
394 | | function get_sortable_columns() { |
395 | | return array(); |
| 391 | public function get_sortable_columns() { |
396 | 392 | |
397 | | /*return array( |
398 | | 'author' => array( 'activity_author', false ), // Intentionally not using "=>" |
399 | | );*/ |
| 393 | /** |
| 394 | * Filters the column names for the sortable columns. |
| 395 | * |
| 396 | * @since 5.0.0 |
| 397 | * |
| 398 | * @param array $value Array of column names. |
| 399 | */ |
| 400 | return apply_filters( 'bp_activity_list_table_get_sortable_columns', array() ); |
400 | 401 | } |
401 | 402 | |
402 | 403 | /** |
diff --git src/bp-groups/classes/class-bp-groups-list-table.php src/bp-groups/classes/class-bp-groups-list-table.php
index f831e0d60..039d913ad 100644
|
|
class BP_Groups_List_Table extends WP_List_Table { |
417 | 417 | * @return array Array of sortable column names. |
418 | 418 | */ |
419 | 419 | public function get_sortable_columns() { |
420 | | return array( |
| 420 | |
| 421 | /** |
| 422 | * Filters the column names for the sortable columns. |
| 423 | * |
| 424 | * @since 5.0.0 |
| 425 | * |
| 426 | * @param array $value Array of keys and their values. |
| 427 | */ |
| 428 | return apply_filters( 'bp_groups_list_table_get_sortable_columns', array( |
421 | 429 | 'gid' => array( 'gid', false ), |
422 | 430 | 'comment' => array( 'name', false ), |
423 | 431 | 'members' => array( 'members', false ), |
424 | 432 | 'last_active' => array( 'last_active', false ), |
425 | | ); |
| 433 | ) ); |
426 | 434 | } |
427 | 435 | |
428 | 436 | /** |