| 开发者 | mudrava |
|---|---|
| 更新时间 | 2026年5月1日 01:34 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
simple:facebook<?php $icon_name = get_field('your_field_name'); echo esc_html($icon_name); // Returns: 'rocket' ?>
Get SVG Markup (with return_format = 'svg'):
<?php $icon_svg = get_field('your_field_name'); echo $icon_svg; // Returns: <svg>...</svg> ?>
Using the Helper Function:
`<?php
// Basic usage
echo mudrava_get_lucide_icon('rocket');
// With custom attributes
echo mudrava_get_lucide_icon('rocket', [
'class' => 'my-custom-class',
'width' => 32,
'height' => 32,
'stroke' => '#ff0000',
]);
?>`
About Lucide Icons
Lucide is a modern, open-source icon library with 1,700+ carefully crafted icons. The bundled Lucide assets are from lucide-static 1.14.0 and are licensed under ISC.
About Brand Icons
Brand logos are bundled separately from Simple Icons 16.18.0 and are saved with the simple: prefix, for example simple:facebook.
Simple Icons is distributed under CC0-1.0, but individual brand logos and trademarks may still be governed by each brand owner's guidelines and permissions. Check the relevant brand guidelines before using a logo in production. Source and guideline URLs from Simple Icons are bundled in data/brand-icons-meta.json.
mudrava-acf-lucide-field folder to /wp-content/plugins/No. The field type works with Advanced Custom Fields 6.0 or higher. It also works inside ACF Pro field groups such as Repeaters and Flexible Content.
No, the plugin will show an admin notice and the field type will not be available. You must keep ACF active.
No. All icon data is stored locally in the plugin files. No external API calls or CDN requests are made.
Lucide SVG data is bundled in assets/sprite.svg. Brand logo SVG data is bundled in assets/brand-sprite.svg. Search metadata is stored in data/icons.json and data/brand-icons.json. Everything runs locally on your server.
Lucide v1 removed most brand icons from the current packages. Version 1.1.0 updates Lucide to lucide-static 1.14.0 and adds a separate Simple Icons brand bundle, which is the recommended direction for brand logos. New brand values are saved as simple:<slug>, and legacy unprefixed social values such as facebook, instagram, twitter, or youtube are resolved against Simple Icons when they no longer exist in Lucide.
Yes, the Lucide Icon field works perfectly within Repeater fields, Flexible Content fields, and any other ACF field groups.
You can configure the return format in the field settings:
Use the mudrava_get_lucide_icon() helper function with custom attributes for width, height, stroke color, fill color, and CSS classes.
Yes, the plugin is fully translation-ready with text domain mudrava-acf-lucide-field. Translation files should be placed in the /languages/ directory.
lucide-static 1.14.0.simple:<slug>.