AI Content Builder 0.24.2 has 4 actions and 28 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when AI Content Builder fires an action
add_action( 'wpaic_token_usage', function( $usage, $id, $arg3 ) {
// Your code runs here.
}, 10, 3 );
// Change a value AI Content Builder is about to use
add_filter( 'wpaic_client_config', function( $config ) {
// Change $config here.
return $config;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filters the configuration of the Designer and the block editor sidebar * (window.wpaicConfig). */ apply_filters( 'wpaic_client_config', $config ); -
/** * This filter is documented in includes/Providers/AbstractProvider.php */ apply_filters( 'wpaic_provider_timeout', 180 ); -
/** * Fires after each design turn with the tokens it used, e.g. to log or meter * them. */ do_action( 'wpaic_token_usage', $usage, $id, (string) Settings::get( 'provider' ) ); -
/** * This filter is documented in wp-includes/class-wp-http.php */ apply_filters( 'http_request_args', $args, $url ); -
/** * This filter is documented in wp-includes/class-wp-http.php */ apply_filters( 'pre_http_request', false, $args, $url ); -
/** * Filters the blocks the AI may use. */ apply_filters( 'wpaic_block_catalog', PluginBlocks::catalog( CoreBlocks::catalog( array() ) ) ); -
/** * Extra guidance for the AI about one block, e.g. where to find valid ids. */ apply_filters( 'wpaic_block_hint', CoreBlocks::hint( $type ), $type ); -
/** * Fires before the plugin's scripts are enqueued, to register scripts that * extend them. */ do_action( 'wpaic_enqueue_scripts', $screen ); -
/** * Filters what fills image requests besides the stock photo search. */ apply_filters( 'wpaic_image_filler', new GeneratedImages() ); -
/** * Filters the image generator: an ImageGeneratorInterface, or null for none. */ apply_filters( 'wpaic_image_generator', new ImageGenerator() ); -
/** * Image prices in US dollars by generator and model (see ImagePrices::PRICES). */ apply_filters( 'wpaic_image_prices', self::PRICES ); -
/** * Quality of generated images (low, medium, high); higher costs more. */ apply_filters( 'wpaic_image_quality', 'medium' ); -
/** * Filters the fields a photo request can have (see * Media\ImageFillerInterface). */ apply_filters( 'wpaic_image_request_fields', array( 'search' => array( 'max' => 120 ), 'generate' => array( 'max' => 1000 ), 'generateIfNotFound' => array( 'max' => 1000, 'requires' => 'search', ), ) ); -
/** * Filters IMAGE SOURCES, what the model is told it can use for images. */ apply_filters( 'wpaic_image_sources', array( 'search' => $can && '' !== StockPhotos::source() ? 'yes' : 'no', 'illustrations' => $can && StockPhotos::has_illustrations() ? 'yes' : 'no', 'generate' => $can && $generator && $generator->ready() ? ( 'always' === $generator->policy() ? 'always' : 'on request' ) : 'off', ) ); -
/** * Fires after images were found or generated, e.g. to log or bill them. */ do_action( 'wpaic_media_usage', $usage, $conversation_id, $context ); -
/** * Filters the page settings a new page the AI builds from scratch gets. * Settings the page can't have are left out afterwards. */ apply_filters( 'wpaic_new_page_settings', $defaults, $set, $own_layout, $post_id ); -
/** * Openverse licenses to search. By default only those that need no credit on * the page (CC0, public domain mark). */ apply_filters( 'wpaic_openverse_licenses', array( 'cc0', 'pdm' ) ); -
/** * Filters the page settings other plugins add. */ apply_filters( 'wpaic_page_fields', array() ); -
/** * Filters the post types a new design can become (the Designer's "Type"). * Types without an editor, or not viewable, are left out. */ apply_filters( 'wpaic_post_types', array( 'page', 'post' ) ); -
/** * Filters extra sections of the designer system prompt, each a markdown * section starting with a "# Heading" line. */ apply_filters( 'wpaic_prompt_sections', array() ); -
/** * Filters the temperature sent to the model, e.g. lower for a local model that * needs it to answer in valid JSON. */ apply_filters( 'wpaic_provider_temperature', (float) ( $this->config['temperature'] ?? 0.7 ), $this->model() ); -
/** * Filters available AI providers. Add-ons can register new providers here. */ apply_filters( 'wpaic_providers', $definitions ); -
/** * Filters the scripts that load before the plugin's own (registered handles). */ apply_filters( 'wpaic_script_dependencies', array(), $screen ); -
/** * Filters the default settings, e.g. to add a plugin's own settings. */ apply_filters( 'wpaic_settings_defaults', $defaults ); -
/** * Filters the settings sent to the admin UI, e.g. to add a plugin's own. Never * include secrets. */ apply_filters( 'wpaic_settings_for_client', $out, $all ); -
/** * Filters the settings about to be saved from the admin UI, e.g. to apply a * plugin's own from $input. Check every value taken from $input. */ apply_filters( 'wpaic_settings_update', $all, $input ); -
/** * Filters the stock photo services, by id (lowercase letters, digits, - and _; * not "off"). */ apply_filters( 'wpaic_stock_sources', array( 'openverse' => new Openverse() ) ); -
/** * Filters the final designer system prompt. */ apply_filters( 'wpaic_system_prompt', $prompt ); -
/** * Filters the theme context given to the AI. */ apply_filters( 'wpaic_theme_context', $context ); -
/** * Filters extra lines of a turn's context for the model (not of a review * pass). */ apply_filters( 'wpaic_turn_context', array(), array( 'message' => $message, 'spec' => $spec, 'post_id' => $post_id, 'post_type' => $post_type, ) ); -
/** * Filters notes added under the reply and suggestions offered first, after a * turn (not a review pass or a cut-off answer). */ apply_filters( 'wpaic_turn_notes', array( 'notes' => array(), 'suggestions' => array(), ), array( 'applied' => $result['applied'], 'message' => $message, 'spec' => $new_spec, 'post_id' => $post_id, 'post_type' => $post_type, ) ); -
do_action( 'wp_enqueue_scripts' );
Generated from AI Content Builder's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: