Hooks and extension points
Stacko Accessibility is an early build and has few public hooks so far. This page lists every hook that exists in the code today. If a hook is not on this page, it does not exist yet.
The plugin has no JavaScript hooks (wp.hooks actions or filters).
Actions
Section titled “Actions”stacko_a11y_loaded
Section titled “stacko_a11y_loaded”Fires at the end of the plugin’s boot, on plugins_loaded, after all services and hooks are registered. Use it to run code that depends on Stacko Accessibility being active.
add_action( 'stacko_a11y_loaded', function () { // Stacko Accessibility is loaded.} );No arguments.
Filters
Section titled “Filters”stacko_a11y_queue_post_types
Section titled “stacko_a11y_queue_post_types”Filters the post types included in the site scan queue (GET /stacko-a11y/v1/queue).
| Parameter | Type | Description |
|---|---|---|
$post_types |
string[] |
By default, post and page, limited to the post types selected under Content types in settings |
Only published items are queued, newest first by modified date, up to 2,000.
add_filter( 'stacko_a11y_queue_post_types', function ( array $post_types ) { $post_types[] = 'product'; return $post_types;} );This filter only changes which items the site check visits. The editor sidebar and the list column follow the Content types setting instead.
Other extension points
Section titled “Other extension points”Exclude markup from scans
Section titled “Exclude markup from scans”Page checks skip any element with a data-stacko-ignore attribute, including its children. Use it for third-party embeds, such as a cookie banner or chat widget, that you can’t change and have checked by hand.
<div data-stacko-ignore> <!-- Not checked by Stacko Accessibility --></div>Use this sparingly. Excluded markup is still used by visitors, and its problems are still real.
Open the inspector from a link
Section titled “Open the inspector from a link”Add stacko-a11y-inspect=1 to the query string of a front-end URL to open the inspector panel as soon as the page loads. This works for users who can use the checker.
https://example.com/about/?stacko-a11y-inspect=1Read scan results
Section titled “Read scan results”- The
stacko_a11y_summarypost meta holds the last score and counts for each scanned post:score,must,should,reviewandscanned_at(UTC, MySQL format). - The REST API returns the latest scan of a post or URL, a site overview and the list of open issues.
Settings
Section titled “Settings”Settings live in the stacko_a11y_settings option. Change them through Accessibility → Settings or POST /stacko-a11y/v1/settings. Writes are always sanitised through the plugin’s settings class, and unknown keys are dropped.