Every inspector field is one of a small set of primitives defined in PropertiesPanel.tsx. This page names them and, more importantly, states exactly where each writes β content, settings or styles β because that determines which sanitizer branch validates it.
Layout primitives#
| Component | Role |
|---|---|
PropGroup | Collapsible accordion group with an optional icon and βinherited from classβ badge |
PropRow | One label + control row; responsive adds the per-breakpoint indicator, stack puts the control below the label |
AccordionScope | Controls which group opens first, keyed by node type and tab |
NormalHoverTabs | Normal / Hover state switch, used by colour, background and border groups |
DeviceBanner | The βEditing Tablet/Mobile β overrides onlyβ banner |
GenericStyleExtras | Renders schema-widget fields marked tab: 'style' at the top of the Style tab |
Input primitives#
| Component | Value | Typical use |
|---|---|---|
TextInput | string | Free text, z-index, box-shadow shorthand |
Select | one key | Enumerations |
AlignButtons | left / center / right / justify | Text alignment |
ColorInput | colour string | Swatch plus text field |
ColorPropRow | colour string | ColorInput in a row, with a Design System link control |
DimensionInput | value + unit | Any length; the unit list is per-control |
SliderDimInput | value + unit | Range track plus a numeric box and unit switch |
SliderPropRow | value + unit | SliderDimInput in a responsive row |
PopupSliderField | number | Slider inside a popup |
BoxSpacingControl | four sides | Margin, padding, border width, border radius; supports link-all |
StarRatingInput | integer | Star Rating widget |
MediaPickerInput / ImageUploadInput | attachment URL | Opens wp.media |
IconInput + IconPickerModal | IconValue | Font Awesome, Bootstrap, Tabler, Material and built-in SVGs, with search and favourites |
DynamicTagPicker | {{tag}} text | Inserts a dynamic tag into a text or URL field |
TokenLinkControl | globalStyleRef.tokens[prop] | Links one property to a Design System token |
ClassPicker | settings.cssClasses | Attach and detach reusable classes |
SectionBgEditor | BgData | Classic / gradient / video / slideshow background editor |
ImgBoxShadowPopup / TextShadowPopup | composite parts | Shadow builders |
TypographyTriggerRow + TypographyPopup | multiple style keys | Family, size, weight, line height, letter spacing, transform, decoration |
AnimationPresetPicker | an interaction rule | Browse the animation library |
InteractionRuleEditor | one InteractionRule | Trigger, action, settings and per-breakpoint toggles |
Which control writes where#
| Inspector tab | Store action | Data path | Validated by |
|---|---|---|---|
| Content | updateNodeContent | node.content.* | sanitize_content() β a case per type |
| Style (desktop) | updateNodeStyles | node.styles.* | sanitize_styles() β a fixed allow-list |
| Style (tablet / mobile) | updateNode({ tabletStyles }) | node.tabletStyles.* / node.mobileStyles.* | sanitize_styles() |
| Advanced / Settings | updateNodeSettings or updateNode | node.settings.* | sanitize_settings() β shared keys plus a case per type |
| Animation β Interaction | addInteraction / updateInteraction | node.interactions[] | sanitize_interactions() |
| Animation β Split | updateNode({ settings }) | node.settings.st_* | sanitize_settings() shared branch |
| Visibility | updateNodeHideOn | node.hideOn | sanitize_node() |
| Token link | linkNodeToken / unlinkNodeToken | node.globalStyleRef.tokens | sanitize_global_style_ref_data() |
| Class attach | addClassToNode / removeClassFromNode | node.settings.cssClasses | sanitize_settings() β capped at 50 keys |
Responsive editing#
Switching the breakpoint in the top bar changes which map the Style tab writes to. The tab computes an effective style map for display:
const styles = respKey
? { ...(node.styles ?? {}), ...Object.fromEntries(
Object.entries(respStyles).filter(([, v]) => v != null && v !== '')) }
: (node.styles ?? {});So a field shows the desktop value until you type something, and an empty override means βinherit desktopβ. On the server, maybe_add_responsive_rules() emits only the properties actually present in tabletStyles / mobileStyles, inside the configured media query β nothing is back-filled.
The Advanced tab shows a reduced set on tablet and mobile: Margin, Padding, Responsive Size, Responsive Typography, and Order & Display.
Style keys that do not persist#
Jalpi_Sanitizer::sanitize_styles() is an allow-list: a key that is neither in $color_keys, nor in $dim_keys, nor matched by its switch is dropped. Several controls write keys outside that list, so their values do not survive a save.
| Control | Key written | In styles_to_css()? | In sanitize_styles()? |
|---|---|---|---|
| Advanced β Position β Mode | position | Yes | No |
| Advanced β Position β Top/Right/Bottom/Left | top, right, bottom, left | Yes | No |
| Advanced β Position β Z-Index | zIndex | Yes | No |
| Advanced β Order & Display β Order | order | No | No |
| Style β Link Color | linkColor, linkColorHover | Read by the Heading and Text elements | No |
| Style β Paragraph Spacing | paragraphSpacing | Read by the Heading and Text elements | No |
The corresponding settings.position / posTop / posRight / posBottom / posLeft keys declared in SectionSettings and ContainerSettings are likewise absent from sanitize_settings() and from every PHP file.
The practical effect: these controls update the canvas immediately (the editor applies them client-side), but the value is not in the response of the next page load. Positioning that must persist should be expressed through per-element Custom CSS, which is sanitised and emitted:
selector { position: absolute; top: 24px; right: 24px; z-index: 5; }Important
- The Position, Z-Index, Order, Link Color and Paragraph Spacing controls write style keys that
sanitize_styles()does not accept, so their values are lost on save. Use per-element Custom CSS for these until the allow-list is extended.
Source
Files
admin/editor/src/components/panels/PropertiesPanel.tsx includes/class-jalpi-sanitizer.php includes/class-jalpi-renderer.php admin/editor/src/components/panels/IconPickerModal.tsx admin/editor/src/components/panels/DynamicTagPicker.tsx
Classes
Jalpi_Sanitizer Jalpi_Renderer
Functions
sanitize_styles sanitize_settings sanitize_content styles_to_css maybe_add_responsive_rules
Last updated: November 2026