bp_get_default_options

Get the default site options and their values.

Description

(array) bp_get_default_options(); 

Default values should not be set by calls to get_option() or get_site_option() due to these causing load order problems with bp_core_clear_root_options_cache(); see #BP7227.

Returns (array)

Filtered option names and values.


Usage

  1. if ( !function_exists( 'bp_get_default_options' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-options.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_default_options(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-options.php  
  1. function bp_get_default_options() { 
  2.  
  3. // Default options. 
  4. $options = array ( 
  5.  
  6. /** Components ********************************************************/ 
  7.  
  8. 'bp-deactivated-components' => array(),  
  9.  
  10. /** bbPress ***********************************************************/ 
  11.  
  12. // Legacy bbPress config location. 
  13. 'bb-config-location' => ABSPATH . 'bb-config.php',  
  14.  
  15. /** XProfile **********************************************************/ 
  16.  
  17. // Base profile groups name. 
  18. 'bp-xprofile-base-group-name' => 'Base',  
  19.  
  20. // Base fullname field name. 
  21. 'bp-xprofile-fullname-field-name' => 'Name',  
  22.  
  23. /** Blogs *************************************************************/ 
  24.  
  25. // Used to decide if blogs need indexing. 
  26. 'bp-blogs-first-install' => false,  
  27.  
  28. /** Settings **********************************************************/ 
  29.  
  30. // Disable the WP to BP profile sync. 
  31. 'bp-disable-profile-sync' => false,  
  32.  
  33. // Hide the Toolbar for logged out users. 
  34. 'hide-loggedout-adminbar' => false,  
  35.  
  36. // Avatar uploads. 
  37. 'bp-disable-avatar-uploads' => false,  
  38.  
  39. // Cover image uploads. 
  40. 'bp-disable-cover-image-uploads' => false,  
  41.  
  42. // Group Profile Photos. 
  43. 'bp-disable-group-avatar-uploads' => false,  
  44.  
  45. // Group Cover image uploads. 
  46. 'bp-disable-group-cover-image-uploads' => false,  
  47.  
  48. // Allow users to delete their own accounts. 
  49. 'bp-disable-account-deletion' => false,  
  50.  
  51. // Allow comments on blog and forum activity items. 
  52. 'bp-disable-blogforum-comments' => true,  
  53.  
  54. // The ID for the current theme package. 
  55. '_bp_theme_package_id' => 'legacy',  
  56.  
  57. // Email unsubscribe salt. 
  58. 'bp-emails-unsubscribe-salt' => '',  
  59.  
  60. /** Groups ************************************************************/ 
  61.  
  62. // @todo Move this into the groups component 
  63. // Restrict group creation to super admins. 
  64.  
  65. /** Akismet ***********************************************************/ 
  66.  
  67. // Users from all sites can post. 
  68. '_bp_enable_akismet' => true,  
  69.  
  70. /** Activity HeartBeat ************************************************/ 
  71.  
  72. // HeartBeat is on to refresh activities. 
  73. '_bp_enable_heartbeat_refresh' => true,  
  74.  
  75. /** BuddyBar **********************************************************/ 
  76.  
  77. // Force the BuddyBar. 
  78. '_bp_force_buddybar' => false,  
  79.  
  80. /** Legacy *********************************************/ 
  81.  
  82. // Do not register the bp-default themes directory. 
  83. '_bp_retain_bp_default' => false,  
  84.  
  85. // Ignore deprecated code. 
  86. '_bp_ignore_deprecated_code' => true,  
  87.  
  88. /** Widgets **************************************************/ 
  89. 'widget_bp_core_login_widget' => false,  
  90. 'widget_bp_core_members_widget' => false,  
  91. 'widget_bp_core_whos_online_widget' => false,  
  92. 'widget_bp_core_recently_active_widget' => false,  
  93. 'widget_bp_groups_widget' => false,  
  94. 'widget_bp_messages_sitewide_notices_widget' => false,  
  95. ); 
  96.  
  97. /** 
  98. * Filters the default options to be set upon activation. 
  99. * @since 1.6.0 
  100. * @param array $options Array of default options to set. 
  101. */ 
  102. return apply_filters( 'bp_get_default_options', $options );