Beispiel #1
0
function spyropress_get_the_bucket($id)
{
    if (class_exists('SpyropressBuilder') && spyropress_has_builder_content($id)) {
        return spyropress_get_the_builder_content($id);
    } else {
        $bucket = get_post($id);
        $content = apply_filters('the_content', $bucket->post_content);
        $content = str_replace(']]>', ']]>', $content);
        return $content;
    }
}
function spyropress_get_the_content($post_id = '')
{
    if (class_exists('SpyropressBuilder') && spyropress_has_builder_content($post_id)) {
        $post = get_post();
        // If post password required and it doesn't match the cookie.
        if (post_password_required($post)) {
            return '<div class="container">' . get_the_password_form($post) . '</div>';
        }
        return spyropress_get_the_builder_content($post_id);
    } elseif (is_singular()) {
        ob_start();
        echo '<div class="container">';
        the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'spyropress'));
        echo '</div>';
        return ob_get_clean();
    } else {
        return get_the_excerpt();
    }
}
Beispiel #3
0
<?php

global $wp_query;
$template_id = $wp_query->queried_template_id;
spyropress_get_builder_header();
if (spyropress_has_builder_content($template_id)) {
    spyropress_the_builder_content($template_id);
}
spyropress_get_builder_footer();
<?php

$is_content = post_type_supports(get_current_post_type(), 'editor');
$editor_id = 'dummy_editor';
$builder_class = $wordpress_class = '';
if (spyropress_has_builder_content() || !$is_content) {
    $builder_class = ' nav-tab-active';
    $show_welcome = false;
} else {
    $wordpress_class = ' nav-tab-active';
    $show_welcome = true;
}
$show_welcome = true;
?>

<div id="builder" class="builder">
    <div id="builder-tabs">
        <h2 class="nav-tab-wrapper">
            <?php 
if ($is_content) {
    ?>

            <a href="#postdivrich" class="nav-tab<?php 
    echo $wordpress_class;
    ?>
">Wordpress</a>
            <?php 
}
?>

            <a href="#builder-data" class="nav-tab<?php