function sgOnloadPopup() { $page = get_queried_object_id(); $popup = "sg_promotional_popup"; $popupId = SGPopup::getPagePopupId($page, $popup); if (!$popupId) { return; } sgRenderPopupOpen($popupId); }
function sgOnloadPopup() { $sgOnloadPopupId = get_option('SG_POPUP_ONLOAD_ID'); if ($sgOnloadPopupId) { sgRenderPopupOpen($sgOnloadPopupId); } $page = get_queried_object_id(); $popup = "sg_promotional_popup"; $popupId = SGPopup::getPagePopupId($page, $popup); if (!$popupId) { return; } sgRenderPopupOpen($popupId); }