Opened 2 years ago
Last modified 11 days ago
#16953 assigned enhancement
Allow symlinked plugins — at Version 5
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Plugins | Version: | |
| Severity: | normal | Keywords: | has-patch dev-feedback |
| Cc: | yincrash, paulschreiber@…, boonebgorges@…, djpaul@…, coenjacobs@…, lkraav, simon@…, junk@…, juzzin, mitcho@…, kenn@…, hertzog@…, kwisatz, info@…, kawauso, synapticism, markus.magnuson@…, cklosowski@…, mike@…, imtiedup@…, johnbeales@…, beaver6813, jason@…, david@…, cor@…, JeromeC, francesco.laffi@…, rodrigosprimo@…, andyadamscp@…, andkrup, tollmanz@… |
Description (last modified by scribu)
There are many scenarios where one would like to have a plugin's folder symlinked to another location.
A couple of these scenarios are described in #13550.
However, when using symlinks, code such as this fails:
plugins_url( 'script.js', __FILE__ );
This happens because __FILE__ resolves to the real path, which confuses plugin_basename().
The most simple and most flexible solution is to add a filter to plugin_basename(), leaving individual devs to handle symlinked paths, depending on their environment.
Change History (7)
comment:1
scribu
— 2 years ago
- Keywords has-patch added
- Owner set to scribu
- Status changed from new to accepted
Test files coming up.
'pre_plugin_basename' filter