| 1 |
<?php |
| 2 |
|
| 3 |
namespace WPDeveloper\BetterDocs\Admin\Customizer\Controls; |
| 4 |
|
| 5 |
use WP_Customize_Control; |
| 6 |
|
| 7 |
class AlphaColorControl extends WP_Customize_Control { |
| 8 |
/** |
| 9 |
* Control name. |
| 10 |
* @var string |
| 11 |
*/ |
| 12 |
public $type = 'betterdocs-alpha-color'; |
| 13 |
|
| 14 |
/** |
| 15 |
* Add support for palettes to be passed in. |
| 16 |
* |
| 17 |
* Supported palette values are true, false, or an array of RGBa and Hex colors. |
| 18 |
* |
| 19 |
* @var bool |
| 20 |
*/ |
| 21 |
public $palette; |
| 22 |
|
| 23 |
/** |
| 24 |
* Add support for showing the opacity value on the slider handle. |
| 25 |
* |
| 26 |
* @var array |
| 27 |
*/ |
| 28 |
public $show_opacity; |
| 29 |
|
| 30 |
/** |
| 31 |
* Enqueue scripts/styles. |
| 32 |
* |
| 33 |
* @since 1.0.0 |
| 34 |
*/ |
| 35 |
public function enqueue() { |
| 36 |
betterdocs()->assets->enqueue( |
| 37 |
'betterdocs-customizer-alpha-color-picker', |
| 38 |
'customizer/js/alpha-color-picker.js', |
| 39 |
[ 'jquery', 'wp-color-picker' ] |
| 40 |
); |
| 41 |
betterdocs()->assets->enqueue( |
| 42 |
'betterdocs-customizer-alpha-color-picker', |
| 43 |
'customizer/css/alpha-color-picker.css', |
| 44 |
[ 'wp-color-picker' ] |
| 45 |
); |
| 46 |
} |
| 47 |
|
| 48 |
/** |
| 49 |
* Render the control's content. |
| 50 |
* |
| 51 |
* @version 1.0.0 |
| 52 |
*/ |
| 53 |
public function render_content() { |
| 54 |
betterdocs()->views->get( 'admin/customizer/controls/alpha-color', [ 'control' => $this ] ); |
| 55 |
} |
| 56 |
} |
| 57 |
|