better-click-to-tweet
better-click-to-tweet copied to clipboard
Only load BCTT assets where they are needed [Performance]
Moving styles and scripts enqueue to the register_block callback function allows to enqueue assets conditionally -- they will be loaded on the pages where the block is used, and won't be loaded where the block is not. Should be working the same with any theme, whether it's FSE/uses Gutenberg/Classic editor etc.