EstudioJuridicoAlmagro_Web/www/wpv_common/admin/ajax/shortcode_preview.php
david f72df580c3 - Importación inicial
- Ticket 1166 -> Orden de los idiomas ES FR EN RU

git-svn-id: https://192.168.0.254/svn/Proyectos.EstudioJuridicoAlmagro_Web/trunk@2 c22fe52d-42d7-ba4f-95f7-33effcf65713
2013-02-27 15:39:05 +00:00

36 lines
844 B
PHP

<!doctype html>
<?php
global $is_shortcode_preview;
$is_shortcode_preview = true;
require_once( '../../../../../../wp-load.php' );
?>
<html>
<head>
<?php
wp_deregister_script('admin-bar');
wp_deregister_style('admin-bar');
remove_action('wp_footer', 'wp_admin_bar_render', 1000);
?>
<?php wp_head() ?>
<?php $shortcode = stripslashes($_POST['data']); // why do we need stripslashes to make it work? we don't post it with slashes...?>
<style>
html, body {
background: transparent;
}
body {
<?php // nasty fix, can we do better? ?>
<?php if(strpos($shortcode, '[tooltip') !== false):?>
padding: 100px 10px 10px 150px;
<?php else: ?>
padding: 10px;
<?php endif ?>
}
</style>
</head>
<body>
<?php echo apply_filters('the_content', do_shortcode($shortcode)) ?>
<?php wp_footer() ?>
</body>
</html>