示例#1
0
function om_custom_excerpt_more($excerpt, $return = false)
{
    global $post;
    $more = '<p>' . om_more_link_tpl(array('href' => get_permalink($post->ID))) . '</p>';
    $excerpt = $excerpt . $more;
    if ($return) {
        return $excerpt;
    } else {
        echo om_esc_wpcf($excerpt);
    }
}
示例#2
0
            echo om_hover_extras($post->thumbnail, false, get_permalink($post->id), '', $this->link_target);
        } elseif ($link_setting === 'link_image' && isset($post->image_link) && !empty($post->image_link)) {
            echo om_hover_extras($post->thumbnail, $post->image_link, false, $this->link_target);
        } else {
            echo $post->thumbnail;
            // no need to escape
        }
    } else {
        echo $post->thumbnail;
        // no need to escape
    }
    ?>
</div>
<?php 
} elseif ($block === 'text') {
    ?>
<div class="entry-content">
    <?php 
    echo empty($link_setting) || $link_setting === 'excerpt' ? $post->excerpt : $post->content;
    ?>
</div>
<?php 
} elseif ($block === 'link') {
    ?>
<div class="post-readmore">
<?php 
    echo om_more_link_tpl(array('href' => $post->link, 'class' => 'vc_read_more', 'attr' => $this->link_target));
    ?>
</div>
<?php 
}