: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace Nextend\SmartSlider3\Slider\Feature;
use Nextend\Framework\Data\Data;
use Nextend\SmartSlider3\Application\Admin\Settings\ViewSettingsGeneral;
use Nextend\SmartSlider3\Settings;
use Nextend\SmartSlider3\Slider\ResponsiveType\AbstractResponsiveTypeFrontend;
use Nextend\SmartSlider3\Slider\ResponsiveType\ResponsiveTypeFactory;
use Nextend\SmartSlider3\Slider\Slider;
use Nextend\SmartSlider3\SmartSlider3Info;
* @var AbstractResponsiveTypeFrontend
protected $responsivePlugin;
protected $hideOnDesktopLandscape = 1;
protected $hideOnDesktopPortrait = 1;
protected $hideOnTabletLandscape = 1;
protected $hideOnTabletPortrait = 1;
protected $hideOnMobileLandscape = 1;
protected $hideOnMobilePortrait = 1;
public $onResizeEnabled = 1;
public $forceFullOverflowX = 'body';
public $forceFullHorizontalSelector = '';
public $minimumHeight = -1;
public $maximumSlideWidthLandscape = -1;
public $maximumSlideWidth = 10000;
public $maximumSlideWidthTabletLandscape = -1;
public $maximumSlideWidthTablet = -1;
public $maximumSlideWidthMobileLandscape = -1;
public $maximumSlideWidthMobile = -1;
public $sliderHeightBasedOn = 'real';
public $responsiveDecreaseSliderHeight = 0;
public $focusEdge = 'auto';
protected $enabledDevices = array(
protected $breakpoints = array();
public $mediaQueries = array(
'desktopPortrait' => array(
public static $translation = array(
'desktoplandscape' => 'desktopLandscape',
'desktopportrait' => 'desktopPortrait',
'tabletlandscape' => 'tabletLandscape',
'tabletportrait' => 'tabletPortrait',
'mobilelandscape' => 'mobileLandscape',
'mobileportrait' => 'mobilePortrait'
public function __construct($slider, $features) {
$this->hideOnDesktopLandscape = !intval($slider->params->get('desktoplandscape', 1));
$this->hideOnDesktopPortrait = !intval($slider->params->get('desktopportrait', 1));
$this->hideOnTabletLandscape = !intval($slider->params->get('tabletlandscape', 1));
$this->hideOnTabletPortrait = !intval($slider->params->get('tabletportrait', 1));
$this->hideOnMobileLandscape = !intval($slider->params->get('mobilelandscape', 1));
$this->hideOnMobilePortrait = !intval($slider->params->get('mobileportrait', 1));
$this->focusUser = intval($slider->params->get('responsiveFocusUser', 1));
$this->focusEdge = $slider->params->get('responsiveFocusEdge', 'auto');
$this->responsivePlugin = ResponsiveTypeFactory::createFrontend($slider->params->get('responsive-mode', 'auto'), $this);
$this->type = $this->responsivePlugin->getType();
$this->responsivePlugin->parse($slider->params, $this, $features);
$this->onResizeEnabled = !$slider->disableResponsive;
if (!$this->scaleDown && !$this->scaleUp) {
$this->onResizeEnabled = 0;
$overrideSizeEnabled = !!$slider->params->get('slider-size-override', 0);
$this->sizes['desktopPortrait']['width'] = max(10, intval($slider->params->get('width', 1200)));
$this->sizes['desktopPortrait']['height'] = max(10, intval($slider->params->get('height', 600)));
$heightHelperRatio = $this->sizes['desktopPortrait']['height'] / $this->sizes['desktopPortrait']['width'];
$this->enabledDevices['desktopLandscape'] = intval($slider->params->get('responsive-breakpoint-desktop-landscape-enabled', 0));
$this->enabledDevices['tabletLandscape'] = intval($slider->params->get('responsive-breakpoint-tablet-landscape-enabled', 0));
$this->enabledDevices['tabletPortrait'] = intval($slider->params->get('responsive-breakpoint-tablet-portrait-enabled', 1));
$this->enabledDevices['mobileLandscape'] = intval($slider->params->get('responsive-breakpoint-mobile-landscape-enabled', 0));
$this->enabledDevices['mobilePortrait'] = intval($slider->params->get('responsive-breakpoint-mobile-portrait-enabled', 1));
$useLocalBreakpoints = !$slider->params->get('responsive-breakpoint-global', 0);
$landscapePortraitWidth = $breakpointWidthLandscape = 3001;
if ($this->enabledDevices['desktopLandscape']) {
$landscapePortraitWidth = $breakpointWidthPortrait = intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-desktop-portrait', ViewSettingsGeneral::defaults['desktop-large-portrait']) : Settings::get('responsive-screen-width-desktop-portrait', ViewSettingsGeneral::defaults['desktop-large-portrait']));
$breakpointWidthLandscape = max($landscapePortraitWidth, intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-desktop-portrait-landscape', ViewSettingsGeneral::defaults['desktop-large-landscape']) : Settings::get('responsive-screen-width-desktop-portrait-landscape', ViewSettingsGeneral::defaults['desktop-large-landscape'])));
$this->breakpoints[] = array(
'device' => 'desktopLandscape',
'type' => 'min-screen-width',
'portraitWidth' => $breakpointWidthPortrait,
'landscapeWidth' => $breakpointWidthLandscape
$editorWidth = intval($slider->params->get('desktop-landscape-width', 1440));
if ($overrideSizeEnabled && $slider->params->get('slider-size-override-desktop-landscape', 0) && $editorWidth > 10) {
$editorHeight = intval($slider->params->get('desktop-landscape-height', 900));
if ($editorWidth < $breakpointWidthPortrait) {
$editorHeight = $breakpointWidthPortrait / $editorWidth * $editorHeight;
$editorWidth = $breakpointWidthPortrait;
if ($editorHeight <= 0) {
switch ($this->slider->data->get('type', 'simple')) {
$editorHeight = $editorWidth * $heightHelperRatio;
$this->sizes['desktopLandscape'] = array(
'height' => floor($editorHeight),
'customHeight' => $customHeight
$this->sizes['desktopLandscape'] = array(
'width' => $this->sizes['desktopPortrait']['width'],
'height' => $this->sizes['desktopPortrait']['height'],
$this->sizes['desktopLandscape']['max'] = 3000;
$this->sizes['desktopLandscape']['min'] = $breakpointWidthPortrait;
$previousSize = &$this->sizes['desktopLandscape'];
$this->sizes['desktopPortrait']['max'] = max($this->sizes['desktopPortrait']['width'], $landscapePortraitWidth - 1, $breakpointWidthLandscape - 1);
$previousSize = &$this->sizes['desktopPortrait'];
* Keep a copy of the current smallest width to be able to disable smaller devices
$smallestWidth = $this->sizes['desktopPortrait']['width'];
if ($this->enabledDevices['tabletLandscape']) {
$breakpointWidthPortrait = intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-tablet-landscape', ViewSettingsGeneral::defaults['tablet-large-portrait']) : Settings::get('responsive-screen-width-tablet-landscape', ViewSettingsGeneral::defaults['tablet-large-portrait']));
$breakpointWidthLandscape = max($breakpointWidthPortrait, intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-tablet-landscape-landscape', ViewSettingsGeneral::defaults['tablet-large-landscape']) : Settings::get('responsive-screen-width-tablet-landscape-landscape', ViewSettingsGeneral::defaults['tablet-large-landscape'])));
$this->breakpoints[] = array(
'device' => 'tabletLandscape',
'type' => 'max-screen-width',
'portraitWidth' => $breakpointWidthPortrait,
'landscapeWidth' => $breakpointWidthLandscape
$editorWidth = intval($slider->params->get('tablet-landscape-width', 1024));
if ($overrideSizeEnabled && $slider->params->get('slider-size-override-tablet-landscape', 0) && $editorWidth > 10) {
$editorHeight = intval($slider->params->get('tablet-landscape-height', 768));
if ($editorWidth > $breakpointWidthPortrait) {
$editorHeight = $breakpointWidthPortrait / $editorWidth * $editorHeight;
$editorWidth = $breakpointWidthPortrait;
if ($editorHeight <= 0) {
$editorHeight = $editorWidth * $heightHelperRatio;
$this->sizes['tabletLandscape'] = array(
'height' => floor($editorHeight),
'customHeight' => $customHeight
$smallestWidth = min($smallestWidth, $editorWidth);
$width = min($smallestWidth, $breakpointWidthPortrait);
$this->sizes['tabletLandscape'] = array(
'height' => floor($width * $heightHelperRatio),
$smallestWidth = min($smallestWidth, $breakpointWidthPortrait);
$this->sizes['tabletLandscape']['max'] = max($this->sizes['tabletLandscape']['width'], $breakpointWidthPortrait, $breakpointWidthLandscape);
$previousSize['min'] = min($previousSize['width'], $breakpointWidthPortrait + 1);
$previousSize = &$this->sizes['tabletLandscape'];
if ($this->enabledDevices['tabletPortrait']) {
$breakpointWidthPortrait = intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-tablet-portrait', ViewSettingsGeneral::defaults['tablet-portrait']) : Settings::get('responsive-screen-width-tablet-portrait', ViewSettingsGeneral::defaults['tablet-portrait']));
$breakpointWidthLandscape = max($breakpointWidthPortrait, intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-tablet-portrait-landscape', ViewSettingsGeneral::defaults['tablet-landscape']) : Settings::get('responsive-screen-width-tablet-portrait-landscape', ViewSettingsGeneral::defaults['tablet-landscape'])));
$this->breakpoints[] = array(
'device' => 'tabletPortrait',
'type' => 'max-screen-width',
'portraitWidth' => $breakpointWidthPortrait,
'landscapeWidth' => $breakpointWidthLandscape
$editorWidth = intval($slider->params->get('tablet-portrait-width', 768));
if ($overrideSizeEnabled && $slider->params->get('slider-size-override-tablet-portrait', 0) && $editorWidth > 10) {
$editorHeight = intval($slider->params->get('tablet-portrait-height', 1024));
if ($editorWidth > $breakpointWidthPortrait) {
$editorHeight = $breakpointWidthPortrait / $editorWidth * $editorHeight;
$editorWidth = $breakpointWidthPortrait;
if ($editorHeight <= 0) {
$editorHeight = $editorWidth * $heightHelperRatio;
$this->sizes['tabletPortrait'] = array(
'height' => floor($editorHeight),
'customHeight' => $customHeight
$smallestWidth = min($smallestWidth, $editorWidth);
$width = min($smallestWidth, $breakpointWidthPortrait);
$this->sizes['tabletPortrait'] = array(
'height' => floor($width * $heightHelperRatio),
$smallestWidth = min($smallestWidth, $breakpointWidthPortrait);
$this->sizes['tabletPortrait']['max'] = max($this->sizes['tabletPortrait']['width'], $breakpointWidthPortrait, $breakpointWidthLandscape);
$previousSize['min'] = min($previousSize['width'], $breakpointWidthPortrait + 1);
$previousSize = &$this->sizes['tabletPortrait'];
if ($this->enabledDevices['mobileLandscape']) {
$breakpointWidthPortrait = intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-mobile-landscape', ViewSettingsGeneral::defaults['mobile-large-portrait']) : Settings::get('responsive-screen-width-mobile-landscape', ViewSettingsGeneral::defaults['mobile-large-portrait']));
$breakpointWidthLandscape = max($breakpointWidthPortrait, intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-mobile-landscape-landscape', ViewSettingsGeneral::defaults['mobile-large-landscape']) : Settings::get('responsive-screen-width-mobile-landscape-landscape', ViewSettingsGeneral::defaults['mobile-large-landscape'])));
$this->breakpoints[] = array(
'device' => 'mobileLandscape',
'type' => 'max-screen-width',
'portraitWidth' => $breakpointWidthPortrait,
'landscapeWidth' => $breakpointWidthLandscape
$editorWidth = intval($slider->params->get('mobile-landscape-width', 568));
if ($overrideSizeEnabled && $slider->params->get('slider-size-override-mobile-landscape', 0) && $editorWidth > 10) {
$editorHeight = intval($slider->params->get('mobile-landscape-height', 320));
if ($editorWidth > $breakpointWidthPortrait) {
$editorHeight = $breakpointWidthPortrait / $editorWidth * $editorHeight;
$editorWidth = $breakpointWidthPortrait;
if ($editorHeight <= 0) {
$editorHeight = $editorWidth * $heightHelperRatio;
$this->sizes['mobileLandscape'] = array(
'height' => floor($editorHeight),
'customHeight' => $customHeight
$smallestWidth = min($smallestWidth, $editorWidth);
$width = min($smallestWidth, $breakpointWidthPortrait);
$this->sizes['mobileLandscape'] = array(
'height' => floor($width * $heightHelperRatio),
$smallestWidth = min($smallestWidth, $breakpointWidthPortrait);
$this->sizes['mobileLandscape']['max'] = max($this->sizes['mobileLandscape']['width'], $breakpointWidthPortrait, $breakpointWidthLandscape);
$previousSize['min'] = min($previousSize['width'], $breakpointWidthPortrait + 1);
$previousSize = &$this->sizes['mobileLandscape'];
if ($this->enabledDevices['mobilePortrait']) {
$breakpointWidthPortrait = intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-mobile-portrait', ViewSettingsGeneral::defaults['mobile-portrait']) : Settings::get('responsive-screen-width-mobile-portrait', ViewSettingsGeneral::defaults['mobile-portrait']));
$breakpointWidthLandscape = max($breakpointWidthPortrait, intval($useLocalBreakpoints ? $slider->params->get('responsive-breakpoint-mobile-portrait-landscape', ViewSettingsGeneral::defaults['mobile-landscape']) : Settings::get('responsive-screen-width-mobile-portrait-landscape', ViewSettingsGeneral::defaults['mobile-landscape'])));
$this->breakpoints[] = array(
'device' => 'mobilePortrait',
'type' => 'max-screen-width',
'portraitWidth' => $breakpointWidthPortrait,
'landscapeWidth' => $breakpointWidthLandscape
$editorWidth = intval($slider->params->get('mobile-portrait-width', 320));
if ($overrideSizeEnabled && $slider->params->get('slider-size-override-mobile-portrait', 0) && $editorWidth > 10) {
$editorHeight = intval($slider->params->get('mobile-portrait-height', 568));
if ($editorWidth > $breakpointWidthPortrait) {
$editorHeight = $breakpointWidthPortrait / $editorWidth * $editorHeight;
$editorWidth = $breakpointWidthPortrait;
if ($editorHeight <= 0) {
$editorHeight = $editorWidth * $heightHelperRatio;
$this->sizes['mobilePortrait'] = array(
'height' => floor($editorHeight),
'customHeight' => $customHeight
$width = min(320, $smallestWidth, $breakpointWidthPortrait);
$this->sizes['mobilePortrait'] = array(
'height' => floor($width * $heightHelperRatio),
$this->sizes['mobilePortrait']['max'] = max($this->sizes['mobilePortrait']['width'], $breakpointWidthPortrait, $breakpointWidthLandscape);
$previousSize['min'] = min($previousSize['width'], $breakpointWidthPortrait + 1);
$previousSize = &$this->sizes['mobilePortrait'];
$previousSize['min'] = min(320, $previousSize['width']);
if (isset($this->sizes['mobileLandscape']['auto'])) {
unset($this->sizes['mobileLandscape']['auto']);
$this->sizes['mobileLandscape']['width'] = $this->sizes['mobileLandscape']['min'];
$this->sizes['mobileLandscape']['height'] = floor($this->sizes['mobileLandscape']['width'] * $heightHelperRatio);
if (isset($this->sizes['tabletPortrait']['auto'])) {
unset($this->sizes['tabletPortrait']['auto']);
$this->sizes['tabletPortrait']['width'] = $this->sizes['tabletPortrait']['min'];
$this->sizes['tabletPortrait']['height'] = floor($this->sizes['tabletPortrait']['width'] * $heightHelperRatio);
if (isset($this->sizes['tabletLandscape']['auto'])) {
unset($this->sizes['tabletLandscape']['auto']);
$this->sizes['tabletLandscape']['width'] = $this->sizes['tabletLandscape']['min'];
$this->sizes['tabletLandscape']['height'] = floor($this->sizes['tabletLandscape']['width'] * $heightHelperRatio);
$this->parseLimitSlideWidth($slider->params);
$breakpointData = array();
foreach ($this->breakpoints as $breakpoint) {
$breakpointData[$breakpoint['device']] = $breakpoint;
if (isset($breakpointData['desktopLandscape'])) {
$portraitMinWidth = $breakpointData['desktopLandscape']['portraitWidth'];
$landscapeMinWidth = $breakpointData['desktopLandscape']['landscapeWidth'];
if ($portraitMinWidth == $landscapeMinWidth || $this->slider->isFrame) {
$this->mediaQueries['desktoplandscape'] = array('(min-width: ' . $portraitMinWidth . 'px)');
$this->mediaQueries['desktoplandscape'] = array(
'(orientation: landscape) and (min-width: ' . $landscapeMinWidth . 'px)',
'(orientation: portrait) and (min-width: ' . $portraitMinWidth . 'px)'