[buddypress-trac] [BuddyPress] #3261: BP options get/update wrapper functions

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Jun 10 22:03:33 UTC 2011


#3261: BP options get/update wrapper functions
---------------------------+-----------------
  Reporter:  boonebgorges  |      Owner:
      Type:  defect        |     Status:  new
  Priority:  normal        |  Milestone:  1.3
 Component:  Core          |    Version:
Resolution:                |   Keywords:
---------------------------+-----------------

Comment (by boonebgorges):

 Whew, this one was a doozy. Backpat, the installation wizard, and
 BP_ENABLE_MULTIBLOG meant that there was a lot to account for. A few
 notes:

 - The hard work of bp_get_option() and bp_update_option() is done by a new
 function bp_get_option_blog_id(). It takes the option name as an argument,
 and checks that argument against a filterable list of options that should
 be stored site-specifically. Essentially, this function always returns
 BP_ROOT_BLOG, except in the following scenario: BP_ENABLE_MULTIBLOG is
 true and the option is 'bp-pages'. The logic here: on _MULTIBLOG, all
 settings should be the same, except for bp-pages, which must necessarily
 be different from blog to blog. A multinetwork BP plugin will need to
 filter this value, so that other BP options are stored in a site-specific
 way. I'd like to know what you think about this approach.

 - I combed through the codebase and found all the places (I think) where
 get_blog_option or get_site_option etc needed to be changed to the new
 bp_x_option() functions. Some things are left in sitemeta (like bp-
 version, and certain WP things like registration settings).

 - The patch should automatically detect the old structure of your data and
 port it over. Let me know if that doesn't happen smoothly.

 Feedback greatly appreciated on 3261.patch

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3261#comment:15>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list