Featured Image From URL - Version 4.1.0

Version Description

  • Enhancement: Featured Video (supports external video files now as mp4, ogg and webm); enhancement: Fast Buy (new settings and improvements); enhancement: CDN + Optimized Thumbnails (serves Unsplash images now).
Download this release

Release Info

Developer marceljm
Plugin Icon 128x128 Featured Image From URL
Version 4.1.0
Comparing to
See all releases

Code changes from version 4.0.9 to 4.1.0

admin/html/menu.html CHANGED
@@ -2250,7 +2250,9 @@
2250
  <th>
2251
  <?php $fifu['title']['buy']() ?>
2252
  </th>
2253
- <th></th>
 
 
2254
  <th>
2255
  wp fifu woo --buy &lt;toggle&gt;
2256
  </th>
@@ -2258,6 +2260,40 @@
2258
  on, off
2259
  </th>
2260
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2261
  </table>
2262
  </div>
2263
  <div id="tabs-2">
@@ -4113,6 +4149,8 @@
4113
 
4114
  <div id="tabsVideo-b">
4115
  <?php $fifu['video']['local']['desc']() ?>
 
 
4116
  </div>
4117
  </ul>
4118
  </div>
@@ -5792,6 +5830,42 @@
5792
  value=""
5793
  style="display:block;border:none" >
5794
  </th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5795
  </tr>
5796
  </table>
5797
  </div>
@@ -5955,7 +6029,7 @@
5955
  <div style="font-style:italic;font-size:13px;color:white;padding-left:40px"><?php $fifu['start']['url']['paste']() ?><input type="text" style="width:80%;background-color:#f3f3f3;font-style:italic;" placeholder="<?php $fifu['start']['url']['drag']() ?>"></div>
5956
  <br>
5957
  </hgroup>
5958
- <img style="float:right;padding-left:1%;width:17%;position:relative;top:19px;filter:grayscale(25%);" src="https://ps.w.org/featured-image-from-url/assets/icon-256x256.png?rev=2384757" title="<?php $fifu['start']['url']['click']() ?>">
5959
  </div>
5960
  <hgroup style="float:right;opacity:0.75" class="speech-bubble2">
5961
  <div style="font-style:italic;font-size:13px;color:white;padding-left:25px;padding-top:10px;"><?php $fifu['start']['post']['famous']() ?></div>
2250
  <th>
2251
  <?php $fifu['title']['buy']() ?>
2252
  </th>
2253
+ <th>
2254
+ <?php $fifu['buy']['enable']() ?>
2255
+ </th>
2256
  <th>
2257
  wp fifu woo --buy &lt;toggle&gt;
2258
  </th>
2260
  on, off
2261
  </th>
2262
  </tr>
2263
+ <tr class="color">
2264
+ <th>
2265
+ <?php $fifu['tab']['woo']() ?>
2266
+ </th>
2267
+ <th>
2268
+ <?php $fifu['title']['buy']() ?>
2269
+ </th>
2270
+ <th>
2271
+ <?php $fifu['buy']['text']['text']() ?>
2272
+ </th>
2273
+ <th>
2274
+ wp fifu woo --buy-text &lt;string&gt;
2275
+ </th>
2276
+ <th>
2277
+ buy now
2278
+ </th>
2279
+ </tr>
2280
+ <tr class="color">
2281
+ <th>
2282
+ <?php $fifu['tab']['woo']() ?>
2283
+ </th>
2284
+ <th>
2285
+ <?php $fifu['title']['buy']() ?>
2286
+ </th>
2287
+ <th>
2288
+ <?php $fifu['buy']['disclaimer']['text']() ?>
2289
+ </th>
2290
+ <th>
2291
+ wp fifu woo --buy-disclaimer &lt;string&gt;
2292
+ </th>
2293
+ <th>
2294
+ This site...
2295
+ </th>
2296
+ </tr>
2297
  </table>
2298
  </div>
2299
  <div id="tabs-2">
4149
 
4150
  <div id="tabsVideo-b">
4151
  <?php $fifu['video']['local']['desc']() ?>
4152
+ <br><br>
4153
+ <?php $fifu['video']['external']['desc']() ?>
4154
  </div>
4155
  </ul>
4156
  </div>
5830
  value=""
5831
  style="display:block;border:none" >
5832
  </th>
5833
+ <th>
5834
+ <?php $fifu['buy']['enable']() ?>
5835
+ </th>
5836
+ </tr>
5837
+ </table>
5838
+ <table style="text-align:left">
5839
+ <tr>
5840
+ <th>
5841
+ <?php $fifu['buy']['text']['text']() ?>
5842
+ </th>
5843
+ <th>
5844
+ <input id="fifu_input_buy_text"
5845
+ type="text"
5846
+ name="fifu_input_buy_text"
5847
+ style="width:250px"
5848
+ placeholder="<?php $fifu['buy']['text']['placeholder']() ?>"
5849
+ value="">
5850
+ </th>
5851
+ </tr>
5852
+ <tr>
5853
+ <th>
5854
+ <?php $fifu['buy']['disclaimer']['text']() ?>
5855
+ </th>
5856
+ <th>
5857
+ <input id="fifu_input_buy_disclaimer"
5858
+ type="text"
5859
+ name="fifu_input_buy_disclaimer"
5860
+ style="width:250px"
5861
+ placeholder="<?php $fifu['buy']['disclaimer']['placeholder']() ?>"
5862
+ value="">
5863
+ </th>
5864
+ </tr>
5865
+ <tr>
5866
+ <th>
5867
+ <input type="submit" value="<?php $fifu['button']['ok']() ?>" style="width:72px" disabled>
5868
+ </th>
5869
  </tr>
5870
  </table>
5871
  </div>
6029
  <div style="font-style:italic;font-size:13px;color:white;padding-left:40px"><?php $fifu['start']['url']['paste']() ?><input type="text" style="width:80%;background-color:#f3f3f3;font-style:italic;" placeholder="<?php $fifu['start']['url']['drag']() ?>"></div>
6030
  <br>
6031
  </hgroup>
6032
+ <img style="float:right;padding-left:1%;width:17%;position:relative;top:19px;filter:grayscale(25%);" src="https://ps.w.org/featured-image-from-url/assets/icon-256x256.png?rev=2776609" title="<?php $fifu['start']['url']['click']() ?>">
6033
  </div>
6034
  <hgroup style="float:right;opacity:0.75" class="speech-bubble2">
6035
  <div style="font-style:italic;font-size:13px;color:white;padding-left:25px;padding-top:10px;"><?php $fifu['start']['post']['famous']() ?></div>
admin/strings.php CHANGED
@@ -1268,6 +1268,23 @@ function fifu_get_strings_settings() {
1268
  _e("image URL (optional)", FIFU_SLUG);
1269
  };
1270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1271
  // social
1272
  $fifu['social']['desc'] = function () {
1273
  _e("Use social tags to share your posts (and their featured images) on the social media.", FIFU_SLUG);
@@ -1317,17 +1334,20 @@ function fifu_get_strings_settings() {
1317
 
1318
  // video
1319
  $fifu['video']['desc'] = function () {
1320
- _e("FIFU supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio, JW Player, VideoPress, Sprout and your media library. Videos hosted elsewhere are not supported.", FIFU_SLUG);
1321
  };
1322
  $fifu['video']['tab']['video'] = function () {
1323
  _e("Featured video", FIFU_SLUG);
1324
  };
1325
  $fifu['video']['tab']['local'] = function () {
1326
- _e("Media library", FIFU_SLUG);
1327
  };
1328
  $fifu['video']['local']['desc'] = function () {
1329
  _e("It's possible to use mp4 videos from your media library as featured videos. However it's required to create a video thumbnail, that will be stored in your media library. For that, in the \"Feature video\" meta box, forward the video to a frame you like and click on \"set this frame as thumbnail\" button. Save the post and that's it.", FIFU_SLUG);
1330
  };
 
 
 
1331
 
1332
  // thumbnail
1333
  $fifu['thumbnail']['desc'] = function () {
1268
  _e("image URL (optional)", FIFU_SLUG);
1269
  };
1270
 
1271
+ // fast buy
1272
+ $fifu['buy']['enable'] = function () {
1273
+ _e("fast buy", FIFU_SLUG);
1274
+ };
1275
+ $fifu['buy']['text']['text'] = function () {
1276
+ _e("Text button", FIFU_SLUG);
1277
+ };
1278
+ $fifu['buy']['disclaimer']['text'] = function () {
1279
+ _e("Disclaimer", FIFU_SLUG);
1280
+ };
1281
+ $fifu['buy']['text']['placeholder'] = function () {
1282
+ _e("buy now (optional)", FIFU_SLUG);
1283
+ };
1284
+ $fifu['buy']['disclaimer']['placeholder'] = function () {
1285
+ _e("disclaimer (optional)", FIFU_SLUG);
1286
+ };
1287
+
1288
  // social
1289
  $fifu['social']['desc'] = function () {
1290
  _e("Use social tags to share your posts (and their featured images) on the social media.", FIFU_SLUG);
1334
 
1335
  // video
1336
  $fifu['video']['desc'] = function () {
1337
+ _e("FIFU supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio, JW Player, VideoPress and Sprout. External and local video files are supported as well.", FIFU_SLUG);
1338
  };
1339
  $fifu['video']['tab']['video'] = function () {
1340
  _e("Featured video", FIFU_SLUG);
1341
  };
1342
  $fifu['video']['tab']['local'] = function () {
1343
+ _e("Video files", FIFU_SLUG);
1344
  };
1345
  $fifu['video']['local']['desc'] = function () {
1346
  _e("It's possible to use mp4 videos from your media library as featured videos. However it's required to create a video thumbnail, that will be stored in your media library. For that, in the \"Feature video\" meta box, forward the video to a frame you like and click on \"set this frame as thumbnail\" button. Save the post and that's it.", FIFU_SLUG);
1347
  };
1348
+ $fifu['video']['external']['desc'] = function () {
1349
+ _e("For external videos, webm and ogg formats are supported as well. Requirement: you must also set an external featured image (video thumbnail).", FIFU_SLUG);
1350
+ };
1351
 
1352
  // thumbnail
1353
  $fifu['thumbnail']['desc'] = function () {
featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image/video/audio as featured image/video/audio of a post or WooCommerce product.
7
- * Version: 4.0.9
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image/video/audio as featured image/video/audio of a post or WooCommerce product.
7
+ * Version: 4.1.0
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
includes/attachment.php CHANGED
@@ -113,7 +113,6 @@ function fifu_replace_attachment_image_src($image, $att_id, $size) {
113
 
114
  // use saved dimensions
115
  if ($image[1] > 1 && $image[2] > 1) {
116
- $image = fifu_resize_unsplash($image);
117
  return $image;
118
  }
119
 
@@ -139,14 +138,6 @@ function fifu_fix_dimensions($image, $size) {
139
  return $image;
140
  }
141
 
142
- function fifu_resize_unsplash($image) {
143
- if (strpos($image[0], 'https://images.unsplash.com') !== false) {
144
- $image[0] = preg_replace("/&w=[0-9]+/", '&w=' . $image[1], $image[0]);
145
- $image[0] = preg_replace("/&h=[0-9]+/", '&h=' . $image[2], $image[0]);
146
- }
147
- return $image;
148
- }
149
-
150
  function fifu_add_size($image, $size) {
151
  // fix lightbox
152
  if ($size == 'woocommerce_single')
113
 
114
  // use saved dimensions
115
  if ($image[1] > 1 && $image[2] > 1) {
 
116
  return $image;
117
  }
118
 
138
  return $image;
139
  }
140
 
 
 
 
 
 
 
 
 
141
  function fifu_add_size($image, $size) {
142
  // fix lightbox
143
  if ($size == 'woocommerce_single')
includes/jetpack.php CHANGED
@@ -31,7 +31,7 @@ function fifu_jetpack_blocked($url) {
31
  if (fifu_is_photon_url($url))
32
  return true;
33
 
34
- $blocklist = array('localhost', 'amazon-adsystem.com', 'sapo.io', 'unsplash.com', 'i.guim.co.uk', 's.yimg.com', 's1.yimg.com', 'www.washingtonpost.com', 'pbs.twimg.com', 'www.aljazeera.com', 'image.influenster.com', 'api.screenshotmachine.com', 'rackcdn.com', 'googleusercontent.com', 'drive.google.com', 'img.brownsfashion.com', 'accounts.parrotproducts.biz', 'www.dropbox.com', 'cdn.fifu.app', 'cloud.fifu.app');
35
  foreach ($blocklist as $domain) {
36
  if (strpos($url, $domain) !== false)
37
  return true;
31
  if (fifu_is_photon_url($url))
32
  return true;
33
 
34
+ $blocklist = array('localhost', 'amazon-adsystem.com', 'sapo.io', 'i.guim.co.uk', 's.yimg.com', 's1.yimg.com', 'www.washingtonpost.com', 'pbs.twimg.com', 'www.aljazeera.com', 'image.influenster.com', 'api.screenshotmachine.com', 'rackcdn.com', 'googleusercontent.com', 'drive.google.com', 'img.brownsfashion.com', 'accounts.parrotproducts.biz', 'www.dropbox.com', 'cdn.fifu.app', 'cloud.fifu.app');
35
  foreach ($blocklist as $domain) {
36
  if (strpos($url, $domain) !== false)
37
  return true;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: marceljm
3
  Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
- Tested up to: 6.0.1
7
- Stable tag: 4.0.9
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -83,7 +83,7 @@ Use an external image as featured image of your post, page or custom post type.
83
  * **[PRO]** Fast Buy
84
 
85
  #### FEATURED VIDEO
86
- Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio, JW Player, VideoPress, Sprout and media library.
87
 
88
  * **[PRO]** Featured video
89
  * **[PRO]** Video thumbnail
@@ -262,20 +262,20 @@ Featured Image, Figurë e Zgjedhur, Image mise en avant, Uitgelichte afbeelding,
262
 
263
  == Changelog ==
264
 
 
 
 
265
  = 4.0.9 =
266
  * New feature: Featured Audio; new feature: Featured video > Privacy Enhanced Mode; new option: Featured Slider > load slider on singular post types only; fix: CDN + Optimized Thumbnails > apply to content images (should skip images that cannot be served).
267
 
268
  = 4.0.8 =
269
  * Fix: CDN + Optimized Thumbnails (conflict with images from other CDNs); fix: conflict with Multisite Global Media plugin.
270
 
271
- = 4.0.7 =
272
- * Fix: integration with WCFM plugin was not working anymore.
273
-
274
  = others =
275
  * [more](https://fifu.app/changelog)
276
 
277
 
278
  == Upgrade Notice ==
279
 
280
- = 4.0.9 =
281
- * New feature: Featured Audio; new feature: Featured video > Privacy Enhanced Mode; new option: Featured Slider > load slider on singular post types only; fix: CDN + Optimized Thumbnails > apply to content images (should skip images that cannot be served).
3
  Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
+ Tested up to: 6.0.2
7
+ Stable tag: 4.1.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
83
  * **[PRO]** Fast Buy
84
 
85
  #### FEATURED VIDEO
86
+ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio, JW Player, VideoPress and Sprout. External and local video files are supported as well.
87
 
88
  * **[PRO]** Featured video
89
  * **[PRO]** Video thumbnail
262
 
263
  == Changelog ==
264
 
265
+ = 4.1.0 =
266
+ * Enhancement: Featured Video (supports external video files now as mp4, ogg and webm); enhancement: Fast Buy (new settings and improvements); enhancement: CDN + Optimized Thumbnails (serves Unsplash images now).
267
+
268
  = 4.0.9 =
269
  * New feature: Featured Audio; new feature: Featured video > Privacy Enhanced Mode; new option: Featured Slider > load slider on singular post types only; fix: CDN + Optimized Thumbnails > apply to content images (should skip images that cannot be served).
270
 
271
  = 4.0.8 =
272
  * Fix: CDN + Optimized Thumbnails (conflict with images from other CDNs); fix: conflict with Multisite Global Media plugin.
273
 
 
 
 
274
  = others =
275
  * [more](https://fifu.app/changelog)
276
 
277
 
278
  == Upgrade Notice ==
279
 
280
+ = 4.1.0 =
281
+ * Enhancement: Featured Video (supports external video files now as mp4, ogg and webm); enhancement: Fast Buy (new settings and improvements); enhancement: CDN + Optimized Thumbnails (serves Unsplash images now).