A step by step refactoring of a function to use early returns. This technique makes the code easier to read and understand.
The Gutenberg Block Editor allows users to customise text and background colours for different blocks.
In this article, we’ll first look at what these colour settings are, and how they work. We’ll then see how to disable the custom colour picker and the default colour palette. Finally we’ll learn how to add our own custom colour palette in a theme.Read More
Together we will:
- Get an in-depth understanding of the scripts API.
- Learn how to make scripts available via a unique identifier by registering them.
- Discover how we can output scripts on the page by enqueueing them.
- Understanding when to register a script first, and when to enqueue directly.
- Output in the right order to account for dependencies between the scripts.
- Ensure that your visitors always see the latest versions of your scripts by clearing browser caches.
- Learn to add scripts to the footer of a page instead of the header.
- See how to add scripts to the frontend, and restrict them to specific pages.
- Understand how scripts can be added to various screens in the admin.
- Get an overview of how to debug issues with scripts.
- Have a look at the common issues that developers run into when using the Scripts API.