-
Notifications
You must be signed in to change notification settings - Fork 0
Hooks Reference
webdesign29 edited this page Jun 13, 2026
·
2 revisions
All hooks are namespaced bext/.
| Filter | Args | Default | Purpose |
|---|---|---|---|
bext/enable_cache |
bool |
setting / true
|
Enable the Cache module. |
bext/enable_cron |
bool |
setting / true
|
Enable the Cron module. |
bext/enable_health |
bool |
setting / true
|
Enable the Health module. |
bext/enable_sdk_email |
bool |
true |
Allow the wp_mail bridge (also needs the setting/constant). |
bext/enable_sdk_jobs |
bool |
true |
Allow the job bridge. |
bext/enable_warning_capture |
bool |
true |
Allow PHP-warning capture (when capture is on). |
bext/purge_urls_for_post |
string[] $paths, int $post_id |
computed set | Customize which relative paths are purged for a post. |
bext/anonymous_cache_control |
string |
the setting |
Cache-Control for anonymous pages (empty = defer to vhost). |
bext/as_concurrent_batches |
int |
1 |
Action Scheduler concurrent batches. |
bext/as_time_limit |
int |
min(20, …) |
Action Scheduler per-run time limit (seconds). |
bext/system_cron_expected |
bool |
DISABLE_WP_CRON |
Whether a system cron drives Action Scheduler. |
bext/health_checks |
array $checks |
built-in | Add/modify dashboard health checks. |
bext/enqueue_job |
`mixed $default, string $name, mixed $payload, int | null $delay` | $default |
| Action | Args | Fires |
|---|---|---|
bext/booted |
Plugin $plugin |
After all modules boot. |
bext/enqueue |
`string $name, mixed $payload, int | null $delay` |
bext/sdk_email_fallback |
mixed $res, array $atts |
When bext can't take an email and WordPress sends it instead. |
// Only purge the permalink + home for a post:
add_filter( 'bext/purge_urls_for_post', function ( $paths, $post_id ) {
return array( '/', wp_make_link_relative( get_permalink( $post_id ) ) );
}, 10, 2 );
// Advertise a positive Cache-Control for anonymous pages:
add_filter( 'bext/anonymous_cache_control', fn() =>
'public, max-age=300, stale-while-revalidate=86400' );
// Allow more Action Scheduler concurrency on a beefy host:
add_filter( 'bext/as_concurrent_batches', fn() => 3 );
// Add a custom health check:
add_filter( 'bext/health_checks', function ( $checks ) {
$checks[] = array(
'id' => 'my_cdn', 'label' => 'CDN reachable',
'status' => 'ok', 'detail' => 'edge responding',
);
return $checks;
} );
// Enqueue a job and get its id; or fire-and-forget:
$id = apply_filters( 'bext/enqueue_job', null, 'thumbnails', array( 'attachment' => 42 ) );
do_action( 'bext/enqueue', 'thumbnails', array( 'attachment' => 42 ) );
// Log email fallbacks:
add_action( 'bext/sdk_email_fallback', fn( $res, $atts ) =>
error_log( 'bext email fallback: ' . wp_json_encode( $res ) ), 10, 2 );See Configuration for the full BEXT_WP_* constant list.
bext-wp · GPL-2.0-or-later · Sponsored by webdesign29 & Inklura · bext.dev
Getting started
Features
Reference
Operations