Пример #1
0
function post_body_keywords($ID, $max = 20)
{
    global $wpdb;
    $content = strip_tags(apply_filters_if_white('the_content', $wpdb->get_var("select post_content from {$wpdb->posts} where ID = {$ID}")));
    $content = html_entity_strip($content);
    return yarpp_extract_keywords($content, $max);
}
Пример #2
0
function post_body_keywords($ID, $max = 20)
{
    $posts = get_posts(array('p' => $ID));
    if (count($posts) != 1) {
        return '';
    }
    $content = strip_tags(apply_filters_if_white('the_content', $posts[0]->post_content));
    $content = html_entity_strip($content);
    return yarpp_extract_keywords($content, $max);
}
Пример #3
0
function post_body_keywords($ID, $max = 20)
{
    global $wpdb;
    $content = strip_tags(apply_filters_if_white('the_content', $wpdb->get_var("select post_content from {$wpdb->posts} where ID = {$ID}")));
    //echo "<!--".get_option('blog_charset')."-->";
    /*if (get_option('blog_charset') == 'UTF-8')
    		$content = html_entity_decode_utf8($content);
    	else
    		$content = html_entity_decode($content,ENT_QUOTES,get_option('blog_charset'));*/
    $content = html_entity_strip($content);
    return yarpp_extract_keywords($content, $max);
}
function post_body_keywords($max = 20)
{
    global $post;
    $content = strip_tags(apply_filters_if_white('the_content', $post->post_content));
    return yarpp_extract_keywords($content, $max);
}