Make WordPress Core

Changes between Initial Version and Version 4 of Ticket #65538


Ignore:
Timestamp:
06/25/2026 08:48:16 PM (3 months ago)
Author:
aaronrobertshaw
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #65538

    • Property Summary Block Supports: Guard elements hover rendering against a missing hover selectorBlock Supports: Guard test for element hover styles with a missing hover selector
  • Ticket #65538 – Description

    initial v4  
    22Related: https://github.com/WordPress/gutenberg/pull/77894
    33
    4 `wp_render_elements_support_styles()` only defines a `hover_selector` for the
    5 `link` element type. If a block's `style.elements` data carries a `:hover`
    6 object for an element type without a hover selector (such as `button` or
    7 `heading`), the `:hover` branch accesses `$element_config['hover_selector']`
    8 on a type that does not define that key.
    9 
    10 This emits an "Undefined array key 'hover_selector'" PHP warning and passes an
    11 empty selector to the style engine.
    12 
    13 While this state is hard to reach through the default editor UI, the attribute
    14 data can be persisted on a block directly, so the warning stands on its own.
     4Earlier fix to elements hover styles guard wasn't backported to Gutenberg. The Gutenberg PR for this also adds a test against regressions for this. So this ticket tracks the backporting of the test to core.