开发者 | nisbetcreative |
---|---|
更新时间 | 2018年10月27日 22:52 |
PHP版本: | 3.5.1 及以上 |
WordPress版本: | 4.5 |
版权: | GPLv3 or later |
版权网址: | 版权信息 |
Custom icons are easy to add. To enable them, select "Custom" from the Icon Type dropdown in the widget settings. In the directory of your active theme, create a folder titled 'social_icons'. Within that directory, add folders titled 'small', 'medium', and 'large' for each icon size you wish to use. Add your icons in .gif, .jpg, .jpeg, or .png format, following the naming format used for the default set of icons.
Developers can easily add more social media websites by creating a filter in the active theme's functions.php file like such: function add_new_icons($icon_list) { $icon_list['Full Website Name'] = 'full-website-id'; return $icon_list; } add_filter('social_icon_accounts', 'add_new_icons'); The full-website-id should reflect the name of the image you create in each of the icon folder sizes, or in your custom icon directory. It is also used to populate the class field of the icon when the widget displays. The Social Icon Widget looks for .gif, .jpg, .jpeg, and .png in order and returns the first extention it finds.
Output of each icon can be adjusted with the social_icon_output filter: function social_icons_html_output($format) { $format = '