Skip to content

Commit bf256ee

Browse files
committed
Add reference for ImageTools class.
1 parent ed0a5bd commit bf256ee

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/reference.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,3 +222,22 @@ This class is useful for automated media uploads within WP-CLI or AI-powered wor
222222
| Name | Return Type | Description |
223223
| --- | --- | --- |
224224
| `MediaManager::upload_to_media_library( $media_path )` | `int` | Uploads a media file to WordPress and returns its attachment ID. |
225+
226+
## `ImageTools` class
227+
228+
The `ImageTools` class provides AI-powered image generation functionality within WP-CLI.
229+
It:
230+
231+
- Integrates AI-based image generation tools.
232+
- Registers the tool in the system for easy access.
233+
- Uses a client to fetch AI-generated images.
234+
235+
This class is used to dynamically generate images based on user prompts.
236+
237+
### Methods
238+
239+
| Name | Return Type | Description |
240+
| --- | --- | --- |
241+
| `ImageTools::__construct( $client )` | `void` | Initializes ImageTools with an AI client. |
242+
| `ImageTools::get_tools()` | `array` | Returns a list of available AI tools. |
243+
| `ImageTools::image_generation_tool()` | `Tool` | Creates an AI-powered image generation tool. |

0 commit comments

Comments
 (0)