| 开发者 | mudrava |
|---|---|
| 更新时间 | 2026年3月19日 14:54 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
<?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,500+ carefully crafted icons. All icons are licensed under ISC, making them free to use in commercial and personal projects.
mudrava-acf-lucide-field folder to /wp-content/plugins/Yes, this plugin is an extension for Advanced Custom Fields Pro and requires ACF Pro version 6.0 or higher to function. It will not work with the free version of ACF.
No, the plugin will show an admin notice and the field type will not be available. You must keep ACF Pro active.
No. All icon data is stored locally in the plugin files (sprite.svg and icons.json). No external API calls or CDN requests are made.
All icon SVG data is bundled with the plugin in the assets/sprite.svg file. Icon metadata (names and tags) is stored in data/icons.json. Everything runs locally on your server.
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, 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.