get_settings_for_display(); $slides_per_view = !empty($settings['slides_per_view']) ? $settings['slides_per_view'] : 1; $slides_per_view_tablet = isset($settings['slides_per_view_tablet']) ? $settings['slides_per_view_tablet'] : 1; $slides_per_view_mobile = isset($settings['slides_per_view_mobile']) ? $settings['slides_per_view_mobile'] : 1; $loop = $settings['slider_loop'] === 'yes' ? true : false; $autoplay = $settings['slider_autoplay'] === 'yes' ? ['delay' => 6000, 'disableOnInteraction' => false] : false; $arrows = $settings['show_arrows'] === 'yes' ? true : false; $pagination = $settings['show_pagination'] === 'yes' ? true : false; // Combine all the settings into a single JSON string $slider_settings = json_encode([ 'slidesPerView' => $slides_per_view, 'slidesPerViewTablet' => $slides_per_view_tablet, 'slidesPerViewMobile' => $slides_per_view_mobile, 'loop' => $loop, 'autoplay' => $autoplay, 'arrows' => $arrows, 'pagination' => $pagination, ]); // Create a unique ID for the slider instance $unique_id = $this->get_id(); ?>