HEX
Server: Apache/2.4.65 (Debian)
System: Linux srv39710 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.4.11
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: /var/www/www-root/data/www/beartz.com/wp-content/themes/blogboost/assets/js/customizer-admin.js
(function (api) {
    api.sectionConstructor["upsell"] = api.Section.extend({
        // No events for this type of section.
        attachEvents: function () {
        },

        // Always make the section active.
        isContextuallyActive: function () {
            return true;
        },
    });
})(wp.customize);

// document.addEventListener('DOMContentLoaded', function () {
//     // MultiCheckbox
//     let checkboxes = document.querySelectorAll('.customize-control-checkbox-multiple input[type="checkbox"]');
//     checkboxes.forEach(checkbox => {
//         checkbox.addEventListener("change", function () {
//             let parentControl = this.closest(".customize-control"),
//                 checkbox_values = Array.from(parentControl.querySelectorAll('input[type="checkbox"]:checked')).map(checkbox => checkbox.value).join(",");
//             parentControl.querySelector('input[type="hidden"]').value = checkbox_values;
//             parentControl.querySelector('input[type="hidden"]').dispatchEvent(new Event("change"));
//         });
//     });
// });
jQuery(document).ready(function ($) {
    // MultiCheckbox
    jQuery('.customize-control-checkbox-multiple input[type="checkbox"]').on(
        "change",
        function () {
            let checkbox_values = jQuery(this)
                .parents(".customize-control")
                .find('input[type="checkbox"]:checked')
                .map(function () {
                    return this.value;
                })
                .get()
                .join(",");

            jQuery(this)
                .parents(".customize-control")
                .find('input[type="hidden"]')
                .val(checkbox_values)
                .trigger("change");
        }
    );
});