bb_get_plugin_uri

The BuddyPress bb get plugin uri function.

Description

bb_get_plugin_uri( (bool) $plugin = false ); 

Parameters (1)

0. $plugin — Optional. (bool) => false
The plugin.

Usage

  1. if ( !function_exists( 'bb_get_plugin_uri' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-core.php'; 
  3.  
  4. // The plugin. 
  5. $plugin = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_get_plugin_uri($plugin); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-core.php  
  1. function bb_get_plugin_uri( $plugin = false ) 
  2. global $bb; 
  3. if ( preg_match( '/^([a-z0-9_-]+)#((?:[a-z0-9\/\\_-]+.)+)(php)$/i', $plugin, $_matches ) ) { 
  4. $plugin_uri = $bb->plugin_locations[$_matches[1]]['url'] . $_matches[2] . $_matches[3]; 
  5. $plugin_uri = dirname( $plugin_uri ) . '/'; 
  6. } else { 
  7. $plugin_uri = $bb->plugin_locations['core']['url']; 
  8. return apply_filters( 'bb_get_plugin_uri', $plugin_uri, $plugin );