[wp-trac] Re: [WordPress Trac] #6341: feature request: plugin_baseurl() function

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 18 18:47:36 GMT 2009


#6341: feature request: plugin_baseurl() function
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:  jacobsantos
     Type:  enhancement        |       Status:  closed     
 Priority:  low                |    Milestone:  2.8        
Component:  Optimization       |      Version:  2.7        
 Severity:  minor              |   Resolution:  invalid    
 Keywords:                     |  
-------------------------------+--------------------------------------------
Changes (by Denis-de-Bernardy):

  * version:  2.5 => 2.7
  * milestone:  => 2.8

Comment:

 well, using this plugin, it goes:

 $folder = plugins_url() . '/' . basename(dirname(__FILE__));

 kinda sucks imo, but I guess I can live with that...

 I still think there is room for:


 {{{
 function plugin_baseurl($FILE) {
     return plugins_url() . '/' . basename(dirname($FILE));
 }
 }}}

 usage: $file = plugin_baseurl(__FILE__) . '/js/myscript.js';

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6341#comment:13>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list