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

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 25 15:56:48 GMT 2009


#6341: feature request: plugin_url() function
-------------------------------------------+--------------------------------
 Reporter:  Denis-de-Bernardy              |        Owner:  jacobsantos
     Type:  enhancement                    |       Status:  reopened   
 Priority:  low                            |    Milestone:  2.8        
Component:  Optimization                   |      Version:  2.7        
 Severity:  minor                          |   Resolution:             
 Keywords:  has-patch tested dev-feedback  |  
-------------------------------------------+--------------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  has-patch tested => has-patch tested dev-feedback

Comment:

 Not so... plugin_urls() gives you the url of the plugin dir, not that of
 the plugin.

 Surely, you've authored enough plugins to know that, while you develop
 your plugin as if it was going to go into wp-content/plugins/yourfolder,
 there is a strong likelihood that those who download it will install it in
 wp-content/plugins, or wp-content/otherfolder instead...

 Plus, having such a plugin_url() function makes good sense to ensure that
 plugins are compatible with WPMU. if its WPMU version,
 plugin_url(__FILE__) would/should additionally check if the plugin is in
 wp-content/plugins or wp-content/mu-plugins -- and return the correct url
 no matter what...

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


More information about the wp-trac mailing list