jankx/icon-picker

挑选您喜欢的图标。

安装: 15

依赖项: 1

建议者: 0

安全: 0

星标: 0

关注者: 0

分支: 3

类型:wordpress-plugin

dev-master 2024-07-09 14:36 UTC

This package is auto-updated.

Last update: 2024-09-09 15:00:52 UTC


README

Icon Picker

挑选您喜欢的图标。

贡献者: 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

  • 初始