Patch for instagram service update
-
Hi,
This is a patch for instagram service update :
### Eclipse Workspace Patch 1.0 #P instagram-slider-widget Index: instaram_slider.php =================================================================== --- instaram_slider.php (revision 1415572) +++ instaram_slider.php (working copy) @@ -882,7 +882,7 @@ $user_opt['attachment'] = $attachment; if ( 'user' == $search ) { - $response = wp_remote_get( 'https://instagram.com/' . trim( $search_string ), array( 'sslverify' => false, 'timeout' => 60 ) ); + $response = wp_remote_get( 'https://www.instagram.com/' . trim( $search_string ), array( 'sslverify' => false, 'timeout' => 60 ) ); } else { $response = wp_remote_get( 'https://instagram.com/explore/tags/' . trim( $search_string ), array( 'sslverify' => false, 'timeout' => 60 ) ); } @@ -1041,6 +1041,13 @@ */ private function save_wp_attachment( $image_data ) { + $image_filename = $image_data['url']; + if (preg_match("#(.*)\?.*#", $image_filename, $matches) ): + $image_filename = $matches[1]; + endif; + + $image_data['url'] = $image_filename; + $image_info = pathinfo( $image_data['url'] ); if ( !in_array( $image_info['extension'], array( 'jpg', 'jpe', 'jpeg', 'gif', 'png' ) ) ) {
https://www.ads-software.com/plugins/instagram-slider-widget/
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Patch for instagram service update’ is closed to new replies.