[wp-trac] [WordPress Trac] #34358: plugin_dir_url( __FILE__ ) returns plugins directory when plugin symlinked to mu-plugins
WordPress Trac
noreply at wordpress.org
Tue Oct 20 05:34:32 UTC 2015
#34358: plugin_dir_url( __FILE__ ) returns plugins directory when plugin symlinked
to mu-plugins
----------------------------+------------------------------
Reporter: scamartist26 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Filesystem API | Version: 4.3.1
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Comment (by mattmckenny):
The use case I have is that I would like to maintain a few of our own, in-
house, plugins each with their own separate Git repo. Due to hosting
setup, we have to commit everything to our WordPress site's Git repo so
subtrees, submodules and composer dependency management don't work for us
(at least not from what I've been able to tell.)
These mu-plugins are in a common shared directory on my development box
outside of any particular WordPress install. I would like to symlink to
these plugins so I can develop new features within the context of a
specific install but outside of the Git history for that install. This way
I can manage new features, pull requests, etc for that specific plugin.
After a new release has been made for the plugin, we replace the symlink
with the actual plugin files and make a single commit with the new plugin
version. This gets committed to the WordPress install's repo and we
deploy.
The plugins need to be symlinked because, as @scamartist26 mentioned, any
assets served via the URL (JS, CSS, images) are broken because they
resolve to the plugins and not mu-plugins directory.
Hopefully that sheds some light on what we're up against and our need to
have this "fixed".
I look forward to any feedback or suggestions.
Thanks
Matt
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34358#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list