Changeset 9698 for trunk/src/bp-core/bp-core-options.php
- Timestamp:
- 04/05/2015 06:18:13 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-options.php
r9598 r9698 482 482 } 483 483 484 /** 485 * Get a root option. 486 * 487 * "Root options" are those that apply across an entire installation, and are fetched only a single 488 * time during a pageload and stored in `buddypress()->site_options` to prevent future lookups. 489 * See {@see bp_core_get_root_options()}. 490 * 491 * @since BuddyPress (2.3.0) 492 * 493 * @param string $option Name of the option key. 494 * @return mixed Value, if found. 495 */ 496 function bp_core_get_root_option( $option ) { 497 $bp = buddypress(); 498 499 if ( ! isset( $bp->site_options ) ) { 500 $bp->site_options = bp_core_get_root_options(); 501 } 502 503 $value = ''; 504 if ( isset( $bp->site_options[ $option ] ) ) { 505 $value = $bp->site_options[ $option ]; 506 } 507 508 return $value; 509 } 510 484 511 /** Active? *******************************************************************/ 485 512
Note: See TracChangeset
for help on using the changeset viewer.