[wp-trac] [WordPress Trac] #16199: plugin_dir_url - wrong directory for symlinks
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 12 15:00:10 UTC 2011
#16199: plugin_dir_url - wrong directory for symlinks
----------------------------+------------------------------
Reporter: iworks | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 3.0.4
Severity: trivial | Resolution: worksforme
Keywords: plugin_dir_url |
----------------------------+------------------------------
Changes (by garyc40):
* status: new => closed
* resolution: => worksforme
Comment:
{{{plugin_dir_url()}}} lets you specify a {{{$file}}} parameter. If you
pass in {{{__FILE__}}}, the symlink will always be resolved.
Instead of passing in {{{__FILE__}}}, you can use
{{{$_SERVER["SCRIPT_FILENAME"]}}}, which will let the symlink alone.
See [http://stackoverflow.com/questions/3221771/how-do-you-get-php-
symlinks-and-file-to-work-together-nicely this StackOverflow Q/A].
Also, you can even move your wp-content folder somewhere else, although
this is not completely compatible with multisite enabled (works fine for
single site). In your {{{wp-config.php}}} file, you can define these
constants:
{{{
define( 'WP_CONTENT_DIR', '/absolute/path/to/your/wp-content' );
define( 'WP_CONTENT_URL', 'http://url.to/your/wp-content' );
}}}
I'm closing this as worksforme.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16199#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list