Linux 软件免费装
Banner图

The Icon Block

开发者 ndiego
outermostdesign
更新时间 2024年3月24日 19:38
PHP版本: 7.0 及以上
WordPress版本: 6.5
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

block SVG icon icon block SVG block

下载

1.2.0 1.6.0 1.7.0 1.9.0 1.5.0 1.0.0 1.1.1 0.1.1 0.1.2 1.1.2 1.3.1 0.1.0 1.3.0 1.4.0 1.1.0 1.3.2 1.8.0

详情介绍:

The Icon Block plugin registers a single, easy-to-use block that allows you to add custom SVG icons and graphics to the WordPress block editor (Gutenberg). The plugin also includes the complete WordPress icon library with 290+ SVG icons.

安装:

  1. You have a couple of options:
  2. Go to Plugins → Add New and search for "Icon Block". Once found, click "Install".
  3. Download the Icon Block from wordpress.org and make sure the folder is zipped. Then upload via Plugins → Add New → Upload.
  4. Open the block inserter within the Block Editor (Gutenberg) and search for "icon". The plugin should appear and allow you to install it directly. Skip steps 2 and 3.
  5. Activate the plugin through the 'Plugins' screen in WordPress.
  6. Search for the block within the Block Editor (Gutenberg) and begin using it.

屏幕截图:

  • Create your own custom icons by simply copying/pasting the SVG code. Then, modify the icon to suit your needs.
  • The Icon Block includes icon controls such as color, rotation, alignment, padding, and border-radius.
  • The Icon Block adapts to your layout, whether you need a big or small icon.
  • Use the "quick inserter" to pick the WordPress icon you need.
  • The WordPress icon library modal has categories, search, and preview size functionality.
  • Custom icons are added via their own insertion modal with a large text area and the ability to preview the SVG code.
  • You are not limited to traditional icons. Any SVG-based graphic will work as well. The block will respect any hard-coded color/fill values in the provided SVG.

常见问题:

Where can I get more icons?

Currently, the Icon Block only includes the WordPress icon library. That said, the plugin allows you to render any SVG-based icon by simply copying/pasting the code into the icon text area when using the "Add custom icon" option! See the screenshots for reference. This gives you complete flexibility and allows you to use practically any icon you want. A great source for free SVG icons is Google's Material Icons project, Font Awesome, and Iconic, to name a few. The Icon Block also allows you to register your own custom block library. This needs to be done externally in your theme or via a plugin but provides complete flexibility over the icons available in the plugin. Learn more.

Why is my icon not changing color?

The Icon Block includes controls for the icon's color and background. However, if your SVG icon has hard-coded color/fill values, the plugin will respect those instead of any applied custom colors.

Why can't I add SVG icons from my Media Library?

By default, WordPress does not allow you to add SVG files to your Media Library, but you can enable this functionality using plugins like Safe SVG. If SVG uploads are enabled, you will see the option to insert icons from Media Library in the Icon Block.

Why is the block not working for certain users?

WordPress only allows Administrators and Editors to save "Unfiltered HTML" content, which includes SVGs. The Icon Block will not work properly for users who are at the Author level or lower. Note that WordPress multisite installations have additional restrictions. "Unfiltered HTML" is restricted to Super Admins on multisite. To enable "Unfiltered HTML" content for site Administrators and Editors, you will need to use a code snippet, the Unfiltered MU plugin, or something similar. Regrettably, this is a WordPress restriction and needs to be handled outside of the Icon Block.

更新日志:

Added Changed 1.7.0 - 2024-01-02 Added Changed Fixed 1.6.0 - 2023-07-29 Added Changed 1.5.0 - 2023-03-09 Added Changed Fixed 1.4.0 - 2023-01-03 Added Changed 1.3.2 - 2022-10-17 Fixed 1.3.1 - 2022-10-01 Fixed 1.3.0 - 2022-09-20 Added Changed Removed Fixed 1.2.0 - 2022-05-02 Added Changed 1.1.2 - 2022-01-27 Fixed 1.1.1 - 2022-01-25 Changed 1.1.0 - 2022-01-25 Added Changed Fixed 1.0.0 - 2021-10-06 Added 0.1.2 - 2021-09-27 Added Fixed 0.1.1 - 2021-09-25 Fixed 0.1.0 - 2021-09-25