Esempio n. 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();
    }
}
/**
 * Generate content using Builder
 */
function spyropress_the_builder_content($post_ID = '')
{
    echo spyropress_get_the_builder_content($post_ID);
}