Actions and filters available to developers extending Steuard. This reference is generated from the plugin source on each release.
Actions (6) #
steuard_fetch_failedsteuard_fetch_succeededsteuard_loadedsteuard_menu_render_failedsteuard_register_connectorssteuard_upgraded
steuard_fetch_failed #
do_action( 'steuard_fetch_failed', string $key, \WP_Error $result, bool $served_stale )
Fires when a live fetch fails — the Connection Log’s data source.
$key(string) — Cache key (e.g. menus_<location>).$result(\WP_Error) — The failed fetch result.$served_stale(bool) — Whether the stale backup covered it.
Source: Steuard/src/Cache/Manager.php
steuard_fetch_succeeded #
do_action( 'steuard_fetch_succeeded', string $key, array $result )
Fires when a live fetch succeeds — Connection_Health’s all-clear.
$key(string) — Cache key (e.g. menus_<location>).$result(array) — The fetched payload.
Source: Steuard/src/Cache/Manager.php
steuard_loaded #
do_action( 'steuard_loaded' )
Fires when Steuard has completed basic setup.
Source: Steuard/src/Plugin.php
steuard_menu_render_failed #
do_action( 'steuard_menu_render_failed', int $post_id, \WP_Error $resolved )
Fires when a menu post cannot render (source missing, fetch failing, unpublished). Lets sites log or alert on silent blanks.
$post_id(int) — The menu post that failed to resolve.$resolved(\WP_Error) — Why.
Source: Steuard/src/Block/Render.php
steuard_register_connectors #
do_action( 'steuard_register_connectors', \Connector_Registry $registry )
Allow third parties to register additional menu providers.
$registry(\Connector_Registry) —
Source: Steuard/src/Api/Provider.php
steuard_upgraded #
do_action( 'steuard_upgraded', string $previous, string $current )
Fires once after the plugin version changes (fresh install or upgrade).
$previous(string) — Previously stored version — ” on fresh installs.$current(string) — The now-current plugin version.
Source: Steuard/src/Plugin.php
Filters (23) #
artifex_license_store_urlsteuard_editorial_short_section_itemssteuard_gbp_reviews_enabledsteuard_hourssteuard_http_retriessteuard_http_retry_delay_mssteuard_http_timeoutsteuard_menu_brandline_htmlsteuard_menu_cache_ttlsteuard_menu_hero_kickersteuard_menu_htmlsteuard_menu_item_calories_htmlsteuard_menu_item_tags_htmlsteuard_menu_item_tags_max_glyphssteuard_menu_legend_htmlsteuard_menu_size_labelsteuard_meta_post_typessteuard_negative_cache_ttlsteuard_reviews_cache_ttlsteuard_reviews_strip_reply_emailssteuard_schema_restaurant_idsteuard_schema_restaurant_namesteuard_show_locations_menu
artifex_license_store_url #
apply_filters( 'artifex_license_store_url', string $url, string $slug )
Filters the EDD licensing endpoint.
$url(string) — Store URL.$slug(string) — Plugin slug.
Source: Steuard/src/Admin/SDK_License.php
steuard_editorial_short_section_items #
apply_filters( 'steuard_editorial_short_section_items', int $count )
Filters the item count at or below which an Editorial section runs single-column.
$count(int) — Default Renderer::EDITORIAL_SHORT_SECTION_ITEMS.
Source: Steuard/src/Menu/Renderer.php
steuard_gbp_reviews_enabled #
apply_filters( 'steuard_gbp_reviews_enabled', bool $enabled )
Filters whether the GBP (broker OAuth) review source is available.
$enabled(bool) — Defaults to the STEUARD_ENABLE_GBP_REVIEWS constant.
Source: Steuard/src/Reviews/Provider.php
steuard_hours #
apply_filters( 'steuard_hours', array<string,mixed> $record, int $post_id )
Filters a location’s hours record before any output reads it.
$record(array<string,mixed>) — Sanitized hours record.$post_id(int) — Location post ID.
Source: Steuard/src/Locations/Repository.php
steuard_http_retries #
apply_filters( 'steuard_http_retries', int $retries, string $url, bool $background )
Filters how many times a transiently-failed request is retried.
$retries(int) — Default 2 in cron/admin/CLI, 0 on the front end.$url(string) — Request URL.$background(bool) — Whether this is a background/admin context.
Source: Steuard/src/Api/Http.php
steuard_http_retry_delay_ms #
apply_filters( 'steuard_http_retry_delay_ms', int $delay_ms, int $attempt, array|\WP_Error $resp )
Filters the pause before an HTTP retry. Return 0 to retry immediately (used by the test suite to keep retry tests fast).
$delay_ms(int) — Computed delay in milliseconds.$attempt(int) — 1-based number of the attempt that just failed.$resp(array|\WP_Error) — The failed response.
Source: Steuard/src/Api/Http.php
steuard_http_timeout #
apply_filters( 'steuard_http_timeout', int $timeout, bool $background )
Filters the HTTP timeout for external API requests.
$timeout(int) — Seconds. Default 15 in cron/admin/CLI, 5 on the front end.$background(bool) — Whether this is a background/admin context.
Source: Steuard/src/Api/Http.php
steuard_menu_brandline_html #
apply_filters( 'steuard_menu_brandline_html', string $html, array $brand, string $layout, array $opt )
Filters the brand-line HTML rendered above a menu’s title.
$html(string) — The brand line HTML; empty when no part is set.$brand(array) — Effective parts: {name, descriptor, dateline}.$layout(string) — The layout slug.$opt(array) — The resolved display options for this render pass.
Source: Steuard/src/Menu/Renderer.php
steuard_menu_cache_ttl #
apply_filters( 'steuard_menu_cache_ttl', int $ttl )
Filters the menu cache TTL. The twicedaily warm cron re-primes the cache regardless, so this mostly governs how long a manual menu edit takes to appear (the dashboard Clear Cache button forces it).
$ttl(int) — Seconds. Default 43200 (12 hours).
Source: Steuard/src/Options/Store.php
steuard_menu_hero_kicker #
apply_filters( 'steuard_menu_hero_kicker', string $kicker, array $item, array $opt )
Filters the small uppercase kicker above the Featured hero item.
$kicker(string) — Default “Featured”.$item(array) — The featured item.$opt(array) — The resolved display options.
Source: Steuard/src/Menu/Renderer.php
steuard_menu_html #
apply_filters( 'steuard_menu_html', string $html, array $menus, array $opt )
Filters the rendered menu markup before it is wrapped in the appearance scope (tabs and before/after text are already in place).
$html(string) — Rendered menu HTML.$menus(array) — The menus that were rendered.$opt(array) — Display options.
Source: Steuard/src/Block/Render.php
steuard_menu_item_calories_html #
apply_filters( 'steuard_menu_item_calories_html', string $html, array $item, string $layout, array $opt )
Filters the calories HTML for a single menu item.
$html(string) — The HTML string to be emitted. Empty when calories are absent or the toggle is off.$item(array) — The raw item array (Toast payload).$layout(string) — The layout slug: ‘basic’, ‘grid’, ‘trattoria’, or ‘pub’.$opt(array) — The resolved display options for this render pass.
Source: Steuard/src/Menu/Renderer.php
steuard_menu_item_tags_html #
apply_filters( 'steuard_menu_item_tags_html', string $html, array $item, string $layout, array $opt )
Filters the tags-list HTML for a single menu item.
$html(string) — The HTML string to be emitted. Empty when the item has no usable tags or the toggle is off.$item(array) — The raw item array (Toast payload).$layout(string) — The layout slug: ‘basic’, ‘grid’, ‘trattoria’, or ‘pub’.$opt(array) — The resolved display options for this render pass.
Source: Steuard/src/Menu/Renderer.php
steuard_menu_item_tags_max_glyphs #
apply_filters( 'steuard_menu_item_tags_max_glyphs', int $max, array $item, string $layout )
Filters how many glyph tags stay visible on one item (the rest are kept for screen readers only).
$max(int) — Default Renderer::MAX_VISIBLE_GLYPHS.$item(array) — The raw item array.$layout(string) — The layout slug.
Source: Steuard/src/Menu/Renderer.php
steuard_menu_legend_html #
apply_filters( 'steuard_menu_legend_html', string $html, array $entries, string $layout, array $opt )
Filters the tag-legend HTML rendered in a menu’s footer.
$html(string) — The legend HTML; empty when nothing to explain.$entries(array) — Legend entries: list of {name, code, icon_html}.$layout(string) — The layout slug.$opt(array) — The resolved display options for this render pass.
Source: Steuard/src/Menu/Renderer.php
steuard_menu_size_label #
apply_filters( 'steuard_menu_size_label', string $label, string $raw, string $qualifier, array<string,mixed> $opt )
Filters a pour/size label after normalization. Lets a site fully override the displayed base label (e.g. map “shot” to “1.5 oz”, or hide a junk size). Return an empty string to render no label for that pour.
$label(string) — Canonical base label (no qualifier).$raw(string) — Original raw size name from the source.$qualifier(string) — Parenthetical qualifier, if any.$opt(array<string,mixed>) — Resolved display options.
Source: Steuard/src/Menu/Renderer.php
steuard_meta_post_types #
apply_filters( 'steuard_meta_post_types', list<string> $post_types )
Filter the post types that receive the Steuard meta box.
$post_types(list<string>) — Post types selected on the Display tab.
Source: Steuard/src/Block/Provider.php
steuard_negative_cache_ttl #
apply_filters( 'steuard_negative_cache_ttl', int $ttl, \WP_Error $result, int $status )
Filters how long a failed fetch is cached before the API is retried.
$ttl(int) — Seconds. Default 90; 600 when the failure was HTTP 429/5xx.$result(\WP_Error) — The failed fetch result.$status(int) — HTTP status carried in the error data, 0 when unknown.
Source: Steuard/src/Cache/Manager.php
steuard_reviews_cache_ttl #
apply_filters( 'steuard_reviews_cache_ttl', int $ttl )
Filters how long fetched reviews are cached. Keep this longer than the daily refresh cron interval so pageviews never fetch synchronously.
$ttl(int) — Seconds. Default 25 hours.
Source: Steuard/src/Reviews/Google_Client.php
steuard_reviews_strip_reply_emails #
apply_filters( 'steuard_reviews_strip_reply_emails', bool $strip )
Filters whether email addresses are stripped from displayed owner replies.
$strip(bool) — Default true. Return false to display replies verbatim.
Source: Steuard/src/Reviews/Renderer.php
steuard_schema_restaurant_id #
apply_filters( 'steuard_schema_restaurant_id', string $restaurant_id, string $context, array<string,mixed> $source, array<string,mixed> $opt )
Filters the business node ID linked to Steuard structured data.
Multi-location sites can return the location-specific ID.
$restaurant_id(string) — Resolved business <code>@id</code> (settings, detection, or the homepage #localbusiness default).$context(string) — Payload context: <code>menu</code> or <code>reviews</code>.$source(array<string,mixed>) — Resolved menu or review summary.$opt(array<string,mixed>) — Resolved display/context options.
Source: Steuard/src/Schema/Business_Identity.php
steuard_schema_restaurant_name #
apply_filters( 'steuard_schema_restaurant_name', string $name, string $context, array<string,mixed> $source, array<string,mixed> $opt )
Filters the business name used in Steuard structured data.
Multi-location sites can return the location-specific name. Same signature as steuard_schema_restaurant_id.
$name(string) — Resolved business name (settings, detection, or the site title).$context(string) — Payload context: <code>menu</code> or <code>reviews</code>.$source(array<string,mixed>) — Resolved menu or review summary.$opt(array<string,mixed>) — Resolved display/context options.
Source: Steuard/src/Schema/Business_Identity.php
steuard_show_locations_menu #
apply_filters( 'steuard_show_locations_menu', bool $in_use )
Filters whether the Steuard → Locations menu items show.
$in_use(bool) — True when at least one Location exists (any status but auto-draft).
Since 3.4.1 · Source: Steuard/src/Locations/Post_Type.php