承接 htmlburger/carbon-field-icon 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

htmlburger/carbon-field-icon

Composer 安装命令:

composer require htmlburger/carbon-field-icon

包简介

Carbon Fields extension, that adds a Icon field type.

README 文档

README

Packagist

Provides the ability to select an icon or a glyph.

Supported glyphs

  • Font Awesome (v5.8.1)
  • Dashicons
  • Custom

Usage

Font Awesome only (default):

Field::make( 'icon', 'social_site_icon', __( 'Icon', 'crb' ) ),

Dashicons only:

Field::make( 'icon', 'social_site_icon', __( 'Icon', 'crb' ) )
	->add_dashicons_options(),

Dashicons and Font Awesome:

Field::make( 'icon', 'social_site_icon', __( 'Icon', 'crb' ) )
	->add_dashicons_options()
	->add_fontawesome_options(),

Custom icon list:

Field::make( 'icon', 'social_site_icon', __( 'Icon', 'crb' ) )
	->set_options( array(
		// Minimal settings:
		'my-custom-icon-1' => array(
			'name' => __( 'My Custom Icon 1' ),
			'icon' => get_template_directory() . '/icons/my-custom-icon-1.svg',
		),

		// Full settings:
		'my-custom-icon-2' => array(
			'name'         => __( 'My Custom Icon 2' ),
			'icon'         => get_template_directory() . '/icons/my-custom-icon-2.svg',
			'id'           => 'my-custom-icon-2',
			'class'        => 'my-custom-prefix-class',
			'search_terms' => array( 'shop', 'checkout', 'product' ),
		),
	) ),

Custom icon list (using providers):

class Custom_Icon_Provider implements Carbon_Field_Icon\Providers\Icon_Provider_Interface {
	public function parse_options() {
		return array(
			// Minimal settings:
			'custom-icon-1' => array(
				'name' => __( 'Custom Icon 1' ),
				'icon' => get_template_directory() . '/icons/custom-icon-1.svg',
			),

			// Full settings:
			'custom-icon-2' => array(
				'name'         => __( 'Custom Icon 2' ),
				'icon'         => get_template_directory() . '/icons/custom-icon-2.svg',
				'id'           => 'custom-icon-2',
				'class'        => 'custom-prefix-class',
				'search_terms' => array( 'shop', 'checkout', 'product' ),
			),
		);
	}
}

add_action( 'carbon_fields_icon_field_loaded', 'crb_register_custom_icon_field_provider' );
function crb_register_custom_icon_field_provider() {
	$provider_id = 'custom';

	\Carbon_Fields\Carbon_Fields::instance()->ioc['icon_field_providers'][ $provider_id ] = function( $container ) {
		return new Custom_Icon_Provider();
	};

	\Carbon_Field_Icon\Icon_Field::add_provider( [ $provider_id ] );
}

Container::make( 'theme_options', __( 'Theme Options', 'crb' ) )
	->set_page_file( 'crbn-theme-options.php' )
	->add_fields( array(
		Field::make( 'icon', 'crb_custom_icon', __( 'Choose Custom Icon', 'crb' ) )
			->add_provider_options( 'custom' ),
	) );

htmlburger/carbon-field-icon 适用场景与选型建议

htmlburger/carbon-field-icon 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 9.04k 次下载、GitHub Stars 达 19, 最近一次更新时间为 2016 年 12 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「wordpress」 「carbon-field」 「carbon-field-icon」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 htmlburger/carbon-field-icon 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 htmlburger/carbon-field-icon 我们能提供哪些服务?
定制开发 / 二次开发

基于 htmlburger/carbon-field-icon 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 19
  • Watchers: 7
  • Forks: 13
  • 开发语言: JavaScript

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2016-12-16