handbook/references/internal-api/wp-cli-utils-launch-editor-for-input.md
Pascal Birchler 264cb131bf
Fix handbook information architecture
- Organize files in folders according to the desired structure
- Use directory iterator to loop through all files and folders (makes generation more robust)
2025-06-25 15:38:39 +02:00

2.1 KiB

WP_CLI\Utils\launch_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 from editor; false, if no change to file.

Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.