From e72ba04c1cd85c1831155dc56412a511d839c1d0 Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Sat, 13 Apr 2024 03:21:49 +0545 Subject: [PATCH] Add examples for option set-autoload an get-autoload commands (#492) --- README.md | 12 ++++++++++++ src/Option_Command.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 89a10073..1e71a5ab 100644 --- a/README.md +++ b/README.md @@ -2057,6 +2057,12 @@ wp option set-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 @@ -2072,6 +2078,12 @@ wp option get-autoload 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 diff --git a/src/Option_Command.php b/src/Option_Command.php index c7fc585e..9a947f21 100644 --- a/src/Option_Command.php +++ b/src/Option_Command.php @@ -441,6 +441,12 @@ public function update( $args, $assoc_args ) { * * : 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 ) { @@ -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 ) {