Forum Replies Created

Viewing 1 replies (of 1 total)
  • Open: /wp-content/plugins/fatpanda-facebook-comments/plugin.php

    Find:

    function wp_head() {
    if (!$this->sharepressHandlesOg() && apply_filters('fbc_can_print_og_tags', true)) {
      $og = array(
    	'og:type' => 'article',
       'og:url' => $this->get_permalink(),
    	'og:title' => get_bloginfo('name'),
    	'og:site_name' => get_bloginfo('name'),
    	'og:locale' => 'en_US'
      );
    
      if (is_single() || ( is_page() && !is_front_page() && !is_home() )) {
    	global $post;
    
    	if (!($excerpt = $post->post_excerpt)) {
    	  $excerpt = preg_match('/^.{1,256}\b/s', preg_replace("/\s+/", ' ', strip_tags($post->post_content)), $matches) ? trim($matches[0]).'...' : get_bloginfo('descrption');
    	} 
    
    	$og['og:title'] = get_the_title();
    
    	$og['og:description'] = $this->strip_shortcodes($excerpt);
    
    	if ($picture = $this->get_first_image_for($post->ID)) {
    	  $og['og:image'] = $picture;
    	}
      }
    
      if ($meta = get_post_meta($post->ID, 'fb:app_id', true)) {
    	$og['fb:app_id'] = $meta;
      } else if (( $this->setting('app_moderator_mode') == 'on' ) && ( $app_id = $this->get_app_id() )) {
    	$og['fb:app_id'] = $app_id;
      }
    
      if ($meta = get_post_meta($post->ID, 'fb:admins', true)) {
    	$og['fb:admins'] = $meta;
      } else if (( $this->setting('admin_moderator_mode') == 'on' ) && ( $moderators = $this->setting('moderators') )) {
    	$og['fb:admins'] = implode(',', $moderators);
      }
    
      $og = apply_filters('fbc_og_tags', $og);
    
      if ($og) {
    	if (is_single() || ( is_page() && !is_front_page() && !is_home() )) {
    	  foreach($og as $property => $content) {
    		echo sprintf("<meta property=\"{$property}\" content=\"%s\" />\n", str_replace(
    		  array('"', '<', '>'),
    		  array('"', '<', '>'),
    		  $this->strip_shortcodes($content)
    		));
    	  }
    	}
      }
    
       allow other plugins to insert og tags on our hook
       this is for adding og to pages and what-not
      do_action('fbc_og_print', $defaults);
    }
    }

    Replace to:

    //  function wp_head() {
    //    if (!$this->sharepressHandlesOg() && apply_filters('fbc_can_print_og_tags', true)) {
    //      $og = array(
    //        'og:type' => 'article',
    //       'og:url' => $this->get_permalink(),
    //        'og:title' => get_bloginfo('name'),
    //        'og:site_name' => get_bloginfo('name'),
    //        'og:locale' => 'en_US'
    //      );
    //
    //      if (is_single() || ( is_page() && !is_front_page() && !is_home() )) {
    //        global $post;
    //
    //        if (!($excerpt = $post->post_excerpt)) {
    //          $excerpt = preg_match('/^.{1,256}\b/s', preg_replace("/\s+/", ' ', strip_tags($post->post_content)), $matches) ? trim($matches[0]).'...' : get_bloginfo('descrption');
    //        } 
    
    //        $og['og:title'] = get_the_title();
    //
    //        $og['og:description'] = $this->strip_shortcodes($excerpt);
    //
    //        if ($picture = $this->get_first_image_for($post->ID)) {
    //          $og['og:image'] = $picture;
    //        }
    //      }
    //
    //      if ($meta = get_post_meta($post->ID, 'fb:app_id', true)) {
    //        $og['fb:app_id'] = $meta;
    //      } else if (( $this->setting('app_moderator_mode') == 'on' ) && ( $app_id = $this->get_app_id() )) {
    //        $og['fb:app_id'] = $app_id;
    //      }
    //
    //      if ($meta = get_post_meta($post->ID, 'fb:admins', true)) {
    //        $og['fb:admins'] = $meta;
    //      } else if (( $this->setting('admin_moderator_mode') == 'on' ) && ( $moderators = $this->setting('moderators') )) {
    //        $og['fb:admins'] = implode(',', $moderators);
    //      }
    //
    //      $og = apply_filters('fbc_og_tags', $og);
    //
    //      if ($og) {
    //        if (is_single() || ( is_page() && !is_front_page() && !is_home() )) {
    //          foreach($og as $property => $content) {
    //            echo sprintf("<meta property=\"{$property}\" content=\"%s\" />\n", str_replace(
    //              array('"', '<', '>'),
    //              array('"', '<', '>'),
    //              $this->strip_shortcodes($content)
    //            ));
    //          }
    //        }
    //      }
    //
    //      // allow other plugins to insert og tags on our hook
    //      // this is for adding og to pages and what-not
    //      do_action('fbc_og_print', $defaults);
    //    }
    //  }

    Finished, sorry my english language is very bad.

    Best regard,
    Napsnaps
    http://satriamedia.com

Viewing 1 replies (of 1 total)