Featured Image From URL - Version 3.1.1

Version Description

  • New option (Premium): Media RSS Tags > width; Improvement (Premium): each Featured Slider can have a different size ratio now; Bug fix: conflict with WooCommerce Product CSV Import Suite plugin; Bug fix: conflict between Lazy Load feature and URLs with parentheses.
Download this release

Release Info

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

Code changes from version 3.1.0 to 3.1.1

admin/html/menu.html CHANGED
@@ -1585,7 +1585,7 @@
1585
  <div class="greybox" id="grad2">
1586
  <b>Premium feature</b><br><br>
1587
 
1588
- FIFU supports videos from YouTube, Vimeo, Facebook, Imgur, 9GAG, Cloudinary, Tumblr and Publitio. You can enable the video meta box here.
1589
 
1590
  </div>
1591
 
@@ -1711,8 +1711,8 @@
1711
  mode
1712
  <br>
1713
  <select id="select_play_type" style="width:85px">
1714
- <option value="lightbox">lightbox</option>
1715
  <option value="inline">inline</option>
 
1716
  </select>
1717
 
1718
  <br>
@@ -2106,6 +2106,19 @@
2106
  value=""
2107
  style="display:block;border:none">
2108
  </th>
 
 
 
 
 
 
 
 
 
 
 
 
 
2109
  </tr>
2110
  </table>
2111
  </div>
@@ -3042,6 +3055,63 @@
3042
  From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
3043
  </div>
3044
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3045
  <div class="box">
3046
  <table>
3047
  <tr>
1585
  <div class="greybox" id="grad2">
1586
  <b>Premium feature</b><br><br>
1587
 
1588
+ FIFU supports videos from YouTube, Vimeo, Facebook, Imgur, 9GAG, Cloudinary, Tumblr and Publitio (videos hosted elsewhere are not supported). Enable the video meta box here.
1589
 
1590
  </div>
1591
 
1711
  mode
1712
  <br>
1713
  <select id="select_play_type" style="width:85px">
 
1714
  <option value="inline">inline</option>
1715
+ <option value="lightbox">lightbox</option>
1716
  </select>
1717
 
1718
  <br>
2106
  value=""
2107
  style="display:block;border:none">
2108
  </th>
2109
+ <th>
2110
+ width
2111
+ <br>
2112
+ <input
2113
+ id="fifu_input_rss_width"
2114
+ type="text"
2115
+ name="fifu_input_rss_width"
2116
+ value=""
2117
+ placeholder="e.g.: 600"
2118
+ style="width:85px">
2119
+ <br>
2120
+ <input type="submit" value="OK" style="width:85px" disabled>
2121
+ </th>
2122
  </tr>
2123
  </table>
2124
  </div>
3055
  From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
3056
  </div>
3057
  </div>
3058
+ <div class="box">
3059
+ <table>
3060
+ <tr>
3061
+ <td style="border-bottom:none">2020-06-03</td>
3062
+ <td style="border-bottom:none"><h3> Klb Shortcode</h3></td>
3063
+ <td style="border-bottom:none">plugin</td>
3064
+ </tr>
3065
+ </table>
3066
+ <div class="greybox" style="position: relative; top: -10px">
3067
+ Featured image not shown on carousel:<br>
3068
+ 1) open "klb-shortcode/inc/klb-shortcode.php";<br>
3069
+ 2) search for "$imageresize = dealsdot_resize( $image_src";<br>
3070
+ 3) add "$imageresize = $imageresize ? $imageresize : $image_src;" immediately below that.<br>
3071
+ </div>
3072
+ </div>
3073
+ <div class="box">
3074
+ <table>
3075
+ <tr>
3076
+ <td style="border-bottom:none">2020-06-02</td>
3077
+ <td style="border-bottom:none"><h3> Zapier [Instagram]</h3></td>
3078
+ <td style="border-bottom:none">service</td>
3079
+ </tr>
3080
+ </table>
3081
+ <div class="greybox" style="position: relative; top: -10px">
3082
+ Setting featured image automatically:<br>
3083
+ 1) access "FIFU Settings > URL from Post Content";<br>
3084
+ 2) enable "use the 1st (or nth) image/video as featured image";<br>
3085
+ 3) enable "hide the 1st (or nth) image/video from content";<br>
3086
+ 4) access "Zapier > Make a Zap", select Instagram as the first app and configure as you want;<br>
3087
+ 5) select WordPress as the second app;<br>
3088
+ 6) click on "Choose Action Event", select "Create Post" and "Continue";<br>
3089
+ 7) select your "WordPress account" and "Continue";<br>
3090
+ 8) on "Customize Post", click on "Content" and select "Permalink";<br>
3091
+ 9) put the "Permalink" in an img tag: &lt;img src="Permalink"&gt;<br>
3092
+ </div>
3093
+ </div>
3094
+ <div class="box">
3095
+ <table>
3096
+ <tr>
3097
+ <td style="border-bottom:none">2020-06-01</td>
3098
+ <td style="border-bottom:none"><h3> Zapier [YouTube]</h3></td>
3099
+ <td style="border-bottom:none">service</td>
3100
+ </tr>
3101
+ </table>
3102
+ <div class="greybox" style="position: relative; top: -10px">
3103
+ Setting featured video automatically:<br>
3104
+ 1) access "FIFU Settings > URL from Post Content";<br>
3105
+ 2) enable "use the 1st (or nth) image/video as featured image";<br>
3106
+ 3) enable "hide the 1st (or nth) image/video from content";<br>
3107
+ 4) access "Zapier > Make a Zap", select YouTube as the first app and configure as you want;<br>
3108
+ 5) select WordPress as the second app;<br>
3109
+ 6) click on "Choose Action Event", select "Create Post" and "Continue";<br>
3110
+ 7) select your "WordPress account" and "Continue";<br>
3111
+ 8) on "Customize Post", click on "Content" and select "Embed URL";<br>
3112
+ 9) put the "Embed URL" in an iframe tag: &lt;iframe src="Embed URL"&gt;&lt;/iframe&gt;<br>
3113
+ </div>
3114
+ </div>
3115
  <div class="box">
3116
  <table>
3117
  <tr>
admin/html/meta-box.html CHANGED
@@ -2,18 +2,23 @@
2
 
3
  <!-- show alt field, image and link if URL was already provided -->
4
 
5
- <div style="<?php echo $show_ignore ?>">
6
- <input type="checkbox" name="fifu_ignore_auto_set" id="fifu_ignore_auto_set">
7
- <label for="fifu_ignore_auto_set">ignore URL from Post Content</label>
8
- <br>
9
- </div>
 
 
 
 
 
10
 
11
- <table id="fifu_giphy" style="<?php echo $show_button ?>">
12
  <tr>
13
- <th style="width:5px;padding:unset">
14
  <input type="checkbox" name="fifu_giphy_checkbox" id="fifu_giphy_checkbox" disabled>
15
  </th>
16
- <th style="padding:unset">
17
  <label for="fifu_giphy_checkbox" style="font-weight:normal;color:#cccccc">Giphy search (Premium)</label>
18
  </th>
19
  </tr>
@@ -24,16 +29,16 @@
24
  name="fifu_input_alt"
25
  placeholder="alt/title attribute (optional)"
26
  value="<?php echo $alt; ?>"
27
- style="<?php echo $width, $margin, $show_alt ?>" />
28
 
29
  <div id="fifu_image"
30
- style="<?php echo $height, $margin, $show_image ?>
31
  background:url('<?php echo $url; ?>') no-repeat center center;
32
  background-size:cover;
33
  cursor:zoom-in" >
34
  </div>
35
 
36
- <table id="fifu_table_url" style="width:100%;position:relative;left:-5px">
37
  <tr>
38
  <td style="width:100%">
39
  <input id="fifu_input_url"
@@ -41,21 +46,17 @@
41
  name="fifu_input_url"
42
  placeholder="Image URL or Keywords"
43
  value="<?php echo $url; ?>"
44
- style="<?php echo $width, $margin ?>" />
45
  </td>
46
  <td>
47
  <span id="fifu_help"
48
- title=
49
- "Example of
50
- - image URL: http...
51
- - keywords: sea,sun
52
-
53
  To get a random image leave this field empty.
54
-
55
- It's possible to define a size for the auto-generated images:
56
- - Settings > Featured Image > Unsplash Image Sizes"
57
  class="dashicons dashicons-editor-help"
58
- style="<?php echo $show_button . ';font-size:25px' ?>">
59
  </span>
60
 
61
  <span
2
 
3
  <!-- show alt field, image and link if URL was already provided -->
4
 
5
+ <table style="<?php echo $show_ignore ?>">
6
+ <tr>
7
+ <th style="width:5px">
8
+ <input type="checkbox" name="fifu_ignore_auto_set" id="fifu_ignore_auto_set">
9
+ </th>
10
+ <th>
11
+ <label for="fifu_ignore_auto_set" style="font-weight:normal">ignore URL from Post Content</label>
12
+ </th>
13
+ </tr>
14
+ </table>
15
 
16
+ <table id="fifu_giphy" style="<?php echo $show_button ?>;padding-bottom:4px">
17
  <tr>
18
+ <th style="width:5px">
19
  <input type="checkbox" name="fifu_giphy_checkbox" id="fifu_giphy_checkbox" disabled>
20
  </th>
21
+ <th>
22
  <label for="fifu_giphy_checkbox" style="font-weight:normal;color:#cccccc">Giphy search (Premium)</label>
23
  </th>
24
  </tr>
29
  name="fifu_input_alt"
30
  placeholder="alt/title attribute (optional)"
31
  value="<?php echo $alt; ?>"
32
+ style="<?php echo $width, $show_alt ?>" />
33
 
34
  <div id="fifu_image"
35
+ style="<?php echo $height, $show_image ?>
36
  background:url('<?php echo $url; ?>') no-repeat center center;
37
  background-size:cover;
38
  cursor:zoom-in" >
39
  </div>
40
 
41
+ <table id="fifu_table_url" style="width:103%;position:relative;left:-3px;top:-3px;">
42
  <tr>
43
  <td style="width:100%">
44
  <input id="fifu_input_url"
46
  name="fifu_input_url"
47
  placeholder="Image URL or Keywords"
48
  value="<?php echo $url; ?>"
49
+ style="<?php echo $width ?>" />
50
  </td>
51
  <td>
52
  <span id="fifu_help"
53
+ title="
54
+ -Example of image URL: http...
55
+ -Example of keywords: sea,sun
 
 
56
  To get a random image leave this field empty.
57
+ "
 
 
58
  class="dashicons dashicons-editor-help"
59
+ style="<?php echo $show_button . ';font-size:20px' ?>">
60
  </span>
61
 
62
  <span
admin/meta-box.php CHANGED
@@ -48,7 +48,7 @@ function fifu_add_css() {
48
  }
49
 
50
  function fifu_show_elements($post) {
51
- $margin = 'margin-top:10px;';
52
  $width = 'width:100%;';
53
  $height = 'height:200px;';
54
  $align = 'text-align:left;';
@@ -291,6 +291,8 @@ function fifu_variation_settings_fields($loop, $variation_data, $variation) {
291
  add_action('import_end', 'fifu_import_end', 10, 0);
292
 
293
  function fifu_import_end() {
 
 
294
  fifu_db_delete_thumbnail_id_without_attachment();
295
  fifu_db_insert_attachment();
296
  fifu_db_insert_attachment_category();
48
  }
49
 
50
  function fifu_show_elements($post) {
51
+ $margin = 'margin-top:5px;';
52
  $width = 'width:100%;';
53
  $height = 'height:200px;';
54
  $align = 'text-align:left;';
291
  add_action('import_end', 'fifu_import_end', 10, 0);
292
 
293
  function fifu_import_end() {
294
+ if ($_POST['action'] == "woocommerce_csv_import_request" && !isset($_POST['mapping']))
295
+ return;
296
  fifu_db_delete_thumbnail_id_without_attachment();
297
  fifu_db_insert_attachment();
298
  fifu_db_insert_attachment_category();
featured-image-from-url.php CHANGED
@@ -4,11 +4,11 @@
4
  * Plugin Name: Featured Image from URL
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image as Featured Image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
- * Version: 3.1.0
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 3.0
11
- * WC tested up to: 4.1.1
12
  */
13
 
14
  define('FIFU_PLUGIN_DIR', plugin_dir_path(__FILE__));
4
  * Plugin Name: Featured Image from URL
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image as Featured Image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
+ * Version: 3.1.1
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 3.0
11
+ * WC tested up to: 4.2.0
12
  */
13
 
14
  define('FIFU_PLUGIN_DIR', plugin_dir_path(__FILE__));
includes/attachment.php CHANGED
@@ -168,9 +168,7 @@ function fifu_callback($buffer) {
168
  preg_match_all('/<[^>]*background-image[^>]*>/', $buffer, $imgList);
169
  foreach ($imgList[0] as $imgItem) {
170
  $mainDelimiter = substr(explode('style=', $imgItem)[1], 0, 1);
171
- $url = explode(')', explode('url(', $imgItem)[1])[0];
172
- $url = trim($url, '"');
173
- $url = trim($url, "'");
174
  $newImgItem = preg_replace("/background-image[^:]*:[^\)]*url[^\)]*[\)]/", "", $imgItem);
175
  $attr = 'data-bg=' . $mainDelimiter . $url . $mainDelimiter;
176
  $newImgItem = str_replace('>', ' ' . $attr . '>', $newImgItem);
168
  preg_match_all('/<[^>]*background-image[^>]*>/', $buffer, $imgList);
169
  foreach ($imgList[0] as $imgItem) {
170
  $mainDelimiter = substr(explode('style=', $imgItem)[1], 0, 1);
171
+ $url = preg_split('/[\'\"]\)/', preg_split('/url\([\'\"]/', $imgItem, -1)[1], -1)[0];
 
 
172
  $newImgItem = preg_replace("/background-image[^:]*:[^\)]*url[^\)]*[\)]/", "", $imgItem);
173
  $attr = 'data-bg=' . $mainDelimiter . $url . $mainDelimiter;
174
  $newImgItem = str_replace('>', ' ' . $attr . '>', $newImgItem);
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Plugin Name ===
2
  Contributors: marceljm
3
  Donate link: https://donorbox.org/fifu
4
- Tags: featured image, image, featured, url, external, external featured image, featured image from url, url featured image, giphy, flickr, s3, picasa, woocommerce, product image, product gallery, product, gallery, column, list, page, post, all, content, custom, type, custom post type, category, video, external video, youtube, vimeo, featured video, hover, effects, hover effects, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, validation, jetpack, visual composer, play, pause, crop, resize, zoom, enable, disable, default, automatic, auto set, cloudinary, schedule, event, cron, seo, variable, tumblr, variation, product variation, shortcode, facebook, instagram, imgur, publitio, 9gag, wcfm, add-on, scraper, 特色圖片, 图片, 网址, 外部, unsplash, keyword, random, acf, rss, media, tag
5
  Requires at least: 4.0
6
  Tested up to: 5.4.1
7
- Stable tag: 3.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -168,6 +168,9 @@ Features:
168
 
169
  == Changelog ==
170
 
 
 
 
171
  = 3.1.0 =
172
  * New Feature (Premium): Giphy search; New option (Premium): Same Height > Delay; Bug Fix: problems due with invalid characters in some fields.
173
 
@@ -768,6 +771,9 @@ was removed. To finish, a Premium version is now been presented.
768
 
769
  == Upgrade Notice ==
770
 
 
 
 
771
  = 3.1.0 =
772
  * New Feature (Premium): Giphy search; New option (Premium): Same Height > Delay; Bug Fix: problems due with invalid characters in some fields.
773
 
1
  === Plugin Name ===
2
  Contributors: marceljm
3
  Donate link: https://donorbox.org/fifu
4
+ Tags: featured image, image, featured, url, external, external featured image, featured image from url, url featured image, giphy, flickr, s3, picasa, woocommerce, product image, product gallery, product, gallery, column, list, page, post, all, content, custom, type, custom post type, category, video, external video, youtube, vimeo, featured video, hover, effects, hover effects, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, validation, jetpack, visual composer, play, pause, crop, resize, zoom, enable, disable, default, automatic, auto set, cloudinary, schedule, event, cron, seo, variable, tumblr, variation, product variation, shortcode, facebook, instagram, imgur, publitio, 9gag, wcfm, add-on, scraper, 特色圖片, 图片, 网址, 外部, unsplash, keyword, random, acf, rss, media, tag, gif
5
  Requires at least: 4.0
6
  Tested up to: 5.4.1
7
+ Stable tag: 3.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
168
 
169
  == Changelog ==
170
 
171
+ = 3.1.1 =
172
+ * New option (Premium): Media RSS Tags > width; Improvement (Premium): each Featured Slider can have a different size ratio now; Bug fix: conflict with WooCommerce Product CSV Import Suite plugin; Bug fix: conflict between Lazy Load feature and URLs with parentheses.
173
+
174
  = 3.1.0 =
175
  * New Feature (Premium): Giphy search; New option (Premium): Same Height > Delay; Bug Fix: problems due with invalid characters in some fields.
176
 
771
 
772
  == Upgrade Notice ==
773
 
774
+ = 3.1.1 =
775
+ * New option (Premium): Media RSS Tags > width; Improvement (Premium): each Featured Slider can have a different size ratio now; Bug fix: conflict with WooCommerce Product CSV Import Suite plugin; Bug fix: conflict between Lazy Load feature and URLs with parentheses.
776
+
777
  = 3.1.0 =
778
  * New Feature (Premium): Giphy search; New option (Premium): Same Height > Delay; Bug Fix: problems due with invalid characters in some fields.
779