Skip to content

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

Closed

Description

@johnbillion

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)

Activity

  1. shawnhooper commented on Nov 16, 2023

    @shawnhooper
    Contributor

    @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?

  2. danielbachhuber commented on Nov 19, 2023

    @danielbachhuber
    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.

  3. danielbachhuber commented on Nov 21, 2023

    @danielbachhuber
    Member

    🔨

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions