Featured Image From URL - Version 2.0.6

Version Description

  • Bug fix: fake internal featured image.
Download this release

Release Info

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

Code changes from version 2.0.5 to 2.0.6

Files changed (3) hide show
  1. admin/menu.php +11 -27
  2. featured-image-from-url.php +1 -1
  3. readme.txt +6 -0
admin/menu.php CHANGED
@@ -50,10 +50,6 @@ function fifu_get_menu_html() {
50
  fifu_enable_fake();
51
  } else {
52
  fifu_disable_fake();
53
- //
54
- update_option('fifu_fake_created', true);
55
- fifu_disable_fake2();
56
- update_option('fifu_fake_created', false);
57
  }
58
 
59
  if (fifu_is_on('fifu_fake2')) {
@@ -61,7 +57,6 @@ function fifu_get_menu_html() {
61
  fifu_enable_fake2();
62
  } else {
63
  fifu_disable_fake2();
64
- update_option('fifu_fake_created', false);
65
  }
66
 
67
  if ($default_url && fifu_is_on('fifu_enable_default_url') && fifu_is_on('fifu_fake2')) {
@@ -174,14 +169,10 @@ function fifu_enable_fake2() {
174
  $table = $wpdb->prefix . 'postmeta';
175
  $query = "
176
  SELECT DISTINCT post_id
177
- FROM " . $table . " a
178
- WHERE a.post_id in (
179
- SELECT post_id
180
- FROM " . $table . " b
181
- WHERE b.meta_key IN ('fifu_image_url', 'fifu_video_url', 'fifu_slider_image_url_0', 'fifu_shortcode')
182
- AND b.meta_value IS NOT NULL
183
- AND b.meta_value <> ''
184
- )
185
  AND NOT EXISTS (
186
  SELECT 1
187
  FROM " . $table . " c
@@ -226,13 +217,9 @@ function fifu_enable_fake_ctgr() {
226
  $query = "
227
  SELECT DISTINCT term_id
228
  FROM " . $table_termmeta . " a
229
- WHERE a.term_id in (
230
- SELECT term_id
231
- FROM " . $table_termmeta . " b
232
- WHERE b.meta_key IN ('fifu_image_url', 'fifu_video_url', 'fifu_slider_image_url_0', 'fifu_shortcode')
233
- AND b.meta_value IS NOT NULL
234
- AND b.meta_value <> ''
235
- )
236
  AND NOT EXISTS (
237
  SELECT 1
238
  FROM " . $table_termmeta . " c
@@ -273,6 +260,7 @@ function fifu_enable_fake_ctgr() {
273
  function fifu_disable_fake2() {
274
  if (!get_option('fifu_fake_created'))
275
  return;
 
276
 
277
  global $wpdb;
278
 
@@ -407,13 +395,9 @@ function fifu_enable_fake() {
407
  $query = "
408
  SELECT DISTINCT post_id
409
  FROM " . $table . " a
410
- WHERE a.post_id in (
411
- SELECT post_id
412
- FROM " . $table . " b
413
- WHERE b.meta_key IN ('fifu_image_url', 'fifu_video_url', 'fifu_slider_image_url_0', 'fifu_shortcode')
414
- AND b.meta_value IS NOT NULL
415
- AND b.meta_value <> ''
416
- )
417
  AND NOT EXISTS (
418
  SELECT 1
419
  FROM " . $table . " c
50
  fifu_enable_fake();
51
  } else {
52
  fifu_disable_fake();
 
 
 
 
53
  }
54
 
55
  if (fifu_is_on('fifu_fake2')) {
57
  fifu_enable_fake2();
58
  } else {
59
  fifu_disable_fake2();
 
60
  }
61
 
62
  if ($default_url && fifu_is_on('fifu_enable_default_url') && fifu_is_on('fifu_fake2')) {
169
  $table = $wpdb->prefix . 'postmeta';
170
  $query = "
171
  SELECT DISTINCT post_id
172
+ FROM " . $table . " a
173
+ WHERE a.meta_key IN ('fifu_image_url', 'fifu_video_url', 'fifu_slider_image_url_0', 'fifu_shortcode')
174
+ AND a.meta_value IS NOT NULL
175
+ AND a.meta_value <> ''
 
 
 
 
176
  AND NOT EXISTS (
177
  SELECT 1
178
  FROM " . $table . " c
217
  $query = "
218
  SELECT DISTINCT term_id
219
  FROM " . $table_termmeta . " a
220
+ WHERE a.meta_key IN ('fifu_image_url', 'fifu_video_url', 'fifu_slider_image_url_0', 'fifu_shortcode')
221
+ AND a.meta_value IS NOT NULL
222
+ AND a.meta_value <> ''
 
 
 
 
223
  AND NOT EXISTS (
224
  SELECT 1
225
  FROM " . $table_termmeta . " c
260
  function fifu_disable_fake2() {
261
  if (!get_option('fifu_fake_created'))
262
  return;
263
+ update_option('fifu_fake_created', false);
264
 
265
  global $wpdb;
266
 
395
  $query = "
396
  SELECT DISTINCT post_id
397
  FROM " . $table . " a
398
+ WHERE a.meta_key IN ('fifu_image_url', 'fifu_video_url', 'fifu_slider_image_url_0', 'fifu_shortcode')
399
+ AND a.meta_value IS NOT NULL
400
+ AND a.meta_value <> ''
 
 
 
 
401
  AND NOT EXISTS (
402
  SELECT 1
403
  FROM " . $table . " c
featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image from URL
5
  * Plugin URI: https://featuredimagefromurl.com/
6
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
7
- * Version: 2.0.5
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
4
  * Plugin Name: Featured Image from URL
5
  * Plugin URI: https://featuredimagefromurl.com/
6
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
7
+ * Version: 2.0.6
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
readme.txt CHANGED
@@ -161,6 +161,9 @@ Features:
161
 
162
  == Changelog ==
163
 
 
 
 
164
  = 2.0.5 =
165
  * Compatibility with WordPress 5.
166
 
@@ -446,6 +449,9 @@ was removed. To finish, a Premium version is now been presented.
446
 
447
  == Upgrade Notice ==
448
 
 
 
 
449
  = 2.0.5 =
450
  * Compatibility with WordPress 5.
451
 
161
 
162
  == Changelog ==
163
 
164
+ = 2.0.6 =
165
+ * Bug fix: fake internal featured image.
166
+
167
  = 2.0.5 =
168
  * Compatibility with WordPress 5.
169
 
449
 
450
  == Upgrade Notice ==
451
 
452
+ = 2.0.6 =
453
+ * Bug fix: fake internal featured image.
454
+
455
  = 2.0.5 =
456
  * Compatibility with WordPress 5.
457