A styled notice block for displaying instructional text or contextual help inside the options panel.
Overview
The Info field renders a styled notice — no input, no saved value. It is purely for display inside the options panel. Use it to add context between fields, explain a group of settings, warn about dependencies, provide a documentation link, or divide sections with a heading notice.
Supports plain text and basic HTML in the body text. Supports conditional logic so notices can appear and disappear based on other field values.
Field Registration
[
'id' => 'typography_info',
'type' => 'info',
'title' => __( 'Typography Settings', 'your-textdomain' ),
'desc' => __( 'Changes here apply across all pages. Google Fonts are loaded automatically on the frontend — no extra setup needed.', 'your-textdomain' ),
'style' => 'info',
]
Field Options
| Option | Type | Required | Description |
|---|---|---|---|
id | string | ✅ | Unique field identifier — not stored, but required for internal rendering |
type | string | ✅ | Must be info |
title | string | — | Bold heading shown at the top of the notice block |
desc | string | — | Body text of the notice — supports basic HTML |
content | string | — | Alias for desc — use either, not both |
style | string | — | Visual style variant — 'info' (default), 'success', 'warning', 'error' |
required | array | — | Conditional logic rules — see Conditional Logic |
Return Value
None. The Info field stores no value and never appears in the output of themeplus_get_option().
Style Variants
| Value | Use case |
|---|---|
'info' | General guidance, explanations, documentation links (default) |
'success' | Confirmation notices, setup complete messages |
'warning' | Caching notices, performance warnings, soft dependencies |
'error' | Hard dependencies, required plugins, blocking conditions |
Usage Examples
Basic informational notice
[
'id' => 'color_section_info',
'type' => 'info',
'title' => __( 'Color Settings', 'your-textdomain' ),
'desc' => __( 'Set the main brand colors for your theme. These are applied globally via CSS custom properties on the frontend.', 'your-textdomain' ),
]
Warning notice
[
'id' => 'cache_warning',
'type' => 'info',
'style' => 'warning',
'title' => __( 'Caching Notice', 'your-textdomain' ),
'desc' => __( 'If you use a caching plugin, clear your cache after saving to see changes on the frontend.', 'your-textdomain' ),
]
Success notice
[
'id' => 'setup_complete',
'type' => 'info',
'style' => 'success',
'desc' => __( 'Your theme is configured and ready. Visit your site to see the result.', 'your-textdomain' ),
]
Error — hard dependency notice
[
'id' => 'woocommerce_required',
'type' => 'info',
'style' => 'error',
'title' => __( 'WooCommerce Required', 'your-textdomain' ),
'desc' => __( 'The shop settings below require WooCommerce to be installed and activated.', 'your-textdomain' ),
]
With HTML in the body text
[
'id' => 'font_info',
'type' => 'info',
'desc' => __( 'Choose fonts from the <strong>Google Fonts</strong> library. Browse available fonts at <a href="https://fonts.google.com" target="_blank" rel="noopener noreferrer">fonts.google.com</a>.', 'your-textdomain' ),
]
Conditional notice — appears only when a related setting is enabled
[
'id' => 'enable_custom_fonts',
'type' => 'toggle',
'title' => __( 'Enable Custom Fonts', 'your-textdomain' ),
'default' => false,
],
[
'id' => 'custom_fonts_notice',
'type' => 'info',
'style' => 'info',
'desc' => __( 'Select a Google Font for each text element below. Fonts are loaded automatically — no extra setup needed.', 'your-textdomain' ),
'required' => ['enable_custom_fonts', '==', true],
],
[
'id' => 'body_typography',
'type' => 'typography',
'title' => __( 'Body Typography', 'your-textdomain' ),
'required' => ['enable_custom_fonts', '==', true],
],
Notes
- The
idmust be unique within the section even though the field stores no value — it is used internally for rendering and conditional logic targeting. descandcontentare aliases — use either one. If both are provided,desctakes priority.- Basic HTML is supported in
descandcontent:<strong>,<em>,<a>,<br>,<code>. Avoid complex markup or scripts. - Info fields fully support the
requiredconditional logic key — the notice appears and disappears live as controlling field values change. - Info fields do not appear in the Developer Panel value list or in
themeplus_get_option()output — they are invisible to PHP.