Advanced iframe debug console - l: local messages, r: remote messages (pro only).
'; include_once dirname(__FILE__) . '/advanced-iframe-admin-functions.php'; $agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; $result_check = ai_checkUrlStatus( trim($src), $agent); $html .= 'User agent: ' . $agent; $html .= '

Headers of ' . $src . ':
'; if(is_array($result_check['header'])){ foreach ($result_check['header'] as $line) { if (!empty($line)) { $replace = array("\n", "\r"); $html .= str_replace($replace, '', $line) . '
'; } } } $html .= ai_print_result($result_check); $html .= '

'; $html .= ' '; $_REQUEST['debugRendered'] = true; } if (!empty($hide_content_until_iframe_color)) { // we print the div to hide everything directly when the plugin is evaluated. $hide_content_until_iframe_color_print = trim(str_replace('|keep','', strtolower($hide_content_until_iframe_color))); echo '
'; } if ($show_iframe_loader === 'true') { // div around $html .= '
'; $filenameloader = $filenamedir . '/loader.gif'; $loader_url = file_exists($filenameloader) ? AIP_URL_CUSTOM : AIP_IMGURL; // div for the loader $html .= '
Loading
'; } if (!empty($hide_part_of_iframe)) { $html_hide = ''; $rectangles = explode('|' , $hide_part_of_iframe); $div_width = $this->addPx($width); if ($show_part_of_iframe === 'true') { $div_width = $this->addPx($show_part_of_iframe_width); } $html .= '
'; for($hi=0;$hiaddPx($values[0]); $r_y= $this->addPx($values[1]); $r_width = $this->addPx($values[2]); $r_height = $this->addPx($values[3]); $display_type = 'div'; $hide_href = ''; if ($num_values === 7 || $num_values === 8 ) { $display_type = 'a'; $hide_href = ' href="'.esc_html(trim($values[6])).'"'; } if ($num_values === 8) { $hide_href .= ' target="'.esc_html(trim($values[7])).'"'; } // bottom and right are extracted $x_style='left'; $y_style='top'; if ($r_x[0] === 'r') { $x_style='right'; $r_x = substr($r_x, 1); } if ($r_y[0] === 'b') { $y_style='bottom'; $r_y = substr($r_y, 1); } // $values[4] does also support a html file which also includes a shortcode // It is added with a $ after the color. html files needs to be in the custom folder. // hide and hide1000 creade click events on close + automatic hide at a specific time. $values_color = explode('$' , $values[4]); $bg_color = $values_color[0]; // file or shortcode $div_content = ''; if (count($values_color) >= 2) { if (count($values_color) === 3) { $element = $values_color[1]; $hide = $values_color[2]; } else { if ($this->ai_startsWith($values_color[1], 'hide')) { $hide = $values_color[1]; $element = "not_used"; } else { $element = $values_color[1]; $hide = "not_used"; } } if ($element != 'not_used') { $filename = $filenamedir . '/hide_'.esc_html(trim($element)).'.html'; // load file and show a message if it does not exist if (file_exists($filename)) { $div_content = trim(file_get_contents($filename)); // evaluate shortcodes $div_content = do_shortcode($div_content); } else { $content = 'The file "' .$filename . '" cannot be found.'; } } if ($hide != 'not_used') { $error = false; if ($this->ai_startsWith($hide, 'hide')) { $html_hide = ''; if ($hide === 'hide') { $html_hide .= ''; } } else { $error = true; } if ($error) { $html = $error_css . '
' . __('ERROR: hide part of iframe ony supports $hide or $hideXXX as last parameter.', 'advanced-iframe') . '
'; return $html; } } } // replace § with , for rbga ! $bg_color = str_replace('§',',',$bg_color ); $html .= ''; $html .= '<'.$display_type.$hide_href.' id="wrapper-div-element-'.$id.'-'.$hi.'">'.$div_content.''; $html .= $html_hide; } else { $html = $error_css . '
' . __('ERROR: hide part of iframe does not have the required 6 parameters', 'advanced-iframe') . '
'; return $html; } } } if ($show_part_of_iframe === 'true') { $html .= '
'; if ($fixChrome65) { $html .= '
'; } } if (!empty($iframe_zoom)) { $html .= '
'; } if ($enable_lazy_load === 'true') { $html .= '
'; } if (!empty($iframe_zoom)) { $html .= '
'; } if ($show_part_of_iframe === 'true') { if ($fixChrome65) { $html .= '
'; } $html .= '
'; } if (!empty($hide_part_of_iframe)) { $html .= '
'; } if ($show_iframe_loader === 'true') { $html .= '
'; } ?>