/** * Set hook prefix for loading assets. * * @param string $prefix Current hook prefix. * * @return string */ public static function hook_prefix($prefix = '') { if ('admin' == $prefix && class_exists('IG_Pb_Helper_Functions') && IG_Pb_Helper_Functions::is_modal()) { $prefix = 'pb_admin'; } return $prefix; }
/** * Check if current page is modal page * * @param type $shortcode * * @return type */ public static function is_modal_of_element($shortcode) { if (empty($shortcode)) { return false; } return IG_Pb_Helper_Functions::is_modal() && isset($_GET['ig_modal_type']) && $_GET['ig_modal_type'] == $shortcode; }
/** * Show Modal page */ function modal_register() { if (IG_Pb_Helper_Functions::is_modal()) { $cls_modal = IG_Pb_Objects_Modal::get_instance(); if (!empty($_GET['ig_modal_type'])) { $cls_modal->preview_modal(); } if (!empty($_GET['ig_layout'])) { $cls_modal->preview_modal('_layout'); } if (!empty($_GET['ig_custom_css'])) { $cls_modal->preview_modal('_custom_css'); } } }