Changeset 715246
- Timestamp:
- 05/19/2013 02:27:37 PM (13 years ago)
- Location:
- lazy-pinner
- Files:
-
- 1 added
- 4 edited
- 7 copied
-
tags/2.1 (added)
-
tags/2.1/images (copied) (copied from lazy-pinner/trunk/images)
-
tags/2.1/images/url.png (copied) (copied from lazy-pinner/trunk/images/url.png)
-
tags/2.1/includes (copied) (copied from lazy-pinner/trunk/includes)
-
tags/2.1/includes/admin.php (copied) (copied from lazy-pinner/trunk/includes/admin.php)
-
tags/2.1/includes/log.php (copied) (copied from lazy-pinner/trunk/includes/log.php)
-
tags/2.1/includes/pinit.php (modified) (2 diffs)
-
tags/2.1/lazypinner.php (copied) (copied from lazy-pinner/trunk/lazypinner.php) (1 diff)
-
tags/2.1/readme.txt (copied) (copied from lazy-pinner/trunk/readme.txt) (3 diffs)
-
trunk/includes/pinit.php (modified) (2 diffs)
-
trunk/lazypinner.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lazy-pinner/tags/2.1/includes/pinit.php
r712087 r715246 2 2 include('auth.php'); 3 3 4 5 // POST IMAGE 6 function get_default_post_image($size = 'thumbnail', $post_id = false){ 7 global $post, $id; 8 $post_id = (int)$post_id; 9 if (!$post_id) $post_id = $post->ID; 10 $image = ''; 11 if(has_post_thumbnail($post_id)) { 12 $image = get_the_post_thumbnail_src(get_the_post_thumbnail($post_id, $size)); 13 } else { 14 $args = array( 15 'post_parent' => $post_id 16 , 'post_type' => 'attachment' 17 , 'post_mime_type' => 'image' 18 , 'post_status' => 'any' 19 , 'numberposts' => 1 20 , 'order' => 'ASC' 21 22 ); 23 $attachments = get_children($args); 24 foreach($attachments as $attachment) { 25 //$attachment = array_shift($attachments); 26 $image = wp_get_attachment_image_src($attachment->ID, $size); 27 $image = $image[0]; 28 29 } 30 } 31 return $image; 32 } 4 33 5 34 function get_the_post_thumbnail_src($img) … … 13 42 $desc = get_the_title(); 14 43 $link = get_permalink(); 15 $imgurl = get_the_post_thumbnail_src(get_the_post_thumbnail()); 44 $imgurl = get_default_post_image($image); 45 //$imgurl = get_the_post_thumbnail_src(get_the_post_thumbnail()); 16 46 $baseurl = get_site_url(); 17 47 $table = $wpdb->prefix . 'lazy_pinner_user'; -
lazy-pinner/tags/2.1/lazypinner.php
r714191 r715246 4 4 Plugin URI: http://www.biofects.com 5 5 Description: This plugin automatically post your image and title to pineterst on Publish or Save 6 Version: 2. 06 Version: 2.1 7 7 Author: Lee Thompson and Nick Westerlund 8 8 Author URI: http://www.biofects.com -
lazy-pinner/tags/2.1/readme.txt
r714191 r715246 5 5 Requires at least: 3.0 6 6 Tested up to: 3.5.1 7 Stable tag: 2. 07 Stable tag: 2.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 31 31 1. This script requires your host to have mcrypt, this is to encrypt passwords saved in the database. 32 32 33 2. This does require your theme to use the_post_thumbnail function. Please see http://codex.wordpress.org/Function_Reference/the_post_thumbnail. 34 35 3. Issues of safe_mode or open_basedir defined (I will fix this in next release). 33 2. Issues of safe_mode or open_basedir defined (I will fix this in next release). 36 34 37 35 = Why two developers = … … 56 54 = 2.0 = 57 55 This major release has a lot of changes. Dont worry it will not impact any setting you have done already. I have made entering your pinterest info easier. I have created a page for logs. 56 57 = 2.1 = 58 I have made the pinner find the first image attached if no featured image is set, this removes the need to posts to have featured image. -
lazy-pinner/trunk/includes/pinit.php
r712087 r715246 2 2 include('auth.php'); 3 3 4 5 // POST IMAGE 6 function get_default_post_image($size = 'thumbnail', $post_id = false){ 7 global $post, $id; 8 $post_id = (int)$post_id; 9 if (!$post_id) $post_id = $post->ID; 10 $image = ''; 11 if(has_post_thumbnail($post_id)) { 12 $image = get_the_post_thumbnail_src(get_the_post_thumbnail($post_id, $size)); 13 } else { 14 $args = array( 15 'post_parent' => $post_id 16 , 'post_type' => 'attachment' 17 , 'post_mime_type' => 'image' 18 , 'post_status' => 'any' 19 , 'numberposts' => 1 20 , 'order' => 'ASC' 21 22 ); 23 $attachments = get_children($args); 24 foreach($attachments as $attachment) { 25 //$attachment = array_shift($attachments); 26 $image = wp_get_attachment_image_src($attachment->ID, $size); 27 $image = $image[0]; 28 29 } 30 } 31 return $image; 32 } 4 33 5 34 function get_the_post_thumbnail_src($img) … … 13 42 $desc = get_the_title(); 14 43 $link = get_permalink(); 15 $imgurl = get_the_post_thumbnail_src(get_the_post_thumbnail()); 44 $imgurl = get_default_post_image($image); 45 //$imgurl = get_the_post_thumbnail_src(get_the_post_thumbnail()); 16 46 $baseurl = get_site_url(); 17 47 $table = $wpdb->prefix . 'lazy_pinner_user'; -
lazy-pinner/trunk/lazypinner.php
r714191 r715246 4 4 Plugin URI: http://www.biofects.com 5 5 Description: This plugin automatically post your image and title to pineterst on Publish or Save 6 Version: 2. 06 Version: 2.1 7 7 Author: Lee Thompson and Nick Westerlund 8 8 Author URI: http://www.biofects.com -
lazy-pinner/trunk/readme.txt
r714191 r715246 5 5 Requires at least: 3.0 6 6 Tested up to: 3.5.1 7 Stable tag: 2. 07 Stable tag: 2.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 31 31 1. This script requires your host to have mcrypt, this is to encrypt passwords saved in the database. 32 32 33 2. This does require your theme to use the_post_thumbnail function. Please see http://codex.wordpress.org/Function_Reference/the_post_thumbnail. 34 35 3. Issues of safe_mode or open_basedir defined (I will fix this in next release). 33 2. Issues of safe_mode or open_basedir defined (I will fix this in next release). 36 34 37 35 = Why two developers = … … 56 54 = 2.0 = 57 55 This major release has a lot of changes. Dont worry it will not impact any setting you have done already. I have made entering your pinterest info easier. I have created a page for logs. 56 57 = 2.1 = 58 I have made the pinner find the first image attached if no featured image is set, this removes the need to posts to have featured image.
Note: See TracChangeset
for help on using the changeset viewer.