wplemon/control-wcag-auto-textcolor

Gridd主题免费版本的文本颜色控制。Kirki框架(v4.0 API)的插件。

安装: 37

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 6

语言:JavaScript

v0.5 2020-07-24 12:19 UTC

README

示例

new \WPLemon\Field\WCAGTextColor( [
	'settings'    => 'my_setting',
	'label'       => esc_html__( 'My Color Control', 'textdomain' ),
	'description' => esc_html__( 'A description here.', 'textdomain' ),
	'section'     => 'my_section',
	'default'     => '',
	'transport'   => 'postMessage',
	'choices'     => [
		'formComponent'   => 'ChromePicker',
		'backgroundColor' => 'test_accessible_textcolor_control_background', // setting-name or hardcoded color.
		'textColor'       => 'test_accessible_textcolor_control', // setting-name or hardcoded color.
		'show'            => [
			'auto'        => false,
			'recommended' => false,
			'custom'      => true,
		],
	],
	'sanitize_callback' => 'sanitize_text_field',
] );