示例#1
0
function yarpp_default($content)
{
    global $wpdb, $post;
    if (is_feed()) {
        return yarpp_rss($content);
    }
    $type = $post->post_type == 'page' ? array('page') : array('post');
    if (yarpp_get_option('cross_relate')) {
        $type = array('post', 'page');
    }
    if (yarpp_get_option('auto_display') and is_single()) {
        return $content . yarpp_related($type, array(), false, false, 'website');
    } else {
        return $content;
    }
}
function yarpp_default($content)
{
    global $wpdb, $post;
    if (is_feed()) {
        return yarpp_rss($content);
    } elseif (yarpp_get_option('auto_display') and is_single()) {
        return $content . yarpp_related(array('post'), array(), false, false, 'website');
    } else {
        return $content;
    }
}