Init.php
48 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Init the Kirki input slider package. |
| 4 | * |
| 5 | * @package kirki-input-slider |
| 6 | * @since 1.0.0 |
| 7 | */ |
| 8 | |
| 9 | namespace Kirki\InputSlider; |
| 10 | |
| 11 | if ( ! defined( 'ABSPATH' ) ) { |
| 12 | exit; |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * Manage the tabs package. |
| 17 | * |
| 18 | * @since 1.0.0 |
| 19 | */ |
| 20 | class Init { |
| 21 | |
| 22 | /** |
| 23 | * The class constructor. |
| 24 | * |
| 25 | * @since 1.0.0 |
| 26 | */ |
| 27 | public function __construct() { |
| 28 | |
| 29 | add_filter( 'kirki_control_types', [ $this, 'control_type' ] ); |
| 30 | |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * The control type. |
| 35 | * |
| 36 | * @since 1.0.0 |
| 37 | * |
| 38 | * @param array $control_types The existing control types. |
| 39 | */ |
| 40 | public function control_type( $control_types ) { |
| 41 | |
| 42 | $control_types['kirki-input-slider'] = 'Kirki\Control\InputSlider'; |
| 43 | |
| 44 | return $control_types; |
| 45 | |
| 46 | } |
| 47 | |
| 48 | } |