<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][7561] trunk/bp-groups: Improve inline docs in bp-groups component.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://buddypress.trac.wordpress.org/changeset/7561">7561</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2013-11-11 02:24:01 +0000 (Mon, 11 Nov 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Improve inline docs in bp-groups component. See <a href="http://buddypress.trac.wordpress.org/ticket/5022">#5022</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpgroupsbpgroupsactionsphp">trunk/bp-groups/bp-groups-actions.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsactivityphp">trunk/bp-groups/bp-groups-activity.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsadminphp">trunk/bp-groups/bp-groups-admin.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsadminbarphp">trunk/bp-groups/bp-groups-adminbar.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpgroupsbpgroupsactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-actions.php (7560 => 7561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-actions.php 2013-11-11 02:03:09 UTC (rev 7560)
+++ trunk/bp-groups/bp-groups-actions.php 2013-11-11 02:24:01 UTC (rev 7561)
</span><span class="lines">@@ -3,9 +3,9 @@
</span><span class="cx"> /**
</span><span class="cx"> * BuddyPress Groups Actions
</span><span class="cx"> *
</span><del>- * Action functions are exactly the same as screen functions, however they do not
- * have a template screen associated with them. Usually they will send the user
- * back to the default screen after execution.
</del><ins>+ * Action functions are exactly the same as screen functions, however they do
+ * not have a template screen associated with them. Usually they will send the
+ * user back to the default screen after execution.
</ins><span class="cx"> *
</span><span class="cx"> * @package BuddyPress
</span><span class="cx"> * @subpackage GroupsActions
</span><span class="lines">@@ -14,6 +14,9 @@
</span><span class="cx"> // Exit if accessed directly
</span><span class="cx"> if ( !defined( 'ABSPATH' ) ) exit;
</span><span class="cx">
</span><ins>+/**
+ * Catch and process group creation form submissions.
+ */
</ins><span class="cx"> function groups_action_create_group() {
</span><span class="cx"> global $bp;
</span><span class="cx">
</span><span class="lines">@@ -238,6 +241,8 @@
</span><span class="cx"> add_action( 'bp_actions', 'groups_action_join_group' );
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * Catch and process "Leave Group" button clicks.
+ *
</ins><span class="cx"> * When a group member clicks on the "Leave Group" button from a group's page,
</span><span class="cx"> * this function is run.
</span><span class="cx"> *
</span><span class="lines">@@ -284,7 +289,9 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'bp_actions', 'groups_action_leave_group' );
</span><span class="cx">
</span><del>-
</del><ins>+/**
+ * Sort the group creation steps.
+ */
</ins><span class="cx"> function groups_action_sort_creation_steps() {
</span><span class="cx"> global $bp;
</span><span class="cx">
</span><span class="lines">@@ -310,7 +317,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Catches requests for a random group page (example.com/groups/?random-group) and redirects
</del><ins>+ * Catch requests for a random group page (example.com/groups/?random-group) and redirect.
</ins><span class="cx"> */
</span><span class="cx"> function groups_action_redirect_to_random_group() {
</span><span class="cx">
</span><span class="lines">@@ -323,9 +330,9 @@
</span><span class="cx"> add_action( 'bp_actions', 'groups_action_redirect_to_random_group' );
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Load the activity feed for the specific group.
</del><ins>+ * Load the activity feed for the current group.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (v1.2)
</del><ins>+ * @since BuddyPress (1.2.0)
</ins><span class="cx"> */
</span><span class="cx"> function groups_action_group_feed() {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-activity.php (7560 => 7561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-activity.php 2013-11-11 02:03:09 UTC (rev 7560)
+++ trunk/bp-groups/bp-groups-activity.php 2013-11-11 02:24:01 UTC (rev 7561)
</span><span class="lines">@@ -13,6 +13,9 @@
</span><span class="cx"> // Exit if accessed directly
</span><span class="cx"> if ( !defined( 'ABSPATH' ) ) exit;
</span><span class="cx">
</span><ins>+/**
+ * Register activity actions for the Groups component.
+ */
</ins><span class="cx"> function groups_register_activity_actions() {
</span><span class="cx"> global $bp;
</span><span class="cx">
</span><span class="lines">@@ -35,6 +38,26 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'bp_register_activity_actions', 'groups_register_activity_actions' );
</span><span class="cx">
</span><ins>+/**
+ * Record an activity item related to the Groups component.
+ *
+ * A wrapper for {@link bp_activity_add()} that provides some Groups-specific
+ * defaults.
+ *
+ * @see bp_activity_add() for more detailed description of parameters and
+ * return values.
+ *
+ * @param array $args {
+ * An array of arguments for the new activity item. Accepts all parameters
+ * of {@link bp_activity_add()}. However, this wrapper provides some
+ * additional defaults, as described below:
+ * @type string $component Default: the id of your Groups component
+ * (usually 'groups').
+ * @type bool $hide_sitewide Default: True if the current group is not
+ * public, otherwise false.
+ * }
+ * @return bool See {@link bp_activity_add()}.
+ */
</ins><span class="cx"> function groups_record_activity( $args = '' ) {
</span><span class="cx"> global $bp;
</span><span class="cx">
</span><span class="lines">@@ -75,6 +98,12 @@
</span><span class="cx"> return bp_activity_add( array( 'id' => $id, 'user_id' => $user_id, 'action' => $action, 'content' => $content, 'primary_link' => $primary_link, 'component' => $component, 'type' => $type, 'item_id' => $item_id, 'secondary_item_id' => $secondary_item_id, 'recorded_time' => $recorded_time, 'hide_sitewide' => $hide_sitewide ) );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+/**
+ * Update the last_activity meta value for a given group.
+ *
+ * @param int $group_id Optional. The ID of the group whose last_activity is
+ * being updated. Default: the current group's ID.
+ */
</ins><span class="cx"> function groups_update_last_activity( $group_id = 0 ) {
</span><span class="cx"> global $bp;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-admin.php (7560 => 7561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-admin.php 2013-11-11 02:03:09 UTC (rev 7560)
+++ trunk/bp-groups/bp-groups-admin.php 2013-11-11 02:24:01 UTC (rev 7561)
</span><span class="lines">@@ -2,11 +2,11 @@
</span><span class="cx"> /**
</span><span class="cx"> * BuddyPress Groups component admin screen
</span><span class="cx"> *
</span><del>- * Props to WordPress core for the Comments admin screen, and its contextual help text,
- * on which this implementation is heavily based.
</del><ins>+ * Props to WordPress core for the Comments admin screen, and its contextual
+ * help text, on which this implementation is heavily based.
</ins><span class="cx"> *
</span><span class="cx"> * @package BuddyPress
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> * @subpackage Groups
</span><span class="cx"> */
</span><span class="cx">
</span><span class="lines">@@ -21,9 +21,9 @@
</span><span class="cx"> add_filter( 'set-screen-option', 'bp_groups_admin_screen_options', 10, 3 );
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Registers the Groups component admin screen
</del><ins>+ * Register the Groups component admin screen.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_add_admin_menu() {
</span><span class="cx">
</span><span class="lines">@@ -43,12 +43,15 @@
</span><span class="cx"> add_action( bp_core_admin_hook(), 'bp_groups_add_admin_menu' );
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Add groups component to custom menus array
</del><ins>+ * Add groups component to custom menus array.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * This ensures that the Groups menu item appears in the proper order on the
+ * main Dashboard menu.
</ins><span class="cx"> *
</span><del>- * @param array $custom_menus
- * @return array
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @param array $custom_menus Array of BP top-level menu items.
+ * @return array Menu item array, with Groups added.
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_menu_order( $custom_menus = array() ) {
</span><span class="cx"> array_push( $custom_menus, 'bp-groups' );
</span><span class="lines">@@ -57,11 +60,16 @@
</span><span class="cx"> add_filter( 'bp_admin_menu_order', 'bp_groups_admin_menu_order' );
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Set up the admin page before any output is sent. Register contextual help and screen options for this admin page.
</del><ins>+ * Set up the Groups admin page.
</ins><span class="cx"> *
</span><ins>+ * Loaded before the page is rendered, this function does all initial setup,
+ * including: processing form requests, registering contextual help, and
+ * setting up screen options.
+ *
+ * @since BuddyPress (1.7.0)
+ *
</ins><span class="cx"> * @global object $bp BuddyPress global settings
</span><span class="cx"> * @global BP_Groups_List_Table $bp_groups_list_table Groups screen list table
</span><del>- * @since BuddyPress (1.7)
</del><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_load() {
</span><span class="cx"> global $bp_groups_list_table;
</span><span class="lines">@@ -375,13 +383,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Handle save/update of screen options for the Groups component admin screen
</del><ins>+ * Handle save/update of screen options for the Groups component admin screen.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> *
</span><span class="cx"> * @param string $value Will always be false unless another plugin filters it first.
</span><del>- * @param string $option Screen option name
- * @param string $new_value Screen option form value
</del><ins>+ * @param string $option Screen option name.
+ * @param string $new_value Screen option form value.
</ins><span class="cx"> * @return string Option value. False to abandon update.
</span><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_screen_options( $value, $option, $new_value ) {
</span><span class="lines">@@ -397,9 +405,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Outputs the Groups component admin screens
</del><ins>+ * Select the appropirate Groups admin screen, and output it.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin() {
</span><span class="cx"> // Decide whether to load the index or edit screen
</span><span class="lines">@@ -420,9 +428,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Display the single groups edit screen
</del><ins>+ * Display the single groups edit screen.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_edit() {
</span><span class="cx">
</span><span class="lines">@@ -543,12 +551,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Display the Group delete confirmation screen
</del><ins>+ * Display the Group delete confirmation screen.
</ins><span class="cx"> *
</span><span class="cx"> * We include a separate confirmation because group deletion is truly
</span><span class="cx"> * irreversible.
</span><span class="cx"> *
</span><del>- * @since (BuddyPress) 1.7
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_delete() {
</span><span class="cx">
</span><span class="lines">@@ -591,12 +599,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Display the Groups admin index screen, which contains a list of all your
- * BuddyPress groups.
</del><ins>+ * Display the Groups admin index screen.
</ins><span class="cx"> *
</span><del>- * @global BP_Group_List_Table $bp_groups_list_table Group screen list table
- * @global string $plugin_page
- * @since BuddyPress (1.7)
</del><ins>+ * This screen contains a list of all BuddyPress groups.
+ *
+ * @since BuddyPress (1.7.0)
+ *
+ * @global BP_Group_List_Table $bp_groups_list_table Group screen list table.
+ * @global string $plugin_page Currently viewed plugin page.
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_index() {
</span><span class="cx"> global $bp_groups_list_table, $plugin_page;
</span><span class="lines">@@ -652,10 +662,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Settings metabox
</del><ins>+ * Markup for the single group's Settings metabox.
</ins><span class="cx"> *
</span><del>- * @param object $item Group item
- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @param object $item Information about the current group.
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_edit_metabox_settings( $item ) {
</span><span class="cx">
</span><span class="lines">@@ -690,9 +701,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Add New Members metabox
</del><ins>+ * Output the markup for a single group's Add New Members metabox.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_edit_metabox_add_new_members( $item ) {
</span><span class="cx"> ?>
</span><span class="lines">@@ -703,11 +714,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Members metabox
</del><ins>+ * Renders the Members metabox on single group pages.
</ins><span class="cx"> *
</span><del>- * @param BP_Groups_Group $item The BP_Groups_Group object
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @param BP_Groups_Group $item The BP_Groups_Group object for the current
+ * group.
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_edit_metabox_members( $item ) {
</span><span class="cx"> global $members_template;
</span><span class="lines">@@ -843,10 +855,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Status metabox for the Groups admin edit screen
</del><ins>+ * Renders the Status metabox for the Groups admin edit screen.
</ins><span class="cx"> *
</span><del>- * @param object $item Group item
- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @param object $item Information about the currently displayed group.
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_edit_metabox_status( $item ) {
</span><span class="cx"> $base_url = add_query_arg( array(
</span><span class="lines">@@ -871,7 +884,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Create pagination links out of a BP_Group_Member_Query
</del><ins>+ * Create pagination links out of a BP_Group_Member_Query.
</ins><span class="cx"> *
</span><span class="cx"> * This function is intended to create pagination links for use under the
</span><span class="cx"> * Manage Members section of the Groups Admin Dashboard pages. It is a stopgap
</span><span class="lines">@@ -879,9 +892,11 @@
</span><span class="cx"> * Plugin authors should not use this function, as it is likely to be
</span><span class="cx"> * deprecated soon.
</span><span class="cx"> *
</span><del>- * @since BuddyPress (1.8)
- * @param object $query A BP_Group_Member_Query object
- * @param string $member_type member|mod|admin|banned
</del><ins>+ * @since BuddyPress (1.8.0)
+ *
+ * @param BP_Group_Member_Query $query A BP_Group_Member_Query object.
+ * @param string $member_type member|mod|admin|banned.
+ * @return string Pagination links HTML.
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_create_pagination_links( BP_Group_Member_Query $query, $member_type ) {
</span><span class="cx"> $pagination = '';
</span><span class="lines">@@ -928,9 +943,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Match a set of user ids up to a set of usernames
</del><ins>+ * Get a set of usernames corresponding to a set of user IDs.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @param array $user_ids Array of user IDs.
+ * @return array Array of user_logins corresponding to $user_ids.
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_get_usernames_from_ids( $user_ids = array() ) {
</span><span class="cx">
</span><span class="lines">@@ -945,9 +963,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * AJAX handler for group member autocomplete requests
</del><ins>+ * AJAX handler for group member autocomplete requests.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_autocomplete_handler() {
</span><span class="cx">
</span><span class="lines">@@ -993,28 +1011,36 @@
</span><span class="cx"> /**
</span><span class="cx"> * List table class for the Groups component admin page.
</span><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> class BP_Groups_List_Table extends WP_List_Table {
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * What type of view is being displayed? e.g. "All", "Pending", "Approved", "Spam"...
</del><ins>+ * The type of view currently being displayed.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
- */
</del><ins>+ * e.g. "All", "Pending", "Approved", "Spam"...
+ *
+ * @since BuddyPress (1.7.0)
+ *
+ * @access public
+ * @var string
+ */
</ins><span class="cx"> public $view = 'all';
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Group counts for each group type
</del><ins>+ * Group counts for each group type.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @access public
+ * @var int
</ins><span class="cx"> */
</span><span class="cx"> public $group_counts = 0;
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Constructor
</span><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> public function __construct() {
</span><span class="cx">
</span><span class="lines">@@ -1027,9 +1053,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Handle filtering of data, sorting, pagination, and any other data-manipulation required prior to rendering.
</del><ins>+ * Set up items for display in the list table.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * Handles filtering of data, sorting, pagination, and any other data
+ * manipulation required prior to rendering.
+ *
+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function prepare_items() {
</span><span class="cx"> global $groups_template;
</span><span class="lines">@@ -1132,10 +1161,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Get an array of all the columns on the page
</del><ins>+ * Get an array of all the columns on the page.
</ins><span class="cx"> *
</span><del>- * @return array
- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @return array Array of column headers.
</ins><span class="cx"> */
</span><span class="cx"> function get_column_info() {
</span><span class="cx"> $this->_column_headers = array(
</span><span class="lines">@@ -1148,18 +1178,18 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Displays a message on screen when no items are found (e.g. no search matches)
</del><ins>+ * Display a message on screen when no items are found ("No groups found").
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function no_items() {
</span><span class="cx"> _e( 'No groups found.', 'buddypress' );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Outputs the Groups data table
</del><ins>+ * Output the Groups data table.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function display() {
</span><span class="cx"> extract( $this->_args );
</span><span class="lines">@@ -1189,10 +1219,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Generates content for a single row of the table
</del><ins>+ * Generate content for a single row of the table.
</ins><span class="cx"> *
</span><del>- * @param object $item The current item
- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @param object $item The current group item in the loop.
</ins><span class="cx"> */
</span><span class="cx"> function single_row( $item = array() ) {
</span><span class="cx"> static $even = false;
</span><span class="lines">@@ -1218,7 +1249,7 @@
</span><span class="cx"> /**
</span><span class="cx"> * Get the list of views available on this table (e.g. "all", "public").
</span><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
</ins><span class="cx"> */
</span><span class="cx"> function get_views() {
</span><span class="cx"> $url_base = bp_get_admin_url( 'admin.php?page=bp-groups' ); ?>
</span><span class="lines">@@ -1235,10 +1266,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Get bulk actions
</del><ins>+ * Get bulk actions for single group row.
</ins><span class="cx"> *
</span><del>- * @return array Key/value pairs for the bulk actions dropdown
- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @return array Key/value pairs for the bulk actions dropdown.
</ins><span class="cx"> */
</span><span class="cx"> function get_bulk_actions() {
</span><span class="cx"> return apply_filters( 'bp_groups_list_table_get_bulk_actions', array(
</span><span class="lines">@@ -1249,9 +1281,11 @@
</span><span class="cx"> /**
</span><span class="cx"> * Get the table column titles.
</span><span class="cx"> *
</span><ins>+ * @since BuddyPress (1.7.0)
+ *
</ins><span class="cx"> * @see WP_List_Table::single_row_columns()
</span><del>- * @return array
- * @since BuddyPress (1.7)
</del><ins>+ *
+ * @return array Array of column titles.
</ins><span class="cx"> */
</span><span class="cx"> function get_columns() {
</span><span class="cx"> return array(
</span><span class="lines">@@ -1276,8 +1310,9 @@
</span><span class="cx"> * the sort order - ie, to make it ASC. Thus last_active is set to
</span><span class="cx"> * $desc_first = false.
</span><span class="cx"> *
</span><del>- * @return array
- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @return array Array of sortable column names.
</ins><span class="cx"> */
</span><span class="cx"> function get_sortable_columns() {
</span><span class="cx"> return array(
</span><span class="lines">@@ -1289,22 +1324,26 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Checkbox column
</del><ins>+ * Markup for the Checkbox column.
</ins><span class="cx"> *
</span><del>- * @param array $item A singular item (one full row)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
</ins><span class="cx"> * @see WP_List_Table::single_row_columns()
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ *
+ * @param array $item A singular item (one full row).
</ins><span class="cx"> */
</span><span class="cx"> function column_cb( $item = array() ) {
</span><span class="cx"> printf( '<label class="screen-reader-text" for="gid-%1$d">' . __( 'Select group %1$d', 'buddypress' ) . '</label><input type="checkbox" name="gid[]" value="%1$d" id="gid-%1$d" />', $item['id'] );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Group id column
</del><ins>+ * Markup for the Group ID column.
</ins><span class="cx"> *
</span><del>- * @param array $item A singular item (one full row)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
</ins><span class="cx"> * @see WP_List_Table::single_row_columns()
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ *
+ * @param array $item A singular item (one full row).
</ins><span class="cx"> */
</span><span class="cx"> function column_gid( $item = array() ) {
</span><span class="cx"> echo '<strong>' . $item['id'] . '</strong>';
</span><span class="lines">@@ -1315,9 +1354,11 @@
</span><span class="cx"> *
</span><span class="cx"> * Called "comment" in the CSS so we can re-use some WP core CSS.
</span><span class="cx"> *
</span><del>- * @param array $item A singular item (one full row)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
</ins><span class="cx"> * @see WP_List_Table::single_row_columns()
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ *
+ * @param array $item A singular item (one full row).
</ins><span class="cx"> */
</span><span class="cx"> function column_comment( $item = array() ) {
</span><span class="cx">
</span><span class="lines">@@ -1369,18 +1410,22 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Description column
</del><ins>+ * Markup for the Description column.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @param array Information about the current row.
</ins><span class="cx"> */
</span><span class="cx"> function column_description( $item = array() ) {
</span><span class="cx"> echo apply_filters_ref_array( 'bp_get_group_description', array( $item['description'], $item ) );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Status column
</del><ins>+ * Markup for the Status column.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @param array Information about the current row.
</ins><span class="cx"> */
</span><span class="cx"> function column_status( $item = array() ) {
</span><span class="cx"> $status = $item['status'];
</span><span class="lines">@@ -1404,9 +1449,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Number of Members column
</del><ins>+ * Markup for the Number of Members column.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @param array Information about the current row.
</ins><span class="cx"> */
</span><span class="cx"> function column_members( $item = array() ) {
</span><span class="cx"> $count = groups_get_groupmeta( $item['id'], 'total_member_count' );
</span><span class="lines">@@ -1414,9 +1461,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Last Active column
</del><ins>+ * Markup for the Last Active column.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.7)
</del><ins>+ * @since BuddyPress (1.7.0)
+ *
+ * @param array Information about the current row.
</ins><span class="cx"> */
</span><span class="cx"> function column_last_active( $item = array() ) {
</span><span class="cx"> $last_active = groups_get_groupmeta( $item['id'], 'last_activity' );
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsadminbarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-adminbar.php (7560 => 7561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-adminbar.php 2013-11-11 02:03:09 UTC (rev 7560)
+++ trunk/bp-groups/bp-groups-adminbar.php 2013-11-11 02:24:01 UTC (rev 7561)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> /**
</span><span class="cx"> * BuddyPress Groups Toolbar
</span><span class="cx"> *
</span><del>- * Handles the groups functions related to the WordPress Toolbar
</del><ins>+ * Handles the groups functions related to the WordPress Toolbar.
</ins><span class="cx"> *
</span><span class="cx"> * @package BuddyPress
</span><span class="cx"> * @subpackage Groups
</span><span class="lines">@@ -13,12 +13,11 @@
</span><span class="cx"> if ( !defined( 'ABSPATH' ) ) exit;
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Adds the Group Admin top-level menu to group pages
</del><ins>+ * Add the Group Admin top-level menu when viewing group pages.
</ins><span class="cx"> *
</span><del>- * @package BuddyPress
- * @since BuddyPress (1.5)
</del><ins>+ * @since BuddyPress (1.5.0)
</ins><span class="cx"> *
</span><del>- * @todo Add dynamic menu items for group extensions
</del><ins>+ * @todo Add dynamic menu items for group extensions.
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_group_admin_menu() {
</span><span class="cx"> global $wp_admin_bar, $bp;
</span><span class="lines">@@ -106,9 +105,9 @@
</span><span class="cx"> add_action( 'admin_bar_menu', 'bp_groups_group_admin_menu', 99 );
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Remove rogue WP core edit menu when viewing a group
</del><ins>+ * Remove rogue WP core Edit menu when viewing a single group.
</ins><span class="cx"> *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_remove_edit_page_menu() {
</span><span class="cx"> if ( bp_is_group() ) {
</span></span></pre>
</div>
</div>
</body>
</html>