Esempio n. 1
0
function wppb_load_template($wppb_template)
{
    global $positions;
    // Starting output buffer
    ob_start();
    // Setting defaults for "content_layout"
    $wppb_designer_settings = get_option(WPPB_DESIGNER_SETTINGS);
    // Setting potentially empty variable
    if (empty($wppb_designer_settings['copyright'])) {
        $wppb_designer_settings['copyright'] = '';
    }
    if (empty($wppb_designer_settings['design'])) {
        $wppb_designer_settings['design'] = '';
    }
    // Hook for adding AJAXed scripts
    do_action('wppb_add_ajax_content');
    ?>
<div id="wppb-page-content">
	<?php 
    echo wppb_create_template();
    ?>
</div>

<?php 
    // Starting output buffer
    $wppb_template .= ob_get_contents();
    // End buffer
    ob_end_clean();
    return $wppb_template;
}
Esempio n. 2
0
function wppb_ajax_content()
{
    $wppb_template = wppb_create_template();
    // Creating template
    $wppb_template = do_shortcode($wppb_template);
    // Create shortcodes
    $wppb_template = do_shortcode($wppb_template);
    // Create inner shortcodes
    die($wppb_template);
    // Spit out template and kill execution immediately since only loading this for AJAX purposes
}