mirror of
https://ghproxy.net/https://github.com/AlxMedia/curver.git
synced 2025-08-28 09:25:45 +08:00
Initial commit
This commit is contained in:
commit
ee50200fe7
353 changed files with 78977 additions and 0 deletions
42
functions/kirki/field/class-kirki-field-preset.php
Normal file
42
functions/kirki/field/class-kirki-field-preset.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* Override field methods
|
||||
*
|
||||
* @package Kirki
|
||||
* @subpackage Controls
|
||||
* @copyright Copyright (c) 2017, Aristeides Stathopoulos
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
* @since 2.2.7
|
||||
*/
|
||||
|
||||
/**
|
||||
* Field overrides.
|
||||
*/
|
||||
class Kirki_Field_Preset extends Kirki_Field_Select {
|
||||
|
||||
/**
|
||||
* Sets the control type.
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
protected function set_type() {
|
||||
$this->type = 'kirki-select';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the preset.
|
||||
*
|
||||
* @access protected
|
||||
* @since 3.0.28
|
||||
*/
|
||||
protected function set_preset() {
|
||||
|
||||
// Set preset from the choices.
|
||||
$this->preset = $this->choices;
|
||||
|
||||
// We're using a flat select.
|
||||
foreach ( $this->choices as $key => $args ) {
|
||||
$this->choices[ $key ] = $args['label'];
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue