Advanced Custom Fields: Iconmoon WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Add iconmoon selector
★ 7stars
0.5latest · 4 years ago
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/beapi/acf-iconmoon/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Description
This enhance ACF with a field icons. Add a field type selector to include your great font icon and returns class icon. One activated you'll be able to use a custom ACF field type which is an icon selector
Important to know
In case you want to include this small plugin to your project running composer you can add this line to your composer.json :
"repositories": [
{
"type": "vcs",
"url": "https://github.com/BeAPI/acf-iconmoon"
}
]
then run the command :
composer require bea/acf-iconmoon
Tips
Using this with your own font icon in your own theme
Font family name, font files dir path and font files URL are filterable.
/**
* Update icon file css path.
*
* @return string
*/
function bea_override_acf_iconmoon_filepath() {
return get_stylesheet_directory() . '/assets/css/icons.css';
}
add_filter( 'bea_iconmoon_filepath', 'bea_override_acf_iconmoon_filepath' );
/**
* Update icon file css url
*
* @return string
*/
function bea_override_acf_iconmoon_fileurl() {
return get_stylesheet_directory_uri() . '/assets/css/icons.css';
}
add_filter( 'bea_iconmoon_fileurl', 'bea_override_acf_iconmoon_fileurl' );
/**
* Update icon files.
*
* @return array
*/
function bea_override_acf_iconmoon_fonts() {
return array(
'eot' => get_stylesheet_directory_uri() . '/assets/fonts/bea_icons.eot',
'woff' => get_stylesheet_directory_uri() . '/assets/fonts/bea_icons.woff',
'ttf' => get_stylesheet_directory_uri() . '/assets/fonts/bea_icons.ttf',
'svg' => get_stylesheet_directory_uri() . '/assets/fonts/bea_icons.svg',
);
}
add_filter( 'bea_iconmoon_fonts', 'bea_override_acf_iconmoon_fonts' );
/**
* font family for theme
*/
function bea_override_acf_iconmoon_font_family() {
return 'my_custom_font_family_name';
}
add_filter( 'bea_iconmoon_font_family_name', 'bea_override_acf_iconmoon_font_family' );
Changelog
0.5 (September 9, 2022)
- Update regex use for extracting icon's name from CSS file
0.4 (September 21, 2017)
- Add support for Select2 v4
0.3 (December 22, 2016)
- Refactor plugin
- Add support for clear button
0.2 (June 28, 2016)
- lang, gitignore + readme
0.1 (February 12, 2016)
- initial commit
Releases
5 releases.
Tag
Published
0.5
latest
Sep 8, 2022 4 years ago
Sep 21, 2017 9 years ago
Dec 22, 2016 9 years ago
Dec 22, 2016 9 years ago
Oct 5, 2016 10 years ago
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.