WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
Escape HTML in description (1 post)

  1. Valessio Brito
    Member
    Posted 1 year ago #

    I'm fixed with:

    // Google Rich Snippet
    if(is_single() || is_page())
    {
    if(!isset($post_title))
    $post_title = get_the_title($post_id);
    if(!isset($post_excerpt))
    $post_excerpt = ratings_post_excerpt($post_id, $post->post_excerpt, $post->post_content, $post->post_password);
    $new_excerpt = strip_tags($post_excerpt);
    if(!isset($post_link))
    $post_link = get_permalink($post_id);

    $post_meta = '<meta itemprop="name" content="'.$post_title.'"><meta itemprop="description" content="'.$new_excerpt.'"><meta itemprop="url" content="'.$post_link.'">';

    http://wordpress.org/extend/plugins/wp-postratings/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic