Changeset 5724 for trunk/bp-core/bp-core-functions.php
- Timestamp:
- 02/11/2012 08:45:05 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-functions.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 /**
Note: See TracChangeset
for help on using the changeset viewer.