-
·
WP_CLIUtilshttp_request()
Make a HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. request to a remote URLURL A specific web…
-
·
WP_CLIUtilsisPiped()
Checks whether the output of the current script is a TTY or a pipe / redirect Usage WP_CLI\Utils\isPiped() @return (bool) Notes Returns true if STDOUT output is being redirected to a pipe or a file; false is output is being sent directly to the terminal. If an env variable SHELL_PIPE exists, the returned result depends…
-
·
WP_CLIUtilsget_temp_dir()
Get the system’s temp directory. Warns user if it isn’t writable. Usage WP_CLI\Utils\get_temp_dir() @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 Line Interface…
-
·
WP_CLIUtilsesc_like()
First half of escaping for LIKE special characters % and _ before preparing for MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com. Usage WP_CLI\Utils\esc_like( $text ) $text (string) The raw text to be escaped. The input typed by…
-
·
WP_CLIUtilsformat_items()
Render a collection of items as an ASCII table, JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML., CSV, YAML, list of ids, or count. Usage WP_CLI\Utils\format_items( $format, $items, $fields ) $format…
-
·
WP_CLIUtilsget_flag_value()
Return the flag value or, if it’s not set, the $default value. Usage WP_CLI\Utils\get_flag_value( $assoc_args, $flag, $default = null ) $assoc_args (array<string|int,string|bool>) Arguments array. $flag (string|int) Flag to get the value. $default (string|bool|int|null) Default value for the flag. Default: NULL. @return (string|bool|int|null) Notes Because flags can be negated (e.g. –no-quiet to negate –quiet), this function…
-
·
WP_CLIUtilsget_home_dir()
Get the home directory. Usage WP_CLI\Utils\get_home_dir() @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 Line Interface for WordPress, used to do administrative and…
-
·
WP_CLIUtilsget_named_sem_ver()
Compare two version strings to get the named semantic version. Usage WP_CLI\Utils\get_named_sem_ver( $new_version, $original_version ) $new_version (string) $original_version (string) @return (string) ‘minor’, ‘patch’ 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…
-
·
WP_CLIUtilsget_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_CLIUtilslaunch_editor_for_input()
Launch system’s $EDITOR for the user to edit some text. Usage WP_CLI\Utils\launch_editor_for_input( $input, $title = WP-CLI, $ext = tmp ) $input (string) Some form of text to edit (e.g. post content). $title (string) Title to display in the editor. $ext (string) Extension to use with the temp file. @return (string|bool) text, if file is saved…