Plugin Directory

Changeset 422758


Ignore:
Timestamp:
08/12/2011 07:29:53 PM (14 years ago)
Author:
sproject
Message:

1.4.6 release

Location:
facebook-likes-you/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • facebook-likes-you/trunk/facebook-likes-you.php

    r422256 r422758  
    44Plugin URI: http://www.sproject.name/download/wp-facebook-likes-you/
    55Description: Facebook Likes You! is simple plugin which makes it easy to add Facebook Like button and widgetable Like box. It's fully configurable, so you can decide where to append the button.
    6 Version: 1.4.5
     6Version: 1.4.6
    77Author: Piotr Sochalewski
    88Author URI: http://www.sproject.name/
     
    210210    ob_end_clean();
    211211   
     212    // Default picture if is home
    212213    if (is_home())
    213214        return $fb_like_settings['defaultpic'];
    214215
     216    // Post thumbnail supported by theme
    215217    if (current_theme_supports('post-thumbnails'))
    216218        if (has_post_thumbnail($post->ID)) {
    217219            $img = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' );
    218             if (!empty($img))
    219                 return esc_attr($img[0]);
     220            return esc_attr($img[0]);
    220221        }
    221 
     222   
     223    // Custom Fields
     224    $cf_thumb_values = get_post_custom_values('thumb');
     225    if (!empty($cf_thumb_values))
     226        return $cf_thumb_values[0];
     227    $cf_thumbnail_values = get_post_custom_values('thumbnail');
     228    if (!empty($cf_thumbnail_values))
     229        return $cf_thumbnail_values[0];
     230
     231    // First picture in the post
    222232    $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
    223233    $img = $matches[1][0];
    224234   
     235    //Default picture
    225236    if (empty($img))
    226237        $img = $fb_like_settings['defaultpic'];
     
    239250        <meta property="og:url" content="' . get_bloginfo("home") . '"/>
    240251';
    241             else echo '<meta property="og:title" content="' . wp_title('&laquo;', false, 'right') . get_bloginfo('name') .'"/>
     252            else echo '<meta property="og:title" content="' . wp_title('', false) . ' &laquo; ' . get_bloginfo('name') .'"/>
    242253        <meta property="og:type" content="article"/>
    243254        <meta property="og:url" content="' . get_permalink() . '"/>
  • facebook-likes-you/trunk/readme.txt

    r422256 r422758  
    55Requires at least: 2.9
    66Tested up to: 3.2
    7 Stable tag: 1.4.5
     7Stable tag: 1.4.6
    88
    99Facebook Likes You! is simple plugin which makes it easy to add Like Button and widgetable Like Box. Google +1 Button isn't a problem too!
     
    4848
    4949== Changelog ==
     50
     51= 1.4.6 =
     52* Supported Custom Fields with thumbnails ('thumb' and 'thumbnail') for Open Graph
    5053
    5154= 1.4.5 =
Note: See TracChangeset for help on using the changeset viewer.