Changeset 422758
- Timestamp:
- 08/12/2011 07:29:53 PM (14 years ago)
- Location:
- facebook-likes-you/trunk
- Files:
-
- 2 edited
-
facebook-likes-you.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
facebook-likes-you/trunk/facebook-likes-you.php
r422256 r422758 4 4 Plugin URI: http://www.sproject.name/download/wp-facebook-likes-you/ 5 5 Description: 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. 56 Version: 1.4.6 7 7 Author: Piotr Sochalewski 8 8 Author URI: http://www.sproject.name/ … … 210 210 ob_end_clean(); 211 211 212 // Default picture if is home 212 213 if (is_home()) 213 214 return $fb_like_settings['defaultpic']; 214 215 216 // Post thumbnail supported by theme 215 217 if (current_theme_supports('post-thumbnails')) 216 218 if (has_post_thumbnail($post->ID)) { 217 219 $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]); 220 221 } 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 222 232 $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); 223 233 $img = $matches[1][0]; 224 234 235 //Default picture 225 236 if (empty($img)) 226 237 $img = $fb_like_settings['defaultpic']; … … 239 250 <meta property="og:url" content="' . get_bloginfo("home") . '"/> 240 251 '; 241 else echo '<meta property="og:title" content="' . wp_title(' «', false, 'right'). get_bloginfo('name') .'"/>252 else echo '<meta property="og:title" content="' . wp_title('', false) . ' « ' . get_bloginfo('name') .'"/> 242 253 <meta property="og:type" content="article"/> 243 254 <meta property="og:url" content="' . get_permalink() . '"/> -
facebook-likes-you/trunk/readme.txt
r422256 r422758 5 5 Requires at least: 2.9 6 6 Tested up to: 3.2 7 Stable tag: 1.4. 57 Stable tag: 1.4.6 8 8 9 9 Facebook 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! … … 48 48 49 49 == Changelog == 50 51 = 1.4.6 = 52 * Supported Custom Fields with thumbnails ('thumb' and 'thumbnail') for Open Graph 50 53 51 54 = 1.4.5 =
Note: See TracChangeset
for help on using the changeset viewer.