Blog

How to Modify HTML in a PHP WordPress Plugin Using The New Tag Processor API

Adjusting the HTML markup in PHP has always been a struggle, but WordPress 6.2 makes it a breeze with the WP_HTML_Tag_Processor API. For example, here’s how you can add an alt=”” attribute to an <img /> tag: If you’ve ever struggled to add an HTML attribute using regular expressions, you know how big of an…

Loading…

Something went wrong. Please refresh the page and/or try again.