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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/popup-bu.../com/helpers
File: AdminHelper.php
}
[500] Fix | Delete
[501] Fix | Delete
public static function getPopupsIdAndTitle($excludesPopups = array())
[502] Fix | Delete
{
[503] Fix | Delete
$allPopups = SGPopup::getAllPopups();
[504] Fix | Delete
$popupIdTitles = array();
[505] Fix | Delete
[506] Fix | Delete
if (empty($allPopups)) {
[507] Fix | Delete
return $popupIdTitles;
[508] Fix | Delete
}
[509] Fix | Delete
[510] Fix | Delete
foreach ($allPopups as $popup) {
[511] Fix | Delete
if (empty($popup)) {
[512] Fix | Delete
continue;
[513] Fix | Delete
}
[514] Fix | Delete
[515] Fix | Delete
$id = $popup->getId();
[516] Fix | Delete
$title = $popup->getTitle();
[517] Fix | Delete
$type = $popup->getType();
[518] Fix | Delete
[519] Fix | Delete
if (!empty($excludesPopups)) {
[520] Fix | Delete
foreach ($excludesPopups as $excludesPopupId) {
[521] Fix | Delete
if ($excludesPopupId != $id) {
[522] Fix | Delete
$popupIdTitles[$id] = $title.' - '.$type;
[523] Fix | Delete
}
[524] Fix | Delete
}
[525] Fix | Delete
}
[526] Fix | Delete
else {
[527] Fix | Delete
$popupIdTitles[$id] = $title.' - '.$type;
[528] Fix | Delete
}
[529] Fix | Delete
}
[530] Fix | Delete
[531] Fix | Delete
return $popupIdTitles;
[532] Fix | Delete
}
[533] Fix | Delete
[534] Fix | Delete
/**
[535] Fix | Delete
* Merge two array and merge same key values to same array
[536] Fix | Delete
*
[537] Fix | Delete
* @since 1.0.0
[538] Fix | Delete
*
[539] Fix | Delete
* @param array $array1
[540] Fix | Delete
* @param array $array2
[541] Fix | Delete
*
[542] Fix | Delete
* @return array|bool
[543] Fix | Delete
*
[544] Fix | Delete
*/
[545] Fix | Delete
public static function arrayMergeSameKeys($array1, $array2)
[546] Fix | Delete
{
[547] Fix | Delete
if (empty($array1)) {
[548] Fix | Delete
return array();
[549] Fix | Delete
}
[550] Fix | Delete
[551] Fix | Delete
$modified = false;
[552] Fix | Delete
$array3 = array();
[553] Fix | Delete
foreach ($array1 as $key => $value) {
[554] Fix | Delete
if (isset($array2[$key]) && is_array($array2[$key])) {
[555] Fix | Delete
$arrDifference = array_diff($array2[$key], $array1[$key]);
[556] Fix | Delete
if (empty($arrDifference)) {
[557] Fix | Delete
continue;
[558] Fix | Delete
}
[559] Fix | Delete
[560] Fix | Delete
$modified = true;
[561] Fix | Delete
$array3[$key] = array_merge($array2[$key], $array1[$key]);
[562] Fix | Delete
unset($array2[$key]);
[563] Fix | Delete
continue;
[564] Fix | Delete
}
[565] Fix | Delete
[566] Fix | Delete
$modified = true;
[567] Fix | Delete
$array3[$key] = $value;
[568] Fix | Delete
}
[569] Fix | Delete
[570] Fix | Delete
// when there are no values
[571] Fix | Delete
if (!$modified) {
[572] Fix | Delete
return $modified;
[573] Fix | Delete
}
[574] Fix | Delete
[575] Fix | Delete
return $array2 + $array3;
[576] Fix | Delete
}
[577] Fix | Delete
[578] Fix | Delete
public static function getCurrentUserRole()
[579] Fix | Delete
{
[580] Fix | Delete
if( !function_exists('wp_get_current_user'))
[581] Fix | Delete
{
[582] Fix | Delete
require_once( ABSPATH . '/wp-includes/pluggable.php' );
[583] Fix | Delete
}
[584] Fix | Delete
[585] Fix | Delete
$role = array();
[586] Fix | Delete
[587] Fix | Delete
if (is_multisite()) {
[588] Fix | Delete
$getUsersObj = array();
[589] Fix | Delete
if (get_current_user_id() !== 0){
[590] Fix | Delete
$getUsersObj = get_users(
[591] Fix | Delete
array(
[592] Fix | Delete
'blog_id' => get_current_blog_id(),
[593] Fix | Delete
'search' => get_current_user_id()
[594] Fix | Delete
)
[595] Fix | Delete
);
[596] Fix | Delete
}
[597] Fix | Delete
[598] Fix | Delete
if (!empty($getUsersObj[0])) {
[599] Fix | Delete
$roles = $getUsersObj[0]->roles;
[600] Fix | Delete
[601] Fix | Delete
if (is_array($roles) && !empty($roles)) {
[602] Fix | Delete
$role = array_merge($role, $getUsersObj[0]->roles);
[603] Fix | Delete
}
[604] Fix | Delete
}
[605] Fix | Delete
[606] Fix | Delete
return $role;
[607] Fix | Delete
}
[608] Fix | Delete
[609] Fix | Delete
if( is_user_logged_in() ) {
[610] Fix | Delete
$current_user = wp_get_current_user();
[611] Fix | Delete
if (!empty($current_user)) {
[612] Fix | Delete
$role = $current_user->roles;
[613] Fix | Delete
}
[614] Fix | Delete
}
[615] Fix | Delete
[616] Fix | Delete
return $role;
[617] Fix | Delete
}
[618] Fix | Delete
[619] Fix | Delete
public static function hexToRgba($color, $opacity = false)
[620] Fix | Delete
{
[621] Fix | Delete
$default = 'rgb(0,0,0)';
[622] Fix | Delete
[623] Fix | Delete
//Return default if no color provided
[624] Fix | Delete
if (empty($color)) {
[625] Fix | Delete
return $default;
[626] Fix | Delete
}
[627] Fix | Delete
[628] Fix | Delete
//Sanitize $color if "#" is provided
[629] Fix | Delete
if ($color[0] == '#') {
[630] Fix | Delete
$color = substr($color, 1);
[631] Fix | Delete
}
[632] Fix | Delete
[633] Fix | Delete
//Check if color has 6 or 3 characters and get values
[634] Fix | Delete
if (strlen($color) == 6) {
[635] Fix | Delete
$hex = array($color[0].$color[1], $color[2].$color[3], $color[4].$color[5]);
[636] Fix | Delete
}
[637] Fix | Delete
else if (strlen($color) == 3) {
[638] Fix | Delete
$hex = array($color[0].$color[0], $color[1].$color[1], $color[2].$color[2]);
[639] Fix | Delete
}
[640] Fix | Delete
else {
[641] Fix | Delete
return $default;
[642] Fix | Delete
}
[643] Fix | Delete
[644] Fix | Delete
//Convert hexadec to rgb
[645] Fix | Delete
$rgb = array_map('hexdec', $hex);
[646] Fix | Delete
[647] Fix | Delete
//Check if opacity is set(rgba or rgb)
[648] Fix | Delete
if ($opacity !== false) {
[649] Fix | Delete
if (abs($opacity) > 1) {
[650] Fix | Delete
$opacity = 1.0;
[651] Fix | Delete
}
[652] Fix | Delete
$output = 'rgba('.implode(',', $rgb).','.$opacity.')';
[653] Fix | Delete
}
[654] Fix | Delete
else {
[655] Fix | Delete
$output = 'rgb('.implode(',', $rgb).')';
[656] Fix | Delete
}
[657] Fix | Delete
[658] Fix | Delete
//Return rgb(a) color string
[659] Fix | Delete
return $output;
[660] Fix | Delete
}
[661] Fix | Delete
[662] Fix | Delete
public static function getAllActiveExtensions()
[663] Fix | Delete
{
[664] Fix | Delete
$extensions = SgpbDataConfig::getOldExtensionsInfo();
[665] Fix | Delete
$labels = array();
[666] Fix | Delete
[667] Fix | Delete
foreach ($extensions as $extension) {
[668] Fix | Delete
if (file_exists(WP_PLUGIN_DIR.'/'.$extension['folderName'])) {
[669] Fix | Delete
$labels[] = $extension['label'];
[670] Fix | Delete
}
[671] Fix | Delete
}
[672] Fix | Delete
[673] Fix | Delete
return $labels;
[674] Fix | Delete
}
[675] Fix | Delete
[676] Fix | Delete
public static function renderExtensionsContent()
[677] Fix | Delete
{
[678] Fix | Delete
$extensions = self::getAllActiveExtensions();
[679] Fix | Delete
ob_start();
[680] Fix | Delete
?>
[681] Fix | Delete
<p class="sgpb-extension-notice-close">x</p>
[682] Fix | Delete
<div class="sgpb-extensions-list-wrapper">
[683] Fix | Delete
<div class="sgpb-notice-header">
[684] Fix | Delete
<h3><?php esc_html_e('Popup Builder plugin has been successfully updated', 'popup-builder'); ?></h3>
[685] Fix | Delete
<h4><?php esc_html_e('The following extensions need to be updated manually', 'popup-builder'); ?></h4>
[686] Fix | Delete
</div>
[687] Fix | Delete
<ul class="sgpb-extensions-list">
[688] Fix | Delete
<?php foreach ($extensions as $extensionName): ?>
[689] Fix | Delete
<a target="_blank" href="https://popup-builder.com/forms/control-panel/"><li><?php echo esc_html($extensionName); ?></li></a>
[690] Fix | Delete
<?php endforeach; ?>
[691] Fix | Delete
</ul>
[692] Fix | Delete
</div>
[693] Fix | Delete
<p class="sgpb-extension-notice-dont-show"><?php esc_html_e('Don\'t show again', 'popup-builder')?></p>
[694] Fix | Delete
<?php
[695] Fix | Delete
$content = ob_get_contents();
[696] Fix | Delete
ob_get_clean();
[697] Fix | Delete
[698] Fix | Delete
return $content;
[699] Fix | Delete
}
[700] Fix | Delete
[701] Fix | Delete
public static function getReverseConvertIds()
[702] Fix | Delete
{
[703] Fix | Delete
$idsMappingSaved = get_option('sgpbConvertedIds');
[704] Fix | Delete
$ids = array();
[705] Fix | Delete
[706] Fix | Delete
if ($idsMappingSaved) {
[707] Fix | Delete
$ids = $idsMappingSaved;
[708] Fix | Delete
}
[709] Fix | Delete
[710] Fix | Delete
return array_flip($ids);
[711] Fix | Delete
}
[712] Fix | Delete
[713] Fix | Delete
public static function getAllFreeExtensions()
[714] Fix | Delete
{
[715] Fix | Delete
$allExtensions = SgpbDataConfig::allFreeExtensionsKeys();
[716] Fix | Delete
[717] Fix | Delete
$notActiveExtensions = array();
[718] Fix | Delete
$activeExtensions = array();
[719] Fix | Delete
[720] Fix | Delete
foreach ($allExtensions as $extension) {
[721] Fix | Delete
if (!is_plugin_active($extension['pluginKey'])) {
[722] Fix | Delete
$notActiveExtensions[] = $extension;
[723] Fix | Delete
}
[724] Fix | Delete
else {
[725] Fix | Delete
$activeExtensions[] = $extension;
[726] Fix | Delete
}
[727] Fix | Delete
}
[728] Fix | Delete
[729] Fix | Delete
$divideExtension = array(
[730] Fix | Delete
'noActive' => $notActiveExtensions,
[731] Fix | Delete
'active' => $activeExtensions
[732] Fix | Delete
);
[733] Fix | Delete
[734] Fix | Delete
return $divideExtension;
[735] Fix | Delete
}
[736] Fix | Delete
[737] Fix | Delete
public static function getAllExtensions()
[738] Fix | Delete
{
[739] Fix | Delete
$allExtensions = SgpbDataConfig::allExtensionsKeys();
[740] Fix | Delete
[741] Fix | Delete
$notActiveExtensions = array();
[742] Fix | Delete
$activeExtensions = array();
[743] Fix | Delete
[744] Fix | Delete
foreach ($allExtensions as $extension) {
[745] Fix | Delete
if (!is_plugin_active($extension['pluginKey'])) {
[746] Fix | Delete
$notActiveExtensions[] = $extension;
[747] Fix | Delete
}
[748] Fix | Delete
else {
[749] Fix | Delete
$activeExtensions[] = $extension;
[750] Fix | Delete
}
[751] Fix | Delete
}
[752] Fix | Delete
[753] Fix | Delete
$divideExtension = array(
[754] Fix | Delete
'noActive' => $notActiveExtensions,
[755] Fix | Delete
'active' => $activeExtensions
[756] Fix | Delete
);
[757] Fix | Delete
[758] Fix | Delete
return $divideExtension;
[759] Fix | Delete
}
[760] Fix | Delete
[761] Fix | Delete
public static function renderAlertProblem()
[762] Fix | Delete
{
[763] Fix | Delete
ob_start();
[764] Fix | Delete
?>
[765] Fix | Delete
<div id="welcome-panel" class="update-nag sgpb-alert-problem">
[766] Fix | Delete
<div class="welcome-panel-content">
[767] Fix | Delete
<p class="sgpb-problem-notice-close">x</p>
[768] Fix | Delete
<div class="sgpb-alert-problem-text-wrapper">
[769] Fix | Delete
<h3><?php esc_html_e('Popup Builder plugin has been updated to the new version 3.', 'popup-builder'); ?></h3>
[770] Fix | Delete
<h5><?php esc_html_e('A lot of changes and improvements have been made.', 'popup-builder'); ?></h5>
[771] Fix | Delete
<h5><?php
[772] Fix | Delete
/* translators: Ticket URL */
[773] Fix | Delete
printf( wp_kses_post( __('In case of any issues, please contact us <a href="%s" target="_blank">here</a>.', 'popup-builder') ) , esc_url( SG_POPUP_TICKET_URL ) );
[774] Fix | Delete
?></h5>
[775] Fix | Delete
</div>
[776] Fix | Delete
<p class="sgpb-problem-notice-dont-show"><?php esc_html_e('Don\'t show again', 'popup-builder'); ?></p>
[777] Fix | Delete
</div>
[778] Fix | Delete
</div>
[779] Fix | Delete
<?php
[780] Fix | Delete
$content = ob_get_clean();
[781] Fix | Delete
[782] Fix | Delete
return $content;
[783] Fix | Delete
}
[784] Fix | Delete
[785] Fix | Delete
public static function getTaxonomyBySlug($slug = '')
[786] Fix | Delete
{
[787] Fix | Delete
$allTerms = get_terms(array('hide_empty' => false));
[788] Fix | Delete
[789] Fix | Delete
$result = array();
[790] Fix | Delete
if (empty($allTerms)) {
[791] Fix | Delete
return $result;
[792] Fix | Delete
}
[793] Fix | Delete
if ($slug == '') {
[794] Fix | Delete
return $allTerms;
[795] Fix | Delete
}
[796] Fix | Delete
foreach ($allTerms as $term) {
[797] Fix | Delete
if ($term->slug == $slug) {
[798] Fix | Delete
return $term;
[799] Fix | Delete
}
[800] Fix | Delete
}
[801] Fix | Delete
}
[802] Fix | Delete
[803] Fix | Delete
public static function getCurrentPopupType()
[804] Fix | Delete
{
[805] Fix | Delete
$type = '';
[806] Fix | Delete
if (!empty($_GET['sgpb_type'])) {
[807] Fix | Delete
$type = sanitize_text_field($_GET['sgpb_type']);
[808] Fix | Delete
}
[809] Fix | Delete
[810] Fix | Delete
$currentPostType = self::getCurrentPostType();
[811] Fix | Delete
[812] Fix | Delete
if ($currentPostType == SG_POPUP_POST_TYPE && !empty($_GET['post'])) {
[813] Fix | Delete
$popupObj = SGPopup::find(sanitize_text_field($_GET['post']));
[814] Fix | Delete
if (is_object($popupObj)) {
[815] Fix | Delete
$type = $popupObj->getType();
[816] Fix | Delete
}
[817] Fix | Delete
}
[818] Fix | Delete
[819] Fix | Delete
return $type;
[820] Fix | Delete
}
[821] Fix | Delete
[822] Fix | Delete
public static function getCurrentPostType()
[823] Fix | Delete
{
[824] Fix | Delete
global $post_type;
[825] Fix | Delete
global $post;
[826] Fix | Delete
$currentPostType = '';
[827] Fix | Delete
[828] Fix | Delete
if (is_object($post)) {
[829] Fix | Delete
$currentPostType = $post->post_type;
[830] Fix | Delete
}
[831] Fix | Delete
[832] Fix | Delete
// in some themes global $post returns null
[833] Fix | Delete
if (empty($currentPostType)) {
[834] Fix | Delete
$currentPostType = $post_type;
[835] Fix | Delete
}
[836] Fix | Delete
[837] Fix | Delete
if (empty($currentPostType) && !empty($_GET['post'])) {
[838] Fix | Delete
$currentPostType = get_post_type(sanitize_text_field($_GET['post']));
[839] Fix | Delete
}
[840] Fix | Delete
[841] Fix | Delete
return $currentPostType;
[842] Fix | Delete
}
[843] Fix | Delete
[844] Fix | Delete
/**
[845] Fix | Delete
* Get image encoded data from URL
[846] Fix | Delete
*
[847] Fix | Delete
* @param $imageUrl
[848] Fix | Delete
* @param $shouldNotConvertBase64
[849] Fix | Delete
*
[850] Fix | Delete
* @return string
[851] Fix | Delete
*/
[852] Fix | Delete
[853] Fix | Delete
public static function getImageDataFromUrl($imageUrl, $shouldNotConvertBase64 = false)
[854] Fix | Delete
{
[855] Fix | Delete
$remoteData = wp_remote_get($imageUrl);
[856] Fix | Delete
if (is_wp_error($remoteData) && $shouldNotConvertBase64) {
[857] Fix | Delete
return SG_POPUP_IMG_URL.'NoImage.png';
[858] Fix | Delete
}
[859] Fix | Delete
[860] Fix | Delete
if (!$shouldNotConvertBase64) {
[861] Fix | Delete
$imageData = wp_remote_retrieve_body($remoteData);
[862] Fix | Delete
$imageUrl = base64_encode($imageData);
[863] Fix | Delete
}
[864] Fix | Delete
[865] Fix | Delete
return $imageUrl;
[866] Fix | Delete
}
[867] Fix | Delete
[868] Fix | Delete
public static function deleteUserFromSubscribers($params = array())
[869] Fix | Delete
{
[870] Fix | Delete
global $wpdb;
[871] Fix | Delete
[872] Fix | Delete
$email = '';
[873] Fix | Delete
$popup = '';
[874] Fix | Delete
$noSubscriber = true;
[875] Fix | Delete
[876] Fix | Delete
if (isset($params['email'])) {
[877] Fix | Delete
$email = $params['email'];
[878] Fix | Delete
}
[879] Fix | Delete
if (isset($params['popup'])) {
[880] Fix | Delete
$popup = $params['popup'];
[881] Fix | Delete
}
[882] Fix | Delete
$subscribersTableName = $wpdb->prefix.SGPB_SUBSCRIBERS_TABLE_NAME;
[883] Fix | Delete
$res = $wpdb->get_row( $wpdb->prepare("SELECT id FROM $subscribersTableName WHERE email = %s && subscriptionType = %s", $email, $popup), ARRAY_A);
[884] Fix | Delete
if (!isset($res['id'])) {
[885] Fix | Delete
$noSubscriber = false;
[886] Fix | Delete
}
[887] Fix | Delete
$params['subscriberId'] = $res['id'];
[888] Fix | Delete
[889] Fix | Delete
$subscriber = self::subscriberExists($params);
[890] Fix | Delete
if ($subscriber && $noSubscriber) {
[891] Fix | Delete
self::deleteSubscriber($params);
[892] Fix | Delete
}
[893] Fix | Delete
else if (!$noSubscriber) {
[894] Fix | Delete
printf( '<span>%s</span>' ,
[895] Fix | Delete
wp_kses_post(__('Oops, something went wrong, please try again or contact the administrator to check more info.', 'popup-builder') )
[896] Fix | Delete
);
[897] Fix | Delete
wp_die();
[898] Fix | Delete
}
[899] Fix | Delete
}
[900] Fix | Delete
[901] Fix | Delete
public static function subscriberExists($params = array())
[902] Fix | Delete
{
[903] Fix | Delete
if (empty($params)) {
[904] Fix | Delete
return false;
[905] Fix | Delete
}
[906] Fix | Delete
[907] Fix | Delete
$receivedToken = $params['token'];
[908] Fix | Delete
$realToken = md5($params['subscriberId'].$params['email']);
[909] Fix | Delete
if ($receivedToken == $realToken) {
[910] Fix | Delete
return true;
[911] Fix | Delete
}
[912] Fix | Delete
[913] Fix | Delete
}
[914] Fix | Delete
[915] Fix | Delete
public static function deleteSubscriber($params = array())
[916] Fix | Delete
{
[917] Fix | Delete
global $wpdb;
[918] Fix | Delete
$homeUrl = get_home_url();
[919] Fix | Delete
[920] Fix | Delete
if (empty($params)) {
[921] Fix | Delete
return false;
[922] Fix | Delete
}
[923] Fix | Delete
// send email to admin about user unsubscription
[924] Fix | Delete
self::sendEmailAboutUnsubscribe($params);
[925] Fix | Delete
$subscribersTableName = $wpdb->prefix.SGPB_SUBSCRIBERS_TABLE_NAME;
[926] Fix | Delete
$wpdb->query( $wpdb->prepare("UPDATE $subscribersTableName SET unsubscribed = 1 WHERE id = %s ", $params['subscriberId']) );
[927] Fix | Delete
/* translators: Home page URL */
[928] Fix | Delete
printf( '<span>%1$s <a href="%2$s">click here</a> %3$s</span>' ,
[929] Fix | Delete
wp_kses_post(__('You have successfully unsubscribed.', 'popup-builder') ),
[930] Fix | Delete
esc_url($homeUrl),
[931] Fix | Delete
wp_kses_post(__(' to go to the home page.', 'popup-builder') )
[932] Fix | Delete
);
[933] Fix | Delete
wp_die();
[934] Fix | Delete
}
[935] Fix | Delete
[936] Fix | Delete
public static function sendEmailAboutUnsubscribe($params = array())
[937] Fix | Delete
{
[938] Fix | Delete
if (empty($params)) {
[939] Fix | Delete
return false;
[940] Fix | Delete
}
[941] Fix | Delete
[942] Fix | Delete
$newsletterOptions = get_option('SGPB_NEWSLETTER_DATA');
[943] Fix | Delete
$receiverEmail = get_bloginfo('admin_email');
[944] Fix | Delete
$userEmail = $params['email'];
[945] Fix | Delete
$emailTitle = __('Unsubscription', 'popup-builder');
[946] Fix | Delete
$subscriptionFormId = (int)$newsletterOptions['subscriptionFormId'];
[947] Fix | Delete
$subscriptionFormTitle = get_the_title($subscriptionFormId);
[948] Fix | Delete
/* translators: user Email, subscription Form Title */
[949] Fix | Delete
$message = sprintf( __('User with %1$s email has unsubscribed from %2$s mail list', 'popup-builder'), $userEmail, $subscriptionFormTitle);
[950] Fix | Delete
[951] Fix | Delete
$headers = 'MIME-Version: 1.0'."\r\n";
[952] Fix | Delete
$headers .= 'From: WordPress Popup Builder'."\r\n";
[953] Fix | Delete
$headers .= 'Content-type: text/html; charset=UTF-8'."\r\n"; //set UTF-8
[954] Fix | Delete
[955] Fix | Delete
wp_mail($receiverEmail, $emailTitle, $message, $headers);
[956] Fix | Delete
}
[957] Fix | Delete
[958] Fix | Delete
public static function addUnsubscribeColumn()
[959] Fix | Delete
{
[960] Fix | Delete
global $wpdb;
[961] Fix | Delete
$subscribersTableName = $wpdb->prefix.SGPB_SUBSCRIBERS_TABLE_NAME;
[962] Fix | Delete
$wpdb->query( "ALTER TABLE $subscribersTableName ADD COLUMN unsubscribed INT NOT NULL DEFAULT 0 " );
[963] Fix | Delete
}
[964] Fix | Delete
[965] Fix | Delete
public static function isPluginActive($key)
[966] Fix | Delete
{
[967] Fix | Delete
$allExtensions = SgpbDataConfig::allExtensionsKeys();
[968] Fix | Delete
$isActive = false;
[969] Fix | Delete
foreach ($allExtensions as $extension) {
[970] Fix | Delete
if (isset($extension['key']) && $extension['key'] == $key) {
[971] Fix | Delete
if (is_plugin_active($extension['pluginKey'])) {
[972] Fix | Delete
$isActive = true;
[973] Fix | Delete
return $isActive;
[974] Fix | Delete
}
[975] Fix | Delete
}
[976] Fix | Delete
}
[977] Fix | Delete
[978] Fix | Delete
return $isActive;
[979] Fix | Delete
}
[980] Fix | Delete
[981] Fix | Delete
public static function supportBannerNotification()
[982] Fix | Delete
{
[983] Fix | Delete
$content = '<div class="sgpb-support-notification-wrapper sgpb-wrapper"><h4 class="sgpb-support-notification-title">'.__('Need some help?', 'popup-builder').'</h4>';
[984] Fix | Delete
$content .= '<h4 class="sgpb-support-notification-title">'.__('Let us know what you think.', 'popup-builder').'</h4>';
[985] Fix | Delete
$content .= '<a class="btn btn-info" target="_blank" href="'.SG_POPUP_RATE_US_URL.'"><span class="dashicons sgpb-dashicons-heart sgpb-info-text-white"></span><span class="sg-info-text">'.__('Rate Us', 'popup-builder').'</span></a>';
[986] Fix | Delete
$content .= '<a class="btn btn-info" target="_blank" href="'.SG_POPUP_TICKET_URL.'"><span class="dashicons sgpb-dashicons-megaphone sgpb-info-text-white"></span>'.__('Support Portal', 'popup-builder').'</a>';
[987] Fix | Delete
$content .= '<a class="btn btn-info" target="_blank" href="https://wordpress.org/support/plugin/popup-builder"><span class="dashicons sgpb-dashicons-admin-plugins sgpb-info-text-white"></span>'.__('Support Forum', 'popup-builder').'</a>';
[988] Fix | Delete
$content .= '<a class="btn btn-info" target="_blank" href="'.SG_POPUP_STORE_URL.'"><span class="dashicons sgpb-dashicons-editor-help sgpb-info-text-white"></span>'.__('LIVE chat', 'popup-builder').'</a>';
[989] Fix | Delete
$content .= '<a class="btn btn-info" target="_blank" href="mailto:support@popup-builder.com?subject=Hello"><span class="dashicons sgpb-dashicons-email-alt sgpb-info-text-white"></span>'.__('Email', 'popup-builder').'</a></div>';
[990] Fix | Delete
$content .= '<div class="sgpb-support-notification-dont-show">'.__('Bored of this?').'<a class="sgpb-dont-show-again-support-notification" href="javascript:void(0)">'.__(' Press here ').'</a>'.__('and we will not show it again!').'</div>';
[991] Fix | Delete
[992] Fix | Delete
return $content;
[993] Fix | Delete
}
[994] Fix | Delete
[995] Fix | Delete
public static function getMaxOpenDaysMessage()
[996] Fix | Delete
{
[997] Fix | Delete
$getUsageDays = self::getPopupUsageDays();
[998] Fix | Delete
/* translators: Usage Days */
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function