Does plugins_url work as we should expect?
-
I’m trying to make Migrate DB Pro a must-use plugin which is turning out to be quite the process. WP Migrate DB Pro uses plugins_url to find the URL it should use for some assets it has. It looks like plugins_url will only use WPMU_PLUGIN_URL if the name of the plugin passed (which WP Migrate DB Pro doesn’t currently) matches the beginning portion of $mu_plugin_dir. Can somebody explain this logic to me? Why not just check if the plugin name is a directory within $mu_plugin_dir?
In my case, I end up with $plugin containing “wp-migrate-db-pro” (if I alter their code) and $mu_plugin_dir containing “/fullpath/wordpress/company/must-use-plugins”. The must-use-plugins directory has all the plugins I want as must-use separated by directory, so “wp-migrate-db-pro” will never be at the beginning of that path.
I can work around this issue using the supplied “plugins_url” filter, but it feels like plugins_url doesn’t work as I would expect. Maybe my definition of must-use plugins is wrong…
- The topic ‘Does plugins_url work as we should expect?’ is closed to new replies.