定制 kunoichi/icon 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kunoichi/icon

最新稳定版本:1.0.5

Composer 安装命令:

composer require kunoichi/icon

包简介

A icon toolset for WordPress

README 文档

README

An icon communicator for WordPress. You can include Icon Block and Inline Icon in your block editor.

Supported Icons

  • Dashicons
  • Font Awesome 5

You can add your original icons.

Core Concept

This library will parse and grab the icon names from your web font CSS. If you like to choose your iconsets(e.g. for performance), customize your web-font CSS.

Installation

Use composer.

composer require kunoich/icon

From your theme or plugin's boostrap file, include autoloader.php.

require __DIR__ . '/vendor/autoload.php';

Then enable icon blocks.

Kunoichi\Icon\Manager::register();

Customize

Create Your Own

Each font are parsed by a class which inherits Kunoichi\Icon\Pattern\IconSet.

You have to parse CSS by your self. For details, see Kunoichi\Icon\Iconsets\Dashicons and do what it does.

Before Manager::register, just make new instance of your class.

new YourIconSets( 'path/to/your/icon.css' );
Kunoichi\Icon\Manager::register();

For Font Awesome 5 Pro, see Kunoichi\Icon\Iconsets\FontAwesomeSolid for your information. It parses SVG :)

Remove Defaults

If you don't use some of default icons(e.g. dashicons), pass argument for exclude list.

Kunoichi\Icon\Manager::register( [ 'dashicons' => false ] );

Thus, no dashicons will be listed.

License

GPL 3.0 or later. Font Awesome is under Font Awesome Free License.

统计信息

  • 总下载量: 3.56k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2019-12-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固