Changeset 4378 for trunk/bp-core/bp-core-functions.php
- Timestamp:
- 05/16/2011 10:22:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-functions.php
r4372 r4378 28 28 29 29 $page_blog_id = $is_enable_multiblog ? get_current_blog_id() : BP_ROOT_BLOG; 30 30 31 31 // Upgrading from an earlier version of BP pre-1.3 32 32 if ( empty( $page_ids ) || isset( $page_ids['members'] ) ) { … … 1001 1001 * BuddyPress stores a number of pieces of userdata in the WordPress central usermeta table. In 1002 1002 * order to allow plugins to enable multiple instances of BuddyPress on a single WP installation, 1003 * BP's usermeta keys are abstracted and stored in the $bp global, at $bp->user_meta_keys.1003 * BP's usermeta keys are filtered with this function, so that they can be altered on the fly. 1004 1004 * 1005 1005 * Plugin authors who access or modify metadata created by BuddyPress should use … … 1009 1009 * 1010 1010 * If your plugin introduces custom user metadata that might change between multiple BP instances 1011 * on a single WP installation, you are strongly recommended to register your meta keys in the $bp 1012 * global (see BP_Core_Component::setup_globals()), and use this function when storing and 1011 * on a single WP installation, you are strongly recommended to use this function when storing and 1013 1012 * retrieving metadata. 1014 1013 * 1015 1014 * @package BuddyPress 1016 1015 * @since 1.3 1017 * @see BP_Core_Component::_setup_globals()1018 1016 * 1019 1017 * @uses apply_filters() Filter bp_get_user_meta_key to modify keys individually 1020 * @param str $ name1018 * @param str $key 1021 1019 * @return str $key 1022 1020 */ 1023 function bp_get_user_meta_key( $name = false ) { 1024 global $bp; 1025 1026 if ( !$name ) 1027 return false; 1028 1029 $key = isset( $bp->user_meta_keys->$name ) ? $bp->user_meta_keys->$name : false; 1030 1031 return apply_filters( 'bp_get_user_meta_key', $key, $name ); 1021 function bp_get_user_meta_key( $key = false ) { 1022 return apply_filters( 'bp_get_user_meta_key', $key ); 1032 1023 } 1033 1024
Note: See TracChangeset
for help on using the changeset viewer.