mundschenk-at / wp-typography

Improve your WordPress micro typography.
https://code.mundschenk.at/wp-typography/
Other
22 stars 3 forks source link

JS assets return 404 when installed as mu-plugin #269

Closed E-VANCE closed 4 years ago

E-VANCE commented 4 years ago

I am requiring the use of wp-typography and have installed it as mu-plugin – but this results in a broken link for the clean-clipboard.min.js since the plugin-folder doesn't adapt to the mu-path...

I checked and I suppose that the plugin_dir_url should pick up that (see class-public-interface.php) but I didn't find out how that var / constant is being generated.

Best regards, Henning

mundschenk-at commented 4 years ago

Interesting. plugins_url should take care of that, but somehow it does not. I'll look into it.

mundschenk-at commented 4 years ago

How exactly are you loading wp-Typography? mu-plugins requires a PHP file in the mu-plugins folder itself, not in a subfolder, so if you just moved (or linked) wp-typography.php, that would most likely be the problem. Something like

<?php

include __DIR__ . '/wp-typography/wp-typography.php';

should do the trick.

Edit: Unfortunately, it does not.