WP_Theme_JSON::get_block_selectors( object $block_type, string $root_selector ): array

In this article

Returns the selectors metadata for a block.

Parameters

$block_typeobjectrequired
The block type.
$root_selectorstringrequired
The block’s root selector.

Return

array The custom selectors set by the block.

Source

	continue;
}

// The global styles custom CSS is not sanitized, but can only be edited by users with 'edit_css' capability.
if ( isset( $input['css'] ) && current_user_can( 'edit_css' ) ) {
	$output = $input;
} else {
	$output = static::remove_insecure_styles( $input );
}

/*
 * Get a reference to element name from path.
 * $metadata['path'] = array( 'styles', 'elements', 'link' );
 */
$current_element = $metadata['path'][ count( $metadata['path'] ) - 1 ];

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

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