: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'value' => 'sgpb-theme-1',
'data-attributes' => array(
'class' => 'js-sgpb-popup-themes sgpb-popup-theme-1',
'data-popup-theme-number' => 1
'value' => 'sgpb-theme-2',
'data-attributes' => array(
'class' => 'js-sgpb-popup-themes sgpb-popup-theme-2',
'data-popup-theme-number' => 2
'value' => 'sgpb-theme-3',
'data-attributes' => array(
'class' => 'js-sgpb-popup-themes sgpb-popup-theme-3',
'data-popup-theme-number' => 3
'value' => 'sgpb-theme-4',
'data-attributes' => array(
'class' => 'js-sgpb-popup-themes sgpb-popup-theme-4',
'data-popup-theme-number' => 4
'value' => 'sgpb-theme-5',
'data-attributes' => array(
'class' => 'js-sgpb-popup-themes sgpb-popup-theme-5',
'data-popup-theme-number' => 5
'value' => 'sgpb-theme-6',
'data-attributes' => array(
'class' => 'js-sgpb-popup-themes sgpb-popup-theme-6',
'data-popup-theme-number' => 6
$data['responsiveDimensions'] = array(
'auto' => __('Auto', 'popup-builder'),
'fullScreen' => __('Full screen', 'popup-builder')
$data['freeConditionsAdvancedTargeting'] = array(
'devices' => __('Devices', 'popup-builder'),
'user-status' => __('User Status', 'popup-builder'),
'after-x' => __('After x pages visit', 'popup-builder'),
'user-role' => __('User Role', 'popup-builder'),
'detect-by-url' => __('Referral URL detection', 'popup-builder'),
'cookie-detection' => __('Cookie Detection', 'popup-builder'),
'operation-system' => __('Operating System', 'popup-builder'),
'browser-detection' => __('Web Browser', 'popup-builder'),
'query-string' => __('URL Query String', 'popup-builder')
$data['freeConditionsGeoTargeting'] = array(
'countries' => __('Countries', 'popup-builder'),
'cities' => __('Cities', 'popup-builder'),
'states' => __('States', 'popup-builder'),
'visitor-ip' => __('Visitor IP', 'popup-builder')
$data['closeButtonPositions'] = array(
'topLeft' => __('top-left', 'popup-builder'),
'topRight' => __('top-right', 'popup-builder'),
'bottomLeft' => __('bottom-left', 'popup-builder'),
'bottomRight' => __('bottom-right', 'popup-builder')
$data['closeButtonPositionsFirstTheme'] = array(
'bottomLeft' => __('bottom-left', 'popup-builder'),
'bottomRight' => __('bottom-right', 'popup-builder')
$data['pxPercent'] = array(
$data['countdownFormat'] = array(
SG_COUNTDOWN_COUNTER_SECONDS_SHOW => 'DD:HH:MM:SS',
SG_COUNTDOWN_COUNTER_SECONDS_HIDE => 'DD:HH:MM'
$data['countdownTimezone'] = self::getPopupTimeZone();
$data['countdownLanguage'] = array(
'Portuguese' => 'Português',
$data['weekDaysArray'] = array(
'Wed' => __('Wednesday'),
$data['messageResize'] = array(
'both' => __('Both', 'popup-builder'),
'horizontal' => __('Horizontal', 'popup-builder'),
'vertical' => __('Vertical', 'popup-builder'),
'none' => __('None', 'popup-builder'),
'inherit' => __('Inherit', 'popup-builder')
$data['socialShareOptions'] = array(
'fieldWrapperAttr' => array(
'class' => 'col-md-7 sgpb-choice-option-wrapper'
'class' => 'col-md-5 sgpb-choice-option-wrapper'
'groupWrapperAttr' => array(
'class' => 'row form-group sgpb-choice-wrapper'
'buttonPosition' => 'right',
'name' => 'sgpb-social-share-url-type',
'class' => 'sgpb-share-url-type',
'name' => __('Use active URL', 'popup-builder').':'
'name' => 'sgpb-social-share-url-type',
'class' => 'sgpb-share-url-type',
'data-attr-href' => 'sgpb-social-share-url-wrapper',
'name' => __('Share URL', 'popup-builder').':'
$data['countdownDateFormat'] = array(
'fieldWrapperAttr' => array(
'class' => 'col-md-5 sgpb-choice-option-wrapper'
'class' => 'col-md-5 sgpb-choice-option-wrapper sgpb-sub-option-label'
'groupWrapperAttr' => array(
'class' => 'row form-group sgpb-choice-wrapper'
'buttonPosition' => 'right',
'name' => 'sgpb-countdown-date-format',
'class' => 'sgpb-countdown-date-format-from-date',
'data-attr-href' => 'sgpb-countdown-date-format-from-date',
'name' => __('Due Date', 'popup-builder').':'
'name' => 'sgpb-countdown-date-format',
'class' => 'sgpb-countdown-date-format-from-date',
'data-attr-href' => 'sgpb-countdown-date-format-from-input',
'name' => __('Timer', 'popup-builder').':'
$data['socialShareTheme'] = array(
'data-attributes' => array(
'class' => 'js-social-share-theme sgpb-social-popup-flat',
'data-popup-theme-number' => 1
'data-attributes' => array(
'class' => 'js-social-share-theme sgpb-social-popup-classic',
'data-popup-theme-number' => 1
'data-attributes' => array(
'class' => 'js-social-share-theme sgpb-social-popup-minima',
'data-popup-theme-number' => 1
'data-attributes' => array(
'class' => 'js-social-share-theme sgpb-social-popup-plain',
'data-popup-theme-number' => 1
$data['socialThemeSizes'] = array(
$data['socialThemeShereCount'] = array(
'true' => __('True', 'popup-builder'),
'false' => __('False', 'popup-builder'),
'inside' => __('Inside', 'popup-builder')
$data['popupInsertEventTypes'] = array(
'inherit' => __('Inherit', 'popup-builder'),
'onLoad' => __('On load', 'popup-builder'),
'click' => __('On click', 'popup-builder'),
'hover' => __('On hover', 'popup-builder')
$data['subscriptionSuccessBehavior'] = array(
'fieldWrapperAttr' => array(
'class' => 'col-md-6 sgpb-choice-option-wrapper'
'class' => 'subFormItem__title sgpb-margin-right-10'
'groupWrapperAttr' => array(
'class' => 'subFormItem sgpb-choice-wrapper'
'buttonPosition' => 'right',
'name' => 'sgpb-subs-success-behavior',
'class' => 'subs-success-message',
'data-attr-href' => 'subs-show-success-message',
'name' => __('Success message', 'popup-builder').':'
'name' => 'sgpb-subs-success-behavior',
'class' => 'subs-redirect-to-URL',
'data-attr-href' => 'subs-redirect-to-URL',
'value' => 'redirectToURL'
'name' => __('Redirect to URL', 'popup-builder').':'
'name' => 'sgpb-subs-success-behavior',
'class' => 'subs-success-open-popup',
'data-attr-href' => 'subs-open-popup',
'name' => __('Open popup', 'popup-builder').':'
'name' => 'sgpb-subs-success-behavior',
'class' => 'subs-hide-popup',
'name' => __('Hide popup', 'popup-builder').':'
$data['buttonsType'] = array(
'standard' => __('Standard', 'popup-builder'),
'box_count' => __('Box with count', 'popup-builder'),
'button_count' => __('Button with count', 'popup-builder'),
'button' => __('Button', 'popup-builder')
$data['backroundImageModes'] = array(
'no-repeat' => __('None', 'popup-builder'),
'cover' => __('Cover', 'popup-builder'),
'contain' => __('Contain', 'popup-builder'),
'repeat' => __('Repeat', 'popup-builder')
$data['openAnimationEfects'] = array(
'No effect' => __('None', 'popup-builder'),
'sgpb-flip' => __('Flip', 'popup-builder'),
'sgpb-shake' => __('Shake', 'popup-builder'),
'sgpb-wobble' => __('Wobble', 'popup-builder'),
'sgpb-swing' => __('Swing', 'popup-builder'),
'sgpb-flash' => __('Flash', 'popup-builder'),
'sgpb-bounce' => __('Bounce', 'popup-builder'),
'sgpb-bounceInRight' => __('BounceInRight', 'popup-builder'),
'sgpb-bounceIn' => __('BounceIn', 'popup-builder'),
'sgpb-pulse' => __('Pulse', 'popup-builder'),
'sgpb-rubberBand' => __('RubberBand', 'popup-builder'),
'sgpb-tada' => __('Tada', 'popup-builder'),
'sgpb-slideInUp' => __('SlideInUp', 'popup-builder'),
'sgpb-jello' => __('Jello', 'popup-builder'),
'sgpb-rotateIn' => __('RotateIn', 'popup-builder'),
'sgpb-fadeIn' => __('FadeIn', 'popup-builder')
$data['closeAnimationEfects'] = array(
'No effect' => __('None', 'popup-builder'),
'sgpb-flipInX' => __('Flip', 'popup-builder'),
'sgpb-shake' => __('Shake', 'popup-builder'),
'sgpb-wobble' => __('Wobble', 'popup-builder'),
'sgpb-swing' => __('Swing', 'popup-builder'),
'sgpb-flash' => __('Flash', 'popup-builder'),
'sgpb-bounce' => __('Bounce', 'popup-builder'),
'sgpb-bounceOutLeft' => __('BounceOutLeft', 'popup-builder'),
'sgpb-bounceOut' => __('BounceOut', 'popup-builder'),
'sgpb-pulse' => __('Pulse', 'popup-builder'),
'sgpb-rubberBand' => __('RubberBand', 'popup-builder'),
'sgpb-tada' => __('Tada', 'popup-builder'),
'sgpb-slideOutUp' => __('SlideOutUp', 'popup-builder'),
'sgpb-jello' => __('Jello', 'popup-builder'),
'sgpb-rotateOut' => __('RotateOut', 'popup-builder'),
'sgpb-fadeOut' => __('FadeOut', 'popup-builder')
$data['floatingButtonPositionsCorner'] = array(
'top-left' => __('Top left', 'popup-builder'),
'top-right' => __('Top right', 'popup-builder'),
'bottom-left' => __('Bottom left', 'popup-builder'),
'bottom-right' => __('Bottom right', 'popup-builder')
$data['floatingButtonPositionsBasic'] = array(
'top-left' => __('Top left', 'popup-builder'),
'top-right' => __('Top right', 'popup-builder'),
'bottom-left' => __('Bottom left', 'popup-builder'),
'bottom-right' => __('Bottom right', 'popup-builder'),
'top-center' => __('Top center', 'popup-builder'),
'bottom-center' => __('Bottom center', 'popup-builder'),
'right-center' => __('Right center', 'popup-builder'),
'left-center' => __('Left center', 'popup-builder')
$data['floatingButtonStyle'] = array(
'corner' => __('Corner', 'popup-builder'),
'basic' => __('Basic', 'popup-builder')
$data['userRoles'] = self::getAllUserRoles();
public static function getAllUserRoles()
if (!function_exists('get_editable_roles')){
$roles = get_editable_roles();
foreach ($roles as $roleName => $roleInfo) {
if ($roleName == 'administrator') {
$rulesArray[$roleName] = $roleName;
public static function getClickActionOptions()
'defaultClickClassName' => __('Default', 'popup-builder'),
'clickActionCustomClass' => __('Custom class', 'popup-builder')
public static function getHoverActionOptions()
'defaultHoverClassName' => __('Default', 'popup-builder'),
'hoverActionCustomClass' => __('Custom class', 'popup-builder')
public static function getPopupDefaultTimeZone()
$timeZone = get_option('timezone_string');
$timeZone = SG_POPUP_DEFAULT_TIME_ZONE;
public static function getPopupTimeZone()
'Pacific/Midway' => '(GMT-11:00) Midway',
'Pacific/Niue' => '(GMT-11:00) Niue',
'Pacific/Pago_Pago' => '(GMT-11:00) Pago Pago',
'Pacific/Honolulu' => '(GMT-10:00) Hawaii Time',
'Pacific/Rarotonga' => '(GMT-10:00) Rarotonga',
'Pacific/Tahiti' => '(GMT-10:00) Tahiti',
'Pacific/Marquesas' => '(GMT-09:30) Marquesas',
'America/Anchorage' => '(GMT-09:00) Alaska Time',
'Pacific/Gambier' => '(GMT-09:00) Gambier',
'America/Los_Angeles' => '(GMT-08:00) Pacific Time',
'America/Tijuana' => '(GMT-08:00) Pacific Time - Tijuana',
'America/Vancouver' => '(GMT-08:00) Pacific Time - Vancouver',
'America/Whitehorse' => '(GMT-08:00) Pacific Time - Whitehorse',
'Pacific/Pitcairn' => '(GMT-08:00) Pitcairn',
'America/Dawson_Creek' => '(GMT-07:00) Mountain Time - Dawson Creek',
'America/Denver' => '(GMT-07:00) Mountain Time',
'America/Edmonton' => '(GMT-07:00) Mountain Time - Edmonton',
'America/Hermosillo' => '(GMT-07:00) Mountain Time - Hermosillo',
'America/Mazatlan' => '(GMT-07:00) Mountain Time - Chihuahua, Mazatlan',
'America/Phoenix' => '(GMT-07:00) Mountain Time - Arizona',
'America/Yellowknife' => '(GMT-07:00) Mountain Time - Yellowknife',
'America/Belize' => '(GMT-06:00) Belize',
'America/Chicago' => '(GMT-06:00) Central Time',
'America/Costa_Rica' => '(GMT-06:00) Costa Rica',
'America/El_Salvador' => '(GMT-06:00) El Salvador',