<!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][9025] trunk/src/bp-notifications: Improve inline documentation for Notifications 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/9025">9025</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2014-09-17 00:05:45 +0000 (Wed, 17 Sep 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Improve inline documentation for Notifications component.
See <a href="http://buddypress.trac.wordpress.org/ticket/5022">#5022</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpnotificationsbpnotificationsactionsphp">trunk/src/bp-notifications/bp-notifications-actions.php</a></li>
<li><a href="#trunksrcbpnotificationsbpnotificationsclassesphp">trunk/src/bp-notifications/bp-notifications-classes.php</a></li>
<li><a href="#trunksrcbpnotificationsbpnotificationsfunctionsphp">trunk/src/bp-notifications/bp-notifications-functions.php</a></li>
<li><a href="#trunksrcbpnotificationsbpnotificationsloaderphp">trunk/src/bp-notifications/bp-notifications-loader.php</a></li>
<li><a href="#trunksrcbpnotificationsbpnotificationstemplatephp">trunk/src/bp-notifications/bp-notifications-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpnotificationsbpnotificationsactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/src/bp-notifications/bp-notifications-actions.php (9024 => 9025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/bp-notifications/bp-notifications-actions.php 2014-09-16 14:52:09 UTC (rev 9024)
+++ trunk/src/bp-notifications/bp-notifications-actions.php 2014-09-17 00:05:45 UTC (rev 9025)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><del>- * @return boolean
</del><ins>+ * @return bool
</ins><span class="cx"> */
</span><span class="cx"> function bp_notifications_action_mark_read() {
</span><span class="cx">
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><del>- * @return boolean
</del><ins>+ * @return bool
</ins><span class="cx"> */
</span><span class="cx"> function bp_notifications_action_mark_unread() {
</span><span class="cx">
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><del>- * @return boolean
</del><ins>+ * @return bool
</ins><span class="cx"> */
</span><span class="cx"> function bp_notifications_action_delete() {
</span><span class="cx">
</span></span></pre></div>
<a id="trunksrcbpnotificationsbpnotificationsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/src/bp-notifications/bp-notifications-classes.php (9024 => 9025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/bp-notifications/bp-notifications-classes.php 2014-09-16 14:52:09 UTC (rev 9024)
+++ trunk/src/bp-notifications/bp-notifications-classes.php 2014-09-17 00:05:45 UTC (rev 9025)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> /**
</span><span class="cx"> * The notification ID.
</span><span class="cx"> *
</span><ins>+ * @since BuddyPress (1.9.0)
+ * @access public
</ins><span class="cx"> * @var int
</span><span class="cx"> */
</span><span class="cx"> public $id;
</span><span class="lines">@@ -33,6 +35,8 @@
</span><span class="cx"> /**
</span><span class="cx"> * The ID of the item associated with the notification.
</span><span class="cx"> *
</span><ins>+ * @since BuddyPress (1.9.0)
+ * @access public
</ins><span class="cx"> * @var int
</span><span class="cx"> */
</span><span class="cx"> public $item_id;
</span><span class="lines">@@ -40,6 +44,8 @@
</span><span class="cx"> /**
</span><span class="cx"> * The ID of the secondary item associated with the notification.
</span><span class="cx"> *
</span><ins>+ * @since BuddyPress (1.9.0)
+ * @access public
</ins><span class="cx"> * @var int
</span><span class="cx"> */
</span><span class="cx"> public $secondary_item_id = null;
</span><span class="lines">@@ -47,6 +53,8 @@
</span><span class="cx"> /**
</span><span class="cx"> * The ID of the user the notification is associated with.
</span><span class="cx"> *
</span><ins>+ * @since BuddyPress (1.9.0)
+ * @access public
</ins><span class="cx"> * @var int
</span><span class="cx"> */
</span><span class="cx"> public $user_id;
</span><span class="lines">@@ -54,6 +62,8 @@
</span><span class="cx"> /**
</span><span class="cx"> * The name of the component that the notification is for.
</span><span class="cx"> *
</span><ins>+ * @since BuddyPress (1.9.0)
+ * @access public
</ins><span class="cx"> * @var string
</span><span class="cx"> */
</span><span class="cx"> public $component_name;
</span><span class="lines">@@ -61,6 +71,8 @@
</span><span class="cx"> /**
</span><span class="cx"> * The component action which the notification is related to.
</span><span class="cx"> *
</span><ins>+ * @since BuddyPress (1.9.0)
+ * @access public
</ins><span class="cx"> * @var string
</span><span class="cx"> */
</span><span class="cx"> public $component_action;
</span><span class="lines">@@ -68,6 +80,8 @@
</span><span class="cx"> /**
</span><span class="cx"> * The date the notification was created.
</span><span class="cx"> *
</span><ins>+ * @since BuddyPress (1.9.0)
+ * @access public
</ins><span class="cx"> * @var string
</span><span class="cx"> */
</span><span class="cx"> public $date_notified;
</span><span class="lines">@@ -75,6 +89,8 @@
</span><span class="cx"> /**
</span><span class="cx"> * Is the notification new, or has it already been read.
</span><span class="cx"> *
</span><ins>+ * @since BuddyPress (1.9.0)
+ * @access public
</ins><span class="cx"> * @var bool
</span><span class="cx"> */
</span><span class="cx"> public $is_new;
</span><span class="lines">@@ -692,7 +708,7 @@
</span><span class="cx"> return self::_delete( $where['data'], $where['format'] );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- /** Convenience methods ***************************************************/
</del><ins>+ /** Convenience methods ***********************************************/
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Delete a single notification by ID.
</span><span class="lines">@@ -805,7 +821,7 @@
</span><span class="cx"> return array( 'notifications' => &$notifications, 'total' => $total_count );
</span><span class="cx"> }
</span><span class="cx">
</span><del>- /** Mark ******************************************************************/
</del><ins>+ /** Mark **************************************************************/
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Mark all user notifications as read.
</span></span></pre></div>
<a id="trunksrcbpnotificationsbpnotificationsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/src/bp-notifications/bp-notifications-functions.php (9024 => 9025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/bp-notifications/bp-notifications-functions.php 2014-09-16 14:52:09 UTC (rev 9024)
+++ trunk/src/bp-notifications/bp-notifications-functions.php 2014-09-17 00:05:45 UTC (rev 9025)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><span class="cx"> * @param int $id ID of the user whose notifications are being deleted.
</span><del>- * @param int $is_new 0 for read, 1 for unread
</del><ins>+ * @param int $is_new 0 for read, 1 for unread.
</ins><span class="cx"> * @return bool True on success, false on failure.
</span><span class="cx"> */
</span><span class="cx"> function bp_notifications_mark_notification( $id, $is_new = false ) {
</span><span class="lines">@@ -128,11 +128,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Get all notifications for a user and cache them
</del><ins>+ * Get all notifications for a user and cache them.
</ins><span class="cx"> *
</span><span class="cx"> * @since BuddyPress (2.1.0)
</span><span class="cx"> *
</span><del>- * @param int $user_id
</del><ins>+ * @param int $user_id ID of the user whose notifications are being fetched.
</ins><span class="cx"> * @return array
</span><span class="cx"> */
</span><span class="cx"> function bp_notifications_get_all_notifications_for_user( $user_id = 0 ) {
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><del>- * @param int $user_id ID of the user whose notification are being fetched.
</del><ins>+ * @param int $user_id ID of the user whose notifications are being fetched.
</ins><span class="cx"> * @param string $format Format of the returned values. 'string' returns HTML,
</span><span class="cx"> * while 'object' returns a structured object for parsing.
</span><span class="cx"> * @return mixed Object or array on success, false on failure.
</span><span class="lines">@@ -403,7 +403,7 @@
</span><span class="cx"> * @param int $user_id ID of the user whose notifications are being deleted.
</span><span class="cx"> * @param string $component_name Name of the associated component.
</span><span class="cx"> * @param string $component_action Name of the associated action.
</span><del>- * @param int $is_new 0 for read, 1 for unread
</del><ins>+ * @param int $is_new 0 for read, 1 for unread.
</ins><span class="cx"> * @return bool True on success, false on failure.
</span><span class="cx"> */
</span><span class="cx"> function bp_notifications_mark_notifications_by_type( $user_id, $component_name, $component_action, $is_new = false ) {
</span><span class="lines">@@ -432,7 +432,7 @@
</span><span class="cx"> * @param string $component_name Name of the associated component.
</span><span class="cx"> * @param string $component_action Name of the associated action.
</span><span class="cx"> * @param int $secondary_item_id ID of the secondary associated item.
</span><del>- * @param int $is_new 0 for read, 1 for unread
</del><ins>+ * @param int $is_new 0 for read, 1 for unread.
</ins><span class="cx"> * @return bool True on success, false on failure.
</span><span class="cx"> */
</span><span class="cx"> function bp_notifications_mark_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false, $is_new = false ) {
</span><span class="lines">@@ -462,7 +462,7 @@
</span><span class="cx"> * @param string $component_name Name of the associated component.
</span><span class="cx"> * @param string $component_action Optional. Name of the associated action.
</span><span class="cx"> * @param int $secondary_item_id Optional. ID of the secondary associated item.
</span><del>- * @param int $is_new 0 for read, 1 for unread
</del><ins>+ * @param int $is_new 0 for read, 1 for unread.
</ins><span class="cx"> * @return bool True on success, false on failure.
</span><span class="cx"> */
</span><span class="cx"> function bp_notifications_mark_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false, $is_new = false ) {
</span><span class="lines">@@ -494,7 +494,7 @@
</span><span class="cx"> * @param int $is_new 0 for read, 1 for unread
</span><span class="cx"> * @param string $component_name Name of the associated component.
</span><span class="cx"> * @param string $component_action Name of the associated action.
</span><del>- * @param int $is_new 0 for read, 1 for unread
</del><ins>+ * @param int $is_new 0 for read, 1 for unread.
</ins><span class="cx"> * @return bool True on success, false on failure.
</span><span class="cx"> */
</span><span class="cx"> function bp_notifications_mark_notifications_from_user( $user_id, $component_name, $component_action, $is_new = false ) {
</span><span class="lines">@@ -550,6 +550,8 @@
</span><span class="cx"> * @since BuddyPress (1.9.1)
</span><span class="cx"> *
</span><span class="cx"> * @see http://buddypress.trac.wordpress.org/ticket/5300
</span><ins>+ *
+ * @return array
</ins><span class="cx"> */
</span><span class="cx"> function bp_notifications_get_registered_components() {
</span><span class="cx">
</span></span></pre></div>
<a id="trunksrcbpnotificationsbpnotificationsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/src/bp-notifications/bp-notifications-loader.php (9024 => 9025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/bp-notifications/bp-notifications-loader.php 2014-09-16 14:52:09 UTC (rev 9024)
+++ trunk/src/bp-notifications/bp-notifications-loader.php 2014-09-17 00:05:45 UTC (rev 9025)
</span><span class="lines">@@ -55,11 +55,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Setup globals
</del><ins>+ * Set up component global data.
</ins><span class="cx"> *
</span><del>- * The BP_FRIENDS_SLUG constant is deprecated, and only used here for
- * backwards compatibility.
- *
</del><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><span class="cx"> * @see BP_Component::setup_globals() for a description of arguments.
</span><span class="lines">@@ -250,4 +247,4 @@
</span><span class="cx"> function bp_setup_notifications() {
</span><span class="cx"> buddypress()->notifications = new BP_Notifications_Component();
</span><span class="cx"> }
</span><del>-add_action( 'bp_setup_components', 'bp_setup_notifications', 6 );
</del><span class="cx">\ No newline at end of file
</span><ins>+add_action( 'bp_setup_components', 'bp_setup_notifications', 6 );
</ins></span></pre></div>
<a id="trunksrcbpnotificationsbpnotificationstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/src/bp-notifications/bp-notifications-template.php (9024 => 9025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/bp-notifications/bp-notifications-template.php 2014-09-16 14:52:09 UTC (rev 9024)
+++ trunk/src/bp-notifications/bp-notifications-template.php 2014-09-17 00:05:45 UTC (rev 9025)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><del>- * @return string Notifications permalink
</del><ins>+ * @return string Notifications permalink.
</ins><span class="cx"> */
</span><span class="cx"> function bp_get_notifications_permalink() {
</span><span class="cx"> $retval = trailingslashit( bp_loggedin_user_domain() . bp_get_notifications_slug() );
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><del>- * @return string Unread notifications permalink
</del><ins>+ * @return string Unread notifications permalink.
</ins><span class="cx"> */
</span><span class="cx"> function bp_get_notifications_unread_permalink() {
</span><span class="cx"> $retval = trailingslashit( bp_loggedin_user_domain() . bp_get_notifications_slug() . '/unread' );
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><del>- * @return string Read notifications permalink
</del><ins>+ * @return string Read notifications permalink.
</ins><span class="cx"> */
</span><span class="cx"> function bp_get_notifications_read_permalink() {
</span><span class="cx"> $retval = trailingslashit( bp_loggedin_user_domain() . bp_get_notifications_slug() . '/read' );
</span><span class="lines">@@ -942,10 +942,10 @@
</span><span class="cx"> * @since BuddyPress (1.9.0)
</span><span class="cx"> *
</span><span class="cx"> * @param array $args {
</span><del>- * @type string $before HTML before the links
- * @type string $after HTML after the links
- * @type string $sep HTML between the links
- * @type array $links Array of links to implode by 'sep'
</del><ins>+ * @type string $before HTML before the links.
+ * @type string $after HTML after the links.
+ * @type string $sep HTML between the links.
+ * @type array $links Array of links to implode by 'sep'.
</ins><span class="cx"> * }
</span><span class="cx"> *
</span><span class="cx"> * @return string HTML links for actions to take on single notifications.
</span></span></pre>
</div>
</div>
</body>
</html>