All Projects → serkanalgur → cmb2-field-faiconselect

serkanalgur / cmb2-field-faiconselect

Licence: GPL-3.0 license
CMB2 Field Type: Font Awesome (Font Awesome Icon Selector for CMB2)

Programming Languages

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

Projects that are alternatives of or similar to cmb2-field-faiconselect

Ruby2 Rails4 Bootstrap Heroku
A starter application based on Ruby 2.4, Rails 4.2 and Bootstrap for Sass 3, deployable on Heroku
Stars: ✭ 181 (+805%)
Mutual labels:  font-awesome
Ember Font Awesome
ember-cli addon for using Font Awesome icons in Ember apps
Stars: ✭ 225 (+1025%)
Mutual labels:  font-awesome
emojifont
🍭Emoji and fontawesom in both base and ggplot2 graphics
Stars: ✭ 61 (+205%)
Mutual labels:  font-awesome
Svelte Awesome
Awesome SVG icon component for Svelte JS, built with Font Awesome icons. Based on Justineo/vue-awesome
Stars: ✭ 193 (+865%)
Mutual labels:  font-awesome
Core
Zikula Core Framework
Stars: ✭ 213 (+965%)
Mutual labels:  font-awesome
Sprat-type
Display typeface
Stars: ✭ 58 (+190%)
Mutual labels:  font-awesome
Fontawesome
Easily insert FontAwesome icons into R Markdown docs and Shiny apps
Stars: ✭ 160 (+700%)
Mutual labels:  font-awesome
JayantGoel001.github.io
My Personal Portfolio.
Stars: ✭ 31 (+55%)
Mutual labels:  font-awesome
Simple Dash
A simple, fully responsive Dashboard to forward to the services of your choice!
Stars: ✭ 222 (+1010%)
Mutual labels:  font-awesome
apple-emoji-linux
Apple Color Emoji for Linux
Stars: ✭ 392 (+1860%)
Mutual labels:  font-awesome
Feathers Vue
A boiler plate template using Feathers with Email Verification, Vue 2 with Server Side Rendering, stylus, scss, jade, babel, webpack, ES 6-8, login form, user authorization, and SEO
Stars: ✭ 195 (+875%)
Mutual labels:  font-awesome
Avfonts
AVFonts for change/swap fontname throughout app.
Stars: ✭ 200 (+900%)
Mutual labels:  font-awesome
hugo-apero
Apéro is a Hugo theme for personal websites. A Hugo theme you'll want to hang out with 🌌 . This is the source for the theme files to install.
Stars: ✭ 122 (+510%)
Mutual labels:  font-awesome
Icon Font To Png
Python script (and library) for exporting icons from icon fonts (e.g. Font Awesome, Octicons) as PNG images
Stars: ✭ 186 (+830%)
Mutual labels:  font-awesome
CMB2-radio-image
Images as radio buttons
Stars: ✭ 18 (-10%)
Mutual labels:  cmb2
Awesome Bootstrap Checkbox
✔️Font Awesome Bootstrap Checkboxes & Radios. Pure css way to make inputs look prettier
Stars: ✭ 2,044 (+10120%)
Mutual labels:  font-awesome
Plantuml Icon Font Sprites
plantuml-font-icon-sprites
Stars: ✭ 242 (+1110%)
Mutual labels:  font-awesome
vscode-icon-fonts
Snippets for popular icon fonts such as Font Awesome, Ionicons, Glyphicons, Octicons, Material Design Icons and many more!
Stars: ✭ 33 (+65%)
Mutual labels:  font-awesome
FontRegister
FontRegister is a small Windows utility to install fonts and/or repair the font registry via commandline.
Stars: ✭ 17 (-15%)
Mutual labels:  font-awesome
ruby2-rails5-bootstrap-heroku
An opinionated starter application based on Ruby 2.6, Rails 5.2, Webpack 4, Yarn, and Bootstrap 4, deployable on Heroku
Stars: ✭ 47 (+135%)
Mutual labels:  font-awesome

CMB2 Field Type: Font Awesome

Font Awesome Icon Selector for CMB2

FOSSA Status

Description

Font Awesome icon selector for powerful custom metabox generator CMB2

You can use as field type in CMB2 function file. Add a new field, set type to faiconselect and add font awesome icons to options (look Usage for examples). Plugin uses jQuery Font Picker for creating a icon selector.

Plugin capable to use Font Awesome 4.7.0 or 5.7.2 (only Solid and Brands icons) for icons and selector.

WordPress Plugin

You can download this plugin also here : CMB2 Field Type: Font Awesome or you can search as CMB2 Field Type: Font Awesome on your plugin install page.

Install via Composer

This plugin available as Composer Package and can be installed via Composer.

composer require serkanalgur/cmb2-field-faiconselect

ScreenShot

Image

Usage

Download this repo and put files into wp-content/plugins/ directory. When you enable plugin, you can use field type in CMB2.

Alternatively you can search CMB2 Field Type: Font Awesome on WordPress plugin directory.

Use faiconselect for type. For Example;

$cmb->add_field( array(
    'name' => __( 'Select Font Awesome Icon', 'cmb' ),
    'id'   => $prefix . 'iconselect',
    'desc' => 'Select Font Awesome icon',
    'type' => 'faiconselect',
    'options' => array(
	'fa fa-facebook' => 'fa fa-facebook',
	'fa fa-500px'  	 => 'fa fa-500px',
	'fa fa-twitter'	 => 'fa fa-twitter'
    )
) );

After that jQuery Font Picker plugin handle the select.

Aslo you can use predefined array for Font Awesome. I created a function with this addon to use in options_cb. Function called as returnRayFaPre.

$cmb->add_field( array(
    'name' => __( 'Select Font Awesome Icon', 'cmb' ),
    'id'   => $prefix . 'iconselect',
    'desc' => 'Select Font Awesome icon',
    'type' => 'faiconselect',
    'options_cb' => 'returnRayFaPre'
) );

Usage From Template Folder

Download and place folder into your theme folder. You need to create a function for fixing asset path issue. Fore example;

// Fix for $asset_path issue
function asset_path_faiconselect() {
    return get_template_directory_uri() . '/path/to/folder'; //Change to correct path.
}

add_filter( 'sa_cmb2_field_faiconselect_asset_path', 'asset_path_faiconselect' );

//Now call faiconselect
require get_template_directory() . '/path/to/folder/iconselect.php'; //Again Change to correct path.

This function solve assetpath issue for including javascript and css files.

Usage With Font Awesome 5

You need two different options for activate Font Awesome 5. You will need to add an attribute. Also there is a function for predefined list of font-awesome 😄

Standart Way

$cmb->add_field( array(
    'name' => __( 'Select Font Awesome Icon', 'cmb' ),
    'id'   => $prefix . 'iconselect',
    'desc' => 'Select Font Awesome icon',
    'type' => 'faiconselect',
    'options' => array(
        'fab fa-facebook' => 'fa fa-facebook',
        'fab fa-500px'  	 => 'fa fa-500px',
        'fab fa-twitter'	 => 'fa fa-twitter',
        'fas fa-address-book' => 'fas fa-address-book'
    ),
    'attributes' => array(
        'faver' => 5
    )
) );

This attribute needed for selecting right style files. If you don't add these attribute, you can not see icons.

Predefined Way

$cmb->add_field( array(
    'name' => __( 'Select Font Awesome Icon', 'cmb' ),
    'id'   => $prefix . 'iconselect',
    'desc' => 'Select Font Awesome icon',
    'type' => 'faiconselect',
    'options_cb' => 'returnRayFapsa',
    'attributes' => array(
        'faver' => 5
    )
) );

As you can see we define an options_cb function named returnRayFapsa. This function create an array for options with solid and brands icons. Also you need faver attribute for Font Awesome 5.

That's All for now 😄 Contributions are welcome

You can donate me via;

Paypal : https://paypal.me/serkanalgur

License

FOSSA Status

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].