<!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][9664] trunk/src/bp-core: Adds hooks documentation for bp-core-filters.php and bp-core-catchuri.php, fixes version number.</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/9664">9664</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/9664","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>tw2113</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-03-31 04:19:19 +0000 (Tue, 31 Mar 2015)</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'>Adds hooks documentation for bp-core-filters.php and bp-core-catchuri.php, fixes version number.
See <a href="http://buddypress.trac.wordpress.org/ticket/5940">#5940</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpcorebpcorecatchuriphp">trunk/src/bp-core/bp-core-catchuri.php</a></li>
<li><a href="#trunksrcbpcorebpcorefiltersphp">trunk/src/bp-core/bp-core-filters.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpcorenotificationphp">trunk/src/bp-core/classes/class-bp-core-notification.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpcorebpcorecatchuriphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/bp-core-catchuri.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/bp-core-catchuri.php 2015-03-30 18:44:55 UTC (rev 9663)
+++ trunk/src/bp-core/bp-core-catchuri.php 2015-03-31 04:19:19 UTC (rev 9664)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,7 +55,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> else
</span><span class="cx" style="display: block; padding: 0 10px"> $path = esc_url( $_SERVER['REQUEST_URI'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Filter the path
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the BuddyPress global URI path.
+ *
+ * @since BuddyPress (1.0.0)
+ *
+ * @param string $path Path to set.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $path = apply_filters( 'bp_uri', $path );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Take GET variables off the URL to avoid problems
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -327,6 +333,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( defined( 'BP_ENABLE_ROOT_PROFILES' ) && ( true == BP_ENABLE_ROOT_PROFILES ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $retval = true;
</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 whether or not root profiles are enabled and allowed.
+ *
+ * @since BuddyPress (1.6.0)
+ *
+ * @param bool $retval Whether or not root profiles are available.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_core_enable_root_profiles', $retval );
</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">@@ -370,7 +383,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $template = '';
</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">- // Filter the template locations so that plugins can alter where they are located
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the template locations.
+ *
+ * Allows plugins to alter where the template files are located.
+ *
+ * @since BuddyPress (1.1.0)
+ *
+ * @param string $template Located template path.
+ * @param array $filtered_templates Array of templates to attempt to load.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $located_template = apply_filters( 'bp_located_template', $template, $filtered_templates );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !empty( $located_template ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Template was located, lets set this as a valid page and not a 404.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -379,10 +401,31 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_query->is_singular = true;
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_query->is_404 = false;
</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 before the loading of a located template file.
+ *
+ * @since BuddyPress (1.6.0)
+ *
+ * @param string $located_template Template found to be loaded.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_core_pre_load_template', $located_template );
</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 selected template right before loading.
+ *
+ * @since BuddyPress (1.1.0)
+ *
+ * @param string $located_template Template found to be loaded.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> load_template( apply_filters( 'bp_load_template', $located_template ) );
</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 after the loading of a located template file.
+ *
+ * @since BuddyPress (1.6.0)
+ *
+ * @param string $located_template Template found that was loaded.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_core_post_load_template', $located_template );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Kill any other output after this.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -401,6 +444,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_query->is_404 = false;
</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">+ /**
+ * Fires if there are no found templates to load and theme compat is needed.
+ *
+ * @since BuddyPress (1.7.0)
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_setup_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="lines" style="display: block; padding: 0 10px; color: #888">@@ -410,6 +458,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_core_catch_profile_uri() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !bp_is_active( 'xprofile' ) ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the path to redirect users to if XProfile is not enabled.
+ *
+ * @since BuddyPress (1.0.0)
+ *
+ * @param string $value Path to redirect users to.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> bp_core_load_template( apply_filters( 'bp_core_template_display_profile', '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="lines" style="display: block; padding: 0 10px; color: #888">@@ -472,6 +528,14 @@
</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"> $r = wp_parse_args( $args, $defaults );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the arguments used for user redirecting when visiting access controlled areas.
+ *
+ * @since BuddyPress (1.6.0)
+ *
+ * @param array $r Array of parsed arguments for redirect determination.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $r = apply_filters( 'bp_core_no_access', $r );
</span><span class="cx" style="display: block; padding: 0 10px"> extract( $r, EXTR_SKIP );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -528,6 +592,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_core_no_access_wp_login_error() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $error;
</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 error message for wp-login.php when needing to log in before accessing.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param string $value Error message to display.
+ * @param string $value URL to redirect user to after successful login.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $error = apply_filters( 'bp_wp_login_error', __( 'You must log in to access the page you requested.', 'buddypress' ), $_REQUEST['redirect_to'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // shake shake shake!
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -554,6 +626,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_redirect_canonical() {
</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 whether or not to do canonical redirects on BuddyPress URLs.
+ *
+ * @since BuddyPress (1.6.0)
+ *
+ * @param bool $value Whether or not to do canonical redirects. Default true.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( !bp_is_blog_page() && apply_filters( 'bp_do_redirect_canonical', true ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // If this is a POST request, don't do a canonical redirect.
</span><span class="cx" style="display: block; padding: 0 10px"> // This is for backward compatibility with plugins that submit form requests to
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -654,6 +733,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // and the current user is logged in. In this case we send to
</span><span class="cx" style="display: block; padding: 0 10px"> // the members directory to avoid redirect loops
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( bp_is_register_page() && 'register' == $front_page_component && is_user_logged_in() ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the logged in register page redirect URL.
+ *
+ * @since BuddyPress (1.5.1)
+ *
+ * @param string $value URL to redirect logged in members to.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $bp->canonical_stack['canonical_url'] = apply_filters( 'bp_loggedin_register_page_redirect_to', bp_get_members_directory_permalink() );
</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">@@ -695,6 +782,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $canonical_url = array_pop( $canonical_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 canonical url of the current page.
+ *
+ * @since BuddyPress (1.6.0)
+ *
+ * @param string $canonical_url Canonical URL of the current page.
+ * @param array $args Array of arguments to help determine canonical URL.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_canonical_url', $canonical_url, $args );
</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">@@ -713,6 +808,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $bp->canonical_stack['requested_url'] .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
</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 URL as requested on the current page load by the user agent.
+ *
+ * @since BuddyPress (1.7.0)
+ *
+ * @param string $value Requested URL string.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_requested_url', $bp->canonical_stack['requested_url'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcbpcorebpcorefiltersphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/bp-core-filters.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/bp-core-filters.php 2015-03-30 18:44:55 UTC (rev 9663)
+++ trunk/src/bp-core/bp-core-filters.php 2015-03-31 04:19:19 UTC (rev 9664)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -94,6 +94,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !empty( $bp->pages->forums ) && ( !bp_is_active( 'forums' ) || ( bp_is_active( 'forums' ) && bp_forums_has_directory() && !bp_forums_is_installed_correctly() ) ) )
</span><span class="cx" style="display: block; padding: 0 10px"> $pages[] = $bp->pages->forums->id;
</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 specific pages that shouldn't show up on page listings.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param array $pages Array of pages to exclude.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_core_exclude_pages', $pages );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'wp_list_pages_excludes', 'bp_core_exclude_pages' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -234,6 +241,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string The blog name for the root blog.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_core_email_from_name_filter() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the "From" name in outgoing email to the site name.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $value Value to set the "From" name to.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_core_email_from_name_filter', bp_get_option( 'blogname', 'WordPress' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'wp_mail_from_name', 'bp_core_email_from_name_filter' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -300,7 +315,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $redirect_to;
</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 plugins to allow or disallow redirects, as desired
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters whether or not to redirect.
+ *
+ * Allows plugins to have finer grained control of redirect upon login.
+ *
+ * @since BuddyPress (1.6.0)
+ *
+ * @param bool $value Whether or not to redirect.
+ * @param string $redirect_to Sanitized URL to be redirected to.
+ * @param string $redirect_to_raw Unsanitized URL to be redirected to.
+ * @param WP_User $user The WP_User object corresponding to a
+ * successfully logged in user.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $maybe_redirect = apply_filters( 'bp_core_login_redirect', false, $redirect_to, $redirect_to_raw, $user );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( false !== $maybe_redirect ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $maybe_redirect;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -317,6 +344,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return wp_get_referer();
</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 URL to redirect users to upon successful login.
+ *
+ * @since BuddyPress (1.9.0)
+ *
+ * @param string $value URL to redirect to.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_core_login_redirect_to', bp_get_root_domain() );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'bp_login_redirect', 'bp_core_login_redirect', 10, 3 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -414,9 +448,52 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $message = sprintf( __( "%1\$s,\n\n\n\nThanks for registering! To complete the activation of your account and blog, please click the following link:\n\n%2\$s\n\n\n\nAfter you activate, you can visit your blog here:\n\n%3\$s", 'buddypress' ), $user, $activate_url, esc_url( "http://{$domain}{$path}" ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $subject = bp_get_email_subject( array( 'text' => sprintf( __( 'Activate %s', 'buddypress' ), 'http://' . $domain . $path ) ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Email filters
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the email that the notification is going to upon successful registration with blog.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $user_email The user's email address.
+ * @param string $domain The new blog domain.
+ * @param string $path The new blog path.
+ * @param string $title The site title.
+ * @param string $user The user's login name.
+ * @param string $user_email The user's email address.
+ * @param string $key The activation key created in wpmu_signup_blog().
+ * @param array $meta Array of meta values for the created site.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $to = apply_filters( 'bp_core_activation_signup_blog_notification_to', $user_email, $domain, $path, $title, $user, $user_email, $key, $meta );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the subject that the notification uses upon successful registration with blog.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $subject The subject to use.
+ * @param string $domain The new blog domain.
+ * @param string $path The new blog path.
+ * @param string $title The site title.
+ * @param string $user The user's login name.
+ * @param string $user_email The user's email address.
+ * @param string $key The activation key created in wpmu_signup_blog().
+ * @param array $meta Array of meta values for the created site.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $subject = apply_filters( 'bp_core_activation_signup_blog_notification_subject', $subject, $domain, $path, $title, $user, $user_email, $key, $meta );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the message that the notification uses upon successful registration with blog.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $message The message to use.
+ * @param string $domain The new blog domain.
+ * @param string $path The new blog path.
+ * @param string $title The site title.
+ * @param string $user The user's login name.
+ * @param string $user_email The user's email address.
+ * @param string $key The activation key created in wpmu_signup_blog().
+ * @param array $meta Array of meta values for the created site.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $message = apply_filters( 'bp_core_activation_signup_blog_notification_message', $message, $domain, $path, $title, $user, $user_email, $key, $meta );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Send the email
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -425,6 +502,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Set up the $admin_email to pass to the filter
</span><span class="cx" style="display: block; padding: 0 10px"> $admin_email = bp_get_option( 'admin_email' );
</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 after the sending of the notification to new users for successful registration with blog.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param string $admin_email Admin Email address for the site.
+ * @param string $subject Subject used in the notification email.
+ * @param string $message Message used in the notification email.
+ * @param string domain The new blog domain.
+ * @param string $path The new blog path.
+ * @param string $title The site title.
+ * @param string $user The user's login name.
+ * @param string $user_email The user's email address.
+ * @param string $key The activation key created in wpmu_signup_blog().
+ * @param array $meta Array of meta values for the created site.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_core_sent_blog_signup_email', $admin_email, $subject, $message, $domain, $path, $title, $user, $user_email, $key, $meta );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Return false to stop the original WPMU function from continuing
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -479,9 +572,43 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url );
</span><span class="cx" style="display: block; padding: 0 10px"> $subject = bp_get_email_subject( array( 'text' => __( 'Activate Your Account', 'buddypress' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Email filters
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the email that the notification is going to upon successful registration without blog.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $user_email The user's email address.
+ * @param string $user The user's login name.
+ * @param string $user_email The user's email address.
+ * @param string $key The activation key created in wpmu_signup_blog().
+ * @param array $meta Array of meta values for the created site.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $to = apply_filters( 'bp_core_activation_signup_user_notification_to', $user_email, $user, $user_email, $key, $meta );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the subject that the notification uses upon successful registration without blog.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $subject The subject to use.
+ * @param string $user The user's login name.
+ * @param string $user_email The user's email address.
+ * @param string $key The activation key created in wpmu_signup_blog().
+ * @param array $meta Array of meta values for the created site.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $subject = apply_filters( 'bp_core_activation_signup_user_notification_subject', $subject, $user, $user_email, $key, $meta );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the message that the notification uses upon successful registration without blog.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $message The message to use.
+ * @param string $user The user's login name.
+ * @param string $user_email The user's email address.
+ * @param string $key The activation key created in wpmu_signup_blog().
+ * @param array $meta Array of meta values for the created site.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $message = apply_filters( 'bp_core_activation_signup_user_notification_message', $message, $user, $user_email, $key, $meta );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Send the email
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -490,6 +617,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Set up the $admin_email to pass to the filter
</span><span class="cx" style="display: block; padding: 0 10px"> $admin_email = bp_get_option( 'admin_email' );
</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 after the sending of the notification to new users for successful registration without blog.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param string $admin_email Admin Email address for the site.
+ * @param string $subject Subject used in the notification email.
+ * @param string $message Message used in the notification email.
+ * @param string $user The user's login name.
+ * @param string $user_email The user's email address.
+ * @param string $key The activation key created in wpmu_signup_blog().
+ * @param array $meta Array of meta values for the created site. Default empty array.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_core_sent_user_signup_email', $admin_email, $subject, $message, $user, $user_email, $key, $meta );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Return false to stop the original WPMU function from continuing
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -623,6 +763,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Some BP nav items contain item counts. Remove them
</span><span class="cx" style="display: block; padding: 0 10px"> $title = preg_replace( '|<span>[0-9]+</span>|', '', $title );
</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 page title for BuddyPress pages.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param string $value Determined title for the current BuddyPress page.
+ * @param string $sep Separator used for the BuddyPress page title.
+ * @param string $seplocation Location to place the separator value.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_modify_page_title', $title . ' ' . $sep . ' ', $title, $sep, $seplocation );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'wp_title', 'bp_modify_page_title', 10, 3 );
</span></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpcorenotificationphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/classes/class-bp-core-notification.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-core-notification.php 2015-03-30 18:44:55 UTC (rev 9663)
+++ trunk/src/bp-core/classes/class-bp-core-notification.php 2015-03-31 04:19:19 UTC (rev 9664)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,7 +15,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Use BP_Notifications_Notification instead.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @package BuddyPress Core
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @deprecated since BuddyPress (1.9)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @deprecated since BuddyPress (1.9.0)
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> class BP_Core_Notification {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -255,4 +255,4 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->core->table_name_notifications} WHERE item_id = %d AND component_name = %s {$component_action_sql} {$secondary_item_sql}", $item_id, $component_name ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+}
</ins></span></pre>
</div>
</div>
</body>
</html>