WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
[resolved] incompatibility with gd star rating (3 posts)

  1. madri2
    Member
    Posted 2 years ago #

    Hi,
    i'm using this plugin and it adds an og:description meta in the head.
    I use gd star rating and the problem is that it show the "loading" text of gd star rating inside this meta.
    <meta
    property='og:description' content='GD Star Ratingloading...' />

    this is caused by that :

    // code to create a pretty excerpt given a post object
    function sfc_base_make_excerpt($post) { 
    
    	if ( !empty($post->post_excerpt) )
    		$text = $post->post_excerpt;
    	else
    		$text = $post->post_content;
    
    	$text = strip_shortcodes( $text );
    
    	// filter the excerpt or content, but without texturizing
    	if ( empty($post->post_excerpt) ) {
    		remove_filter( 'the_content', 'wptexturize' );
    		$text = apply_filters('the_content', $text);
    		add_filter( 'the_content', 'wptexturize' );
    	} else {
    		remove_filter( 'the_excerpt', 'wptexturize' );
    		$text = apply_filters('the_excerpt', $text);
    		add_filter( 'the_excerpt', 'wptexturize' );
    	}

    if $post->post_excerpt is empty, we are setting text as $post->post_content;
    then, why are we replacing text with :

    remove_filter( 'the_content', 'wptexturize' );
    		$text = apply_filters('the_content', $text);
    		add_filter( 'the_content', 'wptexturize' );

    in the case of an empty excerpt? it's redefining text

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    If the excerpt is empty, then we get the normal content and use that to build our special FB excerpt. This is by design.

    If you don't want the GD Star Rating stuff at the beginning of the post, then change the GD Star Rating plugin to not put it at the beginning of the content.

  3. madri2
    Member
    Posted 2 years ago #

    is there a possibility to retrieve the content, without applying filters to it ? (to disable filters that adds text)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.