Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #16953


Ignore:
Timestamp:
03/23/2011 09:10:21 PM (13 years ago)
Author:
scribu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16953 – Description

    v2 v3  
    33A couple of these scenarios are described in #13550.
    44
    5 The reason this is not currently possible is because plugin_basename() doesn't know how to handle symlinks.
     5However, when using symlinks, code such as this fails:
    66
    7 The most simple and most flexible solution is to make the plugin basename filterable, leaving individual devs to handle symlinks, depending on their environment.
     7{{{plugins_url( 'script.js', __FILE__ );}}}
     8
     9This happens because {{{__FILE__}}} resolves to the real path, which confuses plugin_basename().
     10
     11The most simple and most flexible solution is to add a filter to plugin_basename(), leaving individual devs to handle symlinks, depending on their environment.