<!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][5727] trunk: Use bp_get_option() in more places, and include bp-core-options.php in update wizard.</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><a href="http://buddypress.trac.wordpress.org/changeset/5727">5727</a></dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2012-02-11 21:19:15 +0000 (Sat, 11 Feb 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use bp_get_option() in more places, and include bp-core-options.php in update wizard.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcoreadminbpcoresettingsphp">trunk/bp-core/admin/bp-core-settings.php</a></li>
<li><a href="#trunkbpcoreadminbpcoreupdatephp">trunk/bp-core/admin/bp-core-update.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsnotificationsphp">trunk/bp-groups/bp-groups-notifications.php</a></li>
<li><a href="#trunkbploaderphp">trunk/bp-loader.php</a></li>
<li><a href="#trunkbpmembersbpmembersfunctionsphp">trunk/bp-members/bp-members-functions.php</a></li>
<li><a href="#trunkbpmembersbpmemberstemplatephp">trunk/bp-members/bp-members-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcoreadminbpcoresettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-settings.php (5726 => 5727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-settings.php        2012-02-11 21:13:09 UTC (rev 5726)
+++ trunk/bp-core/admin/bp-core-settings.php        2012-02-11 21:19:15 UTC (rev 5727)
</span><span class="lines">@@ -295,7 +295,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since BuddyPress (r3203)
</span><span class="cx">          *
</span><del>-         * @uses get_option()
</del><ins>+         * @uses bp_get_option()
</ins><span class="cx">          * @uses esc_attr()
</span><span class="cx">          * @uses apply_filters()
</span><span class="cx">          *
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx">         function bp_get_form_option( $option, $default = '', $slug = false ) {
</span><span class="cx"> 
</span><span class="cx">                 // Get the option and sanitize it
</span><del>-                $value = get_option( $option, $default );
</del><ins>+                $value = bp_get_option( $option, $default );
</ins><span class="cx"> 
</span><span class="cx">                 // Slug?
</span><span class="cx">                 if ( true === $slug )
</span></span></pre></div>
<a id="trunkbpcoreadminbpcoreupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-update.php (5726 => 5727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-update.php        2012-02-11 21:13:09 UTC (rev 5726)
+++ trunk/bp-core/admin/bp-core-update.php        2012-02-11 21:19:15 UTC (rev 5727)
</span><span class="lines">@@ -499,7 +499,7 @@
</span><span class="cx">                         return false;
</span><span class="cx"> 
</span><span class="cx">                 $prefix              = '';
</span><del>-                $permalink_structure = get_option( 'permalink_structure' );
</del><ins>+                $permalink_structure = bp_get_option( 'permalink_structure' );
</ins><span class="cx">                 $structures          = array( '', $prefix . '/%year%/%monthnum%/%day%/%postname%/', $prefix . '/%year%/%monthnum%/%postname%/', $prefix . '/archives/%post_id%' );
</span><span class="cx"> 
</span><span class="cx">                 // If we're using permalinks already, adjust text accordingly
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsnotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-notifications.php (5726 => 5727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-notifications.php        2012-02-11 21:13:09 UTC (rev 5726)
+++ trunk/bp-groups/bp-groups-notifications.php        2012-02-11 21:19:15 UTC (rev 5727)
</span><span class="lines">@@ -66,7 +66,6 @@
</span><span class="cx">         $group                = groups_get_group( array( 'group_id' =&gt; $group_id ) );
</span><span class="cx"> 
</span><span class="cx">         $ud             = bp_core_get_core_userdata( $admin_id );
</span><del>-        $requesting_ud  = bp_core_get_core_userdata( $requesting_user_id );
</del><span class="cx">         $group_requests = bp_get_group_permalink( $group ) . 'admin/membership-requests';
</span><span class="cx">         $profile_link   = bp_core_get_user_domain( $requesting_user_id );
</span><span class="cx">         $settings_slug  = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
</span><span class="lines">@@ -74,7 +73,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Set up and send the message
</span><span class="cx">         $to       = $ud-&gt;user_email;
</span><del>-        $sitename = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
</del><ins>+        $sitename = wp_specialchars_decode( bp_get_option( 'blogname' ), ENT_QUOTES );
</ins><span class="cx">         $subject  = '[' . $sitename . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group-&gt;name );
</span><span class="cx"> 
</span><span class="cx"> $message = sprintf( __(
</span></span></pre></div>
<a id="trunkbploaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-loader.php (5726 => 5727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-loader.php        2012-02-11 21:13:09 UTC (rev 5726)
+++ trunk/bp-loader.php        2012-02-11 21:19:15 UTC (rev 5727)
</span><span class="lines">@@ -477,6 +477,7 @@
</span><span class="cx">                                 require( $this-&gt;plugin_dir . 'bp-core/bp-core-functions.php'    );
</span><span class="cx">                                 require( $this-&gt;plugin_dir . 'bp-core/bp-core-update.php'       );
</span><span class="cx">                                 require( $this-&gt;plugin_dir . 'bp-core/bp-core-caps.php'         );
</span><ins>+                                require( $this-&gt;plugin_dir . 'bp-core/bp-core-options.php'      );
</ins><span class="cx">                                 require( $this-&gt;plugin_dir . 'bp-core/admin/bp-core-update.php' );
</span><span class="cx">                         }
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkbpmembersbpmembersfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-functions.php (5726 => 5727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-functions.php        2012-02-11 21:13:09 UTC (rev 5726)
+++ trunk/bp-members/bp-members-functions.php        2012-02-11 21:19:15 UTC (rev 5727)
</span><span class="lines">@@ -929,7 +929,7 @@
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><span class="cx">                 if ( empty( $user_id ) ) {
</span><del>-                        $errors-&gt;add( 'registerfail', sprintf( __('&lt;strong&gt;ERROR&lt;/strong&gt;: Couldn&amp;#8217;t register you... please contact the &lt;a href=&quot;mailto:%s&quot;&gt;webmaster&lt;/a&gt; !', 'buddypress' ), get_option( 'admin_email' ) ) );
</del><ins>+                        $errors-&gt;add( 'registerfail', sprintf( __('&lt;strong&gt;ERROR&lt;/strong&gt;: Couldn&amp;#8217;t register you... please contact the &lt;a href=&quot;mailto:%s&quot;&gt;webmaster&lt;/a&gt; !', 'buddypress' ), bp_get_option( 'admin_email' ) ) );
</ins><span class="cx">                         return $errors;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -1108,7 +1108,7 @@
</span><span class="cx">         $activate_url = bp_get_activation_page() .&quot;?key=$key&quot;;
</span><span class="cx">         $activate_url = esc_url( $activate_url );
</span><span class="cx"> 
</span><del>-        $from_name = ( '' == get_option( 'blogname' ) ) ? __( 'BuddyPress', 'buddypress' ) : esc_html( get_option( 'blogname' ) );
</del><ins>+        $from_name = ( '' == bp_get_option( 'blogname' ) ) ? __( 'BuddyPress', 'buddypress' ) : esc_html( bp_get_option( 'blogname' ) );
</ins><span class="cx"> 
</span><span class="cx">         $message = sprintf( __( &quot;Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n&quot;, 'buddypress' ), $activate_url );
</span><span class="cx">         $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress' );
</span></span></pre></div>
<a id="trunkbpmembersbpmemberstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-template.php (5726 => 5727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-template.php        2012-02-11 21:13:09 UTC (rev 5726)
+++ trunk/bp-members/bp-members-template.php        2012-02-11 21:19:15 UTC (rev 5727)
</span><span class="lines">@@ -1140,12 +1140,14 @@
</span><span class="cx">                 $signup_allowed = false;
</span><span class="cx"> 
</span><span class="cx">                 if ( is_multisite() ) {
</span><del>-                        if ( in_array( $bp-&gt;site_options['registration'], array( 'all', 'user' ) ) )
</del><ins>+                        if ( in_array( $bp-&gt;site_options['registration'], array( 'all', 'user' ) ) ) {
</ins><span class="cx">                                 $signup_allowed = true;
</span><ins>+                        }
</ins><span class="cx"> 
</span><span class="cx">                 } else {
</span><del>-                        if ( get_option( 'users_can_register') )
</del><ins>+                        if ( bp_get_option( 'users_can_register') ) {
</ins><span class="cx">                                 $signup_allowed = true;
</span><ins>+                        }
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 return apply_filters( 'bp_get_signup_allowed', $signup_allowed );
</span></span></pre>
</div>
</div>

</body>
</html>