Changeset 5724
- Timestamp:
- 02/11/2012 08:45:05 PM (14 years ago)
- Location:
- trunk/bp-core
- Files:
-
- 2 edited
-
bp-core-functions.php (modified) (1 diff)
-
bp-core-options.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-functions.php
r5723 r5724 56 56 57 57 /** Functions *****************************************************************/ 58 59 /**60 * Retrieve an option61 *62 * This is a wrapper for get_blog_option(), which in turn stores settings data (such as bp-pages)63 * on the appropriate blog, given your current setup.64 *65 * The 'bp_get_option' filter is primarily for backward-compatibility.66 *67 * @package BuddyPress68 * @since 1.569 *70 * @uses bp_get_root_blog_id()71 * @param str $option_name The option to be retrieved72 * @param str $default Optional. Default value to be returned if the option isn't set73 * @return mixed The value for the option74 */75 function bp_get_option( $option_name, $default = '' ) {76 $value = get_blog_option( bp_get_root_blog_id(), $option_name, $default );77 78 return apply_filters( 'bp_get_option', $value );79 }80 81 /**82 * Save an option83 *84 * This is a wrapper for update_blog_option(), which in turn stores settings data (such as bp-pages)85 * on the appropriate blog, given your current setup.86 *87 * @package BuddyPress88 * @since 1.589 *90 * @uses bp_get_root_blog_id()91 * @param str $option_name The option key to be set92 * @param str $value The value to be set93 */94 function bp_update_option( $option_name, $value ) {95 update_blog_option( bp_get_root_blog_id(), $option_name, $value );96 }97 98 /**99 * Delete an option100 *101 * This is a wrapper for delete_blog_option(), which in turn deletes settings data (such as102 * bp-pages) on the appropriate blog, given your current setup.103 *104 * @package BuddyPress105 * @since 1.5106 *107 * @uses bp_get_root_blog_id()108 * @param str $option_name The option key to be set109 */110 function bp_delete_option( $option_name ) {111 delete_blog_option( bp_get_root_blog_id(), $option_name );112 }113 58 114 59 /** -
trunk/bp-core/bp-core-options.php
r5721 r5724 191 191 // Always return a value, even if false 192 192 return $value; 193 } 194 195 /** 196 * Retrieve an option 197 * 198 * This is a wrapper for get_blog_option(), which in turn stores settings data (such as bp-pages) 199 * on the appropriate blog, given your current setup. 200 * 201 * The 'bp_get_option' filter is primarily for backward-compatibility. 202 * 203 * @package BuddyPress 204 * @since 1.5 205 * 206 * @uses bp_get_root_blog_id() 207 * @param str $option_name The option to be retrieved 208 * @param str $default Optional. Default value to be returned if the option isn't set 209 * @return mixed The value for the option 210 */ 211 function bp_get_option( $option_name, $default = '' ) { 212 $value = get_blog_option( bp_get_root_blog_id(), $option_name, $default ); 213 214 return apply_filters( 'bp_get_option', $value ); 215 } 216 217 /** 218 * Save an option 219 * 220 * This is a wrapper for update_blog_option(), which in turn stores settings data (such as bp-pages) 221 * on the appropriate blog, given your current setup. 222 * 223 * @package BuddyPress 224 * @since 1.5 225 * 226 * @uses bp_get_root_blog_id() 227 * @param str $option_name The option key to be set 228 * @param str $value The value to be set 229 */ 230 function bp_update_option( $option_name, $value ) { 231 update_blog_option( bp_get_root_blog_id(), $option_name, $value ); 232 } 233 234 /** 235 * Delete an option 236 * 237 * This is a wrapper for delete_blog_option(), which in turn deletes settings data (such as 238 * bp-pages) on the appropriate blog, given your current setup. 239 * 240 * @package BuddyPress 241 * @since 1.5 242 * 243 * @uses bp_get_root_blog_id() 244 * @param str $option_name The option key to be set 245 */ 246 function bp_delete_option( $option_name ) { 247 delete_blog_option( bp_get_root_blog_id(), $option_name ); 193 248 } 194 249
Note: See TracChangeset
for help on using the changeset viewer.