Fix theme bugs where complex JSON is echoed twice

master 1.0
Skylar Ittner 6 years ago
parent 7e4783ded3
commit 9339ea12c6

@ -37,7 +37,7 @@ include __DIR__ . "/inc/header.inc.php";
$icon = $btn['icon'];
$text = $btn['text'];
?>
<button type="submit" class="btn btn-primary sw-complex" data-json="<?php echo get_escaped_json($btn); ?>" data-component="submit-btn">
<button type="submit" class="btn btn-primary sw-complex" data-json="<?php get_escaped_json($btn); ?>" data-component="submit-btn">
<i class="<?php echo $icon; ?>"></i> <?php echo $text; ?>
</button>
</form>

@ -12,7 +12,7 @@ include __DIR__ . "/inc/header.inc.php";
<?php
$image = get_complex_component("page-image", null, ['image']);
?>
<span class="image fit sw-complex" data-json="<?php echo get_escaped_json($image); ?>" data-component="page-image">
<span class="image fit sw-complex" data-json="<?php get_escaped_json($image); ?>" data-component="page-image">
<img src="<?php get_file_url($image['image']); ?>" alt="" />
</span>
<div class="sw-editable" data-component="content">

@ -22,7 +22,7 @@ include __DIR__ . "/inc/header.inc.php";
$icon = $btn['icon'];
$text = $btn['text'];
?>
<button type="submit" class="button sw-complex" data-json="<?php echo get_escaped_json($btn); ?>" data-component="submit-btn">
<button type="submit" class="button sw-complex" data-json="<?php get_escaped_json($btn); ?>" data-component="submit-btn">
<i class="<?php echo $icon; ?>"></i> <?php echo $text; ?>
</button>
</li>

@ -39,7 +39,7 @@
$icon = $btn['icon'];
$text = $btn['text'];
?>
<button type="submit" class="button icon <?php echo $icon; ?> sw-complex" data-json="<?php echo get_escaped_json($btn); ?>" data-component="submit-btn">
<button type="submit" class="button icon <?php echo $icon; ?> sw-complex" data-json="<?php get_escaped_json($btn); ?>" data-component="submit-btn">
<?php echo $text; ?>
</button>
</form>

@ -21,7 +21,7 @@
$link = $btn['link'];
$text = $btn['text'];
?>
<a href="<?php get_url_or_slug($link); ?>" class="button big icon <?php echo $icon; ?> sw-complex" data-json="<?php echo get_escaped_json($btn); ?>" data-component="banner-btn-1">
<a href="<?php get_url_or_slug($link); ?>" class="button big icon <?php echo $icon; ?> sw-complex" data-json="<?php get_escaped_json($btn); ?>" data-component="banner-btn-1">
<?php echo $text; ?>
</a>
<?php } ?>
@ -34,7 +34,7 @@
$link = $btn['link'];
$text = $btn['text'];
?>
<a href="<?php get_url_or_slug($link); ?>" class="button alt big icon <?php echo $icon; ?> sw-complex" data-json="<?php echo get_escaped_json($btn); ?>" data-component="banner-btn-2">
<a href="<?php get_url_or_slug($link); ?>" class="button alt big icon <?php echo $icon; ?> sw-complex" data-json="<?php get_escaped_json($btn); ?>" data-component="banner-btn-2">
<?php echo $text; ?>
</a>
<?php } ?>
@ -108,7 +108,7 @@ END;
$link = $btn['link'];
$text = $btn['text'];
?>
<a href="<?php get_url_or_slug($link); ?>" class="button icon <?php echo $icon; ?> sw-complex" data-json="<?php echo get_escaped_json($btn); ?>" data-component="sidebar-btn">
<a href="<?php get_url_or_slug($link); ?>" class="button icon <?php echo $icon; ?> sw-complex" data-json="<?php get_escaped_json($btn); ?>" data-component="sidebar-btn">
<?php echo $text; ?>
</a>
<?php } ?>
@ -132,7 +132,7 @@ END;
$link = $btn['link'];
$text = $btn['text'];
?>
<a href="<?php get_url_or_slug($link); ?>" class="button icon <?php echo $icon; ?> sw-complex" data-json="<?php echo get_escaped_json($btn); ?>" data-component="two-btn">
<a href="<?php get_url_or_slug($link); ?>" class="button icon <?php echo $icon; ?> sw-complex" data-json="<?php get_escaped_json($btn); ?>" data-component="two-btn">
<?php echo $text; ?>
</a>
<?php } ?>

Loading…
Cancel
Save