curver/functions/kirki/field/class-kirki-field-dashicons.php

41 lines
779 B
PHP
Raw Normal View History

2019-02-10 20:21:07 +01:00
<?php
/**
* Override field methods
*
* @package Kirki
* @subpackage Controls
2019-02-17 14:28:35 +01:00
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
2020-02-25 18:04:54 +01:00
* @license https://opensource.org/licenses/MIT
2019-02-10 20:21:07 +01:00
* @since 2.2.7
*/
/**
* Field overrides.
*/
class Kirki_Field_Dashicons extends Kirki_Field {
/**
* Sets the control type.
*
* @access protected
*/
protected function set_type() {
$this->type = 'kirki-dashicons';
}
/**
* Sets the $sanitize_callback
*
* @access protected
*/
protected function set_sanitize_callback() {
// If a custom sanitize_callback has been defined,
// then we don't need to proceed any further.
if ( ! empty( $this->sanitize_callback ) ) {
return;
}
$this->sanitize_callback = 'sanitize_text_field';
}
}