Closed jbboynton closed 2 years ago
@jbboynton so the enqueueing happens when the links are displayed. I missed it on the template tag but here is an example on the shortcode: https://github.com/seagyn/the-social-links/blob/0c310e9ad38c958d9f37afec6d3c010f2c118918/src/boot.php#L66
The main idea is to limit loading assets to only pages that require it. I'll explore it a bit more and see if I can fix it.
Enqueue assets on the front end. It looks like this bug was introduced in the 2.0 release. Prior to the version bump, [assets were being enqueued] from the
admin_init
andinit
hooks. However, after the update, front end assets were no longer being enqueued.This commit reimplements the original behavior so that assets are enqueued on the front end. Additionally, this commit prefixes style and script handles with
tsl
, and moves a bit of JavaScript out of a template and into a dedicated file. In general, I tried to make everything related to asset enqueuing as conventional and as possible.