The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. madri2
    Posted 4 years ago #

    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.
    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;
    		$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


  2. Samuel Wood (Otto)
    WordPress.org Tech Dude
    Plugin Author

    Posted 4 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
    Posted 4 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


No tags yet.