Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/popup-bu.../com/config
File: dataConfig.php
<?php
[0] Fix | Delete
/* Exit if accessed directly */
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[2] Fix | Delete
exit;
[3] Fix | Delete
}
[4] Fix | Delete
require_once(SG_POPUP_HELPERS_PATH.'ConfigDataHelper.php');
[5] Fix | Delete
use sgpb\PopupBuilderActivePackage;
[6] Fix | Delete
class SgpbDataConfig
[7] Fix | Delete
{
[8] Fix | Delete
public static function init()
[9] Fix | Delete
{
[10] Fix | Delete
self::addFilters();
[11] Fix | Delete
self::conditionInit();
[12] Fix | Delete
self::transientConfig();
[13] Fix | Delete
self::popupDefaultOptions();
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
public static function conditionInit()
[17] Fix | Delete
{
[18] Fix | Delete
global $SGPB_DATA_CONFIG_ARRAY;
[19] Fix | Delete
[20] Fix | Delete
/*Target condition config*/
[21] Fix | Delete
$targetData = array('param' => 'Pages', 'operator' => 'Is not', 'value' => 'Value');
[22] Fix | Delete
$targetElementTypes = array(
[23] Fix | Delete
'param' => 'select',
[24] Fix | Delete
'operator' => 'select',
[25] Fix | Delete
'value' => 'select',
[26] Fix | Delete
'post_selected' => 'select',
[27] Fix | Delete
'page_selected' => 'select',
[28] Fix | Delete
'post_type' => 'select',
[29] Fix | Delete
'post_category' => 'select',
[30] Fix | Delete
'page_type' => 'select',
[31] Fix | Delete
'page_template' => 'select',
[32] Fix | Delete
'post_tags_ids' => 'select'
[33] Fix | Delete
);
[34] Fix | Delete
[35] Fix | Delete
$targetParams = array(
[36] Fix | Delete
'not_rule' => __('Select rule', 'popup-builder'),
[37] Fix | Delete
'everywhere' => __('Everywhere', 'popup-builder'),
[38] Fix | Delete
'Post' => array(
[39] Fix | Delete
'post_all' => __('All posts', 'popup-builder'),
[40] Fix | Delete
'post_selected' => __('Selected posts', 'popup-builder'),
[41] Fix | Delete
'post_type' => __('Post type', 'popup-builder'),
[42] Fix | Delete
'post_category' => __('Post category', 'popup-builder')
[43] Fix | Delete
),
[44] Fix | Delete
'Page' => array(
[45] Fix | Delete
'page_all' => __('All pages', 'popup-builder'),
[46] Fix | Delete
'page_selected' => __('Selected pages', 'popup-builder'),
[47] Fix | Delete
'page_type' => __('Page type', 'popup-builder'),
[48] Fix | Delete
'page_template' => __('Page template', 'popup-builder')
[49] Fix | Delete
),
[50] Fix | Delete
'Tags' => array(
[51] Fix | Delete
'post_tags' => __('All tags', 'popup-builder'),
[52] Fix | Delete
'post_tags_ids' => __('Selected tags', 'popup-builder')
[53] Fix | Delete
)
[54] Fix | Delete
);
[55] Fix | Delete
[56] Fix | Delete
$targetOperators = array(
[57] Fix | Delete
array('operator' => 'add', 'name' => __('Add', 'popup-builder')),
[58] Fix | Delete
array('operator' => 'delete', 'name' => __('Delete', 'popup-builder'))
[59] Fix | Delete
);
[60] Fix | Delete
[61] Fix | Delete
$targetDataOperator = array(
[62] Fix | Delete
'==' => __('Is', 'popup-builder'),
[63] Fix | Delete
'!=' => __('Is not', 'popup-builder')
[64] Fix | Delete
);
[65] Fix | Delete
$targetInitialData = array(
[66] Fix | Delete
array('param' => 'everywhere')
[67] Fix | Delete
);
[68] Fix | Delete
[69] Fix | Delete
$targetDataParams['param'] = apply_filters('sgPopupTargetParams', $targetParams);
[70] Fix | Delete
$targetDataParams['operator'] = apply_filters('sgPopupTargetOperator', $targetDataOperator);
[71] Fix | Delete
$targetDataParams['post_selected'] = apply_filters('sgPopupTargetPostData', array());
[72] Fix | Delete
$targetDataParams['page_selected'] = apply_filters('sgPopupTargetPageSelected', array());
[73] Fix | Delete
$targetDataParams['post_type'] = apply_filters('sgPopupTargetPostType', array());
[74] Fix | Delete
$targetDataParams['post_category'] = apply_filters('sgPopupTargetPostCategory', array());
[75] Fix | Delete
$targetDataParams['page_type'] = apply_filters('sgPopupTargetPageType', array());
[76] Fix | Delete
$targetDataParams['page_template'] = apply_filters('sgPopupPageTemplates', array());
[77] Fix | Delete
$targetDataParams['post_tags_ids'] = apply_filters('sgPopupTags', array());
[78] Fix | Delete
$targetDataParams['everywhere'] = null;
[79] Fix | Delete
$targetDataParams['not_rule'] = null;
[80] Fix | Delete
$targetDataParams['post_all'] = null;
[81] Fix | Delete
$targetDataParams['page_all'] = null;
[82] Fix | Delete
$targetDataParams['post_tags'] = null;
[83] Fix | Delete
[84] Fix | Delete
$targetAttrs = array(
[85] Fix | Delete
'param' => array(
[86] Fix | Delete
'htmlAttrs' => array(
[87] Fix | Delete
'class' => 'js-sg-select2 js-select-basic',
[88] Fix | Delete
'data-select-class' => 'js-select-basic',
[89] Fix | Delete
'data-select-type' => 'basic',
[90] Fix | Delete
'autocomplete' => 'off'
[91] Fix | Delete
),
[92] Fix | Delete
'infoAttrs' => array(
[93] Fix | Delete
'label' => 'Display rule',
[94] Fix | Delete
'info' => __('Specify where the popup should be shown on your site.', 'popup-builder')
[95] Fix | Delete
)
[96] Fix | Delete
[97] Fix | Delete
),
[98] Fix | Delete
'operator' => array(
[99] Fix | Delete
'htmlAttrs' => array(
[100] Fix | Delete
'class' => 'js-sg-select2 js-select-basic',
[101] Fix | Delete
'data-select-class' => 'js-select-basic',
[102] Fix | Delete
'data-select-type' => 'basic'
[103] Fix | Delete
),
[104] Fix | Delete
'infoAttrs' => array(
[105] Fix | Delete
'label' => 'Is or is not',
[106] Fix | Delete
'info' => __('Allow or Disallow popup showing for the selected rule.', 'popup-builder')
[107] Fix | Delete
)
[108] Fix | Delete
),
[109] Fix | Delete
'post_selected' => array(
[110] Fix | Delete
'htmlAttrs' => array(
[111] Fix | Delete
'class' => 'js-sg-select2 js-select-ajax',
[112] Fix | Delete
'data-select-class' => 'js-select-ajax',
[113] Fix | Delete
'data-select-type' => 'ajax',
[114] Fix | Delete
'data-value-param' => 'post',
[115] Fix | Delete
'multiple' => 'multiple'
[116] Fix | Delete
),
[117] Fix | Delete
'infoAttrs' => array(
[118] Fix | Delete
'label' => 'Select Your Posts',
[119] Fix | Delete
'info' => __('Select your specific posts where the popup should be shown.', 'popup-builder')
[120] Fix | Delete
)
[121] Fix | Delete
),
[122] Fix | Delete
'page_selected' => array(
[123] Fix | Delete
'htmlAttrs' => array(
[124] Fix | Delete
'class' => 'js-sg-select2 js-select-ajax',
[125] Fix | Delete
'data-select-class' => 'js-select-ajax',
[126] Fix | Delete
'data-select-type' => 'ajax',
[127] Fix | Delete
'data-value-param' => 'page',
[128] Fix | Delete
'multiple' => 'multiple'
[129] Fix | Delete
),
[130] Fix | Delete
'infoAttrs' => array(
[131] Fix | Delete
'label' => 'Select Your Pages',
[132] Fix | Delete
'info' => __('Select the pages on your site where the specific popup will be shown.', 'popup-builder')
[133] Fix | Delete
)
[134] Fix | Delete
),
[135] Fix | Delete
'post_type' => array(
[136] Fix | Delete
'htmlAttrs' => array(
[137] Fix | Delete
'class' => 'js-sg-select2 js-select-ajax',
[138] Fix | Delete
'data-select-class' => 'js-select-ajax',
[139] Fix | Delete
'data-select-type' => 'multiple',
[140] Fix | Delete
'data-value-param' => 'postTypes',
[141] Fix | Delete
'isNotPostType' => true,
[142] Fix | Delete
'multiple' => 'multiple'
[143] Fix | Delete
),
[144] Fix | Delete
'infoAttrs' => array(
[145] Fix | Delete
'label' => 'Select Your post types',
[146] Fix | Delete
'info' => __('Specify the post types on your site to show the popup.', 'popup-builder')
[147] Fix | Delete
)
[148] Fix | Delete
),
[149] Fix | Delete
'post_category' => array(
[150] Fix | Delete
'htmlAttrs' => array(
[151] Fix | Delete
'class' => 'js-sg-select2 js-select-ajax',
[152] Fix | Delete
'data-select-class' => 'js-select-ajax',
[153] Fix | Delete
'data-select-type' => 'ajax',
[154] Fix | Delete
'data-value-param' => 'postCategories',
[155] Fix | Delete
'isNotPostType' => true,
[156] Fix | Delete
'isPostCategory' => true,
[157] Fix | Delete
'multiple' => 'multiple'
[158] Fix | Delete
),
[159] Fix | Delete
'infoAttrs' => array(
[160] Fix | Delete
'label' => 'Select post categories',
[161] Fix | Delete
'info' => __('Select the post categories on which the popup should be shown.', 'popup-builder')
[162] Fix | Delete
)
[163] Fix | Delete
),
[164] Fix | Delete
'page_type' => array(
[165] Fix | Delete
'htmlAttrs' => array(
[166] Fix | Delete
'class' => 'js-sg-select2 js-select-ajax',
[167] Fix | Delete
'data-select-class' => 'js-select-ajax',
[168] Fix | Delete
'data-select-type' => 'multiple',
[169] Fix | Delete
'data-value-param' => 'pageTypes',
[170] Fix | Delete
'isNotPostType' => true,
[171] Fix | Delete
'multiple' => 'multiple'
[172] Fix | Delete
),
[173] Fix | Delete
'infoAttrs' => array(
[174] Fix | Delete
'label' => 'Select specific page types',
[175] Fix | Delete
'info' => __('Specify the page types where the popup will be shown.', 'popup-builder')
[176] Fix | Delete
)
[177] Fix | Delete
),
[178] Fix | Delete
'page_template' => array(
[179] Fix | Delete
'htmlAttrs' => array(
[180] Fix | Delete
'class' => 'js-sg-select2 js-select-ajax',
[181] Fix | Delete
'data-select-class' => 'js-select-ajax',
[182] Fix | Delete
'data-select-type' => 'multiple',
[183] Fix | Delete
'data-value-param' => 'pageTemplate',
[184] Fix | Delete
'isNotPostType' => true,
[185] Fix | Delete
'multiple' => 'multiple'
[186] Fix | Delete
),
[187] Fix | Delete
'infoAttrs' => array(
[188] Fix | Delete
'label' => 'Select page template',
[189] Fix | Delete
'info' => __('Select the page templates on which the popup will be shown.', 'popup-builder')
[190] Fix | Delete
)
[191] Fix | Delete
),
[192] Fix | Delete
'post_tags_ids' => array(
[193] Fix | Delete
'htmlAttrs' => array(
[194] Fix | Delete
'class' => 'js-sg-select2 js-select-ajax',
[195] Fix | Delete
'data-select-class' => 'js-select-ajax',
[196] Fix | Delete
'data-select-type' => 'ajax',
[197] Fix | Delete
'data-value-param' => 'postTags',
[198] Fix | Delete
'isNotPostType' => true,
[199] Fix | Delete
'isPostTag' => true,
[200] Fix | Delete
'multiple' => 'multiple'
[201] Fix | Delete
),
[202] Fix | Delete
'infoAttrs' => array(
[203] Fix | Delete
'label' => 'Select tags',
[204] Fix | Delete
'info' => __('Select the tags on your site for popup showing', 'popup-builder')
[205] Fix | Delete
)
[206] Fix | Delete
)
[207] Fix | Delete
);
[208] Fix | Delete
[209] Fix | Delete
$popupTarget['columns'] = apply_filters('sgPopupTargetColumns', $targetData);
[210] Fix | Delete
$popupTarget['columnTypes'] = apply_filters('sgPopupTargetTypes', $targetElementTypes);
[211] Fix | Delete
$popupTarget['paramsData'] = apply_filters('sgPopupTargetData', $targetDataParams);
[212] Fix | Delete
$popupTarget['initialData'] = apply_filters('sgPopupTargetInitialData', $targetInitialData);
[213] Fix | Delete
$popupTarget['operators'] = apply_filters('sgpbPopupEventsOperators', $targetOperators);
[214] Fix | Delete
$popupTarget['attrs'] = apply_filters('sgPopupTargetAttrs', $targetAttrs);
[215] Fix | Delete
[216] Fix | Delete
$SGPB_DATA_CONFIG_ARRAY['target'] = $popupTarget;
[217] Fix | Delete
[218] Fix | Delete
/*Target condition config*/
[219] Fix | Delete
[220] Fix | Delete
/*
[221] Fix | Delete
*
[222] Fix | Delete
* Events data
[223] Fix | Delete
*
[224] Fix | Delete
**/
[225] Fix | Delete
$eventsData = array('param' => 'Event name', 'value' => 'Delay');
[226] Fix | Delete
$hiddenOptionData = array();
[227] Fix | Delete
[228] Fix | Delete
$eventsRowTypes = array(
[229] Fix | Delete
'param' => 'select',
[230] Fix | Delete
'operator' => 'select',
[231] Fix | Delete
'value' => 'text',
[232] Fix | Delete
'load' => 'number',
[233] Fix | Delete
'repetitive' => 'checkbox',
[234] Fix | Delete
'repetitivePeriod' => 'text',
[235] Fix | Delete
SGPB_CLICK_ACTION_KEY => 'select',
[236] Fix | Delete
'clickActionCustomClass' => 'text',
[237] Fix | Delete
'hoverActionCustomClass' => 'text',
[238] Fix | Delete
'defaultClickClassName' => 'conditionalText',
[239] Fix | Delete
'defaultHoverClassName' => 'conditionalText'
[240] Fix | Delete
);
[241] Fix | Delete
[242] Fix | Delete
$params = array(
[243] Fix | Delete
'load' => 'On load',
[244] Fix | Delete
SGPB_CSS_CLASS_ACTIONS_KEY => __('Set by CSS class', 'popup-builder'),
[245] Fix | Delete
SGPB_CLICK_ACTION_KEY => __('On Click', 'popup-builder'),
[246] Fix | Delete
SGPB_HOVER_ACTION_KEY => __('On Hover', 'popup-builder'),
[247] Fix | Delete
'inactivity' => __('Inactivity', 'popup-builder'),
[248] Fix | Delete
'onScroll' => __('On Scroll', 'popup-builder')
[249] Fix | Delete
);
[250] Fix | Delete
[251] Fix | Delete
$hiddenOptionData['load'] = array(
[252] Fix | Delete
'options' => array(
[253] Fix | Delete
'repetitive' => 'Repetitive popup'
[254] Fix | Delete
)
[255] Fix | Delete
);
[256] Fix | Delete
[257] Fix | Delete
$onLoadData = 0;
[258] Fix | Delete
[259] Fix | Delete
$eventsDataParams['param'] = $params;
[260] Fix | Delete
$eventsDataParams['operator'] = array();
[261] Fix | Delete
$eventsDataParams['load'] = $onLoadData;
[262] Fix | Delete
$eventsDataParams['clickActionCustomClass'] = '';
[263] Fix | Delete
$eventsDataParams['hoverActionCustomClass'] = '';
[264] Fix | Delete
$eventsDataParams['defaultClickClassName'] = 'sg-popup-id-';
[265] Fix | Delete
$eventsDataParams['defaultHoverClassName'] = 'sg-popup-hover-';
[266] Fix | Delete
$eventsDataParams[SGPB_CSS_CLASS_ACTIONS_KEY] = null;
[267] Fix | Delete
$eventsDataParams[SGPB_CLICK_ACTION_KEY.'Operator'] = SGPBConfigDataHelper::getClickActionOptions();
[268] Fix | Delete
$eventsDataParams[SGPB_HOVER_ACTION_KEY.'Operator'] = SGPBConfigDataHelper::getHoverActionOptions();
[269] Fix | Delete
/*Hidden params data*/
[270] Fix | Delete
$eventsDataParams['repetitive'] = '';
[271] Fix | Delete
$eventsDataParams['repetitivePeriod'] = 0;
[272] Fix | Delete
[273] Fix | Delete
$eventOperators = array(
[274] Fix | Delete
array('operator' => 'add', 'name' => 'Add'),
[275] Fix | Delete
array('operator' => 'edit', 'name' => 'Edit'),
[276] Fix | Delete
array('operator' => 'delete', 'name' => 'Delete')
[277] Fix | Delete
);
[278] Fix | Delete
[279] Fix | Delete
$eventsInitialData = array(
[280] Fix | Delete
array('param' => 'load', 'value' => '', 'hiddenOption' => array())
[281] Fix | Delete
);
[282] Fix | Delete
[283] Fix | Delete
$eventsAttrs = array(
[284] Fix | Delete
'param' => array(
[285] Fix | Delete
'htmlAttrs' => array(
[286] Fix | Delete
'class' => 'js-sg-select2 js-select-basic sgpb-selectbox-settings',
[287] Fix | Delete
'data-select-class' => 'js-select-basic',
[288] Fix | Delete
'data-select-type' => 'basic'
[289] Fix | Delete
),
[290] Fix | Delete
'infoAttrs' => array(
[291] Fix | Delete
'label' => 'Event',
[292] Fix | Delete
'info' => __('Select when the popup should appear on the page.', 'popup-builder')
[293] Fix | Delete
)
[294] Fix | Delete
),
[295] Fix | Delete
'operator' => array(
[296] Fix | Delete
'htmlAttrs' => array(
[297] Fix | Delete
'class' => 'js-sg-select2 js-select-basic',
[298] Fix | Delete
'data-select-class' => 'js-select-basic',
[299] Fix | Delete
'data-select-type' => 'basic'
[300] Fix | Delete
),
[301] Fix | Delete
'infoAttrs' => array(
[302] Fix | Delete
'label' => 'Options',
[303] Fix | Delete
'info' => __('Select the condition for the current event.', 'popup-builder')
[304] Fix | Delete
)
[305] Fix | Delete
),
[306] Fix | Delete
'load' => array(
[307] Fix | Delete
'htmlAttrs' => array('class' => 'js-sg-onload-text formItem__input formItem__input_select2_num_input', 'placeholder' => __('default custom delay will be used', 'popup-builder'), 'min' => 0),
[308] Fix | Delete
'infoAttrs' => array(
[309] Fix | Delete
'label' => 'Delay',
[310] Fix | Delete
'info' => __('Specify how long the popup appearance should be delayed after loading the page (in sec).', 'popup-builder')
[311] Fix | Delete
)
[312] Fix | Delete
),
[313] Fix | Delete
SGPB_CLICK_ACTION_KEY => array(
[314] Fix | Delete
'htmlAttrs' => array(
[315] Fix | Delete
'class' => 'js-sg-select2 js-select-basic formItem__input formItem__input_select2_num_input',
[316] Fix | Delete
'data-select-class' => 'js-select-basic',
[317] Fix | Delete
'data-select-type' => 'basic'
[318] Fix | Delete
),
[319] Fix | Delete
'infoAttrs' => array(
[320] Fix | Delete
'label' => 'Click Event',
[321] Fix | Delete
'info' => __('Specify the part of the page, in percentages, where the popup should appear after scrolling.', 'popup-builder')
[322] Fix | Delete
)
[323] Fix | Delete
),
[324] Fix | Delete
SGPB_HOVER_ACTION_KEY => array(
[325] Fix | Delete
'htmlAttrs' => array(
[326] Fix | Delete
'class' => 'js-sg-select2 js-select-basic formItem__input formItem__input_select2_num_input',
[327] Fix | Delete
'data-select-class' => 'js-select-basic',
[328] Fix | Delete
'data-select-type' => 'basic'
[329] Fix | Delete
),
[330] Fix | Delete
'infoAttrs' => array(
[331] Fix | Delete
'label' => 'Hover Event',
[332] Fix | Delete
'info' => __('Specify the part of the page, in percentages, where the popup should appear after scrolling.', 'popup-builder')
[333] Fix | Delete
)
[334] Fix | Delete
),
[335] Fix | Delete
'clickActionCustomClass' => array(
[336] Fix | Delete
'htmlAttrs' => array('class' => 'js-sg-inactivity-text formItem__input formItem__input_select2_num_input', 'min' => 0),
[337] Fix | Delete
'infoAttrs' => array(
[338] Fix | Delete
'label' => 'Custom Class',
[339] Fix | Delete
'info' => __('Add the CSS class name of your HTML element which will trigger this popup after click.', 'popup-builder')
[340] Fix | Delete
)
[341] Fix | Delete
),
[342] Fix | Delete
'hoverActionCustomClass' => array(
[343] Fix | Delete
'htmlAttrs' => array('class' => 'js-sg-inactivity-text formItem__input formItem__input_select2_num_input', 'min' => 0),
[344] Fix | Delete
'infoAttrs' => array(
[345] Fix | Delete
'label' => 'Custom Class',
[346] Fix | Delete
'info' => __('Add the CSS class name of your HTML element which will trigger this popup after click.', 'popup-builder')
[347] Fix | Delete
)
[348] Fix | Delete
),
[349] Fix | Delete
'defaultClickClassName' => array(
[350] Fix | Delete
'htmlAttrs' => array(
[351] Fix | Delete
'class' => 'js-sg-click-event formItem__input formItem__input_select2_num_input',
[352] Fix | Delete
'min' => 0,
[353] Fix | Delete
'readonly' => '',
[354] Fix | Delete
'value' => 'sg-popup-id-',
[355] Fix | Delete
'beforeSaveLabel' => __('Please save popup to generate class name.', 'popup-builder')
[356] Fix | Delete
),
[357] Fix | Delete
'infoAttrs' => array(
[358] Fix | Delete
'label' => 'Default Class',
[359] Fix | Delete
'info' => __('Add the following CSS class into your HTML element.', 'popup-builder')
[360] Fix | Delete
)
[361] Fix | Delete
),
[362] Fix | Delete
'defaultHoverClassName' => array(
[363] Fix | Delete
'htmlAttrs' => array(
[364] Fix | Delete
'class' => 'js-sg-hover-event formItem__input formItem__input_select2_num_input',
[365] Fix | Delete
'min' => 0,
[366] Fix | Delete
'readonly' => '',
[367] Fix | Delete
'value' => 'sg-popup-hover-',
[368] Fix | Delete
'beforeSaveLabel' => __('Please save popup to generate class name.', 'popup-builder')
[369] Fix | Delete
),
[370] Fix | Delete
'infoAttrs' => array(
[371] Fix | Delete
'label' => 'Default Class',
[372] Fix | Delete
'info' => __('Add the following CSS class into your HTML element.', 'popup-builder')
[373] Fix | Delete
)
[374] Fix | Delete
),
[375] Fix | Delete
'repetitive' => array(
[376] Fix | Delete
'htmlAttrs' => array(
[377] Fix | Delete
'class' => 'sgpb-popup-option sgpb-popup-accordion',
[378] Fix | Delete
'data-name' => 'repetitive',
[379] Fix | Delete
'autocomplete' => 'off'
[380] Fix | Delete
),
[381] Fix | Delete
'infoAttrs' => array(
[382] Fix | Delete
'label' => 'Repetitive open popup',
[383] Fix | Delete
'info' => __('If this option is enabled the same popup will open up after every X seconds you have defined (after closing it).', 'popup-builder')
[384] Fix | Delete
),
[385] Fix | Delete
'childOptions' => array('repetitivePeriod')
[386] Fix | Delete
),
[387] Fix | Delete
'repetitivePeriod' => array(
[388] Fix | Delete
'htmlAttrs' => array(
[389] Fix | Delete
'class' => 'sgpb-popup-option',
[390] Fix | Delete
'autocomplete' => 'off'
[391] Fix | Delete
),
[392] Fix | Delete
'infoAttrs' => array(
[393] Fix | Delete
'label' => 'period',
[394] Fix | Delete
'info' => __('This is info', 'popup-builder')
[395] Fix | Delete
)
[396] Fix | Delete
)
[397] Fix | Delete
);
[398] Fix | Delete
[399] Fix | Delete
$popupEvents['columns'] = apply_filters('sgPopupEventColumns', $eventsData);
[400] Fix | Delete
$popupEvents['columnTypes'] = apply_filters('sgPopupEventTypes', $eventsRowTypes);
[401] Fix | Delete
$popupEvents['paramsData'] = apply_filters('sgPopupEventsData', $eventsDataParams);
[402] Fix | Delete
$popupEvents['initialData'] = apply_filters('sgPopupEventsInitialData', $eventsInitialData);
[403] Fix | Delete
$popupEvents['operators'] = apply_filters('sgPopupEventOperators', $eventOperators);
[404] Fix | Delete
$popupEvents['hiddenOptionData'] = apply_filters('sgEventsHiddenData', $hiddenOptionData);
[405] Fix | Delete
$popupEvents['attrs'] = apply_filters('sgPopupEventAttrs', $eventsAttrs);
[406] Fix | Delete
[407] Fix | Delete
$popupEvents['specialDefaultOperator'] = apply_filters('sgPopupEventsOperators', ' ');
[408] Fix | Delete
$popupEvents['operatorAllowInConditions'] = apply_filters('sgPopupEventsOperatorAllowInConditions', array(SGPB_CLICK_ACTION_KEY, SGPB_HOVER_ACTION_KEY));
[409] Fix | Delete
[410] Fix | Delete
$SGPB_DATA_CONFIG_ARRAY['events'] = $popupEvents;
[411] Fix | Delete
[412] Fix | Delete
/*Target condition config*/
[413] Fix | Delete
$targetData = array('param' => 'Pages', 'operator' => 'Is not', 'value' => 'Value');
[414] Fix | Delete
$targetElementTypes = array(
[415] Fix | Delete
'param' => 'select',
[416] Fix | Delete
'operator' => 'select',
[417] Fix | Delete
'value' => 'select',
[418] Fix | Delete
'select_role' => 'select',
[419] Fix | Delete
);
[420] Fix | Delete
[421] Fix | Delete
$targetParams = array(
[422] Fix | Delete
'select_role' => __('Select Conditions', 'popup-builder')
[423] Fix | Delete
);
[424] Fix | Delete
[425] Fix | Delete
$targetOperators = array(
[426] Fix | Delete
array('operator' => 'add', 'name' => __('Add', 'popup-builder')),
[427] Fix | Delete
array('operator' => 'delete', 'name' => __('Delete', 'popup-builder'))
[428] Fix | Delete
);
[429] Fix | Delete
[430] Fix | Delete
$targetDataOperator = array(
[431] Fix | Delete
'==' => __('Is', 'popup-builder'),
[432] Fix | Delete
'!=' => __('Is not', 'popup-builder')
[433] Fix | Delete
);
[434] Fix | Delete
[435] Fix | Delete
$targetInitialData = array(
[436] Fix | Delete
array('param' => 'select_role', 'operator' => '==', 'value' => '')
[437] Fix | Delete
);
[438] Fix | Delete
[439] Fix | Delete
$targetDataParams['param'] = apply_filters('sgpbPopupSpecialEventsParams', $targetParams);
[440] Fix | Delete
$targetDataParams['operator'] = apply_filters('sgpbPopupConditionsOperator', $targetDataOperator);
[441] Fix | Delete
[442] Fix | Delete
$targetDataParams['select_role'] = null;
[443] Fix | Delete
[444] Fix | Delete
$targetAttrs = array(
[445] Fix | Delete
'param' => array(
[446] Fix | Delete
'htmlAttrs' => array(
[447] Fix | Delete
'class' => 'js-sg-select2 js-select-basic sgpb-selectbox-settings',
[448] Fix | Delete
'data-select-class' => 'js-select-basic',
[449] Fix | Delete
'data-select-type' => 'basic',
[450] Fix | Delete
'autocomplete' => 'off'
[451] Fix | Delete
),
[452] Fix | Delete
'infoAttrs' => array(
[453] Fix | Delete
'label' => 'Condition',
[454] Fix | Delete
'info' => __('Target visitors to show the popup by different conditions.', 'popup-builder')
[455] Fix | Delete
)
[456] Fix | Delete
),
[457] Fix | Delete
'operator' => array(
[458] Fix | Delete
'htmlAttrs' => array(
[459] Fix | Delete
'class' => 'js-sg-select2 js-select-basic',
[460] Fix | Delete
'data-select-class' => 'js-select-basic',
[461] Fix | Delete
'data-select-type' => 'basic'
[462] Fix | Delete
),
[463] Fix | Delete
'infoAttrs' => array(
[464] Fix | Delete
'label' => 'Rule',
[465] Fix | Delete
'info' => __('Allow or Disallow popup showing for the selected conditions.', 'popup-builder')
[466] Fix | Delete
)
[467] Fix | Delete
)
[468] Fix | Delete
);
[469] Fix | Delete
[470] Fix | Delete
$popupConditions['columns'] = apply_filters('sgPopupConditionsColumns', $targetData);
[471] Fix | Delete
$popupConditions['columnTypes'] = apply_filters('sgPopupConditionsTypes', $targetElementTypes);
[472] Fix | Delete
$popupConditions['paramsData'] = apply_filters('sgPopupConditionsData', $targetDataParams);
[473] Fix | Delete
$popupConditions['initialData'] = apply_filters('sgPopupConditionsInitialData', $targetInitialData);
[474] Fix | Delete
$popupConditions['operators'] = apply_filters('sgPopupConditionsOperators', $targetOperators);
[475] Fix | Delete
$popupConditions['attrs'] = apply_filters('sgPopupConditionsAttrs', $targetAttrs);
[476] Fix | Delete
[477] Fix | Delete
$popupConditions['specialDefaultOperator'] = apply_filters('sgPopupConditionsOperators', $targetDataOperator);
[478] Fix | Delete
$popupConditions['operatorAllowInConditions'] = apply_filters('sgPopupConditionsOperatorAllowInConditions', array());
[479] Fix | Delete
[480] Fix | Delete
$SGPB_DATA_CONFIG_ARRAY['conditions'] = $popupConditions;
[481] Fix | Delete
[482] Fix | Delete
$SGPB_DATA_CONFIG_ARRAY['behavior-after-special-events'] = self::getBehaviorAfterSpecialEventsConfig();
[483] Fix | Delete
$SGPB_DATA_CONFIG_ARRAY = apply_filters('sgpbConfigArray', $SGPB_DATA_CONFIG_ARRAY);
[484] Fix | Delete
/*Target condition config*/
[485] Fix | Delete
}
[486] Fix | Delete
[487] Fix | Delete
public static function allFreeExtensionsKeys()
[488] Fix | Delete
{
[489] Fix | Delete
$keys = array();
[490] Fix | Delete
[491] Fix | Delete
return $keys;
[492] Fix | Delete
}
[493] Fix | Delete
[494] Fix | Delete
public static function allExtensionsKeys()
[495] Fix | Delete
{
[496] Fix | Delete
$keys = array();
[497] Fix | Delete
$keys[] = array(
[498] Fix | Delete
'label' => __('AdBlock', 'popup-builder'),
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function