Changeset 2407162
- Timestamp:
- 10/27/2020 01:39:37 AM (5 years ago)
- Location:
- thumblink
- Files:
-
- 3 added
- 1 edited
-
tags/1.1 (added)
-
tags/1.1/readme.txt (added)
-
tags/1.1/thumblink.php (added)
-
trunk/thumblink.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
thumblink/trunk/thumblink.php
r2405717 r2407162 2 2 /** 3 3 * @package Thumblink 4 * @version 1. 0.04 * @version 1.1 5 5 */ 6 6 /* … … 9 9 Description: Thumblink automatically creates thumbnails for all of your blog posts to make your links look better. A link to your WordPress site on platforms like Facebook, Twitter, and LinkedIn is often the first interaction you have with a visitor. The link's thumbnail is 3x larger than its text preview - if it looks ugly or unmaintained, they won't click on it. Thumblink automatically generates these thumbnails by taking a screenshot of each page. 10 10 Author: Team Thumblink 11 Version: 1. 0.011 Version: 1.1 12 12 Author URI: https://thumblink.com/ 13 13 */ … … 16 16 function hook_thumblink() { 17 17 $url = get_page_link(); 18 if (has_post_thumbnail()) { 19 $post_image = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); 20 if (!empty($post_image[0])) { 21 $post_image = $post_image[0]; 22 echo "<meta property=\"og:image\" content=\"{$post_image}\" />"; 23 return; 24 } 25 } 18 26 echo "<meta property=\"og:image\" content=\"https://generate.thumblink.com/?url={$url}\" />"; 19 27 }
Note: See TracChangeset
for help on using the changeset viewer.