<!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][5508] trunk/bp-core/bp-core-options.php: Update bp-core-options.php with existing BuddyPress options.</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/5508">5508</a></dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-12-11 17:47:40 +0000 (Sun, 11 Dec 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update bp-core-options.php with existing BuddyPress options. See <a href="http://buddypress.trac.wordpress.org/ticket/3835">#3835</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcoreoptionsphp">trunk/bp-core/bp-core-options.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcoreoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-options.php (5507 => 5508)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-options.php        2011-12-11 17:31:06 UTC (rev 5507)
+++ trunk/bp-core/bp-core-options.php        2011-12-11 17:47:40 UTC (rev 5508)
</span><span class="lines">@@ -24,111 +24,38 @@
</span><span class="cx"> 
</span><span class="cx">                 /** DB Version ********************************************************/
</span><span class="cx"> 
</span><del>-                '_bp_db_version'            =&gt; '155',
</del><ins>+                '_bp_db_version'                =&gt; '155',
</ins><span class="cx"> 
</span><span class="cx">                 /** Settings **********************************************************/
</span><span class="cx"> 
</span><del>-                // Lock post editing after 5 minutes
-                '_bp_edit_lock'             =&gt; '5',
</del><ins>+                // Disable the WP to BP profile sync
+                'bp-disable-profile-sync'       =&gt; false,
</ins><span class="cx"> 
</span><del>-                // Throttle post time to 10 seconds
-                '_bp_throttle_time'         =&gt; '10',
</del><ins>+                // Hide the admin bar for logged out users
+                'hide-loggedout-adminbar'       =&gt; false,
</ins><span class="cx"> 
</span><del>-                // Favorites
-                '_bp_enable_favorites'      =&gt; true,
</del><ins>+                // Avatar uploads
+                'bp-disable-avatar-uploads'     =&gt; false,
</ins><span class="cx"> 
</span><del>-                // Subscriptions
-                '_bp_enable_subscriptions'  =&gt; true,
</del><ins>+                // Allow users to delete their own accounts
+                'bp-disable-account-deletion'   =&gt; true,
</ins><span class="cx"> 
</span><span class="cx">                 // Allow anonymous posting
</span><del>-                '_bp_allow_anonymous'       =&gt; false,
</del><ins>+                'bp-disable-blogforum-comments' =&gt; true,
</ins><span class="cx"> 
</span><del>-                // Users from all sites can post
-                '_bp_allow_global_access'   =&gt; false,
</del><ins>+                // Use the WordPress editor when possible
+                '_bp_use_wp_editor'             =&gt; false,
</ins><span class="cx"> 
</span><del>-                // Use the WordPress editor if available
-                '_bp_use_wp_editor'         =&gt; true,
</del><ins>+                /** Groups ************************************************************/
</ins><span class="cx"> 
</span><del>-                /** Per Page **********************************************************/
</del><ins>+                // @todo Move this into the groups component
</ins><span class="cx"> 
</span><del>-                // Topics per page
-                '_bp_topics_per_page'       =&gt; '15',
</del><ins>+                // Restrict group creation to super admins
+                'bp_restrict_group_creation'    =&gt; false,
</ins><span class="cx"> 
</span><del>-                // Replies per page
-                '_bp_replies_per_page'      =&gt; '15',
</del><ins>+                // Root forum ID for groups
+                '_bbp_group_forums_root_id'     =&gt; 0,
</ins><span class="cx"> 
</span><del>-                // Forums per page
-                '_bp_forums_per_page'       =&gt; '50',
-
-                // Topics per RSS page
-                '_bp_topics_per_rss_page'   =&gt; '25',
-
-                // Replies per RSS page
-                '_bp_replies_per_rss_page'  =&gt; '25',
-
-                /** Page For **********************************************************/
-
-                // Page for forums
-                '_bp_page_for_forums'       =&gt; '0',
-
-                // Page for forums
-                '_bp_page_for_topics'       =&gt; '0',
-
-                // Page for login
-                '_bp_page_for_login'        =&gt; '0',
-
-                // Page for register
-                '_bp_page_for_register'     =&gt; '0',
-
-                // Page for lost-pass
-                '_bp_page_for_lost_pass'    =&gt; '0',
-
-                /** Archive Slugs *****************************************************/
-
-                // Forum archive slug
-                '_bp_root_slug'             =&gt; 'forums',
-
-                // Topic archive slug
-                '_bp_topic_archive_slug'    =&gt; 'topics',
-
-                /** Single Slugs ******************************************************/
-
-                // Include Forum archive before single slugs
-                '_bp_include_root'          =&gt; true,
-
-                // Forum slug
-                '_bp_forum_slug'            =&gt; 'forum',
-
-                // Topic slug
-                '_bp_topic_slug'            =&gt; 'topic',
-
-                // Reply slug
-                '_bp_reply_slug'            =&gt; 'reply',
-
-                // Topic tag slug
-                '_bp_topic_tag_slug'        =&gt; 'topic-tag',
-
-                /** Other Slugs *******************************************************/
-
-                // User profile slug
-                '_bp_user_slug'             =&gt; 'users',
-
-                // View slug
-                '_bp_view_slug'             =&gt; 'view',
-
-                /** Topics ************************************************************/
-
-                // Title Max Length
-                '_bp_title_max_length'      =&gt; '80',
-
-                /** BuddyPress ********************************************************/
-
-                // Enable BuddyPress Group Extension
-                '_bbp_enable_group_forums'  =&gt; true,
-
-                // Group Forums parent forum id
-                '_bbp_group_forums_root_id' =&gt; '0',
-
</del><span class="cx">                 /** Akismet ***********************************************************/
</span><span class="cx"> 
</span><span class="cx">                 // Users from all sites can post
</span><span class="lines">@@ -162,6 +89,7 @@
</span><span class="cx">         // Allow previously activated plugins to append their own options.
</span><span class="cx">         do_action( 'bp_add_options' );
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> /**
</span><span class="cx">  * Delete default options
</span><span class="cx">  *
</span><span class="lines">@@ -189,7 +117,7 @@
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Add filters to each BuddyPress option and allow them to be overloaded from
</span><del>- * inside the $bbp-&gt;options array.
</del><ins>+ * inside the $bp-&gt;options array.
</ins><span class="cx">  *
</span><span class="cx">  * @since BuddyPress (1.6)
</span><span class="cx">  *
</span><span class="lines">@@ -212,16 +140,16 @@
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Filter default options and allow them to be overloaded from inside the
</span><del>- * $bbp-&gt;options array.
</del><ins>+ * $bp-&gt;options array.
</ins><span class="cx">  *
</span><span class="cx">  * @since BuddyPress (1.6)
</span><span class="cx">  *
</span><del>- * @global BuddyPress $bbp
</del><ins>+ * @global BuddyPress $bp
</ins><span class="cx">  * @param bool $value Optional. Default value false
</span><span class="cx">  * @return mixed false if not overloaded, mixed if set
</span><span class="cx">  */
</span><span class="cx"> function bp_pre_get_option( $value = false ) {
</span><del>-        global $bbp;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         // Get the name of the current filter so we can manipulate it
</span><span class="cx">         $filter = current_filter();
</span><span class="lines">@@ -230,8 +158,8 @@
</span><span class="cx">         $option = str_replace( 'pre_option_', '', $filter );
</span><span class="cx"> 
</span><span class="cx">         // Check the options global for preset value
</span><del>-        if ( !empty( $bbp-&gt;options[$option] ) )
-                $value = $bbp-&gt;options[$option];
</del><ins>+        if ( !empty( $bp-&gt;options[$option] ) )
+                $value = $bp-&gt;options[$option];
</ins><span class="cx"> 
</span><span class="cx">         // Always return a value, even if false
</span><span class="cx">         return $value;
</span><span class="lines">@@ -240,112 +168,118 @@
</span><span class="cx"> /** Active? *******************************************************************/
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Checks if favorites feature is enabled.
</del><ins>+ * Is profile sycing disabled?
</ins><span class="cx">  *
</span><span class="cx">  * @since BuddyPress (1.6)
</span><span class="cx">  *
</span><span class="cx">  * @param $default bool Optional.Default value true
</span><span class="cx">  *
</span><del>- * @uses get_option() To get the favorites option
- * @return bool Is favorites enabled or not
</del><ins>+ * @uses get_option() To get the profile sync option
+ * @return bool Is profile sync enabled or not
</ins><span class="cx">  */
</span><del>-function bp_is_favorites_active( $default = true ) {
-        return (bool) apply_filters( 'bp_is_favorites_active', (bool) get_option( '_bp_enable_favorites', $default ) );
</del><ins>+function bp_disable_profile_sync( $default = true ) {
+        return (bool) apply_filters( 'bp_disable_profile_sync', (bool) get_option( 'bp-disable-profile-sync', $default ) );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Checks if subscription feature is enabled.
</del><ins>+ * Is the admin bar hidden for logged out users?
</ins><span class="cx">  *
</span><span class="cx">  * @since BuddyPress (1.6)
</span><span class="cx">  *
</span><span class="cx">  * @param $default bool Optional.Default value true
</span><span class="cx">  *
</span><del>- * @uses get_option() To get the subscriptions option
- * @return bool Is subscription enabled or not
</del><ins>+ * @uses get_option() To get the logged out admin bar option
+ * @return bool Is logged out admin bar enabled or not
</ins><span class="cx">  */
</span><del>-function bp_is_subscriptions_active( $default = true ) {
-        return (bool) apply_filters( 'bp_is_subscriptions_active', (bool) get_option( '_bp_enable_subscriptions', $default ) );
</del><ins>+function bp_hide_loggedout_adminbar( $default = true ) {
+        return (bool) apply_filters( 'bp_hide_loggedout_adminbar', (bool) get_option( 'hide-loggedout-adminbar', $default ) );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Are topic and reply revisions allowed
</del><ins>+ * Are members able to upload their own avatars?
</ins><span class="cx">  *
</span><span class="cx">  * @since BuddyPress (r3412)
</span><span class="cx">  *
</span><span class="cx">  * @param $default bool Optional. Default value true
</span><span class="cx">  *
</span><del>- * @uses get_option() To get the allow revisions
- * @return bool Are revisions allowed?
</del><ins>+ * @uses get_option() To get the avatar uploads option
+ * @return bool Are avatar uploads allowed?
</ins><span class="cx">  */
</span><del>-function bp_allow_revisions( $default = true ) {
-        return (bool) apply_filters( 'bp_allow_revisions', (bool) get_option( '_bp_allow_revisions', $default ) );
</del><ins>+function bp_disable_avatar_uploads( $default = true ) {
+        return (bool) apply_filters( 'bp_disable_avatar_uploads', (bool) get_option( 'bp-disable-avatar-uploads', $default ) );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Is the anonymous posting allowed?
</del><ins>+ * Are members able to delete their own accounts
</ins><span class="cx">  *
</span><span class="cx">  * @since BuddyPress (1.6)
</span><span class="cx">  *
</span><span class="cx">  * @param $default bool Optional. Default value
</span><span class="cx">  *
</span><del>- * @uses get_option() To get the allow anonymous option
- * @return bool Is anonymous posting allowed?
</del><ins>+ * @uses get_option() To get the account deletion option
+ * @return bool Is account deletion allowed?
</ins><span class="cx">  */
</span><del>-function bp_allow_anonymous( $default = false ) {
-        return apply_filters( 'bp_allow_anonymous', (bool) get_option( '_bp_allow_anonymous', $default ) );
</del><ins>+function bp_disable_account_deletion( $default = false ) {
+        return apply_filters( 'bp_disable_account_deletion', (bool) get_option( 'bp-disable-account-deletion', $default ) );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Is this community available to all users on all sites in this installation?
</del><ins>+ * Are blog and forum activity stream comments disabled
</ins><span class="cx">  *
</span><span class="cx">  * @since BuddyPress (1.6)
</span><span class="cx">  *
</span><span class="cx">  * @param $default bool Optional. Default value false
</span><ins>+ * @todo split and move into blog and forum components
+ * @uses get_option() To get the blog/forum comments option
+ * @return bool Is blog/forum comments allowed?
+ */
+function bp_disable_blogforum_comments( $default = false ) {
+        return (bool) apply_filters( 'bp_disable_blogforum_comments', (bool) get_option( 'bp-disable-blogforum-comments', $default ) );
+}
+
+/**
+ * Is group creation turned off?
</ins><span class="cx">  *
</span><del>- * @uses get_option() To get the global access option
- * @return bool Is global access allowed?
</del><ins>+ * @since BuddyPress (r3386)
+ *
+ * @param $default bool Optional. Default value true
+ *
+ * @todo Move into groups component
+ * @uses get_option() To get the group creation
+ * @return bool Allow group creation?
</ins><span class="cx">  */
</span><del>-function bp_allow_global_access( $default = false ) {
-        return (bool) apply_filters( 'bp_allow_global_access', (bool) get_option( '_bp_allow_global_access', $default ) );
</del><ins>+function bp_restrict_group_creation( $default = true ) {
+        return (bool) apply_filters( 'bp_restrict_group_creation', (bool) get_option( 'bp_restrict_group_creation', $default ) );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Use the WordPress editor if available
</del><ins>+ * Have we migrated to using the WordPress admin bar?
</ins><span class="cx">  *
</span><span class="cx">  * @since BuddyPress (r3386)
</span><span class="cx">  *
</span><span class="cx">  * @param $default bool Optional. Default value true
</span><span class="cx">  *
</span><ins>+ * @todo Move into groups component
</ins><span class="cx">  * @uses get_option() To get the WP editor option
</span><span class="cx">  * @return bool Use WP editor?
</span><span class="cx">  */
</span><del>-function bp_use_wp_editor( $default = true ) {
-        return (bool) apply_filters( 'bp_use_wp_editor', (bool) get_option( '_bp_use_wp_editor', $default ) );
</del><ins>+function bp_force_buddybar( $default = true ) {
+        return (bool) apply_filters( 'bp_force_buddybar', (bool) get_option( 'bp-force-buddybar', $default ) );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Output the maximum length of a title
</del><ins>+ * Use the WordPress editor if available
</ins><span class="cx">  *
</span><del>- * @since BuddyPress (r3246)
</del><ins>+ * @since BuddyPress (r3386)
</ins><span class="cx">  *
</span><del>- * @param $default bool Optional. Default value 80
</del><ins>+ * @param $default bool Optional. Default value true
+ *
+ * @uses get_option() To get the WP editor option
+ * @return bool Use WP editor?
</ins><span class="cx">  */
</span><del>-function bp_title_max_length( $default = '80' ) {
-        echo bp_get_title_max_length( $default );
</del><ins>+function bp_use_wp_editor( $default = true ) {
+        return (bool) apply_filters( 'bp_use_wp_editor', (bool) get_option( '_bp_use_wp_editor', $default ) );
</ins><span class="cx"> }
</span><del>-        /**
-         * Return the maximum length of a title
-         *
-         * @since BuddyPress (1.6)
-         *
-         * @param $default bool Optional. Default value 80
-         *
-         * @uses get_option() To get the maximum title length
-         * @return int Is anonymous posting allowed?
-         */
-        function bp_get_title_max_length( $default = '80' ) {
-                return (int) apply_filters( 'bp_get_title_max_length', (int) get_option( '_bp_title_max_length', $default ) );
-        }
</del><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Output the group forums root parent forum id
</span><span class="lines">@@ -358,7 +292,7 @@
</span><span class="cx">         echo bp_get_group_forums_root_id( $default );
</span><span class="cx"> }
</span><span class="cx">         /**
</span><del>-         * Return the grop forums root parent forum id
</del><ins>+         * Return the group forums root parent forum id
</ins><span class="cx">          *
</span><span class="cx">          * @since BuddyPress (1.6)
</span><span class="cx">          *
</span></span></pre>
</div>
</div>

</body>
</html>