What if no version query string was applied to the asset’s URL? Then there’s no reason for us to run the conversion code. Right? That regex pattern is slow. So we don’t want to run it unless it’s needed. When does WordPress not append a version query string? Think about it. Go look up wp_enqueue_script. Look at the description for the version parameter. In this episode, we’ll explore 2 different techniques of checking if the incoming asset’s URL has the version query string.
Labs
Labs are hands-on coding projects that you build along with Tonya as she explains the code, concepts, and thought processes behind it. You can use the labs to further your code knowledge or to use right in your projects. Each lab ties into the Docx to ensure you have the information you need.
Each lab is designed to further your understanding and mastery of code. You learn more about how to think about its construction, quality, maintainability, programmatic and logical thought, and problem-solving. While you may be building a specific thing, Tonya presents the why of it to make it adaptable far beyond that specific implementation, thereby giving you the means to make it your own, in any context.