Add Icons to WordPress’ Core Button Block

Add Icons to WordPress’ Core Button Block

Posted by WP Tavern on November 2, 2023 at 7:16 pm
kitty kitty CATegory News
Nick Diego, a developer advocate at Automattic and core contributor, is the author of the popular Icon Block plugin that enables users to add custom SVG icons and graphics to the WordPress block editor. He is often asked if the plugin can add icons to the core Button block, but that is outside the scope of what it does. Last week he wrote a plugin that fulfills this feature request in a separate plugin without building a custom block. Everyone asks me if @theiconblock can add icons to the core Button block in #WordPress. Unfortunately, the answer is no. But while traveling last week, I built a little demo plugin that does just that.It works quite well, and no need for a custom block … pic.twitter.com/jF3T3T8lOA— Nick Diego (@nickmdiego) November 2, 2023 The Enable Button Icons plugin is available on GitHub as an example that demonstrates how developers can lightly extend core blocks for features like this. Diego said he was inspired by WordPress developer Aki Hamano’s Enable Responsive Image plugin that adds settings to the Image block to elegantly display different images depending on the width of the screen. WordPressの画像ブロックで、モバイル時に画像を切り替えたいけど、カスタムブロックを作るまでもなくシンプルにコアブロックを拡張するものが欲しいなと思い、試しに作ってみました。とりあえず追加出来る画像は1枚で、ブレークポイントと解像度だけ切り替えられるように。https://t.co/3OeUEQcGqQ pic.twitter.com/NxafBGRDfh— Aki Hamano / 浜野 哲明 (@tetsuaki_hamano) October 13,…

…Full post on WP Tavern
Read Full

Similar Posts

Leave a Reply