Dennis Snell (@dmsnell23) profile picture
Joined December 2013
Photo by Dennis Snell (@dmsnell23)Photo by Dennis Snell (@dmsnell23)Photo by Dennis Snell (@dmsnell23)Photo by Dennis Snell (@dmsnell23)Photo by Dennis Snell (@dmsnell23)Photo by Dennis Snell (@dmsnell23)Photo by Dennis Snell (@dmsnell23)Photo by Dennis Snell (@dmsnell23)Photo by Dennis Snell (@dmsnell23)Photo by Dennis Snell (@dmsnell23)
ボタンブロック内のa要素にdownload属性を付けるなら普通にWP_HTML_Tag_Processor。プラグインは不要です😉
今ぶち当たっている問題が、まさにこれです。 wordpress、意外と自由度が無い。 プラグイン「download manager」を試しています。
1
2
22
3,942
the document is the database 🤔 #sgml
117
Inspired by Dennis Snell's talk on #WordPress Playground at #WCUS2024, I put together a #VSCode extension to edit ReadMe files in the block editor.
9
9
1
64
5,939
Dennis Snell retweeted
🌊 "We're so used to WordPress development being a drop in a massive ocean, but with Playground, *we are* the ocean. We get to choose everything that goes out to our customers," said @dmsnell23, sharing unique opportunities with Playground at #WCUS. 💻✨ #WordPress #PlayGround
2
2
343
want to highlight your #wordpress #wordpressplayground based app at #wcus? send me a message!
1
175
Even spec-compliant #html parsers can "break." HTML cannot represent all possible (even invalid) DOM trees. #wordpress' #htmlapi speaks HTML and ensures full encapsulation and isolation when manipulating a document so this doesn't happen.
1
137
The #wordpress #htmlapi knows #html so you don't have to.
108
#wordpress #htmlapi knows how to convert #HTML into #XML/#XHTML (but you probably shouldn't do it!)
89
You can't parse #HTML with #XML. Because HTML can't be parsed by XML. XML is not a tool that can be used to correctly parse HTML. The use of XML will not allow you to consume HTML. XML is a tool that is insufficiently sophisticated. Have you tried using an HTML parser instead?
1
115
SGML lets me write post tags the way I think about them, and with a proper ENTITY and SHORTREF+USEMAP, it parses them structurally. #sgml
99
Did you know that HTML API is built from 0, specially for #WordPress, and there's no other framework or CMS that has anything similar? They all still use regex 🥲 There's also an interesting effect on performance 👯 I'll show you its magic in two weeks at @PHPSrbija #PHPSRB 🥰
1
1
5
254
11/ In this hook, we'll create a custom class using the `wp_unique_id` function and apply it to our block using #WordPress relatively new `WP_HTML_Tag_Processor`. We'll then compose the style selector and add the icon markup using a regex.
2
1
2
282
When learning about new features in code, I found that reading tests is, by far, the fastest route to understanding the usage and learning about available methods. Here are some utterly educational tests for WP_HTML_Tag_Processor by @dmsnell23 🤩 github.com/dmsnell/wordpress…
1
5
27
1,176
なお、ブランド名など翻訳させたくないテキストには、translate="no"をつけようネ💪 developer.mozilla.org/ja/doc… WPのブロックエディタでは、WP_HTML_Tag_Processor を使うと良きです😇 .notranslate クラスを付けたブロックには一律 translate=noを付ける処理が書けます💪 developer.wordpress.org/refe…
1
1
2
221
Not many people realize the revolution that the HTML API represents for WordPress. @dmsnell23 is doing an amazing job explaining how this API works in his workshop right now at #WCEU. If you are not in this room now, make a note to see it later online 📝📺
3
7
1
36
1,815
If you want your own TOC block that dynamically creates a list of anchor links based on H2s, you can use the WP HTML Tag Processor in a custom block. Here's a basic example that skips any H2s that don't have an id (and it works inside templates, too 🤫)
2
1
5
302
When tests, linting, and CI reject work that fixes defects, it may be a good time to revaluate that system. Something is not right when defects are automatically enforced and preferred over fixes. #testsfailed
1
123
Dennis Snell retweeted
In WP 6.5, the HTML API will be able to scan every token in an HTML document. This API is especially important for any programmatic modification of the content in the block era, and it's getting better and better with each version. Read more in the following post 👇
2
1
5
586