Skip to content

Subcommands for working with multi-dimensional values #42

Description

@aaemnnosttv

E.g.

wp_update_option('example_option', array('foo' => 'bar'));
wp option pluck example_option foo
# or 
wp option get example_option --key=foo

Returns bar

wp option patch example_option foo baz
# or
wp option set example_option --key=foo baz

Updates bar to baz

Ideally it would be great to be able to use dot notation using the normal functions, but option names could contain dots or really any other character that could be used to separate hierarchy.

e.g.

wp option get example_option.foo

Returns bar

This same idea could be applied to just about all get set commands, for meta, transient, etc.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Sponsor
      SponsoredKunjungi sekarang
      Promo