WP_Theme_JSON::get_block_element_selectors( string $root_selector ): array

In this article

Generates all the element selectors for a block.

Parameters

$root_selectorstringrequired
The block’s root CSS selector.

Return

array The block’s element selectors.

Source

									$element_output[ $pseudo_selector ] = static::remove_insecure_styles( $element_input[ $pseudo_selector ] );
								}
							}
						}

						if ( ! empty( $element_output ) ) {
							_wp_array_set( $variation_output, array( 'elements', $element_name ), $element_output );
						}
					}
				}
			}

			if ( ! empty( $variation_output ) ) {
				_wp_array_set( $sanitized, $variation['path'], $variation_output );
			}
		}
	}
}

$setting_nodes = static::get_setting_nodes( $theme_json );
foreach ( $setting_nodes as $metadata ) {
	$input = _wp_array_get( $theme_json, $metadata['path'], array() );

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.