<!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][12779] trunk: BP Blogs: improve Site Icons / Blavatar synchronization</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 { white-space: pre-line; 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/12779">12779</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/12779","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>imath</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-11-11 13:33:08 +0000 (Wed, 11 Nov 2020)</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'>BP Blogs: improve Site Icons / Blavatar synchronization
Make sure BuddyPress tries to synchronize Sites Icons / Blavatars even when it's not network activated.
Add a new BP Repair tool to repair this synchronization. This can be needed when a different site of the network has its site icon updated after the BuddyPress Sites directory already listed this site previously.
Props vapvarun
Fixes <a href="http://buddypress.trac.wordpress.org/ticket/8384">#8384</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpblogsbpblogsfunctionsphp">trunk/src/bp-blogs/bp-blogs-functions.php</a></li>
<li><a href="#trunksrcbpblogsbpblogstemplatephp">trunk/src/bp-blogs/bp-blogs-template.php</a></li>
<li><a href="#trunksrcbpcoreadminbpcoreadmintoolsphp">trunk/src/bp-core/admin/bp-core-admin-tools.php</a></li>
<li><a href="#trunksrcbptemplatesbpnouveaucommonstyles_bp_blogs_loopscss">trunk/src/bp-templates/bp-nouveau/common-styles/_bp_blogs_loop.scss</a></li>
<li><a href="#trunksrcbptemplatesbpnouveaucssbuddypressrtlcss">trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css</a></li>
<li><a href="#trunksrcbptemplatesbpnouveaucssbuddypresscss">trunk/src/bp-templates/bp-nouveau/css/buddypress.css</a></li>
<li><a href="#trunktestsphpunittestcasesblogstemplatephp">trunk/tests/phpunit/testcases/blogs/template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpblogsbpblogsfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-blogs/bp-blogs-functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-blogs/bp-blogs-functions.php 2020-11-10 18:10:54 UTC (rev 12778)
+++ trunk/src/bp-blogs/bp-blogs-functions.php 2020-11-11 13:33:08 UTC (rev 12779)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -549,13 +549,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|string $new_value New value
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_blogs_update_option_site_icon( $old_value, $new_value ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $blog_id = get_current_blog_id();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 0 === $new_value ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- bp_blogs_update_blogmeta( get_current_blog_id(), 'site_icon_url_thumb', 0 );
- bp_blogs_update_blogmeta( get_current_blog_id(), 'site_icon_url_full', 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ bp_blogs_update_blogmeta( $blog_id, 'site_icon_url_thumb', 0 );
+ bp_blogs_update_blogmeta( $blog_id, 'site_icon_url_full', 0 );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> // Save site icon URL as blogmeta.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- bp_blogs_update_blogmeta( get_current_blog_id(), 'site_icon_url_thumb', get_site_icon_url( bp_core_avatar_thumb_width() ) );
- bp_blogs_update_blogmeta( get_current_blog_id(), 'site_icon_url_full', get_site_icon_url( bp_core_avatar_full_width() ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ bp_blogs_update_blogmeta( $blog_id, 'site_icon_url_thumb', bp_blogs_get_site_icon_url( $blog_id, bp_core_avatar_thumb_width() ) );
+ bp_blogs_update_blogmeta( $blog_id, 'site_icon_url_full', bp_blogs_get_site_icon_url( $blog_id, bp_core_avatar_full_width() ) );
</ins><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"> add_action( 'update_option_site_icon', 'bp_blogs_update_option_site_icon', 10, 2 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1563,3 +1565,52 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return wpmu_validate_blog_signup( $blog_name, $blog_title, $user );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * Gets the site icon URL even when BuddyPress is not network activated.
+ *
+ * @since 7.0.0
+ *
+ * @param integer $blog_id The ID of the blog to get the site icon URL for.
+ * @param integer $size The size of the site icon.
+ * @return string The site icon URL
+ */
+function bp_blogs_get_site_icon_url( $blog_id = 0, $size = 512 ) {
+ if ( is_multisite() && ! bp_is_network_activated() && ! bp_is_root_blog( $blog_id ) ) {
+ $switched_blog = false;
+ $url = '';
+
+ if ( $blog_id && get_current_blog_id() !== (int) $blog_id ) {
+ switch_to_blog( $blog_id );
+ $switched_blog = true;
+ }
+
+ $site_icon_id = get_option( 'site_icon' );
+
+ if ( $site_icon_id ) {
+ $site_icon_data = wp_get_attachment_metadata( $site_icon_id );
+ $sizes = wp_list_pluck( $site_icon_data['sizes'], 'width' );
+
+ sort( $sizes );
+ $closest = 'full';
+
+ foreach ( $sizes as $width ) {
+ $closest = array( $width, $width );
+
+ if ( (int) $size < (int) $width ) {
+ break;
+ }
+ }
+
+ $url = wp_get_attachment_image_url( $site_icon_id, $closest );
+ }
+
+ if ( $switched_blog ) {
+ restore_current_blog();
+ }
+
+ return $url;
+ }
+
+ return get_site_icon_url( $size, '', $blog_id );
+}
</ins></span></pre></div>
<a id="trunksrcbpblogsbpblogstemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-blogs/bp-blogs-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-blogs/bp-blogs-template.php 2020-11-10 18:10:54 UTC (rev 12778)
+++ trunk/src/bp-blogs/bp-blogs-template.php 2020-11-11 13:33:08 UTC (rev 12779)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -380,8 +380,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Never attempted to fetch site icon before; do it now!
</span><span class="cx" style="display: block; padding: 0 10px"> if ( '' === $site_icon ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- switch_to_blog( $blog_id );
-
</del><span class="cx" style="display: block; padding: 0 10px"> // Fetch the other size first.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'full' === $r['type'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $size = bp_core_avatar_thumb_width();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -391,7 +389,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $save_size = 'full';
</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">- $site_icon = get_site_icon_url( $size );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $site_icon = bp_blogs_get_site_icon_url( $blog_id, $size );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Empty site icons get saved as integer 0.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $site_icon ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $site_icon = 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -403,13 +402,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Now, fetch the size we want.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 0 !== $site_icon ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $size = 'full' === $r['type'] ? bp_core_avatar_full_width() : bp_core_avatar_thumb_width();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $site_icon = get_site_icon_url( $size );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $site_icon = bp_blogs_get_site_icon_url( $blog_id, $size );
</ins><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"> // Sync site icon to blogmeta.
</span><span class="cx" style="display: block; padding: 0 10px"> bp_blogs_update_blogmeta( $blog_id, "site_icon_url_{$r['type']}", $site_icon );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- restore_current_blog();
</del><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"> // We have a site icon.
</span></span></pre></div>
<a id="trunksrcbpcoreadminbpcoreadmintoolsphp"></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/admin/bp-core-admin-tools.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/admin/bp-core-admin-tools.php 2020-11-10 18:10:54 UTC (rev 12778)
+++ trunk/src/bp-core/admin/bp-core-admin-tools.php 2020-11-11 13:33:08 UTC (rev 12779)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -143,6 +143,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> __( 'Repopulate site tracking records.', 'buddypress' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'bp_admin_repair_blog_records',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ if ( bp_is_active( 'blogs', 'site-icon' ) ) {
+ $repair_list[91] = array(
+ 'bp-blog-site-icons',
+ __( 'Repair site tracking site icons/blog avatars synchronization.', 'buddypress' ),
+ 'bp_admin_repair_blog_site_icons',
+ );
+ }
</ins><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"> // Emails:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -313,6 +321,59 @@
</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><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Repair site icons/blog avatars synchronization.
+ *
+ * @since 7.0.0
+ *
+ * @return array
+ */
+function bp_admin_repair_blog_site_icons() {
+
+ /* translators: %s: the result of the action performed by the repair tool */
+ $statement = __( 'Repairing site icons/blog avatars synchronization… %s', 'buddypress' );
+
+ // Run function if blogs component is active.
+ if ( bp_is_active( 'blogs', 'site-icon' ) ) {
+ $blog_ids = get_sites(
+ array(
+ 'fields' => 'ids',
+ 'archived' => 0,
+ 'mature' => 0,
+ 'spam' => 0,
+ 'deleted' => 0,
+ )
+ );
+
+ $sizes = array(
+ array(
+ 'key' => 'site_icon_url_full',
+ 'size' => bp_core_avatar_full_width(),
+ ),
+ array(
+ 'key' => 'site_icon_url_thumb',
+ 'size' => bp_core_avatar_thumb_width(),
+ ),
+ );
+
+ foreach ( $blog_ids as $blog_id ) {
+ $site_icon = 0;
+
+ foreach ( $sizes as $size ) {
+ $site_icon = bp_blogs_get_site_icon_url( $blog_id, $size['size'] );
+ if ( ! $site_icon ) {
+ $site_icon = 0;
+ }
+
+ bp_blogs_update_blogmeta( $blog_id, $size['key'], $site_icon );
+ }
+ }
+ }
+
+ // All done!
+ return array( 0, sprintf( $statement, __( 'Complete!', 'buddypress' ) ) );
+}
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Recalculate the total number of active site members.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.0.0
</span></span></pre></div>
<a id="trunksrcbptemplatesbpnouveaucommonstyles_bp_blogs_loopscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-templates/bp-nouveau/common-styles/_bp_blogs_loop.scss</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-templates/bp-nouveau/common-styles/_bp_blogs_loop.scss 2020-11-10 18:10:54 UTC (rev 12778)
+++ trunk/src/bp-templates/bp-nouveau/common-styles/_bp_blogs_loop.scss 2020-11-11 13:33:08 UTC (rev 12779)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7,6 +7,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> li {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ .item-avatar {
+
+ img.avatar-150 {
+ max-width: 150px;
+ max-height: 150px;
+ }
+
+ img.avatar-50 {
+ max-width: 50px;
+ max-height: 50px;
+ }
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> @include medium-up() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .item-block {
</span></span></pre></div>
<a id="trunksrcbptemplatesbpnouveaucssbuddypressrtlcss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css 2020-11-10 18:10:54 UTC (rev 12778)
+++ trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css 2020-11-11 13:33:08 UTC (rev 12779)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1774,6 +1774,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @section 3.2 - Blogs Loop
</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">+.buddypress-wrap .blogs-list li .item-avatar img.avatar-150 {
+ max-width: 150px;
+ max-height: 150px;
+}
+
+.buddypress-wrap .blogs-list li .item-avatar img.avatar-50 {
+ max-width: 50px;
+ max-height: 50px;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> @media screen and (min-width: 46.8em) {
</span><span class="cx" style="display: block; padding: 0 10px"> .buddypress-wrap .blogs-list li .item-block {
</span><span class="cx" style="display: block; padding: 0 10px"> float: none;
</span></span></pre></div>
<a id="trunksrcbptemplatesbpnouveaucssbuddypresscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-templates/bp-nouveau/css/buddypress.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-templates/bp-nouveau/css/buddypress.css 2020-11-10 18:10:54 UTC (rev 12778)
+++ trunk/src/bp-templates/bp-nouveau/css/buddypress.css 2020-11-11 13:33:08 UTC (rev 12779)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1774,6 +1774,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @section 3.2 - Blogs Loop
</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">+.buddypress-wrap .blogs-list li .item-avatar img.avatar-150 {
+ max-width: 150px;
+ max-height: 150px;
+}
+
+.buddypress-wrap .blogs-list li .item-avatar img.avatar-50 {
+ max-width: 50px;
+ max-height: 50px;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> @media screen and (min-width: 46.8em) {
</span><span class="cx" style="display: block; padding: 0 10px"> .buddypress-wrap .blogs-list li .item-block {
</span><span class="cx" style="display: block; padding: 0 10px"> float: none;
</span></span></pre></div>
<a id="trunktestsphpunittestcasesblogstemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/testcases/blogs/template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/testcases/blogs/template.php 2020-11-10 18:10:54 UTC (rev 12778)
+++ trunk/tests/phpunit/testcases/blogs/template.php 2020-11-11 13:33:08 UTC (rev 12779)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -431,6 +431,7 @@
</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"> add_filter( 'get_site_icon_url', array( $this, 'filter_blog_avatar' ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_filter( 'bp_is_network_activated', '__return_true' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $avatar = bp_get_blog_avatar( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'full',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -441,6 +442,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'class' => 'avatar',
</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">+ remove_filter( 'bp_is_network_activated', '__return_true' );
</ins><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'get_site_icon_url', array( $this, 'filter_blog_avatar' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $blogs_template = $reset_blogs_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>