codeinwp/icon-picker

选择您喜欢的图标。

安装: 475

依赖项: 0

建议者: 0

安全性: 0

星标: 4

关注者: 4

分支: 3

类型:wordpress-plugin

dev-master 2024-05-13 08:27 UTC

This package is auto-updated.

Last update: 2024-09-13 09:10:59 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

  • 初始版本