[wp-trac] Re: [WordPress Trac] #6341: feature request:
plugin_baseurl() function
WordPress Trac
wp-trac at lists.automattic.com
Tue Oct 14 12:34:44 GMT 2008
#6341: feature request: plugin_baseurl() function
-------------------------------------+--------------------------------------
Reporter: Denis-de-Bernardy | Owner: jacobsantos
Type: enhancement | Status: reopened
Priority: low | Milestone: 2.7
Component: Optimization | Version: 2.5
Severity: minor | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+--------------------------------------
Comment (by jacobsantos):
The idea is so that you just put in __FILE__ and get the relative base
directory back.
{{{
function plugin_baseurl($path) {
return plugins_url( plugin_basename( dirname($path) ) );
}
}}}
So you would just need to do {{{ $url = plugin_baseurl(__FILE__); }}}.
--
Ticket URL: <http://trac.wordpress.org/ticket/6341#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list