lkwdwrd / wp-muplugin-loader

A drop-in MU Plugin loader for WordPress
59 stars 26 forks source link

Normalize the MU Path before use #3

Closed johnpbloch closed 7 years ago

johnpbloch commented 7 years ago

On Windows, I was running into an issue where the rel_path function can't correctly calculate the relative path due to differences in directory separators. The composer.json file uses unix separators (/), which Windows can understand just fine, but PHP uses the windows separator (\). This patch simply makes sure that whatever value we've gotten from the composer.json file, it's using the same separators that PHP itself is using.

johnpbloch commented 7 years ago

Never mind; I need to adjust the approach on this one. Normalization should probably occur inside the rel_path function.