All Projects → houke → acf-icon-picker

houke / acf-icon-picker

Licence: other
Creates an icon picker ACF field

Programming Languages

javascript
184084 projects - #8 most used programming language
PHP
23972 projects - #3 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to acf-icon-picker

acf-image-aspect-ratio-crop
Image Aspect Ratio Crop field for Advanced Custom Fields
Stars: ✭ 100 (+26.58%)
Mutual labels:  acf-field
svgpack
A tool for generating and managing SVG Sprites.
Stars: ✭ 28 (-64.56%)
Mutual labels:  svg-icons
webpack-svg-sprite-sample
a webpack SVG sprite sample when using Vue and React
Stars: ✭ 19 (-75.95%)
Mutual labels:  svg-icons
sass-inline-svg
Inline url-encoded SVG with Sass. Optional variable string replacement included!
Stars: ✭ 21 (-73.42%)
Mutual labels:  svg-icons
flexicon
SVG icon collection.
Stars: ✭ 23 (-70.89%)
Mutual labels:  svg-icons
bookmarks
Bookmarks that I ❤️
Stars: ✭ 151 (+91.14%)
Mutual labels:  svg-icons
Font Awesome
The iconic SVG, font, and CSS toolkit
Stars: ✭ 66,937 (+84630.38%)
Mutual labels:  svg-icons
flagpack
A lightweight flag icon toolkit for the web.
Stars: ✭ 51 (-35.44%)
Mutual labels:  svg-icons
md-svg-vue
Material design icons by Google for Vue.js & Nuxt.js (server side support & inline svg with path)
Stars: ✭ 14 (-82.28%)
Mutual labels:  svg-icons
acf-conditional-logic-advanced
Advanced Custom Fields - Conditional Logic Advanced
Stars: ✭ 31 (-60.76%)
Mutual labels:  acf-field
react-svg-icon-generator
Generate React Icon Component from SVG icons to show, resize and recolor them.
Stars: ✭ 65 (-17.72%)
Mutual labels:  svg-icons
blade-bootstrap-icons
A package to easily make use of Bootstrap Icons in your Laravel Blade views
Stars: ✭ 46 (-41.77%)
Mutual labels:  svg-icons
lunar-icons
A set of beautiful handcrafted SVG icons.
Stars: ✭ 18 (-77.22%)
Mutual labels:  svg-icons
vue-feather-icon
No description or website provided.
Stars: ✭ 109 (+37.97%)
Mutual labels:  svg-icons
react-ratings-declarative
A customizable rating component for selecting x widgets or visualizing x widgets
Stars: ✭ 41 (-48.1%)
Mutual labels:  svg-icons
acf-move-wp-editor
This is a simple ACF Field that moves the WordPress content editor of a post or page to the location of this field.
Stars: ✭ 32 (-59.49%)
Mutual labels:  acf-field
vue-svg-icon-loader
Turn SVG files into VueJS Components
Stars: ✭ 24 (-69.62%)
Mutual labels:  svg-icons
edent.tel
A semantic contact page built around SVG
Stars: ✭ 28 (-64.56%)
Mutual labels:  svg-icons
icons
a collection of custom icons for use with the notion-enhancer's "icon sets" integration
Stars: ✭ 29 (-63.29%)
Mutual labels:  svg-icons
minidenticons
Super lightweight SVG identicon (icon avatar) generator
Stars: ✭ 89 (+12.66%)
Mutual labels:  svg-icons

ACF Icon Selector Field

Allows you to create an 'icon-picker' acf-field.


Please note

I am no longer developing this plugin myself, but will still be accepting PRs.

Description

Add the svg icons you want to be available in your theme to an acf folder inside an img folder in your theme. The field returns the name of the svg.

Compatibility

This ACF field type is compatible with:

[x] ACF 6 [x] ACF 5

Screenshots

Icon Picker

Installation

via Composer

  1. Add a line to your repositories array: { "type": "git", "url": "https://github.com/houke/acf-icon-picker" }
  2. Add a line to your require block: "houke/acf-icon-picker": "dev-master"
  3. Run: composer update

Manually

  1. Copy the acf-icon-picker folder into your wp-content/plugins folder
  2. Activate the Icon Selector plugin via the plugins admin page
  3. Create a new field via ACF and select the Icon Selector type

Filters

Use the below filters to override the default icon folder, path, and / or URL:

// modify the path to the icons directory
add_filter( 'acf_icon_path_suffix', 'acf_icon_path_suffix' );

function acf_icon_path_suffix( $path_suffix ) {
    return 'assets/img/icons/';
}

// modify the path to the above prefix
add_filter( 'acf_icon_path', 'acf_icon_path' );

function acf_icon_path( $path_suffix ) {
    return plugin_dir_path( __FILE__ );
}

// modify the URL to the icons directory to display on the page
add_filter( 'acf_icon_url', 'acf_icon_url' );

function acf_icon_url( $path_suffix ) {
    return plugin_dir_url( __FILE__ );
}

For Sage/Bedrock edit filters.php:

/// modify the path to the icons directory
add_filter('acf_icon_path_suffix',
  function ( $path_suffix ) {
    return '/assets/images/icons/'; // After assets folder you can define folder structure
  }
);

// modify the path to the above prefix
add_filter('acf_icon_path',
  function ( $path_suffix ) {
    return '/app/public/web/themes/THEME_NAME/resources';
  }
);

// modify the URL to the icons directory to display on the page
add_filter('acf_icon_url',
  function ( $path_suffix ) {
    return get_stylesheet_directory_uri();
  }
);

Changelog

  • 1.9.1 - ACF 6 compatibility fix. Thanks to idflood
  • 1.9.0 - Fix issue with Gutenberg preview not updating when removing. Thanks to cherbst
  • 1.8.0 - Fix issue with Gutenberg not saving icon. Thanks to tlewap
  • 1.7.0 - 2 new filters for more control over icon path. Thanks to benjibee
  • 1.6.0 - Performance fix with lots of icons. Thanks to idflood
  • 1.5.0 - Fix issue where searching for icons would break preview if icon name has space
  • 1.4.0 - Add filter to change folder where svg icons are stored
  • 1.3.0 - Adding close option on modal
  • 1.2.0 - Adding search filter input to filter through icons by name
  • 1.1.0 - Add button to remove the selected icon when the field is not required
  • 1.0.0 - First release
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].