<!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][3698] trunk/bp-themes/bp-default: Swap function_exists calls to bp_is_active in BP-Default.</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, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>3698</dd>
<dt>Author</dt> <dd>djpaul</dd>
<dt>Date</dt> <dd>2011-01-11 17:41:53 +0000 (Tue, 11 Jan 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Swap function_exists calls to bp_is_active in BP-Default. See #2718</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpdefault_incajaxphp">trunk/bp-themes/bp-default/_inc/ajax.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivityindexphp">trunk/bp-themes/bp-default/activity/index.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivitypostformphp">trunk/bp-themes/bp-default/activity/post-form.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupscreatephp">trunk/bp-themes/bp-default/groups/create.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssingleadminphp">trunk/bp-themes/bp-default/groups/single/admin.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmembersindexphp">trunk/bp-themes/bp-default/members/index.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssinglememberheaderphp">trunk/bp-themes/bp-default/members/single/member-header.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssingleprofileprofileloopphp">trunk/bp-themes/bp-default/members/single/profile/profile-loop.php</a></li>
<li><a href="#trunkbpthemesbpdefaultregistrationregisterphp">trunk/bp-themes/bp-default/registration/register.php</a></li>
<li><a href="#trunkbpthemesbpdefaultsidebarphp">trunk/bp-themes/bp-default/sidebar.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpthemesbpdefault_incajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/ajax.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/ajax.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/_inc/ajax.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -146,10 +146,10 @@
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        if ( empty( $_POST['object'] ) && function_exists( 'bp_activity_post_update' ) ) {
</del><ins>+        if ( empty( $_POST['object'] ) && bp_is_active( 'activity' ) ) {
</ins><span class="cx">                 $activity_id = bp_activity_post_update( array( 'content' => $_POST['content'] ) );
</span><span class="cx">         } elseif ( $_POST['object'] == 'groups' ) {
</span><del>-                if ( !empty( $_POST['item_id'] ) && function_exists( 'groups_post_update' ) )
</del><ins>+                if ( !empty( $_POST['item_id'] ) && bp_is_active( 'groups' ) )
</ins><span class="cx">                         $activity_id = groups_post_update( array( 'content' => $_POST['content'], 'group_id' => $_POST['item_id'] ) );
</span><span class="cx">         } else
</span><span class="cx">                 $activity_id = apply_filters( 'bp_activity_custom_update', $_POST['object'], $_POST['item_id'], $_POST['content'] );
</span><span class="lines">@@ -588,7 +588,7 @@
</span><span class="cx">                         $user_ids = apply_filters( 'bp_core_autocomplete_ids', $user_ids, $_GET['q'], $limit );
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><del>-                if ( function_exists( 'friends_search_friends' ) ) {
</del><ins>+                if ( bp_is_active( 'friends' ) ) {
</ins><span class="cx">                         $users = friends_search_friends( $_GET['q'], $bp->loggedin_user->id, $limit, 1 );
</span><span class="cx">
</span><span class="cx">                         // Keeping the bp_friends_autocomplete_list filter for backward compatibility
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivityindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/index.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/index.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/activity/index.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">
</span><span class="cx">                                                 <?php do_action( 'bp_before_activity_type_tab_friends' ) ?>
</span><span class="cx">
</span><del>-                                                <?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?>
</del><ins>+                                                <?php if ( bp_is_active( 'friends' ) ) : ?>
</ins><span class="cx">                                                         <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
</span><span class="cx">                                                                 <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_FRIENDS_SLUG . '/' ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ) ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
</span><span class="cx">                                                         <?php endif; ?>
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">
</span><span class="cx">                                                 <?php do_action( 'bp_before_activity_type_tab_groups' ) ?>
</span><span class="cx">
</span><del>-                                                <?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?>
</del><ins>+                                                <?php if ( bp_is_active( 'groups' ) ) : ?>
</ins><span class="cx">                                                         <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
</span><span class="cx">                                                                 <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_GROUPS_SLUG . '/' ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
</span><span class="cx">                                                         <?php endif; ?>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivitypostformphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/post-form.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/post-form.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/activity/post-form.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">                                 <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e( 'Post Update', 'buddypress' ) ?>" />
</span><span class="cx">                         </div>
</span><span class="cx">
</span><del>-                        <?php if ( function_exists('bp_has_groups') && !bp_is_my_profile() && !bp_is_group() ) : ?>
</del><ins>+                        <?php if ( bp_is_active( 'groups' ) && !bp_is_my_profile() && !bp_is_group() ) : ?>
</ins><span class="cx">                                 <div id="whats-new-post-in-box">
</span><span class="cx">                                         <?php _e( 'Post in', 'buddypress' ) ?>:
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupscreatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/create.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/create.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/groups/create.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -40,13 +40,7 @@
</span><span class="cx">
</span><span class="cx">                                         <?php do_action( 'bp_before_group_settings_creation_step' ); ?>
</span><span class="cx">
</span><del>-                                        <?php if ( function_exists('bp_wire_install') ) : ?>
-                                        <div class="checkbox">
-                                                <label><input type="checkbox" name="group-show-wire" id="group-show-wire" value="1"<?php if ( bp_get_new_group_enable_wire() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable comment wire', 'buddypress') ?></label>
-                                        </div>
-                                        <?php endif; ?>
-
-                                        <?php if ( function_exists('bp_forums_is_installed_correctly') ) : ?>
</del><ins>+                                        <?php if ( bp_is_active( 'forums' ) ) : ?>
</ins><span class="cx">                                                 <?php if ( bp_forums_is_installed_correctly() ) : ?>
</span><span class="cx">                                                         <div class="checkbox">
</span><span class="cx">                                                                 <label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php if ( bp_get_new_group_enable_forum() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable discussion forum', 'buddypress') ?></label>
</span><span class="lines">@@ -156,7 +150,7 @@
</span><span class="cx">
</span><span class="cx">                                         <?php do_action( 'bp_before_group_invites_creation_step' ); ?>
</span><span class="cx">
</span><del>-                                        <?php if ( function_exists( 'bp_get_total_friend_count' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
</del><ins>+                                        <?php if ( bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
</ins><span class="cx">                                                 <div class="left-menu">
</span><span class="cx">
</span><span class="cx">                                                         <div id="invite-list">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssingleadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/admin.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/admin.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/groups/single/admin.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -39,16 +39,8 @@
</span><span class="cx">
</span><span class="cx">         <?php do_action( 'bp_before_group_settings_admin' ); ?>
</span><span class="cx">
</span><del>-        <?php if ( function_exists('bp_wire_install') ) : ?>
</del><ins>+        <?php if ( bp_is_active( 'forums' ) ) : ?>
</ins><span class="cx">
</span><del>-                <div class="checkbox">
-                        <label><input type="checkbox" name="group-show-wire" id="group-show-wire" value="1"<?php bp_group_show_wire_setting() ?>/> <?php _e( 'Enable comment wire', 'buddypress' ) ?></label>
-                </div>
-
-        <?php endif; ?>
-
-        <?php if ( function_exists('bp_forums_is_installed_correctly') ) : ?>
-
</del><span class="cx">                 <?php if ( bp_forums_is_installed_correctly() ) : ?>
</span><span class="cx">
</span><span class="cx">                         <div class="checkbox">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmembersindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/index.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/index.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/members/index.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx">                                 <ul>
</span><span class="cx">                                         <li class="selected" id="members-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Members (%s)', 'buddypress' ), bp_get_total_member_count() ) ?></a></li>
</span><span class="cx">
</span><del>-                                        <?php if ( is_user_logged_in() && function_exists( 'bp_get_total_friend_count' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
</del><ins>+                                        <?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
</ins><span class="cx">                                                 <li id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_FRIENDS_SLUG . '/my-friends/' ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
</span><span class="cx">                                         <?php endif; ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssinglememberheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/member-header.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/member-header.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/members/single/member-header.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx">         <?php do_action( 'bp_before_member_header_meta' ) ?>
</span><span class="cx">
</span><span class="cx">         <div id="item-meta">
</span><del>-                <?php if ( function_exists( 'bp_activity_latest_update' ) ) : ?>
</del><ins>+                <?php if ( bp_is_active( 'activity' ) ) : ?>
</ins><span class="cx">                         <div id="latest-update">
</span><span class="cx">                                 <?php bp_activity_latest_update( bp_displayed_user_id() ) ?>
</span><span class="cx">                         </div>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssingleprofileprofileloopphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/profile/profile-loop.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/profile/profile-loop.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/members/single/profile/profile-loop.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> <?php do_action( 'bp_before_profile_loop_content' ) ?>
</span><span class="cx">
</span><del>-<?php if ( function_exists('xprofile_get_profile') ) : ?>
</del><ins>+<?php if ( bp_is_active( 'xprofile' ) ) : ?>
</ins><span class="cx">
</span><span class="cx">         <?php if ( bp_has_profile() ) : ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultregistrationregisterphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/registration/register.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/registration/register.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/registration/register.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">                                                 <h4><?php _e( 'Profile Details', 'buddypress' ) ?></h4>
</span><span class="cx">
</span><span class="cx">                                                 <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
</span><del>-                                                <?php if ( function_exists( 'bp_has_profile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
</del><ins>+                                                <?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
</ins><span class="cx">
</span><span class="cx">                                                 <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultsidebarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/sidebar.php (3697 => 3698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/sidebar.php        2011-01-10 21:30:32 UTC (rev 3697)
+++ trunk/bp-themes/bp-default/sidebar.php        2011-01-11 17:41:53 UTC (rev 3698)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx">
</span><span class="cx">                 <?php do_action( 'bp_after_sidebar_me' ) ?>
</span><span class="cx">
</span><del>-                <?php if ( function_exists( 'bp_message_get_notices' ) ) : ?>
</del><ins>+                <?php if ( bp_is_active( 'messages' ) ) : ?>
</ins><span class="cx">                         <?php bp_message_get_notices(); /* Site wide notices to all users */ ?>
</span><span class="cx">                 <?php endif; ?>
</span><span class="cx">
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">                 <div id="forum-directory-tags" class="widget tags">
</span><span class="cx">
</span><span class="cx">                         <h3 class="widgettitle"><?php _e( 'Forum Topic Tags', 'buddypress' ) ?></h3>
</span><del>-                        <?php if ( function_exists('bp_forums_tag_heat_map') ) : ?>
</del><ins>+                        <?php if ( bp_is_active( 'forums' ) ) : ?>
</ins><span class="cx">                                 <div id="tag-text"><?php bp_forums_tag_heat_map(); ?></div>
</span><span class="cx">                         <?php endif; ?>
</span><span class="cx">                 </div>
</span></span></pre>
</div>
</div>
</body>
</html>