<!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][7472] trunk/bp-activity/bp-activity-admin.php: Improve inline docs in bp-activity-admin.php.</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/7472">7472</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2013-10-24 00:08:59 +0000 (Thu, 24 Oct 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Improve inline docs in bp-activity-admin.php. See <a href="http://buddypress.trac.wordpress.org/ticket/5022">#5022</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityadminphp">trunk/bp-activity/bp-activity-admin.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-admin.php (7471 => 7472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-admin.php  2013-10-23 19:54:07 UTC (rev 7471)
+++ trunk/bp-activity/bp-activity-admin.php     2013-10-24 00:08:59 UTC (rev 7472)
</span><span class="lines">@@ -1,12 +1,12 @@
</span><span class="cx"> <?php
</span><span class="cx"> /**
</span><del>- * BuddyPress Activity component admin screen
</del><ins>+ * BuddyPress Activity component admin screen.
</ins><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.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  * @subpackage Activity
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">  add_filter( 'set-screen-option', 'bp_activity_admin_screen_options', 10, 3 );
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Registers the Activity component admin screen.
</del><ins>+ * Register the Activity component admin screen.
</ins><span class="cx">  *
</span><span class="cx">  * @since BuddyPress (1.6)
</span><span class="cx">  */
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">  * which all appear together in the middle of the Dashboard menu. This function
</span><span class="cx">  * adds the Activity page to the array of these menu items.
</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">  * @param array $custom_menus The list of top-level BP menu items.
</span><span class="cx">  * @return array $custom_menus List of top-level BP menu items, with Activity added
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">  * Processes requests to add new activity comments, and echoes HTML for a new
</span><span class="cx">  * table row.
</span><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_activity_admin_reply() {
</span><span class="cx">  // Check nonce
</span><span class="lines">@@ -136,9 +136,10 @@
</span><span class="cx"> /**
</span><span class="cx">  * Handle save/update of screen options for the Activity component admin screen.
</span><span class="cx">  *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  *
</span><del>- * @param string $value Will always be false unless another plugin filters it first.
</del><ins>+ * @param string $value Will always be false unless another plugin filters it
+ *        first.
</ins><span class="cx">  * @param string $option Screen option name.
</span><span class="cx">  * @param string $new_value Screen option form value.
</span><span class="cx">  * @return string Option value. False to abandon update.
</span><span class="lines">@@ -158,7 +159,7 @@
</span><span class="cx"> /**
</span><span class="cx">  * Hide the advanced edit meta boxes by default, so we don't clutter the screen.
</span><span class="cx">  *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  *
</span><span class="cx">  * @param WP_Screen $screen Screen identifier.
</span><span class="cx">  * @return array Hidden Meta Boxes.
</span><span class="lines">@@ -182,7 +183,7 @@
</span><span class="cx">  *   - Enqueues scripts and styles
</span><span class="cx">  *   - Catches POST and GET requests related to Activity
</span><span class="cx">  *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  *
</span><span class="cx">  * @global object $bp BuddyPress global settings.
</span><span class="cx">  * @global BP_Activity_List_Table $bp_activity_list_table Activity screen list table.
</span><span class="lines">@@ -532,9 +533,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Outputs the Activity component admin screens.
</del><ins>+ * Output the Activity component admin screens.
</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_activity_admin() {
</span><span class="cx">  // Decide whether to load the index or edit screen
</span><span class="lines">@@ -552,7 +553,7 @@
</span><span class="cx"> /**
</span><span class="cx">  * Display the single activity edit screen.
</span><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_activity_admin_edit() {
</span><span class="cx"> 
</span><span class="lines">@@ -643,7 +644,7 @@
</span><span class="cx"> /**
</span><span class="cx">  * Status metabox for the Activity admin edit screen.
</span><span class="cx">  *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  *
</span><span class="cx">  * @param object $item Activity item.
</span><span class="cx">  */
</span><span class="lines">@@ -699,7 +700,7 @@
</span><span class="cx"> /**
</span><span class="cx">  * Primary link metabox for the Activity admin edit screen.
</span><span class="cx">  *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  *
</span><span class="cx">  * @param object $item Activity item.
</span><span class="cx">  */
</span><span class="lines">@@ -716,7 +717,7 @@
</span><span class="cx"> /**
</span><span class="cx">  * User ID metabox for the Activity admin edit screen.
</span><span class="cx">  *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  *
</span><span class="cx">  * @param object $item Activity item.
</span><span class="cx">  */
</span><span class="lines">@@ -732,11 +733,11 @@
</span><span class="cx"> /**
</span><span class="cx">  * Activity type metabox for the Activity admin edit screen
</span><span class="cx">  *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  *
</span><del>- * @global object $bp BuddyPress global settings
</del><ins>+ * @global object $bp BuddyPress global settings.
</ins><span class="cx">  *
</span><del>- * @param object $item Activity item
</del><ins>+ * @param object $item Activity item.
</ins><span class="cx">  */
</span><span class="cx"> function bp_activity_admin_edit_metabox_type( $item ) {
</span><span class="cx">  global $bp;
</span><span class="lines">@@ -770,9 +771,9 @@
</span><span class="cx"> /**
</span><span class="cx">  * Primary item ID/Secondary item ID metabox for the Activity admin edit screen.
</span><span class="cx">  *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  *
</span><del>- * @param object $item Activity item
</del><ins>+ * @param object $item Activity item.
</ins><span class="cx">  */
</span><span class="cx"> function bp_activity_admin_edit_metabox_itemids( $item ) {
</span><span class="cx"> ?>
</span><span class="lines">@@ -792,9 +793,10 @@
</span><span class="cx"> /**
</span><span class="cx">  * Display the Activity admin index screen, which contains a list of all the activities.
</span><span class="cx">  *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.6.0)
</ins><span class="cx">  *
</span><del>- * @global BP_Activity_List_Table $bp_activity_list_table Activity screen list table.
</del><ins>+ * @global BP_Activity_List_Table $bp_activity_list_table Activity screen list
+ *         table.
</ins><span class="cx">  * @global string $plugin_page The current plugin page.
</span><span class="cx">  */
</span><span class="cx"> function bp_activity_admin_index() {
</span><span class="lines">@@ -925,30 +927,35 @@
</span><span class="cx"> class BP_Activity_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>+         * What type of view is being displayed?
</ins><span class="cx">    *
</span><del>-        * @since BuddyPress (1.6)
-       */
</del><ins>+         * e.g. "all", "pending", "approved", "spam"...
+        *
+        * @since BuddyPress (1.6.0)
+        * @var string
+        */
</ins><span class="cx">   public $view = 'all';
</span><span class="cx"> 
</span><span class="cx">  /**
</span><span class="cx">   * How many activity items have been marked as spam.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
+        * @var int
</ins><span class="cx">    */
</span><span class="cx">  public $spam_count = 0;
</span><span class="cx"> 
</span><span class="cx">  /**
</span><span class="cx">   * Store activity-to-user-ID mappings for use in the In Response To column.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
+        * @var array
</ins><span class="cx">    */
</span><span class="cx">  protected $activity_user_id = array();
</span><span class="cx"> 
</span><span class="cx">  /**
</span><span class="cx">   * Constructor.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    */
</span><span class="cx">  public function __construct() {
</span><span class="cx"> 
</span><span class="lines">@@ -961,9 +968,9 @@
</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>+         * Handle filtering of data, sorting, pagination, and any other data manipulation prior to rendering.
</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 prepare_items() {
</span><span class="cx">          $screen = get_current_screen();
</span><span class="lines">@@ -1064,9 +1071,9 @@
</span><span class="cx">  /**
</span><span class="cx">   * Get an array of all the columns on the page.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><del>-        * @return array
</del><ins>+         * @return array 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">@@ -1079,18 +1086,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 (e.g. no search matches).
</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 no_items() {
</span><span class="cx">          _e( 'No activities found.', 'buddypress' );
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="cx">  /**
</span><del>-        * Outputs the Activity data table.
</del><ins>+         * Output the Activity data table.
</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 display() {
</span><span class="cx">          extract( $this->_args );
</span><span class="lines">@@ -1120,11 +1127,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>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><del>-        * @param object $item The current item
</del><ins>+         * @param object $item The current item.
</ins><span class="cx">    */
</span><span class="cx">  function single_row( $item ) {
</span><span class="cx">          static $even = false;
</span><span class="lines">@@ -1145,7 +1152,7 @@
</span><span class="cx">  /**
</span><span class="cx">   * Get the list of views available on this table (e.g. "all", "spam").
</span><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 get_views() {
</span><span class="cx">          $url_base = bp_get_admin_url( 'admin.php?page=bp-activity' ); ?>
</span><span class="lines">@@ -1162,7 +1169,7 @@
</span><span class="cx">  /**
</span><span class="cx">   * Get bulk actions.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><span class="cx">   * @return array Key/value pairs for the bulk actions dropdown.
</span><span class="cx">   */
</span><span class="lines">@@ -1178,7 +1185,7 @@
</span><span class="cx">  /**
</span><span class="cx">   * Get the table column titles.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><span class="cx">   * @see WP_List_Table::single_row_columns()
</span><span class="cx">   *
</span><span class="lines">@@ -1198,8 +1205,9 @@
</span><span class="cx">   *
</span><span class="cx">   * Currently, returns an empty array (no columns are sortable).
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
-        * @todo For this to work, BP_Activity_Activity::get() needs updating to supporting ordering by specific fields
</del><ins>+         * @since BuddyPress (1.6.0)
+        * @todo For this to work, BP_Activity_Activity::get() needs updating
+        *       to support ordering by specific fields.
</ins><span class="cx">    *
</span><span class="cx">   * @return array The columns that can be sorted on the Activity screen.
</span><span class="cx">   */
</span><span class="lines">@@ -1214,7 +1222,7 @@
</span><span class="cx">  /**
</span><span class="cx">   * Markup for the "filter" part of the form (i.e. which activity type to display).
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><span class="cx">   * @param string $which 'top' or 'bottom'.
</span><span class="cx">   */
</span><span class="lines">@@ -1247,7 +1255,7 @@
</span><span class="cx">  /**
</span><span class="cx">   * Checkbox column markup.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><span class="cx">   * @see WP_List_Table::single_row_columns()
</span><span class="cx">   *
</span><span class="lines">@@ -1260,11 +1268,11 @@
</span><span class="cx">  /**
</span><span class="cx">   * Author column markup.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><span class="cx">   * @see WP_List_Table::single_row_columns()
</span><span class="cx">   *
</span><del>-        * @param array $item A singular item (one full row)
</del><ins>+         * @param array $item A singular item (one full row).
</ins><span class="cx">    */
</span><span class="cx">  function column_author( $item ) {
</span><span class="cx">          echo '<strong>' . get_avatar( $item['user_id'], '32' ) . ' ' . bp_core_get_userlink( $item['user_id'] ) . '</strong>';
</span><span class="lines">@@ -1275,10 +1283,10 @@
</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>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><span class="cx">   * @see WP_List_Table::single_row_columns()
</span><del>-        &
</del><ins>+         *
</ins><span class="cx">    * @param array $item A singular item (one full row).
</span><span class="cx">   */
</span><span class="cx">  function column_comment( $item ) {
</span><span class="lines">@@ -1349,7 +1357,7 @@
</span><span class="cx">  /**
</span><span class="cx">   * "In response to" column markup.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><span class="cx">   * @see WP_List_Table::single_row_columns()
</span><span class="cx">   *
</span><span class="lines">@@ -1383,7 +1391,7 @@
</span><span class="cx">   * Wraps bp_activity_get_specific(), with some additional logic for
</span><span class="cx">   * avoiding duplicate queries.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><span class="cx">   * @param int $activity_id Activity ID to retrieve User ID for.
</span><span class="cx">   * @return int User ID of the activity item in question.
</span><span class="lines">@@ -1421,7 +1429,7 @@
</span><span class="cx">   * In some cases, BuddyPress gives us a structured tree of activity
</span><span class="cx">   * items plus their comments. This method converts it to a flat array.
</span><span class="cx">   *
</span><del>-        * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.6.0)
</ins><span class="cx">    *
</span><span class="cx">   * @param array $tree Source array.
</span><span class="cx">   * @return array Flattened array.
</span></span></pre>
</div>
</div>

</body>
</html>