diff --git src/bp-activity/bp-activity-admin.php src/bp-activity/bp-activity-admin.php
index 4157d6c..6df7dd3 100644
|
|
function bp_activity_admin_load() { |
256 | 256 | add_meta_box( 'bp_activity_type', _x( 'Type', 'activity admin edit screen', 'buddypress' ), 'bp_activity_admin_edit_metabox_type', get_current_screen()->id, 'normal', 'core' ); |
257 | 257 | add_meta_box( 'bp_activity_userid', _x( 'Author ID', 'activity admin edit screen', 'buddypress' ), 'bp_activity_admin_edit_metabox_userid', get_current_screen()->id, 'normal', 'core' ); |
258 | 258 | |
| 259 | /** |
| 260 | * Fires after the registration of all of the default activity meta boxes. |
| 261 | * |
| 262 | * @since 2.4.0 |
| 263 | */ |
| 264 | do_action( 'bp_activity_admin_meta_boxes' ); |
| 265 | |
259 | 266 | // Enqueue JavaScript files |
260 | 267 | wp_enqueue_script( 'postbox' ); |
261 | 268 | wp_enqueue_script( 'dashboard' ); |
… |
… |
function bp_activity_admin_load() { |
306 | 313 | wp_style_add_data( 'bp_activity_admin_css', 'suffix', $min ); |
307 | 314 | } |
308 | 315 | |
| 316 | /** |
| 317 | * Fires after the activity js and style has been enqueued. |
| 318 | * |
| 319 | * @since 2.4.0 |
| 320 | */ |
| 321 | do_action( 'bp_activity_admin_enqueue_scripts' ); |
309 | 322 | |
310 | 323 | // Handle spam/un-spam/delete of activities |
311 | 324 | if ( !empty( $doaction ) && ! in_array( $doaction, array( '-1', 'edit', 'save', ) ) ) { |
… |
… |
class BP_Activity_List_Table extends WP_List_Table { |
1343 | 1356 | * @return array The columns to appear in the Activity list table. |
1344 | 1357 | */ |
1345 | 1358 | function get_columns() { |
1346 | | return array( |
| 1359 | /** |
| 1360 | * Filters the titles for the columns for the activity list table. |
| 1361 | * |
| 1362 | * @since 2.4.0 |
| 1363 | * |
| 1364 | * @param array $value Array of slugs and titles for the columns. |
| 1365 | */ |
| 1366 | return apply_filters( 'bp_activity_list_table_get_columns', array( |
1347 | 1367 | 'cb' => '<input name type="checkbox" />', |
1348 | 1368 | 'author' => _x('Author', 'Admin SWA column header', 'buddypress' ), |
1349 | 1369 | 'comment' => _x( 'Activity', 'Admin SWA column header', 'buddypress' ), |
1350 | 1370 | 'action' => _x( 'Action', 'Admin SWA column header', 'buddypress' ), |
1351 | 1371 | 'response' => _x( 'In Response To', 'Admin SWA column header', 'buddypress' ), |
1352 | | ); |
| 1372 | ) ); |
1353 | 1373 | } |
1354 | 1374 | |
1355 | 1375 | /** |
… |
… |
class BP_Activity_List_Table extends WP_List_Table { |
1393 | 1413 | |
1394 | 1414 | <div class="alignleft actions"> |
1395 | 1415 | <label for="activity-type" class="screen-reader-text"><?php _e( 'Filter by activity type', 'buddypress' ); ?></label> |
1396 | | <select name="activity_type" id="activity-type"> |
| 1416 | <select name="activity_type" id="activity-type"> |
1397 | 1417 | <option value="" <?php selected( ! $selected ); ?>><?php _e( 'View all actions', 'buddypress' ); ?></option> |
1398 | 1418 | |
1399 | 1419 | <?php foreach ( $activity_actions as $component => $actions ) : ?> |
… |
… |
class BP_Activity_List_Table extends WP_List_Table { |
1600 | 1620 | $content = apply_filters_ref_array( 'bp_get_activity_action', array( $item['action'] ) ); |
1601 | 1621 | } |
1602 | 1622 | |
1603 | | echo $content . ' ' . $this->row_actions( $actions ); |
| 1623 | /** |
| 1624 | * Filter here to add extra output to the activity content into the Administration |
| 1625 | * |
| 1626 | * @since 2.4.0 |
| 1627 | * |
| 1628 | * @param string $content The activity content |
| 1629 | * @param array $item The activity object converted into an array |
| 1630 | */ |
| 1631 | echo apply_filters( 'bp_activity_admin_comment_content', $content, $item ) . ' ' . $this->row_actions( $actions ); |
1604 | 1632 | } |
1605 | 1633 | |
1606 | 1634 | /** |
… |
… |
class BP_Activity_List_Table extends WP_List_Table { |
1644 | 1672 | } |
1645 | 1673 | |
1646 | 1674 | /** |
| 1675 | * Allow plugins to add their custom column. |
| 1676 | * |
| 1677 | * @since 2.4.0 |
| 1678 | * |
| 1679 | * @param array $item Information about the current row. |
| 1680 | * @param string $column_name The column name. |
| 1681 | * |
| 1682 | * @return string |
| 1683 | */ |
| 1684 | public function column_default( $item = array(), $column_name = '' ) { |
| 1685 | |
| 1686 | /** |
| 1687 | * Filters a string to allow plugins to add custom column content. |
| 1688 | * |
| 1689 | * @since 2.4.0 |
| 1690 | * |
| 1691 | * @param string $value Empty string. |
| 1692 | * @param string $column_name Name of the column being rendered. |
| 1693 | * @param array $item The current activity item in the loop. |
| 1694 | */ |
| 1695 | return apply_filters( 'bp_activity_admin_get_custom_column', '', $column_name, $item ); |
| 1696 | } |
| 1697 | |
| 1698 | /** |
1647 | 1699 | * Get the user id associated with a given activity item. |
1648 | 1700 | * |
1649 | 1701 | * Wraps bp_activity_get_specific(), with some additional logic for |