[wp-trac] [WordPress Trac] #34358: plugin_dir_url( __FILE__ ) returns plugins directory when plugin symlinked to mu-plugins
WordPress Trac
noreply at wordpress.org
Fri Apr 22 04:03:45 UTC 2016
#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
Component: Plugins | Review
Severity: normal | Version: 4.3.1
Keywords: has-patch needs-unit-tests needs- | Resolution:
refresh | Focuses:
-------------------------------------------------+-------------------------
Comment (by rmccue):
FWIW: the reason we didn't support symlinks for mu-plugins is because
they're only files, whereas normal plugins are files or directories. It
doesn't make much sense for just files to have the realpath registered.
Presumably if you're using subdirectories, you have a loader file as well;
this loader file should be calling `wp_register_plugin_realpath()` on the
files it loads to
[https://github.com/WordPress/WordPress/blob/c3fe61770c5342877407bc143cc1a2590afcf93a
/wp-settings.php#L252-L256 mirror how WP loads these files]. It ''should''
Just Work if you do this; is that not the case?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34358#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list