• We’re trying to use Loco Translate as a mu-plugin but are getting 404’s on the bundle.css, admin.css and admin.js files.
    The path doesn’t have the mu-plugin folder base (mu-plugins/loco-translate/) and is still set to the default plugins folder (plugins/loco-translate/).

    The issue boils down to that you’re not sending the full path to the plugin (Line 60, loco.php):
    isset($handle) or $handle = plugin_basename(__FILE__);

    If we change that line to include the full path, everything works fine:
    isset($handle) or $handle = __FILE__;

    Any specific reasons for this? And is this something you would be willing to have a look at?

Viewing 1 replies (of 1 total)
  • Plugin Author Tim W

    (@timwhitlock)

    mu-plugins are intended to be single files and don’t have a base directory of their own. See Caveats: https://codex.ww.wp.xz.cn/Must_Use_Plugins

    The plugin_basename is the correct way to identify a regular plugin to WordPress. I don’t plan to change the way it is intended to be installed.

Viewing 1 replies (of 1 total)

The topic ‘Mu plugin’ is closed to new replies.