Andrew Ozz
Andrew Ozz
> That is not how PHPCS currently works. True, and that prevents it from making "suggestions" like in the WP standards. > IIRC, it doesn't say anywhere in the standards...
@jrfnl hm, I may be missing something... Where can I set the maximum number of white spaces that will be inserted between `key` and `=>` when aligning arrays? Example: an...
> Well, what's the point of having a sniff if it doesn't do anything... Well, it is a sniff that is enforcing an exception (and can produce unreadable, ugly code)...
> we'll have to make a separate REST API endpoint to allow uploading images by URL Right, the end point should use (or do something similar to) [ `media_sideload_image()` ](https://developer.wordpress.org/reference/functions/media_sideload_image/)....
Just a note that namespace declarations are not part of the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/) (yet), see https://make.wordpress.org/core/2020/03/20/updating-the-coding-standards-for-modern-php/. This enhancement does not belong in WPCS unless namespace declarations are added to...
There is something I don't understand here. Why would you want to "tokenize an HTML document to find specific tags" when you had all that data/tokens in JS when that...
> We store it. It's the block markup Uh, not what I meant, sorry. The markup is the "product" that was outputted when using that data, a lot less useful...
> Parsing HTML is a common thing to do outside of a browser and many languages have libraries for that. @adamziel And the PHP way of doing that is DOMDocument,...
Btw, [Jsoup](https://jsoup.org/) is a good example. But is called "soup" for a reason, right? Looks like a reference to [tag soup](https://en.wikipedia.org/wiki/Tag_soup) :)
> that can help with adding a class for those block if that were the case @MaggieCabrera Right, my thoughts here are not about the ability to add HTML classes...