HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux sa-dev.otherchirps.net 5.15.0-139-generic #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025 x86_64
User: www-data (33)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wp-content/plugins/ml-slider/admin/slideshows/Settings.php
<?php

if (!defined('ABSPATH')) {
die('No direct access.');
}

/**
 * Class to handle individual slideshow settings
 */
class MetaSlider_Slideshow_Settings
{
    /**
     * Themes class
     *
     * @var object | bool
     */
    private $settings;

    /**
     * Constructor
     *
     * @param string|null $slideshow_id The settings object
     */
    public function __construct($slideshow_id = null)
    {
        $this->settings = get_post_meta($slideshow_id, 'ml-slider_settings', true);
    }

    /**
     * Returns settings
     *
     * @return object
     */
    public function get_settings()
    {
        return $this->settings ? $this->settings : self::defaults();
    }

    /**
     * Returns a single setting
     *
     * @param string $setting A single setting name
     *
     * @return mixed|WP_error The setting result or an error object
     */
    public function get_single($setting)
    {
        return isset($this->settings[$setting]) ? $this->settings[$setting] : new WP_Error('invalid_setting', 'The setting was not found', array('status' => 404));
    }

    /**
     * Returns the default settings
     *
     * @return array
     */
    public static function defaults()
    {
        $defaults = array(
            'title' => __('New Slideshow', 'ml-slider'),
            'type' => 'flex',
            'random' => false,
            'cssClass' => '',
            'printCss' => true,
            'printJs' => true,
            'width' => 700,
            'height' => 300,
            'spw' => 7,
            'sph' => 5,
            'delay' => 3000,
            'sDelay' => 30,
            'opacity' => 0.7,
            'titleSpeed' => 500,
            'effect' => 'random',
            'navigation' => true,
            'links' => true,
            'hoverPause' => true,
            'theme' => 'none',
            'direction' => 'horizontal',
            'reverse' => false,
            'keyboard' => true,
            'touch' => true,
            'animationSpeed' => 600,
            'prevText' => __('Previous', 'ml-slider'),
            'nextText' => __('Next', 'ml-slider'),
            'slices' => 15,
            'center' => false,
            'smartCrop' => true,
            'smoothHeight' => false,
            'carouselMode' => false,
            'infiniteLoop' => false,
            'carouselMargin' => 5,
            'firstSlideFadeIn' => false,
            'easing' => 'linear',
            'autoPlay' => true,
            'thumb_width' => 150,
            'thumb_height' => 100,
            'responsive_thumbs' => true,
            'thumb_min_width' => 100,
            'fullWidth' => true,
            'noConflict' => true,
            'mobileArrows_smartphone' => false,
            'mobileArrows_tablet' => false,
            'mobileArrows_laptop' => false,
            'mobileArrows_desktop' => false,
            'mobileNavigation_smartphone' => false,
            'mobileNavigation_tablet' => false,
            'mobileNavigation_laptop' => false,
            'mobileNavigation_desktop' => false,
        );
        $defaults = apply_filters('metaslider_default_parameters', $defaults);
        $overrides = get_option('metaslider_default_settings');
        return is_array($overrides) ? array_merge($defaults, $overrides) : $defaults;
    }
}