Skip to content

Instantly share code, notes, and snippets.

@jeherve
Created March 5, 2019 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeherve/bb3a1bb5eef4e6d43810f3dc608227b4 to your computer and use it in GitHub Desktop.
Save jeherve/bb3a1bb5eef4e6d43810f3dc608227b4 to your computer and use it in GitHub Desktop.

You could use the jetpack_set_available_extensions filter (reference) to avoid registering some of Jetpack's blocks in the editor. When you do so, they won't appear in the block editor.

That said, it won't change the size of the CSS file used to style those blocks in the editor; that file concatenates CSS for all blocks, regardless of what's actually available in the editor. It should not be too much of an issue though:

  1. That file is minified and rather small (63.8 KB right now - #).
  2. The file is only loaded in the editor. It is not loaded on the frontend. On your site, we only load CSS for the blocks that are on the page, and need CSS, and in those cases we use separate CSS files like the ones you can find in this directory.

I hope this clarifies things a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment