-
Notifications
You must be signed in to change notification settings - Fork 1.1k
remove --path argument so plugins are loaded #387
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
remove --path argument so plugins are loaded #387
Conversation
|
Does this mean to imply that WordPress plugins can also provide additional WP-CLI behavior? Are there any documentation links on that you can share? (My searching isn't coming up with anything useful except the |
|
I found a reference here: https://wp-cli.org/#extending and also here https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/ but I came across this when trying to install the ilabs mediacloud wordpress plugin. Not that you're probably looking for this, but here's the code that it triggers https://github.com/Interfacelab/ilab-media-tools/blob/eb3ad995724d5c6355a9016870257eb80c20d91f/classes/CLI/Storage/StorageCommands.php#L161 and it is registered here https://github.com/Interfacelab/ilab-media-tools/blob/eb3ad995724d5c6355a9016870257eb80c20d91f/ilab-media-tools.php#L113 TBH: I'm not super familiar with wordpress and am still putting things together. |
|
ping :) |
|
Man, sorry for the delay. 🙇 I really appreciate the patience and the excellent links. ❤️ My concern with removing this is that we added for a reason, but I can't recall what that reason was (I'm sure there was some specific use case that broke without it). Do you have any ideas? Does |
|
No worries, I think I package my own docker image which includes this, but I actually haven't used the cli that much. I'm really not too familiar with wordpress. However this is what I'm thinking:
If help itself fails it would be because something has broken the CLI from loading. I'm not sure how defensive the CLI is but the |
combine ifs in the cli entrypoint
|
Rebased and coalesced the two LGTM cc @tianon |
Changes: - docker-library/wordpress@598769a: Merge pull request docker-library/wordpress#387 from terencehonles/remove-cli-entrypoint-path-argument-to-load-plugins - docker-library/wordpress@c0d11ed: remove --path argument so plugins are loaded
|
Thanks all! I look forward to updating my container and not having to mount over the entrypoint / reducing the extra config 😅 |
Remove
--path=/dev/nullso if the current directory is a wordpress directory it will load the plugins and correctly prefix "wp" when needed. The second if is changed to elif because the conditions are exclusive and if the first test matched the second doesn't need to run.