Skip to content

Commit

Permalink
Try moving the JavaScript fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinan committed Jun 16, 2023
1 parent a729dcd commit b972cf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-library/src/back-to-top/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function render_block_core_back_to_top( $attributes ) {
$link_text = isset( $attributes['text'] ) ? $attributes['text'] : __( 'Back to top' );
$wrapper_attributes = get_block_wrapper_attributes();

enqueue_block_core_back_to_top_classic_fallback();

return sprintf(
'<p %1$s><a href="#wp-back-to-top">%2$s</a></p>',
$wrapper_attributes,
Expand Down Expand Up @@ -84,4 +86,3 @@ function enqueue_block_core_back_to_top_classic_fallback() {
}
}
}
add_action( 'wp_enqueue_scripts', 'enqueue_block_core_back_to_top_classic_fallback' );

0 comments on commit b972cf7

Please sign in to comment.