WP_CLI\Utils\get_flag_value() Edit

Return the flag value or, if it’s not set, the $default value.

Usage Usage

WP_CLI\Utils\get_flag_value( $assoc_args, $flag, $default = null )
$assoc_args (array) Arguments array.
$flag (string) Flag to get the value.
$default (mixed) Default value for the flag. Default: NULL
@return (mixed)

Top ↑

Notes Notes

Because flags can be negated (e.g. –no-quiet to negate –quiet), this
function provides a safer alternative to using
isset( $assoc_args['quiet'] ) or similar.

Internal APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. documentation is generated from the WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ codebase on every release. To suggest improvements, please submit a pull request.

Top ↑

Last updated: