-
·
WP_CLI::read_value()
Read a value, from various formats. Usage WP_CLI::read_value( $raw_value, $assoc_args = [] ) $raw_value (string) $assoc_args (array) 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…
-
·
WP_CLI::run_command()
Run a given command within the current process using the same global parameters. Usage WP_CLI::run_command( $args, $assoc_args = [] ) $args (array) Positional arguments including command name. $assoc_args (array) Notes Use WP_CLI::runcommand() instead, which is easier to use and works better. To run a command using a new process with the same global parameters, use…
-
·
WP_CLI::runcommand()
Run a 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/ command. Usage WP_CLI::runcommand( $command, $options = [] ) $command (string) WP-CLI command to run, including arguments. $options (array) { Configuration options for command execution. @type bool $launch…
-
·
WP_CLI::do_hook()
Execute callbacks registered to a given hook. Usage WP_CLI::do_hook( $when, $args ) $when (string) Identifier for the hook. …$args (mixed) Optional. Arguments that will be passed onto the callback provided by `WP_CLI::add_hook()`. @return (null|mixed) the first optional argument if optional<br /> arguments were passed, otherwise returns null. Notes See WP_CLI::add_hook() for details on WP-CLIWP-CLI WP-CLI…
-
·
WP_CLIUtilsbasename()
Locale-independent version of basename() Usage WP_CLI\Utils\basename( $path, $suffix = ” ) $path (string) $suffix (string) @return (string) 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…
-
·
WP_CLI::error_multi_line()
Display a multi-line error message in a red box. Doesn’t exit script. Usage WP_CLI::error_multi_line( $message_lines ) $message_lines (array) Multi-line error message to be displayed. Notes Error message is written to STDERR. Internal APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in…
-
·
WP_CLI::error()
Display error message prefixed with “Error: ” and exit script. Usage WP_CLI::error( $message, $exit = true ) $message (string|WP_Error|Exception|Throwable) Message to write to STDERR. $exit (boolean|integer) True defaults to exit(1). @return (null) Notes Error message is written to STDERR. Defaults to halting script execution with return code 1. Use WP_CLI::warning() instead when script execution should…
-
·
WP_CLI::get_config()
Get values of global configuration parameters. Usage WP_CLI::get_config( $key = null ) $key (string) Get value for a specific global configuration parameter. @return (mixed) Notes Provides access to –path=<path>, –url=<url>, and other values of the global configuration parameters. WP_CLI::log( ‘The –url=<url> value is: ‘ . WP_CLI::get_config( ‘url’ ) ); Internal APIAPI An API or Application…
-
·
WP_CLI::get_php_binary()
Get the path to the PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/index.php binary used when executing WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks…
-
·
WP_CLI::halt()
Halt script execution with a specific return code. Usage WP_CLI::halt( $return_code ) $return_code (integer) @return (never) Notes Permits script execution to be overloaded by WP_CLI::runcommand() When –debug is enabled, this method will also output a backtrace showing where the halt was triggered from, making it easier to identify the cause of early termination. Internal APIAPI…