INN / umbrella-inndev

Umbrella repository for inn.org
GNU General Public License v2.0
0 stars 1 forks source link

Dequeue unused styles scripts #133

Closed joshdarby closed 4 years ago

joshdarby commented 4 years ago

Changes

This pull request makes the following changes:

Why

For #132

Testing/Questions

Features that this PR affects:

Questions that need to be answered before merging:

Steps to test this PR:

  1. View the embed template
  2. Make sure it's functioning as expected
benlk commented 4 years ago

6ce22aa wraps the dequeue functions in a conditional that only fires if the amplify-feed query param is set. Do you think that's necessary?

Yes.

Are there any other scripts to dequeue?

I'd remove largo_header_js from wp_enqueue_scripts, since we aren't displaying the Largo header: https://github.com/INN/largo/blob/512da701664b329f2f92244bbe54880a6e146431/inc/enqueue.php#L177-L192

Also jquery, jquery-migrate, and the emoji styles, if possible.

joshdarby commented 4 years ago

https://github.com/INN/umbrella-inndev/pull/133/commits/e7a634ef56d67155c8c8b32acabec0c414c23a74 removes largo_header_js, jquery, jquery-migrate, and all of the emoji styles and scripts.

benlk commented 4 years ago

We're down to 117.23 KB / 40.89 KB transferred on my local testing, which is gloriously small. 18.08 KB of the transferred is the header image.