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

Clarify that network meta and network options are the same thing #322

Closed
1 task done
johnbillion opened this issue Jun 21, 2021 · 3 comments
Closed
1 task done

Comments

@johnbillion
Copy link
Contributor

Feature Request

Describe your use case and the problem you are facing

The wp network meta command is technically named correctly, but most developers know network meta as network options due to the (add|get|update|delete)_network_option() functions.

When you're trying to remember what command to use for network options WP-CLI isn't very helpful, especially for developers who don't know that network options are technically network meta.

Describe the solution you'd like

  • Clarify the description of the wp network meta command so it mentions network options
  • When a user types wp network option, show a suggestion for wp network meta (currently there's no suggestion)
@shawnhooper
Copy link
Contributor

shawnhooper commented Nov 16, 2023

@danielbachhuber I've tested out a patch that would work for suggesting wp network meta when you type wp network option but there's something about the approach I don't like.

See:
wp-cli/wp-cli@b6daeba

It feels like putting this suggestion into the Runner feels too high-level for a very specific suggestion like this.

But I don't see a good pattern for suggesting this command in the entity repo.

I also don't like putting this mapping in the Utils\get_suggestion() $suggestion_map array because I don't want to globally recommend replacing option with meta. Only in the network command.

Any suggested approaches before I turn this into a PR?

@danielbachhuber
Copy link
Member

@shawnhooper I think the Runner is the most appropriate place at this time. It's a one-off solution for a one-off idiosyncrasy. It will be safe to abstract further in the future if we need.

@danielbachhuber
Copy link
Member

🔨

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

No branches or pull requests

3 participants