Skip to content

Commit

Permalink
Add examples for option set-autoload an get-autoload commands (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar authored Apr 12, 2024
1 parent 22d726d commit e72ba04
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2057,6 +2057,12 @@ wp option set-autoload <key> <autoload>
- 'no'
---

**EXAMPLES**

# Set the 'autoload' value for an option.
$ wp option set-autoload abc_options no
Success: Updated autoload value for 'abc_options' option.



### wp option get-autoload
Expand All @@ -2072,6 +2078,12 @@ wp option get-autoload <key>
<key>
The name of the option to get 'autoload' of.

**EXAMPLES**

# Get the 'autoload' value for an option.
$ wp option get-autoload blogname
yes



### wp post
Expand Down
12 changes: 12 additions & 0 deletions src/Option_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,12 @@ public function update( $args, $assoc_args ) {
* <key>
* : The name of the option to get 'autoload' of.
*
* ## EXAMPLES
*
* # Get the 'autoload' value for an option.
* $ wp option get-autoload blogname
* yes
*
* @subcommand get-autoload
*/
public function get_autoload( $args ) {
Expand Down Expand Up @@ -477,6 +483,12 @@ public function get_autoload( $args ) {
* - 'no'
* ---
*
* ## EXAMPLES
*
* # Set the 'autoload' value for an option.
* $ wp option set-autoload abc_options no
* Success: Updated autoload value for 'abc_options' option.
*
* @subcommand set-autoload
*/
public function set_autoload( $args ) {
Expand Down

0 comments on commit e72ba04

Please sign in to comment.