better-click-to-tweet icon indicating copy to clipboard operation
better-click-to-tweet copied to clipboard

Only load BCTT assets where they are needed [Performance]

Open sabrina-zeidan opened this issue 2 years ago • 0 comments

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.

sabrina-zeidan avatar Oct 04 '22 00:10 sabrina-zeidan