public function add( $args, $assoc_args ) {
		$key = $args[0];

		$value = WP_CLI::get_value_from_arg_or_stdin( $args, 1 );
		$value = WP_CLI::read_value( $value, $assoc_args );

		if ( ! add_site_option( $key, $value ) ) {
			WP_CLI::error( "Could not add site option '{$key}'. Does it already exist?" );
		} else {
			WP_CLI::success( "Added '{$key}' site option." );
		}
	}
public function add( $args, $assoc_args ) {
		$key = $args[0];

		$value = WP_CLI::get_value_from_arg_or_stdin( $args, 1 );
		$value = WP_CLI::read_value( $value, $assoc_args );

		if ( ! add_site_option( $key, $value ) ) {
			WP_CLI::error( "Could not add site option '{$key}'. Does it already exist?" );
		} else {
			WP_CLI::success( "Added '{$key}' site option." );
		}
	}
public function add ( $ args , $ assoc_args ) { $ key = $ args [ 0 ] ; $ value = WP_CLI :: get_value_from_arg_or_stdin ( $ args , 1 ) ; $ value = WP_CLI :: read_value ( $ value , $ assoc_args ) ; if ( ! add_site_option ( $ key , $ value ) ) { WP_CLI :: error ( "Could not add site option '{$key}'. Does it already exist?" ) ; } else { WP_CLI :: success ( "Added '{$key}' site option." ) ; } }
Adds a site option.

## OPTIONS

<key>
: The name of the site option to add.

[<value>]
: The value of the site option to add. If ommited, the value is read from STDIN.

[--format=<format>]
: The serialization format for the value.
---
default: plaintext
options:
- plaintext
- json
---

## EXAMPLES

# Create a site option by reading a JSON file
$ wp site option add my_option --format=json < config.json
Success: Added 'my_option' site option.
Adds a site option .