/** * Display template preview metabox */ public static function display_template_preview_metabox() { global $post; $template = Landing_Pages_Variations::get_current_template($post->ID); $permalink = Landing_Pages_Variations::get_variation_permalink($post->ID); $datetime = the_modified_date('YmjH', null, null, false); $permalink = add_query_arg(array('dt' => $datetime, 'dont_save' => true), $permalink); ?> <style type="text/css"> <?php /* hide featured image slot if not default template */ if ($template != 'default') { echo '#postimagediv {display:none;}'; } ?> #lp-thumbnail-sidebar-preview { background: transparent !important; } #lp-thumbnail-sidebar-preview .handlediv, #lp-thumbnail-sidebar-preview .hndle { display: none !important; } #lp-thumbnail-sidebar-preview .inside { padding: 0px !important; border: none !important; margin-top: -33px !important; margin-bottom: -10px; overflow:hidden; } #lp-thumbnail-sidebar-preview .zoomer-wrapper { vertical-align: top; margin-top:33px !important; } #lp-thumbnail-sidebar-preview iframe#zoomer { margin-top: -30px; } </style> <?php if (isset($_GET['new-variation'])) { return; } if (isset($_GET['inbound-editor']) && $_GET['inbound-editor'] !== true) { return; } // default echo "<iframe src='{$permalink}' id='zoomer'></iframe>"; }