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

Consider importing mu-plugins directories #500

Open
danielbachhuber opened this issue Sep 2, 2024 · 4 comments
Open

Consider importing mu-plugins directories #500

danielbachhuber opened this issue Sep 2, 2024 · 4 comments
Labels
Studio App [Type] Enhancement Improvement upon an existing feature

Comments

@danielbachhuber
Copy link
Contributor

We currently ignore mu-plugins directories in our import workflow. We should consider properly importing them.

@wojtekn
Copy link
Contributor

wojtekn commented Sep 10, 2024

From https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/:

[...] For web hosts, mu-plugins are commonly used to add support for host-specific features, especially those where their absence could break the site.

It makes sense to treat those as host-specific features. Studio puts different polyfills there, and any host or local app could do the same.

@danielbachhuber how this addition would help you?

@wojtekn wojtekn added [Type] Enhancement Improvement upon an existing feature and removed Studio Import & Export labels Sep 10, 2024
@danielbachhuber
Copy link
Contributor Author

@wojtekn I'm not sure I agree with that description. I think mu-plugins can often be use for site-specific code.

@wojtekn
Copy link
Contributor

wojtekn commented Sep 24, 2024

@danielbachhuber Now Playground supports loading polyfill my-plugins from Playground-specific directory (/internal/shared/mu-plugins), so they won't clutter WordPress WP Admin: https://github.com/WordPress/wordpress-playground/blob/b81c81d9636989acfcbb7102e618ee840072b958/packages/playground/wordpress/src/index.ts#L17

We could move our polyfills there and support importing and exporting the default mu-plugins/ directory. Users who don't want them can always delete them manually after the import.

@danielbachhuber
Copy link
Contributor Author

@wojtekn Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Studio App [Type] Enhancement Improvement upon an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants