[wp-hackers] plugins_url function
Mario Peshev
mario at peshev.net
Wed Dec 14 15:23:23 UTC 2011
Is WP_PLUGIN_URL an accepted solution to point to the plugins directory? I
can't find any positive or negative comments on this nor documentation in
the codex.
I've been using the plugins_url() but here I encountered the constant too -
http://codex.wordpress.org/Determining_Plugin_and_Content_Directories (though
it is not recommended).
Mario Peshev
Training and Consulting Services @ DevriX
http://www.linkedin.com/in/mpeshev
http://devrix.com
http://peshev.net/blog
On Wed, Dec 14, 2011 at 5:20 PM, Phillip Lord
<phillip.lord at newcastle.ac.uk>wrote:
> John Blackbourn <johnbillion+wp at gmail.com> writes:
>
> > On 13 December 2011 14:30, Phillip Lord <phillip.lord at newcastle.ac.uk>
> wrote:
> >> Okay, that's not ideal for me. In practice, I think it's easier to
> >> unwind the symlinks -- or just turn them around, so that the real
> >> directory is under wp-content/plugins then I symlink to this for ease.
> >
> > Yeah reversing the symlinks can work, depending on the situation. More
> > commonly though I'll have a plugin in one central location which I
> > want to symlink to multiple installs.
>
> Yeah, I think that would be the most common use case. You could
> hard-link, if you are within one filesystem.
>
>
> > Out of interest, what do you mean by unwinding the symlink? If you
> > mean resolving the symlink, then unfortunately it can't be done in PHP
> > (see Otto's PHP bug link).
>
> I meant remove the symlink and stick the real directory there.
>
>
> >
> > Re-reading your first email - If you're keeping all of your plugins in
> > a separate directory then you can just define the WP_PLUGINS_DIR and
> > WP_PLUGINS_URL constants so they point at your ~/wordpress-plugins
> > directory, and then you don't need to bother with symlinks at all. I
> > do this on my dev box where I have many WordPress installs and just
> > one directory that contains the plugins.
>
> I don't do this. Basically, I have some plugins where I want to track
> versions by svn installed through symlinks. It's pretty much there for
> historical reasons, so easy enough to remove. I just wanted to be sure
> that it's not a flaw in my plugin; it doesn't appear to be. It's just a
> gotcha.
>
> Phil
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list