开发者 | agolubnichenko |
---|---|
更新时间 | 2019年7月1日 23:06 |
PHP版本: | 3.5.0 及以上 |
WordPress版本: | 4.8 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
The plugin includes some templates for each shortcode in "templates/" folder. You can copy any template in your active theme and customize it for your needs. Path to the templates folder inside the active theme: [ActiveTheme]/templates/agp-font-awesome-collection/
The plugin includes CSS file "assets/css/style.css". You can copy this file in your active theme and customize it for your needs. Path to the styles inside the active theme: [ActiveTheme]/templates/agp-font-awesome-collection/assets/css/style.css
Following shortcode can be used for adding of a simple icon:
[fac_icon icon="camera"]
[fac_icon icon="camera" font_size="20px" color="#ff0000"]
Following shortcode can be used for adding of a simple icon with additional text and shape:
[fac_icontext icon="heart" text="Default"]
[fac_icontext icon="heart" text="Default" shape_type="round" shape_bg="#000000" icon_color="ffffff" text_color="000000"]
Following shortcode can be used for adding of a simple icon button:
[fac_button icon="facebook" name="button_1" title="Find Us on Facebook" link="www.facebook.com" target="_blank"]
[fac_button icon="facebook" name="button_1" title="Find Us on Facebook" link=www.facebook.com text=" Find Us on Facebook "]
[fac_button icon="facebook" name="button_1" title="Find Us on Facebook" link=www.facebook.com text=" Find Us on Facebook " background="#0d47a1" color="#ffffff" border_radius="4px" border_width="4px" border_color="#0d47a1"]
At first, You must enable "Menu Icons" module on the plugin settings page in the Admin Panel. Then go to the Appearance > Menus and select necessary menu. For each menu item you can find additional drop-down list with the FA icons.
Following shortcode can be used for adding of dropdown with Font Awesome icons list:
[fac_dropdown icon="cc-visa" name="myselectid_1"]
Following shortcode can be used for adding of info box with current Font Awesome version:
[fac_version]
If you need to have access to object of collection you can use following code:
<?php $iconRepository = Fac()->getIconRepository(); ?>
This object contains list of the entity of Font Awesome icons collection and access methods for these objects.
You can find general objects access methods below:
<?php echo Fac()->getIconRepository()->findById('adn')->getName(); ?>
As result, will be displayed: "App.net"
For more references you can check realization for "Agp\Plugin\Fac\Persistence\IconRepository" and "Agp\Plugin\Fac\Persistence\IconEntity" classes in plugin code.
Also you can send any questions in plugin support tab.
The first, You must enable "Category Icons" feature on the "Settings" page of plugin in the Admin Panel.
After that You must setup icons and icons position on the terms of taxonomy.
You can get the icon data for a specified term of taxonomy with the following code:
<?php $data = Fac()->getTaxonomyIcons()->getTaxIcon( $term_id ); ?>
where: