run:R W Run
1.25 KB
2026-03-11 16:18:52
R W Run
639 By
2026-03-11 16:18:52
R W Run
2.26 KB
2026-03-11 16:18:52
R W Run
3.13 KB
2026-03-11 16:18:52
R W Run
1.42 KB
2026-03-11 16:18:52
R W Run
5.16 KB
2026-03-11 16:18:52
R W Run
9.22 KB
2026-03-11 16:18:52
R W Run
588 By
2026-03-11 16:18:52
R W Run
7.84 KB
2026-03-11 16:18:52
R W Run
1.74 KB
2026-03-11 16:18:52
R W Run
1.18 KB
2026-03-11 16:18:52
R W Run
9.18 KB
2026-03-11 16:18:52
R W Run
1.1 KB
2026-03-11 16:18:52
R W Run
2.08 KB
2026-03-11 16:18:52
R W Run
7.97 KB
2026-03-11 16:18:52
R W Run
27.22 KB
2026-03-11 16:18:52
R W Run
2.25 KB
2026-03-11 16:18:52
R W Run
2.75 KB
2026-03-11 16:18:52
R W Run
1.1 KB
2026-03-11 16:18:52
R W Run
716 By
2026-03-11 16:18:52
R W Run
18.49 KB
2026-03-11 16:18:52
R W Run
3.23 KB
2026-03-11 16:18:52
R W Run
1.67 KB
2026-03-11 16:18:52
R W Run
1.65 KB
2026-03-11 16:18:52
R W Run
10.32 KB
2026-03-11 16:18:52
R W Run
13.52 KB
2026-03-11 16:18:52
R W Run
1.03 KB
2026-03-11 16:18:52
R W Run
5.04 KB
2026-03-11 16:18:52
R W Run
11.61 KB
2026-03-11 16:18:52
R W Run
3.31 KB
2026-03-11 16:18:52
R W Run
6.79 KB
2026-03-11 16:18:52
R W Run
1.17 KB
2026-03-11 16:18:52
R W Run
686 By
2026-03-11 16:18:52
R W Run
1.68 KB
2026-03-11 16:18:52
R W Run
2.58 KB
2026-03-11 16:18:52
R W Run
error_log
📄class-wp-customize-color-control.php
1<?php
2/**
3 * Customize API: WP_Customize_Color_Control class
4 *
5 * @package WordPress
6 * @subpackage Customize
7 * @since 4.4.0
8 */
9
10/**
11 * Customize Color Control class.
12 *
13 * @since 3.4.0
14 *
15 * @see WP_Customize_Control
16 */
17class WP_Customize_Color_Control extends WP_Customize_Control {
18 /**
19 * Type.
20 *
21 * @var string
22 */
23 public $type = 'color';
24
25 /**
26 * Statuses.
27 *
28 * @var array
29 */
30 public $statuses;
31
32 /**
33 * Mode.
34 *
35 * @since 4.7.0
36 * @var string
37 */
38 public $mode = 'full';
39
40 /**
41 * Constructor.
42 *
43 * @since 3.4.0
44 *
45 * @see WP_Customize_Control::__construct()
46 *
47 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
48 * @param string $id Control ID.
49 * @param array $args Optional. Arguments to override class property defaults.
50 * See WP_Customize_Control::__construct() for information
51 * on accepted arguments. Default empty array.
52 */
53 public function __construct( $manager, $id, $args = array() ) {
54 $this->statuses = array( '' => __( 'Default' ) );
55 parent::__construct( $manager, $id, $args );
56 }
57
58 /**
59 * Enqueue scripts/styles for the color picker.
60 *
61 * @since 3.4.0
62 */
63 public function enqueue() {
64 wp_enqueue_script( 'wp-color-picker' );
65 wp_enqueue_style( 'wp-color-picker' );
66 }
67
68 /**
69 * Refresh the parameters passed to the JavaScript via JSON.
70 *
71 * @since 3.4.0
72 * @uses WP_Customize_Control::to_json()
73 */
74 public function to_json() {
75 parent::to_json();
76 $this->json['statuses'] = $this->statuses;
77 $this->json['defaultValue'] = $this->setting->default;
78 $this->json['mode'] = $this->mode;
79 }
80
81 /**
82 * Don't render the control content from PHP, as it's rendered via JS on load.
83 *
84 * @since 3.4.0
85 */
86 public function render_content() {}
87
88 /**
89 * Render a JS template for the content of the color picker control.
90 *
91 * @since 4.1.0
92 */
93 public function content_template() {
94 ?>
95 <#
96 var defaultValue = '#RRGGBB',
97 defaultValueAttr = '',
98 inputId = _.uniqueId( 'customize-color-control-input-' ),
99 isHueSlider = data.mode === 'hue';
100
101 if ( data.defaultValue && _.isString( data.defaultValue ) && ! isHueSlider ) {
102 if ( '#' !== data.defaultValue.substring( 0, 1 ) ) {
103 defaultValue = '#' + data.defaultValue;
104 } else {
105 defaultValue = data.defaultValue;
106 }
107 defaultValueAttr = ' data-default-color=' + defaultValue; // Quotes added automatically.
108 }
109 #>
110 <# if ( data.label ) { #>
111 <span class="customize-control-title">{{{ data.label }}}</span>
112 <# } #>
113 <# if ( data.description ) { #>
114 <span class="description customize-control-description">{{{ data.description }}}</span>
115 <# } #>
116 <div class="customize-control-content">
117 <label for="{{ inputId }}"><span class="screen-reader-text">{{{ data.label }}}</span></label>
118 <# if ( isHueSlider ) { #>
119 <input id="{{ inputId }}" class="color-picker-hue" type="number" min="1" max="359" data-type="hue" />
120 <# } else { #>
121 <input id="{{ inputId }}" class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} />
122 <# } #>
123 </div>
124 <?php
125 }
126}
127
Ui Ux Design – Teachers Night Out

Get in Touch

© 2024 Teachers Night Out. All Rights Reserved.