Changeset 1371777
- Timestamp:
- 03/15/2016 07:27:48 PM (10 years ago)
- Location:
- ifttt-instagram-gallery/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
ifttt-instagram-gallery.php (modified) (1 diff)
-
public/class-ifttt-instagram-gallery.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ifttt-instagram-gallery/trunk/README.txt
r1150788 r1371777 4 4 Tags: ifttt, ifthisthenthat, instagram, gallery 5 5 Requires at least: 3.9 6 Tested up to: 4. 2.16 Tested up to: 4.4.2 7 7 Stable tag: trunk 8 8 License: GPLv3 … … 118 118 = 1.0.3 = 119 119 * Bugfix: Special characters led to broken title attributes of Instagram images and invalid html. Title attributes of images are now escaped with htmlspecialchars(). 120 121 = 1.0.4 = 122 * Bugfix after changed instagram URLs. Crop query part, e.g. invoke https://scontent-frt3-1.cdninstagram.com/t51.2885-15/e35/1208218_821804957925622_1457586436_n.jpg instead of https://scontent-frt3-1.cdninstagram.com/t51.2885-15/e35/1208218_821804957925622_1457586436_n.jpg?ig_cache_key=MTIwNDU4NDU1NzU3MjMxODAxNg%3D%3D.2 -
ifttt-instagram-gallery/trunk/ifttt-instagram-gallery.php
r1013519 r1371777 11 11 * Plugin URI: http://www.bjoerne.com 12 12 * Description: IFTTT Instagram Gallery is a highly configurable widget that automatically shares your latest Instagram pictures in an amazing looking photo grid on your WordPress blog. 13 * Version: 1.0. 313 * Version: 1.0.4 14 14 * Author: Björn Weinbrenner 15 15 * Author URI: http://www.bjoerne.com/ -
ifttt-instagram-gallery/trunk/public/class-ifttt-instagram-gallery.php
r1013519 r1371777 29 29 * @var string 30 30 */ 31 const VERSION = '1.0. 3';31 const VERSION = '1.0.4'; 32 32 33 33 /** … … 116 116 $title = htmlspecialchars( $content_struct['title'] ); 117 117 $description = $content_struct['description']; 118 $description_decoded = json_decode( $description, true ); 118 $description_decoded = json_decode( $description, true ); 119 119 $instagram_url = $this->get_final_url( $description_decoded['Url'] ); 120 120 $image_url = $this->get_final_url( $description_decoded['SourceUrl'] ); … … 133 133 private function get_final_url( $url ) { 134 134 for ( $i = 0; $i < 5; $i++ ) { 135 $url = $this->get_url_without_query( $url ); 135 136 $response = wp_remote_head( $url, array( 'redirection' => 0 ) ); 136 137 $reponse_code = wp_remote_retrieve_response_code( $response ); … … 146 147 } 147 148 } 149 } 150 151 /** 152 * Returns the URL without query part. 153 * 154 * @since 1.0.2 155 */ 156 private function get_url_without_query( $url ) { 157 $url_parts = parse_url( $url ); 158 return $url_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path']; 148 159 } 149 160
Note: See TracChangeset
for help on using the changeset viewer.