<!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][9112] trunk/src/bp-activity: Hook documentation for bp-activity-loader.php and bp-activity-screens.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" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/9112">9112</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/9112","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>boonebgorges</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2014-10-30 23:58:29 +0000 (Thu, 30 Oct 2014)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Hook documentation for bp-activity-loader.php and bp-activity-screens.php.
Props tw2113.
See <a href="http://buddypress.trac.wordpress.org/ticket/5938">#5938</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpactivitybpactivityloaderphp">trunk/src/bp-activity/bp-activity-loader.php</a></li>
<li><a href="#trunksrcbpactivitybpactivityscreensphp">trunk/src/bp-activity/bp-activity-screens.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpactivitybpactivityloaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-activity/bp-activity-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-activity/bp-activity-loader.php 2014-10-30 23:56:28 UTC (rev 9111)
+++ trunk/src/bp-activity/bp-activity-loader.php 2014-10-30 23:58:29 UTC (rev 9112)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,6 +60,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Load Akismet support if Akismet is configured
</span><span class="cx" style="display: block; padding: 0 10px"> $akismet_key = bp_get_option( 'wordpress_api_key' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /** This filter is documented in bp-activity/bp-activity-actions.php */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( defined( 'AKISMET_VERSION' ) && ( !empty( $akismet_key ) || defined( 'WPCOM_API_KEY' ) ) && apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $includes[] = 'akismet';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcbpactivitybpactivityscreensphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-activity/bp-activity-screens.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-activity/bp-activity-screens.php 2014-10-30 23:56:28 UTC (rev 9111)
+++ trunk/src/bp-activity/bp-activity-screens.php 2014-10-30 23:58:29 UTC (rev 9112)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,7 +17,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the Activity directory.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.5)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.5.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_displayed_user_id()
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_is_activity_component()
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,8 +31,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( bp_is_activity_directory() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_update_is_directory( true, 'activity' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Fires right before the loading of the Activity directory screen template file.
+ *
+ * @since BuddyPress (1.5.0)
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_activity_screen_index' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the template to load for the Activity directory screen.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param string $template Path to the activity template to load.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> bp_core_load_template( apply_filters( 'bp_activity_screen_index', 'activity/index' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -41,21 +53,35 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the 'My Activity' page.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.0)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.0.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses do_action() To call the 'bp_activity_screen_my_activity' hook.
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_core_load_template()
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses apply_filters() To call the 'bp_activity_template_my_activity' hook.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_activity_screen_my_activity() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Fires right before the loading of the "My Activity" screen template file.
+ *
+ * @since BuddyPress (1.0.0)
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_activity_screen_my_activity' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the template to load for the "My Activity" screen.
+ *
+ * @since BuddyPress (1.0.0)
+ *
+ * @param string $template Path to the activity template to load.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> bp_core_load_template( apply_filters( 'bp_activity_template_my_activity', 'members/single/home' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the 'My Friends' activity page.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.0)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.0.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_is_active()
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_update_is_item_admin()
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -69,14 +95,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> bp_update_is_item_admin( bp_current_user_can( 'bp_moderate' ), 'activity' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Fires right before the loading of the "My Friends" screen template file.
+ *
+ * @since BuddyPress (1.2.0)
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_activity_screen_friends' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the template to load for the "My Friends" screen.
+ *
+ * @since BuddyPress (1.0.0)
+ *
+ * @param string $template Path to the activity template to load.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> bp_core_load_template( apply_filters( 'bp_activity_template_friends_activity', 'members/single/home' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the 'My Groups' activity page.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.2)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.2.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_is_active()
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_update_is_item_admin()
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -90,14 +130,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> bp_update_is_item_admin( bp_current_user_can( 'bp_moderate' ), 'activity' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Fires right before the loading of the "My Groups" screen template file.
+ *
+ * @since BuddyPress (1.2.0)
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_activity_screen_groups' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the template to load for the "My Groups" screen.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $template Path to the activity template to load.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> bp_core_load_template( apply_filters( 'bp_activity_template_groups_activity', 'members/single/home' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the 'Favorites' activity page.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.2)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.2.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_update_is_item_admin()
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_current_user_can()
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -107,14 +161,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_activity_screen_favorites() {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_update_is_item_admin( bp_current_user_can( 'bp_moderate' ), 'activity' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Fires right before the loading of the "Favorites" screen template file.
+ *
+ * @since BuddyPress (1.2.0)
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_activity_screen_favorites' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the template to load for the "Favorites" screen.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $template Path to the activity template to load.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> bp_core_load_template( apply_filters( 'bp_activity_template_favorite_activity', 'members/single/home' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the 'Mentions' activity page.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.2)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.2.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_update_is_item_admin()
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_current_user_can()
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -124,14 +192,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_activity_screen_mentions() {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_update_is_item_admin( bp_current_user_can( 'bp_moderate' ), 'activity' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Fires right before the loading of the "Mentions" screen template file.
+ *
+ * @since BuddyPress (1.2.0)
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_activity_screen_mentions' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the template to load for the "Mentions" screen.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $template Path to the activity template to load.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> bp_core_load_template( apply_filters( 'bp_activity_template_mention_activity', 'members/single/home' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Reset the logged-in user's new mentions data when he visits his mentions screen.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.5)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.5.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_is_my_profile()
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_activity_clear_new_mentions()
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -146,7 +228,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Load the page for a single activity item.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.2)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.2.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global object $bp BuddyPress global settings
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_is_activity_component()
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -218,10 +300,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Allow access to be filtered
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the access permission for a single activity view.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param array $access Array holding the current $has_access value and current activity item instance.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $has_access = apply_filters_ref_array( 'bp_activity_permalink_access', array( $has_access, &$activity ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Allow additional code execution
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Fires before the loading of a single activity template file.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param BP_Activity_Activity $activity Object representing the current activity item being displayed.
+ * @param bool $has_access Whether or not the current user has access to view activity.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_activity_screen_single_activity_permalink', $activity, $has_access );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Access is specifically disallowed
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -244,6 +339,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> bp_core_redirect( $url );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the template to load for a single activity screen.
+ *
+ * @since BuddyPress (1.0.0)
+ *
+ * @param string $template Path to the activity template to load.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> bp_core_load_template( apply_filters( 'bp_activity_template_profile_activity_permalink', 'members/single/activity/permalink' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'bp_screens', 'bp_activity_screen_single_activity_permalink' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -251,7 +353,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Add activity notifications settings to the notifications settings page.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.2)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.2.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_get_user_meta()
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses bp_core_get_username()
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -298,7 +400,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" value="no" <?php checked( $reply, 'no', true ) ?>/></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php do_action( 'bp_activity_screen_notification_settings' ) ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
+
+ /**
+ * Fires inside the closing </tbody> tag for activity screen notification settings.
+ *
+ * @since BuddyPress (1.2.0)
+ */
+ do_action( 'bp_activity_screen_notification_settings' ) ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> </tbody>
</span><span class="cx" style="display: block; padding: 0 10px"> </table>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -314,14 +423,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * This class sets up the necessary theme compatability actions to safely output
</span><span class="cx" style="display: block; padding: 0 10px"> * activity template parts to the_title and the_content areas of a theme.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.7)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.7.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> class BP_Activity_Theme_Compat {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Set up the activity component theme compatibility.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.7)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.7.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct() {
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'bp_setup_theme_compat', array( $this, 'is_activity' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -330,7 +439,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Set up the theme compatibility hooks, if we're looking at an activity page.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.7)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.7.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function is_activity() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -342,6 +451,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! bp_displayed_user_id() && ! bp_current_action() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_update_is_directory( true, 'activity' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /** This action is documented in bp-activity/bp-activity-screens.php */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_activity_screen_index' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'bp_get_buddypress_template', array( $this, 'directory_template_hierarchy' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -363,13 +473,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.8)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.8.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $templates The templates from bp_get_theme_compat_templates().
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array $templates Array of custom templates to look for.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function directory_template_hierarchy( $templates ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Setup our templates based on priority
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the template hierarchy for the activity directory page.
+ *
+ * @since BuddyPress (1.8.0)
+ *
+ * @param array $index-directory Array holding template names to be merged into template list.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $new_templates = apply_filters( 'bp_template_hierarchy_activity_directory', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'activity/index-directory.php'
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -384,7 +501,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Update the global $post with directory data.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.7)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.7.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function directory_dummy_post() {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_theme_compat_reset_post( array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -403,7 +520,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filter the_content with the groups index template part.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.7)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.7.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function directory_content() {
</span><span class="cx" style="display: block; padding: 0 10px"> return bp_buffer_template_part( 'activity/index', null, false );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -416,13 +533,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.8)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.8.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $templates The templates from bp_get_theme_compat_templates().
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array $templates Array of custom templates to look for.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function single_template_hierarchy( $templates ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Setup our templates based on priority
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the template hierarchy for the activity permalink pages.
+ *
+ * @since BuddyPress (1.8.0)
+ *
+ * @param array $index Array holding template names to be merged into template list.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $new_templates = apply_filters( 'bp_template_hierarchy_activity_single_item', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'activity/single/index.php'
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -437,7 +561,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Update the global $post with the displayed user's data.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.7)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.7.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function single_dummy_post() {
</span><span class="cx" style="display: block; padding: 0 10px"> bp_theme_compat_reset_post( array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -456,7 +580,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filter the_content with the members' activity permalink template part.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since BuddyPress (1.7)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since BuddyPress (1.7.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function single_dummy_content() {
</span><span class="cx" style="display: block; padding: 0 10px"> return bp_buffer_template_part( 'activity/single/home', null, false );
</span></span></pre>
</div>
</div>
</body>
</html>