Edit File by line
/home/zeestwma/redstone.../wp-inclu...
File: class-wp-customize-control.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WordPress Customize Control classes
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Customize
[5] Fix | Delete
* @since 3.4.0
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
// Don't load directly.
[9] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[10] Fix | Delete
die( '-1' );
[11] Fix | Delete
}
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* Customize Control class.
[15] Fix | Delete
*
[16] Fix | Delete
* @since 3.4.0
[17] Fix | Delete
*/
[18] Fix | Delete
#[AllowDynamicProperties]
[19] Fix | Delete
class WP_Customize_Control {
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* Incremented with each new class instantiation, then stored in $instance_number.
[23] Fix | Delete
*
[24] Fix | Delete
* Used when sorting two instances whose priorities are equal.
[25] Fix | Delete
*
[26] Fix | Delete
* @since 4.1.0
[27] Fix | Delete
* @var int
[28] Fix | Delete
*/
[29] Fix | Delete
protected static $instance_count = 0;
[30] Fix | Delete
[31] Fix | Delete
/**
[32] Fix | Delete
* Order in which this instance was created in relation to other instances.
[33] Fix | Delete
*
[34] Fix | Delete
* @since 4.1.0
[35] Fix | Delete
* @var int
[36] Fix | Delete
*/
[37] Fix | Delete
public $instance_number;
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Customizer manager.
[41] Fix | Delete
*
[42] Fix | Delete
* @since 3.4.0
[43] Fix | Delete
* @var WP_Customize_Manager
[44] Fix | Delete
*/
[45] Fix | Delete
public $manager;
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Control ID.
[49] Fix | Delete
*
[50] Fix | Delete
* @since 3.4.0
[51] Fix | Delete
* @var string
[52] Fix | Delete
*/
[53] Fix | Delete
public $id;
[54] Fix | Delete
[55] Fix | Delete
/**
[56] Fix | Delete
* All settings tied to the control.
[57] Fix | Delete
*
[58] Fix | Delete
* @since 3.4.0
[59] Fix | Delete
* @var array
[60] Fix | Delete
*/
[61] Fix | Delete
public $settings;
[62] Fix | Delete
[63] Fix | Delete
/**
[64] Fix | Delete
* The primary setting for the control (if there is one).
[65] Fix | Delete
*
[66] Fix | Delete
* @since 3.4.0
[67] Fix | Delete
* @var string|WP_Customize_Setting|null
[68] Fix | Delete
*/
[69] Fix | Delete
public $setting = 'default';
[70] Fix | Delete
[71] Fix | Delete
/**
[72] Fix | Delete
* Capability required to use this control.
[73] Fix | Delete
*
[74] Fix | Delete
* Normally this is empty and the capability is derived from the capabilities
[75] Fix | Delete
* of the associated `$settings`.
[76] Fix | Delete
*
[77] Fix | Delete
* @since 4.5.0
[78] Fix | Delete
* @var string
[79] Fix | Delete
*/
[80] Fix | Delete
public $capability;
[81] Fix | Delete
[82] Fix | Delete
/**
[83] Fix | Delete
* Order priority to load the control in Customizer.
[84] Fix | Delete
*
[85] Fix | Delete
* @since 3.4.0
[86] Fix | Delete
* @var int
[87] Fix | Delete
*/
[88] Fix | Delete
public $priority = 10;
[89] Fix | Delete
[90] Fix | Delete
/**
[91] Fix | Delete
* Section the control belongs to.
[92] Fix | Delete
*
[93] Fix | Delete
* @since 3.4.0
[94] Fix | Delete
* @var string
[95] Fix | Delete
*/
[96] Fix | Delete
public $section = '';
[97] Fix | Delete
[98] Fix | Delete
/**
[99] Fix | Delete
* Label for the control.
[100] Fix | Delete
*
[101] Fix | Delete
* @since 3.4.0
[102] Fix | Delete
* @var string
[103] Fix | Delete
*/
[104] Fix | Delete
public $label = '';
[105] Fix | Delete
[106] Fix | Delete
/**
[107] Fix | Delete
* Description for the control.
[108] Fix | Delete
*
[109] Fix | Delete
* @since 4.0.0
[110] Fix | Delete
* @var string
[111] Fix | Delete
*/
[112] Fix | Delete
public $description = '';
[113] Fix | Delete
[114] Fix | Delete
/**
[115] Fix | Delete
* List of choices for 'radio' or 'select' type controls, where values are the keys, and labels are the values.
[116] Fix | Delete
*
[117] Fix | Delete
* @since 3.4.0
[118] Fix | Delete
* @var array
[119] Fix | Delete
*/
[120] Fix | Delete
public $choices = array();
[121] Fix | Delete
[122] Fix | Delete
/**
[123] Fix | Delete
* List of custom input attributes for control output, where attribute names are the keys and values are the values.
[124] Fix | Delete
*
[125] Fix | Delete
* Not used for 'checkbox', 'radio', 'select', or 'dropdown-pages' control types.
[126] Fix | Delete
*
[127] Fix | Delete
* @since 4.0.0
[128] Fix | Delete
* @var array
[129] Fix | Delete
*/
[130] Fix | Delete
public $input_attrs = array();
[131] Fix | Delete
[132] Fix | Delete
/**
[133] Fix | Delete
* Show UI for adding new content, currently only used for the dropdown-pages control.
[134] Fix | Delete
*
[135] Fix | Delete
* @since 4.7.0
[136] Fix | Delete
* @var bool
[137] Fix | Delete
*/
[138] Fix | Delete
public $allow_addition = false;
[139] Fix | Delete
[140] Fix | Delete
/**
[141] Fix | Delete
* @deprecated It is better to just call the json() method
[142] Fix | Delete
* @since 3.4.0
[143] Fix | Delete
* @var array
[144] Fix | Delete
*/
[145] Fix | Delete
public $json = array();
[146] Fix | Delete
[147] Fix | Delete
/**
[148] Fix | Delete
* Control's Type.
[149] Fix | Delete
*
[150] Fix | Delete
* @since 3.4.0
[151] Fix | Delete
* @var string
[152] Fix | Delete
*/
[153] Fix | Delete
public $type = 'text';
[154] Fix | Delete
[155] Fix | Delete
/**
[156] Fix | Delete
* Callback.
[157] Fix | Delete
*
[158] Fix | Delete
* @since 4.0.0
[159] Fix | Delete
*
[160] Fix | Delete
* @see WP_Customize_Control::active()
[161] Fix | Delete
*
[162] Fix | Delete
* @var callable Callback is called with one argument, the instance of
[163] Fix | Delete
* WP_Customize_Control, and returns bool to indicate whether
[164] Fix | Delete
* the control is active (such as it relates to the URL
[165] Fix | Delete
* currently being previewed).
[166] Fix | Delete
*/
[167] Fix | Delete
public $active_callback = '';
[168] Fix | Delete
[169] Fix | Delete
/**
[170] Fix | Delete
* Constructor.
[171] Fix | Delete
*
[172] Fix | Delete
* Supplied `$args` override class property defaults.
[173] Fix | Delete
*
[174] Fix | Delete
* If `$args['settings']` is not defined, use the `$id` as the setting ID.
[175] Fix | Delete
*
[176] Fix | Delete
* @since 3.4.0
[177] Fix | Delete
*
[178] Fix | Delete
* @param WP_Customize_Manager $manager Customizer bootstrap instance.
[179] Fix | Delete
* @param string $id Control ID.
[180] Fix | Delete
* @param array $args {
[181] Fix | Delete
* Optional. Array of properties for the new Control object. Default empty array.
[182] Fix | Delete
*
[183] Fix | Delete
* @type int $instance_number Order in which this instance was created in relation
[184] Fix | Delete
* to other instances.
[185] Fix | Delete
* @type WP_Customize_Manager $manager Customizer bootstrap instance.
[186] Fix | Delete
* @type string $id Control ID.
[187] Fix | Delete
* @type array $settings All settings tied to the control. If undefined, `$id` will
[188] Fix | Delete
* be used.
[189] Fix | Delete
* @type string $setting The primary setting for the control (if there is one).
[190] Fix | Delete
* Default 'default'.
[191] Fix | Delete
* @type string $capability Capability required to use this control. Normally this is empty
[192] Fix | Delete
* and the capability is derived from `$settings`.
[193] Fix | Delete
* @type int $priority Order priority to load the control. Default 10.
[194] Fix | Delete
* @type string $section Section the control belongs to. Default empty.
[195] Fix | Delete
* @type string $label Label for the control. Default empty.
[196] Fix | Delete
* @type string $description Description for the control. Default empty.
[197] Fix | Delete
* @type array $choices List of choices for 'radio' or 'select' type controls, where
[198] Fix | Delete
* values are the keys, and labels are the values.
[199] Fix | Delete
* Default empty array.
[200] Fix | Delete
* @type array $input_attrs List of custom input attributes for control output, where
[201] Fix | Delete
* attribute names are the keys and values are the values. Not
[202] Fix | Delete
* used for 'checkbox', 'radio', 'select', or 'dropdown-pages'
[203] Fix | Delete
* control types. Default empty array.
[204] Fix | Delete
* @type bool $allow_addition Show UI for adding new content, currently only used for the
[205] Fix | Delete
* dropdown-pages control. Default false.
[206] Fix | Delete
* @type array $json Deprecated. Use WP_Customize_Control::json() instead.
[207] Fix | Delete
* @type string $type Control type. Core controls include 'text', 'checkbox',
[208] Fix | Delete
* 'textarea', 'radio', 'select', and 'dropdown-pages'. Additional
[209] Fix | Delete
* input types such as 'email', 'url', 'number', 'hidden', and
[210] Fix | Delete
* 'date' are supported implicitly. Default 'text'.
[211] Fix | Delete
* @type callable $active_callback Active callback.
[212] Fix | Delete
* }
[213] Fix | Delete
*/
[214] Fix | Delete
public function __construct( $manager, $id, $args = array() ) {
[215] Fix | Delete
$keys = array_keys( get_object_vars( $this ) );
[216] Fix | Delete
foreach ( $keys as $key ) {
[217] Fix | Delete
if ( isset( $args[ $key ] ) ) {
[218] Fix | Delete
$this->$key = $args[ $key ];
[219] Fix | Delete
}
[220] Fix | Delete
}
[221] Fix | Delete
[222] Fix | Delete
$this->manager = $manager;
[223] Fix | Delete
$this->id = $id;
[224] Fix | Delete
if ( empty( $this->active_callback ) ) {
[225] Fix | Delete
$this->active_callback = array( $this, 'active_callback' );
[226] Fix | Delete
}
[227] Fix | Delete
self::$instance_count += 1;
[228] Fix | Delete
$this->instance_number = self::$instance_count;
[229] Fix | Delete
[230] Fix | Delete
// Process settings.
[231] Fix | Delete
if ( ! isset( $this->settings ) ) {
[232] Fix | Delete
$this->settings = $id;
[233] Fix | Delete
}
[234] Fix | Delete
[235] Fix | Delete
$settings = array();
[236] Fix | Delete
if ( is_array( $this->settings ) ) {
[237] Fix | Delete
foreach ( $this->settings as $key => $setting ) {
[238] Fix | Delete
$settings[ $key ] = $this->manager->get_setting( $setting );
[239] Fix | Delete
}
[240] Fix | Delete
} elseif ( is_string( $this->settings ) ) {
[241] Fix | Delete
$this->setting = $this->manager->get_setting( $this->settings );
[242] Fix | Delete
$settings['default'] = $this->setting;
[243] Fix | Delete
}
[244] Fix | Delete
$this->settings = $settings;
[245] Fix | Delete
}
[246] Fix | Delete
[247] Fix | Delete
/**
[248] Fix | Delete
* Enqueues control related scripts/styles.
[249] Fix | Delete
*
[250] Fix | Delete
* @since 3.4.0
[251] Fix | Delete
*/
[252] Fix | Delete
public function enqueue() {}
[253] Fix | Delete
[254] Fix | Delete
/**
[255] Fix | Delete
* Checks whether control is active to current Customizer preview.
[256] Fix | Delete
*
[257] Fix | Delete
* @since 4.0.0
[258] Fix | Delete
*
[259] Fix | Delete
* @return bool Whether the control is active to the current preview.
[260] Fix | Delete
*/
[261] Fix | Delete
final public function active() {
[262] Fix | Delete
$control = $this;
[263] Fix | Delete
$active = call_user_func( $this->active_callback, $this );
[264] Fix | Delete
[265] Fix | Delete
/**
[266] Fix | Delete
* Filters response of WP_Customize_Control::active().
[267] Fix | Delete
*
[268] Fix | Delete
* @since 4.0.0
[269] Fix | Delete
*
[270] Fix | Delete
* @param bool $active Whether the Customizer control is active.
[271] Fix | Delete
* @param WP_Customize_Control $control WP_Customize_Control instance.
[272] Fix | Delete
*/
[273] Fix | Delete
$active = apply_filters( 'customize_control_active', $active, $control );
[274] Fix | Delete
[275] Fix | Delete
return $active;
[276] Fix | Delete
}
[277] Fix | Delete
[278] Fix | Delete
/**
[279] Fix | Delete
* Default callback used when invoking WP_Customize_Control::active().
[280] Fix | Delete
*
[281] Fix | Delete
* Subclasses can override this with their specific logic, or they may
[282] Fix | Delete
* provide an 'active_callback' argument to the constructor.
[283] Fix | Delete
*
[284] Fix | Delete
* @since 4.0.0
[285] Fix | Delete
*
[286] Fix | Delete
* @return true Always true.
[287] Fix | Delete
*/
[288] Fix | Delete
public function active_callback() {
[289] Fix | Delete
return true;
[290] Fix | Delete
}
[291] Fix | Delete
[292] Fix | Delete
/**
[293] Fix | Delete
* Fetches a setting's value.
[294] Fix | Delete
* Grabs the main setting by default.
[295] Fix | Delete
*
[296] Fix | Delete
* @since 3.4.0
[297] Fix | Delete
*
[298] Fix | Delete
* @param string $setting_key
[299] Fix | Delete
* @return mixed The requested setting's value, if the setting exists.
[300] Fix | Delete
*/
[301] Fix | Delete
final public function value( $setting_key = 'default' ) {
[302] Fix | Delete
if ( isset( $this->settings[ $setting_key ] ) ) {
[303] Fix | Delete
return $this->settings[ $setting_key ]->value();
[304] Fix | Delete
}
[305] Fix | Delete
}
[306] Fix | Delete
[307] Fix | Delete
/**
[308] Fix | Delete
* Refreshes the parameters passed to the JavaScript via JSON.
[309] Fix | Delete
*
[310] Fix | Delete
* @since 3.4.0
[311] Fix | Delete
*/
[312] Fix | Delete
public function to_json() {
[313] Fix | Delete
$this->json['settings'] = array();
[314] Fix | Delete
foreach ( $this->settings as $key => $setting ) {
[315] Fix | Delete
$this->json['settings'][ $key ] = $setting->id;
[316] Fix | Delete
}
[317] Fix | Delete
[318] Fix | Delete
$this->json['type'] = $this->type;
[319] Fix | Delete
$this->json['priority'] = $this->priority;
[320] Fix | Delete
$this->json['active'] = $this->active();
[321] Fix | Delete
$this->json['section'] = $this->section;
[322] Fix | Delete
$this->json['content'] = $this->get_content();
[323] Fix | Delete
$this->json['label'] = $this->label;
[324] Fix | Delete
$this->json['description'] = $this->description;
[325] Fix | Delete
$this->json['instanceNumber'] = $this->instance_number;
[326] Fix | Delete
[327] Fix | Delete
if ( 'dropdown-pages' === $this->type ) {
[328] Fix | Delete
$this->json['allow_addition'] = $this->allow_addition;
[329] Fix | Delete
}
[330] Fix | Delete
}
[331] Fix | Delete
[332] Fix | Delete
/**
[333] Fix | Delete
* Gets the data to export to the client via JSON.
[334] Fix | Delete
*
[335] Fix | Delete
* @since 4.1.0
[336] Fix | Delete
*
[337] Fix | Delete
* @return array Array of parameters passed to the JavaScript.
[338] Fix | Delete
*/
[339] Fix | Delete
public function json() {
[340] Fix | Delete
$this->to_json();
[341] Fix | Delete
return $this->json;
[342] Fix | Delete
}
[343] Fix | Delete
[344] Fix | Delete
/**
[345] Fix | Delete
* Checks if the user can use this control.
[346] Fix | Delete
*
[347] Fix | Delete
* Returns false if the user cannot manipulate one of the associated settings,
[348] Fix | Delete
* or if one of the associated settings does not exist. Also returns false if
[349] Fix | Delete
* the associated section does not exist or if its capability check returns
[350] Fix | Delete
* false.
[351] Fix | Delete
*
[352] Fix | Delete
* @since 3.4.0
[353] Fix | Delete
*
[354] Fix | Delete
* @return bool False if theme doesn't support the control or user doesn't have the required permissions, otherwise true.
[355] Fix | Delete
*/
[356] Fix | Delete
final public function check_capabilities() {
[357] Fix | Delete
if ( ! empty( $this->capability ) && ! current_user_can( $this->capability ) ) {
[358] Fix | Delete
return false;
[359] Fix | Delete
}
[360] Fix | Delete
[361] Fix | Delete
foreach ( $this->settings as $setting ) {
[362] Fix | Delete
if ( ! $setting || ! $setting->check_capabilities() ) {
[363] Fix | Delete
return false;
[364] Fix | Delete
}
[365] Fix | Delete
}
[366] Fix | Delete
[367] Fix | Delete
$section = $this->manager->get_section( $this->section );
[368] Fix | Delete
if ( isset( $section ) && ! $section->check_capabilities() ) {
[369] Fix | Delete
return false;
[370] Fix | Delete
}
[371] Fix | Delete
[372] Fix | Delete
return true;
[373] Fix | Delete
}
[374] Fix | Delete
[375] Fix | Delete
/**
[376] Fix | Delete
* Gets the control's content for insertion into the Customizer pane.
[377] Fix | Delete
*
[378] Fix | Delete
* @since 4.1.0
[379] Fix | Delete
*
[380] Fix | Delete
* @return string Contents of the control.
[381] Fix | Delete
*/
[382] Fix | Delete
final public function get_content() {
[383] Fix | Delete
ob_start();
[384] Fix | Delete
$this->maybe_render();
[385] Fix | Delete
return trim( ob_get_clean() );
[386] Fix | Delete
}
[387] Fix | Delete
[388] Fix | Delete
/**
[389] Fix | Delete
* Checks capabilities and render the control.
[390] Fix | Delete
*
[391] Fix | Delete
* @since 3.4.0
[392] Fix | Delete
* @uses WP_Customize_Control::render()
[393] Fix | Delete
*/
[394] Fix | Delete
final public function maybe_render() {
[395] Fix | Delete
if ( ! $this->check_capabilities() ) {
[396] Fix | Delete
return;
[397] Fix | Delete
}
[398] Fix | Delete
[399] Fix | Delete
/**
[400] Fix | Delete
* Fires just before the current Customizer control is rendered.
[401] Fix | Delete
*
[402] Fix | Delete
* @since 3.4.0
[403] Fix | Delete
*
[404] Fix | Delete
* @param WP_Customize_Control $control WP_Customize_Control instance.
[405] Fix | Delete
*/
[406] Fix | Delete
do_action( 'customize_render_control', $this );
[407] Fix | Delete
[408] Fix | Delete
/**
[409] Fix | Delete
* Fires just before a specific Customizer control is rendered.
[410] Fix | Delete
*
[411] Fix | Delete
* The dynamic portion of the hook name, `$this->id`, refers to
[412] Fix | Delete
* the control ID.
[413] Fix | Delete
*
[414] Fix | Delete
* @since 3.4.0
[415] Fix | Delete
*
[416] Fix | Delete
* @param WP_Customize_Control $control WP_Customize_Control instance.
[417] Fix | Delete
*/
[418] Fix | Delete
do_action( "customize_render_control_{$this->id}", $this );
[419] Fix | Delete
[420] Fix | Delete
$this->render();
[421] Fix | Delete
}
[422] Fix | Delete
[423] Fix | Delete
/**
[424] Fix | Delete
* Renders the control wrapper and calls $this->render_content() for the internals.
[425] Fix | Delete
*
[426] Fix | Delete
* @since 3.4.0
[427] Fix | Delete
*/
[428] Fix | Delete
protected function render() {
[429] Fix | Delete
$id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
[430] Fix | Delete
$class = 'customize-control customize-control-' . $this->type;
[431] Fix | Delete
[432] Fix | Delete
printf( '<li id="%s" class="%s">', esc_attr( $id ), esc_attr( $class ) );
[433] Fix | Delete
$this->render_content();
[434] Fix | Delete
echo '</li>';
[435] Fix | Delete
}
[436] Fix | Delete
[437] Fix | Delete
/**
[438] Fix | Delete
* Gets the data link attribute for a setting.
[439] Fix | Delete
*
[440] Fix | Delete
* @since 3.4.0
[441] Fix | Delete
* @since 4.9.0 Return a `data-customize-setting-key-link` attribute if a setting is not registered for the supplied setting key.
[442] Fix | Delete
*
[443] Fix | Delete
* @param string $setting_key
[444] Fix | Delete
* @return string Data link parameter, a `data-customize-setting-link` attribute if the `$setting_key` refers
[445] Fix | Delete
* to a pre-registered setting, and a `data-customize-setting-key-link` attribute if the setting
[446] Fix | Delete
* is not yet registered.
[447] Fix | Delete
*/
[448] Fix | Delete
public function get_link( $setting_key = 'default' ) {
[449] Fix | Delete
if ( isset( $this->settings[ $setting_key ] ) && $this->settings[ $setting_key ] instanceof WP_Customize_Setting ) {
[450] Fix | Delete
return 'data-customize-setting-link="' . esc_attr( $this->settings[ $setting_key ]->id ) . '"';
[451] Fix | Delete
} else {
[452] Fix | Delete
return 'data-customize-setting-key-link="' . esc_attr( $setting_key ) . '"';
[453] Fix | Delete
}
[454] Fix | Delete
}
[455] Fix | Delete
[456] Fix | Delete
/**
[457] Fix | Delete
* Renders the data link attribute for the control's input element.
[458] Fix | Delete
*
[459] Fix | Delete
* @since 3.4.0
[460] Fix | Delete
* @uses WP_Customize_Control::get_link()
[461] Fix | Delete
*
[462] Fix | Delete
* @param string $setting_key Default 'default'.
[463] Fix | Delete
*/
[464] Fix | Delete
public function link( $setting_key = 'default' ) {
[465] Fix | Delete
echo $this->get_link( $setting_key );
[466] Fix | Delete
}
[467] Fix | Delete
[468] Fix | Delete
/**
[469] Fix | Delete
* Renders the custom attributes for the control's input element.
[470] Fix | Delete
*
[471] Fix | Delete
* @since 4.0.0
[472] Fix | Delete
*/
[473] Fix | Delete
public function input_attrs() {
[474] Fix | Delete
foreach ( $this->input_attrs as $attr => $value ) {
[475] Fix | Delete
echo $attr . '="' . esc_attr( $value ) . '" ';
[476] Fix | Delete
}
[477] Fix | Delete
}
[478] Fix | Delete
[479] Fix | Delete
/**
[480] Fix | Delete
* Renders the control's content.
[481] Fix | Delete
*
[482] Fix | Delete
* Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`.
[483] Fix | Delete
*
[484] Fix | Delete
* Supports basic input types `text`, `checkbox`, `textarea`, `radio`, `select` and `dropdown-pages`.
[485] Fix | Delete
* Additional input types such as `email`, `url`, `number`, `hidden` and `date` are supported implicitly.
[486] Fix | Delete
*
[487] Fix | Delete
* Control content can alternately be rendered in JS. See WP_Customize_Control::print_template().
[488] Fix | Delete
*
[489] Fix | Delete
* @since 3.4.0
[490] Fix | Delete
*/
[491] Fix | Delete
protected function render_content() {
[492] Fix | Delete
$input_id = '_customize-input-' . $this->id;
[493] Fix | Delete
$description_id = '_customize-description-' . $this->id;
[494] Fix | Delete
$describedby_attr = ( ! empty( $this->description ) ) ? ' aria-describedby="' . esc_attr( $description_id ) . '" ' : '';
[495] Fix | Delete
switch ( $this->type ) {
[496] Fix | Delete
case 'checkbox':
[497] Fix | Delete
?>
[498] Fix | Delete
<span class="customize-inside-control-row">
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function