seothemes/rgba-customizer-control

用于替换标准WordPress颜色选择器的直接替换品。

dev-master 2018-07-12 05:20 UTC

This package is auto-updated.

Last update: 2024-09-26 15:24:23 UTC


README

这是一个由https://github.com/BraadMartin/components派生的分支,它已被转换为Composer包。

安装

composer require seothemes/rgba-customizer-control

设置

RGBA Customizer Control 使用 PSR-4 自动加载。

要在您的主题或插件中使用,请使用以下命名空间

use SEOThemes\RgbaCustomizerControl\RgbaCustomizerControl;

一旦导入命名空间,您就可以直接调用类

new RgbaCustomizerControl;

示例

$wp_customize->add_control(
	new RgbaCustomizerControl (
		$wp_customize,
		$setting,
		array(
			'section'      => 'colors',
			'label'        => $label,
			'settings'     => $setting,
			'show_opacity' => true,
			'palette'      => true,
		)
	)
);