Open MaximeCulea opened 6 years ago
Hello Maxime,
I am not aware of mu-plugins. Can you share some mu-plugins. I can refer them and understand the changes required to have it as a mu-plugin.
Thanks, Salil
Hello @salil-elevati,
So I would have load this plugin as Must Use Plugin rather than a traditionnal plugin.
The main reason is that plugin can be deactivated. So if the WordPress is running a web add, etc, the wanted contents available through created routes could not be anymore reachable. So a simple action could break so much !
To avoid this, loaded as mu-plugin with a mu-loader, this plugin would be always activated, no matters what happens.
What do you think about it ?
Hello @MaximeCulea I installed mu-loader, and see we do not need any changes to the plugin code to work as Must Use Plugin.
So, do I need to change in the plugin composer.json to install in mu-plugins directory?
Hello @salil-elevati,
I would simply change wordpress-plugin
by wordpress-muplugin
into https://github.com/elevati/wp-api-multiple-posttype/blob/master/composer.json#L3.
And add the mu-loader trick into the installation notice.
Best,
Hi there !
Thx you for this awesome work. I wanted to implement it myself, then I saw your plugin.
One thought, I will require it as composer mu-plugin and not plugin. As it could break routes and then content requesting.
With mu-loader, it's very smooth ;)