Ejemplo n.º 1
0
function premise_the_optin_align($postId = null)
{
    echo apply_filters('premise_the_optin_align', premise_get_optin_align($postId), $postId);
}
Ejemplo n.º 2
0
function premise_do_before_post()
{
    global $content_width;
    if (!isset($content_width) || !$content_width) {
        $landing_page_style = premise_get_landing_page_style();
        $width = intval(premise_get_fresh_design_option('wrap_width', $landing_page_style)) - 2 * intval(premise_get_fresh_design_option('wrap_padding', $landing_page_style)) - intval(premise_get_fresh_design_option('optin_holder_padding', $landing_page_style) * 2 + 2 * premise_get_fresh_design_option('optin_holder_border', $landing_page_style));
    } else {
        $width = (int) ($content_width / 2);
    }
    switch (premise_get_advice_type()) {
        case 'opt-in':
            ?>
			<div style="width: <?php 
            echo $width;
            ?>
px;" class="entry-optin entry-optin-align-<?php 
            premise_the_optin_align();
            ?>
">
			<?php 
            premise_the_optin_form_code();
            if (premise_get_optin_align() != 'center') {
                echo apply_filters('the_content', premise_get_optin_copy());
            }
            ?>
				<span class="clear"></span>
			</div>
<?php 
            add_filter('the_content', 'premise_get_optin_below_copy', 0);
            break;
        case 'pricing':
            add_filter('the_content', 'premise_get_pricing_content', 0);
            break;
        case 'social-share':
            add_filter('the_content', premise_has_social_share_shared_page() ? 'premise_get_social_share_after_share_page' : 'premise_get_social_share_teaser_page', 0);
            break;
        case 'content-scroller':
            ?>

<script type="text/javascript">
//<!--
	var $ = jQuery;
	jQuery(document).ready(function($) {
		$('.coda-slider, .coda-slider .panel').css({
			width: '<?php 
            echo $width;
            ?>
px'
		});
		$('.coda-slider .container-border').css({
			width: '<?php 
            echo $width - 2;
            ?>
px'
		});
	});
//-->
</script>
<?php 
            add_filter('the_content', 'premise_get_content_scroller_content', 0);
            //@todo: check that this isn't doing the same thing twice
            add_action('premise_after_footer', 'premise_do_after_content_scroller_content');
            break;
        case 'video':
            premise_do_before_video_content();
            add_filter('the_content', 'premise_get_video_below_copy', 0);
            break;
    }
}
Ejemplo n.º 3
0
			<?php 
include 'inc/headline.php';
?>

			<div style="width: <?php 
echo $entryOptinWidth;
?>
px;" class="entry-optin entry-optin-align-<?php 
premise_the_optin_align();
?>
">
				<?php 
premise_the_optin_form_code();
?>
				<?php 
if (premise_get_optin_align() != 'center') {
    ?>
				<?php 
    echo apply_filters('the_content', premise_get_optin_copy());
    ?>
				<?php 
}
?>
				<span class="clear"></span>
			</div>
			<div class="entry-content"><?php 
echo apply_filters('the_content', premise_get_optin_below_copy());
?>
</div>
		</div>
	</div><!-- end #content -->