[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-activity/classes/ -> class-bp-activity-list-table.php (summary)

BuddyPress Activity component admin list table. Props to WordPress core for the Comments admin screen, and its contextual help text, on which this implementation is heavily based.

File Size: 915 lines (27 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BP_Activity_List_Table:: (22 methods):
  __construct()
  prepare_items()
  get_column_info()
  get_default_primary_column_name()
  no_items()
  display()
  single_row()
  get_views()
  get_bulk_actions()
  get_columns()
  get_sortable_columns()
  extra_tablenav()
  row_actions()
  column_cb()
  column_author()
  column_action()
  column_comment()
  column_response()
  column_default()
  get_activity_user_id()
  can_comment()
  flatten_activity_array()


Class: BP_Activity_List_Table  - X-Ref

List table class for the Activity component admin page.

__construct()   X-Ref
Constructor.

since: 1.6.0

prepare_items()   X-Ref
Handle filtering of data, sorting, pagination, and any other data manipulation prior to rendering.

since: 1.6.0

get_column_info()   X-Ref
Get an array of all the columns on the page.

return: array Column headers.
since: 1.6.0

get_default_primary_column_name()   X-Ref
Get name of default primary column

return: string
since: 2.3.3

no_items()   X-Ref
Display a message on screen when no items are found (e.g. no search matches).

since: 1.6.0

display()   X-Ref
Output the Activity data table.

since: 1.6.0

single_row( $item )   X-Ref
Generate content for a single row of the table.

param: object $item The current item.
since: 1.6.0

get_views()   X-Ref
Get the list of views available on this table (e.g. "all", "spam").

since: 1.6.0

get_bulk_actions()   X-Ref
Get bulk actions.

return: array Key/value pairs for the bulk actions dropdown.
since: 1.6.0

get_columns()   X-Ref
Get the table column titles.

return: array The columns to appear in the Activity list table.
since: 1.6.0

get_sortable_columns()   X-Ref
Get the column names for sortable columns.

return: array The columns that can be sorted on the Activity screen.
since: 1.6.0

extra_tablenav( $which )   X-Ref
Markup for the "filter" part of the form (i.e. which activity type to display).

param: string $which 'top' or 'bottom'.
since: 1.6.0

row_actions( $actions, $always_visible = false )   X-Ref
Override WP_List_Table::row_actions().

Basically a duplicate of the row_actions() method, but removes the
unnecessary <button> addition.

param: array $actions The list of actions.
param: bool  $always_visible Whether the actions should be always visible.
return: string
since: 2.3.3
since: 2.3.4 Visibility set to public for compatibility with WP < 4.0.0.

column_cb( $item )   X-Ref
Checkbox column markup.

param: array $item A singular item (one full row).
since: 1.6.0

column_author( $item )   X-Ref
Author column markup.

param: array $item A singular item (one full row).
since: 1.6.0

column_action( $item )   X-Ref
Action column markup.

param: array $item A singular item (one full row).
since: 2.0.0

column_comment( $item )   X-Ref
Content column, and "quick admin" rollover actions.

Called "comment" in the CSS so we can re-use some WP core CSS.

param: array $item A singular item (one full row).
since: 1.6.0

column_response( $item )   X-Ref
"In response to" column markup.

param: array $item A singular item (one full row).
since: 1.6.0

column_default( $item = array()   X-Ref
Allow plugins to add their custom column.

param: array  $item        Information about the current row.
param: string $column_name The column name.
return: string
since: 2.4.0

get_activity_user_id( $activity_id )   X-Ref
Get the user id associated with a given activity item.

Wraps bp_activity_get_specific(), with some additional logic for
avoiding duplicate queries.

param: int $activity_id Activity ID to retrieve User ID for.
return: int User ID of the activity item in question.
since: 1.6.0

can_comment( $item )   X-Ref
Checks if an activity item can be replied to.

This method merges functionality from {@link bp_activity_can_comment()} and
{@link bp_blogs_disable_activity_commenting()}. This is done because the activity
list table doesn't use a BuddyPress activity loop, which prevents those
functions from working as intended.

param: array $item An array version of the BP_Activity_Activity object.
return: bool $can_comment
since: 2.0.0
since: 2.5.0 Include Post type activities types

flatten_activity_array( $tree )   X-Ref
Flatten the activity array.

In some cases, BuddyPress gives us a structured tree of activity
items plus their comments. This method converts it to a flat array.

param: array $tree Source array.
return: array Flattened array.
since: 1.6.0



Generated: Tue Mar 19 01:01:09 2024 Cross-referenced by PHPXref 0.7.1