mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +00:00
Customize: Add hue-only mode to color picker.
The color control in the customizer can use the new mode by supplying the `mode` param with `hue` (as opposed to the new default `full` value). New control replaces the `range` control in Twenty Seventeen for `colorscheme_hue`. The `wpColorPicker` can opt for hue-only mode via supplying `hue` as the `type` option. Iris Color Picker is updated from v1.0.7 to v1.1.0-beta. Props mattwiebe, celloexpressions. Fixes #38263. git-svn-id: https://develop.svn.wordpress.org/trunk@38931 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -44,20 +44,11 @@ function twentyseventeen_customize_register( $wp_customize ) {
|
||||
'priority' => 5,
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'colorscheme_hue', array(
|
||||
'type' => 'range',
|
||||
'input_attrs' => array(
|
||||
'min' => 0,
|
||||
'max' => 359,
|
||||
'step' => 1,
|
||||
),
|
||||
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'colorscheme_hue', array(
|
||||
'mode' => 'hue',
|
||||
'section' => 'colors',
|
||||
'priority' => 6,
|
||||
'description' => 'Temporary hue slider will be replaced with a visual hue picker that is only shown when a custom scheme is selected', // temporary, intentionally untranslated.
|
||||
// @todo change this to a visual hue picker control, ideally extending the color control and leveraging iris by adding a `hue` mode in core.
|
||||
// See https://core.trac.wordpress.org/ticket/38263
|
||||
// @todo only show this control when the colorscheme is custom.
|
||||
) );
|
||||
) ) );
|
||||
|
||||
/**
|
||||
* Add the Theme Options section.
|
||||
|
||||
Reference in New Issue
Block a user