buddyboss_global_search_init

Main.

Description

buddyboss_global_search_init(); 

Usage

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

Defined (1)

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

/buddypress-global-search.php  
  1. function buddyboss_global_search_init() { 
  2. global $bp, $buddyboss_global_search; 
  3.  
  4. $main_include = BUDDYBOSS_GLOBAL_SEARCH_PLUGIN_DIR . 'includes/main-class.php'; 
  5.  
  6. try { 
  7. if (file_exists($main_include)) { 
  8. require( $main_include ); 
  9. } else { 
  10. $msg = sprintf(__("Couldn't load main class at:<br/>%s", 'buddypress-global-search'), $main_include); 
  11. throw new Exception($msg, 404); 
  12. } catch (Exception $e) { 
  13. $msg = sprintf(__("<h1>Fatalerror</h1><hr/><pre>%s</pre>", 'buddypress-global-search'), $e->getMessage()); 
  14. echo $msg; 
  15.  
  16. $buddyboss_global_search = BuddyBoss_Global_Search_Plugin::instance();