kucrut/icon-picker

该包已废弃,不再维护。未建议替代包。

选择您喜欢的图标。

安装: 262

依赖: 0

建议者: 0

安全: 0

星星: 20

关注者: 1

分支: 10

类型:wordpress-plugin

v0.5.0 2017-02-04 14:35 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:53:00 UTC


README

选择您喜欢的图标。

贡献者: kucrut
标签: icons, image, svg
至少需要 4.3
测试到 4.7.2
稳定标签 0.5.0
许可证: GPLv2
捐赠链接: http://kucrut.org/#coffee

Build Status Built with Grunt

描述

图标选择库插件。

截图

图标选择器

Icon selector

使用 CMB 在帖子元框中的图标字段

Icon fields in a post meta box using CMB

常见问题

如何使用来自 CDN 的 CSS 文件?

您可以使用 icon_picker_icon_type_stylesheet_uri 过滤器,例如

/**
 * Load Font Awesome's CSS from CDN
 *
 * @param  string                $stylesheet_uri Icon type's stylesheet URI.
 * @param  string                $icon_type_id   Icon type's ID.
 * @param  Icon_Picker_Type_Font $icon_type      Icon type's instance.
 *
 * @return string
 */
function myprefix_font_awesome_css_from_cdn( $stylesheet_uri, $icon_type_id, $icon_type ) {
	if ( 'fa' === $icon_type_id ) {
		$stylesheet_uri = sprintf(
			'https://maxcdn.bootstrap.ac.cn/font-awesome/%s/css/font-awesome.min.css',
			$icon_type->version
		);
	}

	return $stylesheet_uri;
}
add_filter( 'icon_picker_icon_type_stylesheet_uri', 'myprefix_font_awesome_css_from_cdn', 10, 3 );

变更日志

0.5.0

0.4.1

  • 改善对 CMB 的支持:使字段在可重复字段中使用。

0.4.0

  • 引入 icon_picker_icon_type_stylesheet_uri 过滤钩子。
  • Font Awesome 4.6.1

0.3.0

  • 修复 CSS 类名冲突。

0.2.0

  • 引入 icon_picker_field()
  • 添加对 CMB 的支持。

0.1.1

0.1.0

  • 初始