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/helpers
File: ConfigDataHelper.php
<?php
[0] Fix | Delete
class SGPBConfigDataHelper
[1] Fix | Delete
{
[2] Fix | Delete
public static $customPostType;
[3] Fix | Delete
public static $allCustomPosts = array();
[4] Fix | Delete
[5] Fix | Delete
public static function getPostTypeData($args = array())
[6] Fix | Delete
{
[7] Fix | Delete
$query = self::getQueryDataByArgs($args);
[8] Fix | Delete
[9] Fix | Delete
$posts = array();
[10] Fix | Delete
foreach ($query->posts as $post) {
[11] Fix | Delete
$posts[$post->ID] = $post->post_title;
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
return $posts;
[15] Fix | Delete
}
[16] Fix | Delete
[17] Fix | Delete
public static function getQueryDataByArgs($args = array())
[18] Fix | Delete
{
[19] Fix | Delete
$defaultArgs = array(
[20] Fix | Delete
'offset' => '',
[21] Fix | Delete
'orderby' => 'date',
[22] Fix | Delete
'order' => 'DESC',
[23] Fix | Delete
'post_status' => 'publish',
[24] Fix | Delete
'suppress_filters' => false,
[25] Fix | Delete
'post_type' => 'post',
[26] Fix | Delete
'posts_per_page' => 1000
[27] Fix | Delete
);
[28] Fix | Delete
$args = wp_parse_args($args, $defaultArgs);
[29] Fix | Delete
$query = new WP_Query($args);
[30] Fix | Delete
[31] Fix | Delete
return $query;
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
/**
[35] Fix | Delete
* this method is used for to get all other post types
[36] Fix | Delete
* that may created by another plugins or theme or website owner!
[37] Fix | Delete
*
[38] Fix | Delete
* example: download from EDD, product from Woocommerce!
[39] Fix | Delete
*/
[40] Fix | Delete
public static function getAllCustomPosts()
[41] Fix | Delete
{
[42] Fix | Delete
$args = array(
[43] Fix | Delete
'public' => true,
[44] Fix | Delete
'_builtin' => false
[45] Fix | Delete
);
[46] Fix | Delete
[47] Fix | Delete
$allCustomPosts = get_post_types($args);
[48] Fix | Delete
[49] Fix | Delete
if (isset($allCustomPosts[SG_POPUP_POST_TYPE])) {
[50] Fix | Delete
unset($allCustomPosts[SG_POPUP_POST_TYPE]);
[51] Fix | Delete
}
[52] Fix | Delete
self::$allCustomPosts = $allCustomPosts;
[53] Fix | Delete
return $allCustomPosts; // TODO check for usages and remove this line
[54] Fix | Delete
}
[55] Fix | Delete
[56] Fix | Delete
public static function addFilters()
[57] Fix | Delete
{
[58] Fix | Delete
self::addPostTypeToFilters();
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
private static function addPostTypeToFilters()
[62] Fix | Delete
{
[63] Fix | Delete
self::getAllCustomPosts();
[64] Fix | Delete
add_filter('sgPopupTargetParams', array(__CLASS__, 'addPopupTargetParams'), 1, 1);
[65] Fix | Delete
add_filter('sgPopupTargetData', array(__CLASS__, 'addPopupTargetData'), 1, 1);
[66] Fix | Delete
add_filter('sgPopupTargetTypes', array(__CLASS__, 'addPopupTargetTypes'), 1, 1);
[67] Fix | Delete
add_filter('sgPopupTargetAttrs', array(__CLASS__, 'addPopupTargetAttrs'), 1, 1);
[68] Fix | Delete
add_filter('sgPopupPageTemplates', array(__CLASS__, 'addPopupPageTemplates'), 1, 1);
[69] Fix | Delete
add_filter('sgPopupTargetPostType', array(__CLASS__, 'getAllCustomPostTypes'), 1, 1);
[70] Fix | Delete
add_filter('sgPopupTargetPageType', array(__CLASS__, 'getPageTypes'), 1, 1);
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
public static function addPopupTargetParams($targetParams)
[74] Fix | Delete
{
[75] Fix | Delete
$allCustomPostTypes = self::$allCustomPosts;
[76] Fix | Delete
// for conditions, to exclude other post types, tags etc.
[77] Fix | Delete
if (isset($targetParams['select_role'])) {
[78] Fix | Delete
return $targetParams;
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
foreach ($allCustomPostTypes as $customPostType) {
[82] Fix | Delete
$targetParams[$customPostType] = array(
[83] Fix | Delete
$customPostType.'_all' => 'All '.ucfirst($customPostType).'s',
[84] Fix | Delete
$customPostType.'_archive' => 'Archives '.ucfirst($customPostType).'s',
[85] Fix | Delete
$customPostType.'_selected' => 'Select '.ucfirst($customPostType).'s',
[86] Fix | Delete
$customPostType.'_categories' => 'Select '.ucfirst($customPostType).' categories'
[87] Fix | Delete
);
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
return $targetParams;
[91] Fix | Delete
}
[92] Fix | Delete
[93] Fix | Delete
public static function addPopupTargetData($targetData)
[94] Fix | Delete
{
[95] Fix | Delete
$allCustomPostTypes = self::$allCustomPosts;
[96] Fix | Delete
[97] Fix | Delete
foreach ($allCustomPostTypes as $customPostType) {
[98] Fix | Delete
$targetData[$customPostType.'_all'] = null;
[99] Fix | Delete
$targetData[$customPostType.'_selected'] = '';
[100] Fix | Delete
$targetData[$customPostType.'_categories'] = self::getCustomPostCategories($customPostType);
[101] Fix | Delete
}
[102] Fix | Delete
[103] Fix | Delete
return $targetData;
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
public static function getCustomPostCategories($postTypeName)
[107] Fix | Delete
{
[108] Fix | Delete
$taxonomyObjects = get_object_taxonomies($postTypeName);
[109] Fix | Delete
if ($postTypeName == 'product') {
[110] Fix | Delete
$taxonomyObjects = array('product_cat');
[111] Fix | Delete
}
[112] Fix | Delete
$categories = self::getPostsAllCategories($postTypeName, $taxonomyObjects);
[113] Fix | Delete
[114] Fix | Delete
return $categories;
[115] Fix | Delete
}
[116] Fix | Delete
[117] Fix | Delete
public static function addPopupTargetTypes($targetTypes)
[118] Fix | Delete
{
[119] Fix | Delete
$allCustomPostTypes = self::$allCustomPosts;
[120] Fix | Delete
[121] Fix | Delete
foreach ($allCustomPostTypes as $customPostType) {
[122] Fix | Delete
$targetTypes[$customPostType.'_selected'] = 'select';
[123] Fix | Delete
$targetTypes[$customPostType.'_categories'] = 'select';
[124] Fix | Delete
}
[125] Fix | Delete
[126] Fix | Delete
return $targetTypes;
[127] Fix | Delete
}
[128] Fix | Delete
[129] Fix | Delete
public static function addPopupTargetAttrs($targetAttrs)
[130] Fix | Delete
{
[131] Fix | Delete
$allCustomPostTypes = self::$allCustomPosts;
[132] Fix | Delete
[133] Fix | Delete
foreach ($allCustomPostTypes as $customPostType) {
[134] Fix | Delete
$targetAttrs[$customPostType.'_selected']['htmlAttrs'] = array('class' => 'js-sg-select2 js-select-ajax', 'data-select-class' => 'js-select-ajax', 'data-select-type' => 'ajax', 'data-value-param' => $customPostType, 'multiple' => 'multiple');
[135] Fix | Delete
$targetAttrs[$customPostType.'_selected']['infoAttrs'] = array('label' => __('Select ', 'popup-builder').$customPostType);
[136] Fix | Delete
[137] Fix | Delete
$targetAttrs[$customPostType.'_categories']['htmlAttrs'] = array('class' => 'js-sg-select2 js-select-ajax', 'data-select-class' => 'js-select-ajax', 'isNotPostType' => true, 'data-value-param' => $customPostType, 'multiple' => 'multiple');
[138] Fix | Delete
$targetAttrs[$customPostType.'_categories']['infoAttrs'] = array('label' => __('Select ', 'popup-builder').$customPostType.' categories');
[139] Fix | Delete
}
[140] Fix | Delete
[141] Fix | Delete
return $targetAttrs;
[142] Fix | Delete
}
[143] Fix | Delete
[144] Fix | Delete
public static function addPopupPageTemplates($templates)
[145] Fix | Delete
{
[146] Fix | Delete
$pageTemplates = self::getPageTemplates();
[147] Fix | Delete
[148] Fix | Delete
$pageTemplates += $templates;
[149] Fix | Delete
[150] Fix | Delete
return $pageTemplates;
[151] Fix | Delete
}
[152] Fix | Delete
[153] Fix | Delete
public static function getAllCustomPostTypes()
[154] Fix | Delete
{
[155] Fix | Delete
$args = array(
[156] Fix | Delete
'public' => true,
[157] Fix | Delete
'_builtin' => false
[158] Fix | Delete
);
[159] Fix | Delete
[160] Fix | Delete
$allCustomPosts = get_post_types($args);
[161] Fix | Delete
if (!empty($allCustomPosts[SG_POPUP_POST_TYPE])) {
[162] Fix | Delete
unset($allCustomPosts[SG_POPUP_POST_TYPE]);
[163] Fix | Delete
}
[164] Fix | Delete
[165] Fix | Delete
return $allCustomPosts;
[166] Fix | Delete
}
[167] Fix | Delete
[168] Fix | Delete
public static function getPostsAllCategories($postType = 'post', $taxonomies = array(), $search_text = '')
[169] Fix | Delete
{
[170] Fix | Delete
$cats = get_terms(
[171] Fix | Delete
array(
[172] Fix | Delete
'taxonomy' => $taxonomies,
[173] Fix | Delete
'hide_empty' => false,
[174] Fix | Delete
'type' => $postType,
[175] Fix | Delete
'orderby' => 'name',
[176] Fix | Delete
'order' => 'ASC',
[177] Fix | Delete
'number' => 200,
[178] Fix | Delete
'offset' => 0,
[179] Fix | Delete
'name__like' => $search_text
[180] Fix | Delete
)
[181] Fix | Delete
);
[182] Fix | Delete
[183] Fix | Delete
$supportedTaxonomies = array('category');
[184] Fix | Delete
if (!empty($taxonomies)) {
[185] Fix | Delete
$supportedTaxonomies = $taxonomies;
[186] Fix | Delete
}
[187] Fix | Delete
[188] Fix | Delete
$catsParams = array();
[189] Fix | Delete
foreach ($cats as $cat) {
[190] Fix | Delete
if (isset($cat->taxonomy)) {
[191] Fix | Delete
if (!in_array($cat->taxonomy, $supportedTaxonomies)) {
[192] Fix | Delete
continue;
[193] Fix | Delete
}
[194] Fix | Delete
}
[195] Fix | Delete
$id = $cat->term_id;
[196] Fix | Delete
$name = $cat->name;
[197] Fix | Delete
$catsParams[$id] = $name;
[198] Fix | Delete
}
[199] Fix | Delete
[200] Fix | Delete
return $catsParams;
[201] Fix | Delete
}
[202] Fix | Delete
[203] Fix | Delete
public static function getPageTypes()
[204] Fix | Delete
{
[205] Fix | Delete
$postTypes = array();
[206] Fix | Delete
[207] Fix | Delete
$postTypes['is_home_page'] = __('Home Page', 'popup-builder');
[208] Fix | Delete
$postTypes['is_home'] = __('Posts Page', 'popup-builder');
[209] Fix | Delete
$postTypes['is_search'] = __('Search Pages', 'popup-builder');
[210] Fix | Delete
$postTypes['is_404'] = __('404 Pages', 'popup-builder');
[211] Fix | Delete
if (function_exists('is_shop')) {
[212] Fix | Delete
$postTypes['is_shop'] = __('Shop Page', 'popup-builder');
[213] Fix | Delete
}
[214] Fix | Delete
if (function_exists('is_archive')) {
[215] Fix | Delete
$postTypes['is_archive'] = __('Archive Page', 'popup-builder');
[216] Fix | Delete
}
[217] Fix | Delete
[218] Fix | Delete
return $postTypes;
[219] Fix | Delete
}
[220] Fix | Delete
[221] Fix | Delete
public static function getPageTemplates()
[222] Fix | Delete
{
[223] Fix | Delete
$pageTemplates = array(
[224] Fix | Delete
'page.php' => __('Default Template', 'popup-builder')
[225] Fix | Delete
);
[226] Fix | Delete
[227] Fix | Delete
$templates = wp_get_theme()->get_page_templates();
[228] Fix | Delete
if (empty($templates)) {
[229] Fix | Delete
return $pageTemplates;
[230] Fix | Delete
}
[231] Fix | Delete
[232] Fix | Delete
foreach ($templates as $key => $value) {
[233] Fix | Delete
$pageTemplates[$key] = $value;
[234] Fix | Delete
}
[235] Fix | Delete
[236] Fix | Delete
return $pageTemplates;
[237] Fix | Delete
}
[238] Fix | Delete
[239] Fix | Delete
public static function getAllTags($search_text = '')
[240] Fix | Delete
{
[241] Fix | Delete
$allTags = array();
[242] Fix | Delete
$tags = get_tags(array(
[243] Fix | Delete
'hide_empty' => false,
[244] Fix | Delete
'name__like' => $search_text
[245] Fix | Delete
));
[246] Fix | Delete
[247] Fix | Delete
foreach ($tags as $tag) {
[248] Fix | Delete
$allTags[$tag->slug] = $tag->name;
[249] Fix | Delete
}
[250] Fix | Delete
[251] Fix | Delete
return $allTags;
[252] Fix | Delete
}
[253] Fix | Delete
public static function getTagsByIds($ids = [])
[254] Fix | Delete
{
[255] Fix | Delete
$allTags = array();
[256] Fix | Delete
$tags = get_tags(array(
[257] Fix | Delete
'hide_empty' => false,
[258] Fix | Delete
'include' => $ids
[259] Fix | Delete
));
[260] Fix | Delete
foreach ($tags as $tag) {
[261] Fix | Delete
$allTags[$tag->slug] = $tag->name;
[262] Fix | Delete
}
[263] Fix | Delete
return $allTags;
[264] Fix | Delete
}
[265] Fix | Delete
public static function getTagsBySlug($ids = [])
[266] Fix | Delete
{
[267] Fix | Delete
$allTags = array();
[268] Fix | Delete
$tags = get_tags(array(
[269] Fix | Delete
'hide_empty' => false,
[270] Fix | Delete
'slug' => $ids
[271] Fix | Delete
));
[272] Fix | Delete
foreach ($tags as $tag) {
[273] Fix | Delete
$allTags[$tag->slug] = $tag->name;
[274] Fix | Delete
}
[275] Fix | Delete
return $allTags;
[276] Fix | Delete
}
[277] Fix | Delete
[278] Fix | Delete
public static function getTermsByIds($ids = array())
[279] Fix | Delete
{
[280] Fix | Delete
$allTags = array();
[281] Fix | Delete
$terms = get_terms(array(
[282] Fix | Delete
'hide_empty' => false,
[283] Fix | Delete
'include' => $ids
[284] Fix | Delete
));
[285] Fix | Delete
foreach ($terms as $term) {
[286] Fix | Delete
$allTags[$term->term_id] = $term->name;
[287] Fix | Delete
}
[288] Fix | Delete
return $allTags;
[289] Fix | Delete
}
[290] Fix | Delete
[291] Fix | Delete
public static function defaultData()
[292] Fix | Delete
{
[293] Fix | Delete
$data = array();
[294] Fix | Delete
[295] Fix | Delete
$data['contentClickOptions'] = array(
[296] Fix | Delete
'template' => array(
[297] Fix | Delete
'fieldWrapperAttr' => array(
[298] Fix | Delete
'class' => 'col-md-7 sgpb-choice-option-wrapper'
[299] Fix | Delete
),
[300] Fix | Delete
'labelAttr' => array(
[301] Fix | Delete
'class' => 'formItem__title'
[302] Fix | Delete
),
[303] Fix | Delete
'groupWrapperAttr' => array(
[304] Fix | Delete
'class' => 'subFormItem sgpb-choice-wrapper formItem'
[305] Fix | Delete
)
[306] Fix | Delete
),
[307] Fix | Delete
'buttonPosition' => 'right',
[308] Fix | Delete
'nextNewLine' => true,
[309] Fix | Delete
'fields' => array(
[310] Fix | Delete
array(
[311] Fix | Delete
'attr' => array(
[312] Fix | Delete
'type' => 'radio',
[313] Fix | Delete
'name' => 'sgpb-content-click-behavior',
[314] Fix | Delete
'value' => 'close'
[315] Fix | Delete
),
[316] Fix | Delete
'label' => array(
[317] Fix | Delete
'name' => __('Close Popup', 'popup-builder').':'
[318] Fix | Delete
)
[319] Fix | Delete
),
[320] Fix | Delete
array(
[321] Fix | Delete
'attr' => array(
[322] Fix | Delete
'type' => 'radio',
[323] Fix | Delete
'name' => 'sgpb-content-click-behavior',
[324] Fix | Delete
'data-attr-href' => 'content-click-redirect',
[325] Fix | Delete
'value' => 'redirect'
[326] Fix | Delete
),
[327] Fix | Delete
'label' => array(
[328] Fix | Delete
'name' => __('Redirect', 'popup-builder').':'
[329] Fix | Delete
)
[330] Fix | Delete
),
[331] Fix | Delete
array(
[332] Fix | Delete
'attr' => array(
[333] Fix | Delete
'type' => 'radio',
[334] Fix | Delete
'name' => 'sgpb-content-click-behavior',
[335] Fix | Delete
'data-attr-href' => 'content-copy-to-clipboard',
[336] Fix | Delete
'value' => 'copy'
[337] Fix | Delete
),
[338] Fix | Delete
'label' => array(
[339] Fix | Delete
'name' => __('Copy to clipboard', 'popup-builder').':'
[340] Fix | Delete
)
[341] Fix | Delete
)
[342] Fix | Delete
)
[343] Fix | Delete
);
[344] Fix | Delete
[345] Fix | Delete
$data['customEditorContent'] = array(
[346] Fix | Delete
'js' => array(
[347] Fix | Delete
'helperText' => array(
[348] Fix | Delete
'ShouldOpen' => '<b>Opening events:</b><br><br><b>#1</b> Add the code you want to run <b>before</b> the popup opening. This will be a condition for opening the popup, that is processed and defined before the popup opening. If the return value is <b>"true"</b> then the popup will open, if the value is <b>"false"</b> the popup won\'t open.',
[349] Fix | Delete
'WillOpen' => '<b>#2</b> Add the code you want to run <b>before</b> the popup opens. This will be the code that will work in the process of opening the popup. <b>true/false</b> conditions will not work in this phase.',
[350] Fix | Delete
'DidOpen' => '<b>#3</b> Add the code you want to run <b>after</b> the popup opens. This code will work when the popup is already open on the page.',
[351] Fix | Delete
'ShouldClose' => '<b>Closing events:</b><br><br><b>#1</b> Add the code that will be fired <b>before</b> the popup closes. This will be a condition for the popup closing. If the return value is <b>"true"</b> then the popup will close, if the value is <b>"false"</b> the popup won\'t close.',
[352] Fix | Delete
'WillClose' => '<b>#2</b> Add the code you want to run <b>before</b> the popup closes. This will be the code that will work in the process of closing the popup. <b>true/false</b> conditions will not work in this phase.',
[353] Fix | Delete
'DidClose' => '<b>#3</b> Add the code you want to run <b>after</b> the popup closes. This code will work when the popup is already closed on the page.'
[354] Fix | Delete
),
[355] Fix | Delete
'description' => array(
[356] Fix | Delete
'<span class="formItem__text">
[357] Fix | Delete
'.__('If you need the popup id number in the custom code, you may use the following variable to get the ID:', 'popup-builder').'
[358] Fix | Delete
<b>popupId</b>
[359] Fix | Delete
</span>'
[360] Fix | Delete
)
[361] Fix | Delete
),
[362] Fix | Delete
'css' => array(
[363] Fix | Delete
// we need this oldDefaultValue for the backward compatibility
[364] Fix | Delete
'oldDefaultValue' => array(
[365] Fix | Delete
'/*popup content wrapper*/'."\n".
[366] Fix | Delete
'.sgpb-content-popupId {'."\n\n".'}'."\n\n".
[367] Fix | Delete
[368] Fix | Delete
'/*overlay*/'."\n".
[369] Fix | Delete
'.sgpb-popup-overlay-popupId {'."\n\n".'}'."\n\n".
[370] Fix | Delete
[371] Fix | Delete
'/*popup wrapper*/'."\n".
[372] Fix | Delete
'.sgpb-popup-builder-content-popupId {'."\n\n".'}'."\n\n"
[373] Fix | Delete
),
[374] Fix | Delete
'helperText' => array(
[375] Fix | Delete
'<br>/*popup content wrapper*/',
[376] Fix | Delete
'.sgpb-content-popupId',
[377] Fix | Delete
'<br>/*overlay*/',
[378] Fix | Delete
'.sgpb-popup-overlay-popupId',
[379] Fix | Delete
'<br>/*popup wrapper*/',
[380] Fix | Delete
'.sgpb-popup-builder-content-popupId'
[381] Fix | Delete
),
[382] Fix | Delete
'description' => array(
[383] Fix | Delete
'<span class="formItem__text">
[384] Fix | Delete
'.__('If you need the popup id number in the custom code, you may use the following variable to get the ID:', 'popup-builder').'
[385] Fix | Delete
<b>popupId</b>
[386] Fix | Delete
</span>'
[387] Fix | Delete
)
[388] Fix | Delete
)
[389] Fix | Delete
);
[390] Fix | Delete
[391] Fix | Delete
$data['htmlCustomButtonArgs'] = array(
[392] Fix | Delete
'template' => array(
[393] Fix | Delete
'fieldWrapperAttr' => array(
[394] Fix | Delete
'class' => 'col-md-6 sgpb-choice-option-wrapper'
[395] Fix | Delete
),
[396] Fix | Delete
'labelAttr' => array(
[397] Fix | Delete
'class' => 'col-md-6 sgpb-choice-option-wrapper sgpb-sub-option-label'
[398] Fix | Delete
),
[399] Fix | Delete
'groupWrapperAttr' => array(
[400] Fix | Delete
'class' => 'row form-group sgpb-choice-wrapper'
[401] Fix | Delete
)
[402] Fix | Delete
),
[403] Fix | Delete
'buttonPosition' => 'right',
[404] Fix | Delete
'nextNewLine' => true,
[405] Fix | Delete
'fields' => array(
[406] Fix | Delete
array(
[407] Fix | Delete
'attr' => array(
[408] Fix | Delete
'type' => 'radio',
[409] Fix | Delete
'name' => 'sgpb-custom-button',
[410] Fix | Delete
'class' => 'custom-button-copy-to-clipboard',
[411] Fix | Delete
'data-attr-href' => 'sgpb-custom-button-copy',
[412] Fix | Delete
'value' => 'copyToClipBoard'
[413] Fix | Delete
),
[414] Fix | Delete
'label' => array(
[415] Fix | Delete
'name' => __('Copy to clipboard', 'popup-builder').':'
[416] Fix | Delete
)
[417] Fix | Delete
),
[418] Fix | Delete
array(
[419] Fix | Delete
'attr' => array(
[420] Fix | Delete
'type' => 'radio',
[421] Fix | Delete
'name' => 'sgpb-custom-button',
[422] Fix | Delete
'class' => 'custom-button-copy-to-clipboard',
[423] Fix | Delete
'data-attr-href' => 'sgpb-custom-button-redirect-to-URL',
[424] Fix | Delete
'value' => 'redirectToURL'
[425] Fix | Delete
),
[426] Fix | Delete
'label' => array(
[427] Fix | Delete
'name' => __('Redirect to URL', 'popup-builder').':'
[428] Fix | Delete
)
[429] Fix | Delete
),
[430] Fix | Delete
array(
[431] Fix | Delete
'attr' => array(
[432] Fix | Delete
'type' => 'radio',
[433] Fix | Delete
'name' => 'sgpb-custom-button',
[434] Fix | Delete
'class' => 'subs-success-open-popup',
[435] Fix | Delete
'data-attr-href' => 'sgpb-custom-button-open-popup',
[436] Fix | Delete
'value' => 'openPopup'
[437] Fix | Delete
),
[438] Fix | Delete
'label' => array(
[439] Fix | Delete
'name' => __('Open popup', 'popup-builder').':'
[440] Fix | Delete
)
[441] Fix | Delete
),
[442] Fix | Delete
array(
[443] Fix | Delete
'attr' => array(
[444] Fix | Delete
'type' => 'radio',
[445] Fix | Delete
'name' => 'sgpb-custom-button',
[446] Fix | Delete
'class' => 'sgpb-custom-button-hide-popup',
[447] Fix | Delete
'value' => 'hidePopup'
[448] Fix | Delete
),
[449] Fix | Delete
'label' => array(
[450] Fix | Delete
'name' => __('Hide popup', 'popup-builder').':'
[451] Fix | Delete
)
[452] Fix | Delete
)
[453] Fix | Delete
)
[454] Fix | Delete
);
[455] Fix | Delete
[456] Fix | Delete
$data['popupDimensions'] = array(
[457] Fix | Delete
'template' => array(
[458] Fix | Delete
'fieldWrapperAttr' => array(
[459] Fix | Delete
'class' => 'col-md-7 sgpb-choice-option-wrapper'
[460] Fix | Delete
),
[461] Fix | Delete
'labelAttr' => array(
[462] Fix | Delete
'class' => 'formItem__title'
[463] Fix | Delete
),
[464] Fix | Delete
'groupWrapperAttr' => array(
[465] Fix | Delete
'class' => 'subFormItem sgpb-choice-wrapper sgpb-display-flex sgpb-align-item-center formItem'
[466] Fix | Delete
)
[467] Fix | Delete
),
[468] Fix | Delete
'buttonPosition' => 'right',
[469] Fix | Delete
'nextNewLine' => true,
[470] Fix | Delete
'fields' => array(
[471] Fix | Delete
array(
[472] Fix | Delete
'attr' => array(
[473] Fix | Delete
'type' => 'radio',
[474] Fix | Delete
'name' => 'sgpb-popup-dimension-mode',
[475] Fix | Delete
'class' => 'test class',
[476] Fix | Delete
'data-attr-href' => 'responsive-dimension-wrapper',
[477] Fix | Delete
'value' => 'responsiveMode'
[478] Fix | Delete
),
[479] Fix | Delete
'label' => array(
[480] Fix | Delete
'name' => __('Responsive mode', 'popup-builder').':',
[481] Fix | Delete
'info' => __('The sizes of the popup will be counted automatically, according to the content size of the popup. You can select the size in percentages, with this mode, to specify the size on the screen', 'popup-builder').'.'
[482] Fix | Delete
)
[483] Fix | Delete
),
[484] Fix | Delete
array(
[485] Fix | Delete
'attr' => array(
[486] Fix | Delete
'type' => 'radio',
[487] Fix | Delete
'name' => 'sgpb-popup-dimension-mode',
[488] Fix | Delete
'class' => 'test class',
[489] Fix | Delete
'data-attr-href' => 'custom-dimension-wrapper',
[490] Fix | Delete
'value' => 'customMode'
[491] Fix | Delete
),
[492] Fix | Delete
'label' => array(
[493] Fix | Delete
'name' => __('Custom mode', 'popup-builder').':',
[494] Fix | Delete
'info' => __('Add your own custom dimensions for the popup to get the exact sizing for your popup', 'popup-builder').'.'
[495] Fix | Delete
)
[496] Fix | Delete
)
[497] Fix | Delete
)
[498] Fix | Delete
);
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function