Featured Image From URL - Version 3.7.9

Version Description

  • Enhancement: hide internal image metaboxes when the post has an external featured image.
Download this release

Release Info

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

Code changes from version 3.7.8 to 3.7.9

admin/html/css/menu.css CHANGED
@@ -181,8 +181,8 @@ tr.color:nth-child(even) {
181
  height: 24px;
182
  position: relative;
183
  float:right;
184
- right:6px;
185
- top:-36px;
186
  padding: 7px;
187
  }
188
 
@@ -190,10 +190,11 @@ div.fifu-referral {
190
  height: 24px;
191
  position: relative;
192
  float:right;
193
- right:2px;
194
- top:-39px;
195
  padding: 7px;
196
  color: #f0f0f1;
 
197
  }
198
 
199
  div.polaroid {
181
  height: 24px;
182
  position: relative;
183
  float:right;
184
+ right:16px;
185
+ top:-3px;
186
  padding: 7px;
187
  }
188
 
190
  height: 24px;
191
  position: relative;
192
  float:right;
193
+ right:8px;
194
+ top:-6px;
195
  padding: 7px;
196
  color: #f0f0f1;
197
+ display: flex;
198
  }
199
 
200
  div.polaroid {
admin/html/js/meta-box.js CHANGED
@@ -81,6 +81,9 @@ function runPreview($url) {
81
 
82
  if (fifuMetaBoxVars.is_sirv_active)
83
  jQuery("#fifu_sirv_button").hide();
 
 
 
84
  }
85
  }
86
 
@@ -164,3 +167,16 @@ function fifu_register_help() {
164
  );
165
  });
166
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  if (fifuMetaBoxVars.is_sirv_active)
83
  jQuery("#fifu_sirv_button").hide();
84
+
85
+ // hide default featured image field
86
+ fifu_hide_regular_featured_image_field();
87
  }
88
  }
89
 
167
  );
168
  });
169
  }
170
+
171
+ function fifu_hide_regular_featured_image_field() {
172
+ if (wp.data.dispatch('core/edit-post'))
173
+ wp.data.dispatch('core/edit-post').removeEditorPanel('featured-image');
174
+ }
175
+
176
+ jQuery(document).ready(function () {
177
+ setTimeout(function () {
178
+ if (jQuery("#fifu_input_url").val() || jQuery("#fifu_image").css('background-image').includes('http')) {
179
+ fifu_hide_regular_featured_image_field();
180
+ }
181
+ }, 100);
182
+ });
admin/html/menu.html CHANGED
@@ -1,9 +1,11 @@
1
  <div class="wrap" style="opacity:0">
2
 
3
  <div class="header-box">
4
- <h1 style="color:white;padding-left:20px"><span class="dashicons dashicons-camera" style="font-size:30px"></span><span style="padding-left:20px">featured image from url</span></h1>
5
- <a href="https://chrome.google.com/webstore/detail/fifu-scraper/pccimcccbkdeeadhejdmnffmllpicola" target="_blank"><img class="fifu-chrome" src="https://storage.googleapis.com/featuredimagefromurl/chrome-web-store2.png" title="<?php $fifu['chrome']['link']() ?>"/></a>
6
- <a href="https://referral.fifu.app" target="_blank"><div class="fifu-referral"><i class="fas fa-comment-dollar" style="font-size:30px" title="<?php $fifu['referral']['link']() ?>"></i></div></a>
 
 
7
  </div>
8
 
9
  <div id="tabs-top" style="float:left">
1
  <div class="wrap" style="opacity:0">
2
 
3
  <div class="header-box">
4
+ <h1 style="color:white;padding-left:20px;width:98%;font-family:Ubuntu,sans-serif">
5
+ <span class="dashicons dashicons-camera" style="font-size:30px"></span><span style="padding-left:20px">featured image from url</span>
6
+ <a href="https://chrome.google.com/webstore/detail/fifu-scraper/pccimcccbkdeeadhejdmnffmllpicola" target="_blank"><img class="fifu-chrome" src="https://storage.googleapis.com/featuredimagefromurl/chrome-web-store2.png" title="<?php $fifu['chrome']['link']() ?>"/></a>
7
+ <a href="https://referral.fifu.app" target="_blank"><div class="fifu-referral"><i class="fas fa-comment-dollar" style="font-size:30px" title="<?php $fifu['referral']['link']() ?>"></i></div></a>
8
+ </h1>
9
  </div>
10
 
11
  <div id="tabs-top" style="float:left">
admin/meta-box.php CHANGED
@@ -16,6 +16,17 @@ function fifu_insert_meta_box() {
16
  fifu_register_meta_box_script();
17
  }
18
 
 
 
 
 
 
 
 
 
 
 
 
19
  function fifu_register_meta_box_script() {
20
  $fifu = fifu_get_strings_meta_box_php();
21
  $fifu_help = fifu_get_strings_help();
16
  fifu_register_meta_box_script();
17
  }
18
 
19
+ add_action('add_meta_boxes', 'remove_metaboxes', 50);
20
+
21
+ function remove_metaboxes() {
22
+ global $post;
23
+ $url = get_post_meta($post->ID, 'fifu_image_url', true);
24
+ if ($url) {
25
+ remove_meta_box('postimagediv', 'product', 'normal');
26
+ remove_meta_box('woocommerce-product-images', 'product', 'normal');
27
+ }
28
+ }
29
+
30
  function fifu_register_meta_box_script() {
31
  $fifu = fifu_get_strings_meta_box_php();
32
  $fifu_help = fifu_get_strings_help();
featured-image-from-url.php CHANGED
@@ -4,11 +4,11 @@
4
  * Plugin Name: Featured Image from URL (FIFU)
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.7.8
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
11
- * WC tested up to: 5.7
12
  * Text Domain: featured-image-from-url
13
  * License: GPLv3
14
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
4
  * Plugin Name: Featured Image from URL (FIFU)
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.7.9
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
11
+ * WC tested up to: 5.9
12
  * Text Domain: featured-image-from-url
13
  * License: GPLv3
14
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
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: 5.8.1
7
- Stable tag: 3.7.8
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -225,20 +225,20 @@ Featured Image, Figurë e Zgjedhur, Image mise en avant, Uitgelichte afbeelding,
225
 
226
  == Changelog ==
227
 
 
 
 
228
  = 3.7.8 =
229
  * CSV and JSON examples updated.
230
 
231
  = 3.7.7 =
232
  * Enhancement: Featured video (supports videos from the media library now); new option: FIFU Product Gallery > adaptive height; new option: Save in the Media Library > Run now.
233
 
234
- = 3.7.6 =
235
- * New option: Auto set featured media using web page address > Custom field; enhancement: Auto set featured media using web page address (auto set product gallery for Amazon products); enhancement: CDN + Optimized Thumbnails (can serve Amazon images now); notice: FIFU will no longer support Instagram images.
236
-
237
  = others =
238
  * [more](https://fifu.app/changelog)
239
 
240
 
241
  == Upgrade Notice ==
242
 
243
- = 3.7.8 =
244
- * CSV and JSON examples updated.
3
  Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
+ Tested up to: 5.8.2
7
+ Stable tag: 3.7.9
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
225
 
226
  == Changelog ==
227
 
228
+ = 3.7.9 =
229
+ * Enhancement: hide internal image metaboxes when the post has an external featured image.
230
+
231
  = 3.7.8 =
232
  * CSV and JSON examples updated.
233
 
234
  = 3.7.7 =
235
  * Enhancement: Featured video (supports videos from the media library now); new option: FIFU Product Gallery > adaptive height; new option: Save in the Media Library > Run now.
236
 
 
 
 
237
  = others =
238
  * [more](https://fifu.app/changelog)
239
 
240
 
241
  == Upgrade Notice ==
242
 
243
+ = 3.7.9 =
244
+ * Enhancement: hide internal image metaboxes when the post has an external featured image.