getAdminOptions(); // print_r($devOptions); if (isset($_POST['update_iframe-loader'])) { //save option changes $adminSettings = array('securitykey', 'src', 'width', 'height', 'scrolling', 'marginwidth', 'marginheight', 'frameborder', 'transparency', 'content_id', 'content_styles', 'hide_elements', 'class', 'shortcode_attributes', 'url_forward_parameter', 'id', 'name', 'onload', 'onload_resize', 'onload_scroll_top', 'additional_js', 'additional_css', 'store_height_in_cookie', 'additional_height', 'iframe_content_id', 'iframe_content_styles', 'iframe_hide_elements', 'version_counter', 'onload_show_element_only' ); if (!wp_verify_nonce($_POST['twg-options'], 'twg-options')) die('Sorry, your nonce did not verify.'); foreach ($adminSettings as $item) { if ($item == 'version_counter') { $text = rand(100000, 999999); } else { $text = trim($_POST[$item]); } // replace ' with " $text = str_replace("'", '"' ,$text); if (function_exists('sanitize_text_field')) { $devOptions[$item] = stripslashes(sanitize_text_field($text)); } else { $devOptions[$item] = stripslashes($text); } } update_option($this->adminOptionsName, $devOptions); ?>