Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thought as composer mu-plugin #13

Open
MaximeCulea opened this issue Nov 23, 2017 · 4 comments
Open

Thought as composer mu-plugin #13

MaximeCulea opened this issue Nov 23, 2017 · 4 comments

Comments

@MaximeCulea
Copy link

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 ;)

@salil-elevati
Copy link

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

@MaximeCulea
Copy link
Author

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 ?

@salil-elevati
Copy link

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?

@MaximeCulea
Copy link
Author

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants