Skip to content

Commit

Permalink
Update enqueue module identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
luisherranz committed Jan 25, 2024
1 parent 8b20b81 commit 06c04fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/file/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static function ( $matches ) {

// If it's interactive, enqueue the script module and add the directives.
if ( ! empty( $attributes['displayPreview'] ) ) {
wp_enqueue_script_module( '@wordpress/block-library/file-block' );
wp_enqueue_script_module( '@wordpress/block-library/file' );

$processor = new WP_HTML_Tag_Processor( $content );
$processor->next_tag();
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ private static function get_nav_element_directives( $is_interactive, $attributes
*/
private static function handle_view_script_module_loading( $attributes, $block, $inner_blocks ) {
if ( static::is_interactive( $attributes, $inner_blocks ) ) {
wp_enqueue_script_module( '@wordpress/block-library/navigation-block' );
wp_enqueue_script_module( '@wordpress/block-library/navigation' );
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/search/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function render_block_core_search( $attributes ) {
// If it's interactive, enqueue the script module and add the directives.
$is_expandable_searchfield = 'button-only' === $button_position;
if ( $is_expandable_searchfield ) {
wp_enqueue_script_module( '@wordpress/block-library/search-block' );
wp_enqueue_script_module( '@wordpress/block-library/search' );

$input->set_attribute( 'data-wp-bind--aria-hidden', '!context.isSearchInputVisible' );
$input->set_attribute( 'data-wp-bind--tabindex', 'state.tabindex' );
Expand Down

0 comments on commit 06c04fd

Please sign in to comment.