You can submit plugins here:
Once they’re approved, you’ll get a bbPress URL for your plugin.
I think gautam2011 means outputting the path to bbPress’ plugin URL directory.
Is there a constant variable like WP_PLUGIN_URL?
I’m looking for this too! I’m porting a WP plugin over.
Found it! It’s in bb-settings.php
The variable is BB_PLUGIN_URL.
Simple as that!
BB_PLUGIN_URL is useless as there are several places a user can put a plugin. Most users also don’t know they aren’t supposed to use
bb-plugins and make
my-plugins because the powers that be refuse to ship bbpress with a pre-made
After much trial and error and problems reported by windows users, I figured this out:
Where $url is the full uri to the local plugin’s directory (ie. if you have an image in there, that’s the url to it)
The $path is the local storage path that will work in both windows and linux.
It may look like these functions can be simplified but if you do that, I guarantee you’ll break it under one environment or another.
But, you forgot to escape .
So, the correct code is:
$url = bb_get_option('uri').trim(str_replace(array(trim(BBPATH,"/\"),"\"),array("","/"),dirname(__FILE__)),' /\').'/';
The forum changed double into single