Featured Image From URL - Version 2.7.5

Version Description

  • Improvement: menu settings is faster now; Bug fix: conflict with internal images in some sites.
Download this release

Release Info

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

Code changes from version 2.7.4 to 2.7.5

admin/api.php CHANGED
@@ -42,6 +42,14 @@ function fifu_clean_dimensions_all_api(WP_REST_Request $request) {
42
  fifu_db_clean_dimensions_all();
43
  }
44
 
 
 
 
 
 
 
 
 
45
  function fifu_test_execution_time() {
46
  for ($i = 0; $i <= 120; $i++) {
47
  error_log($i);
@@ -74,5 +82,13 @@ add_action('rest_api_init', function () {
74
  'methods' => 'POST',
75
  'callback' => 'fifu_clean_dimensions_all_api'
76
  ));
 
 
 
 
 
 
 
 
77
  });
78
 
42
  fifu_db_clean_dimensions_all();
43
  }
44
 
45
+ function fifu_disable_default_api(WP_REST_Request $request) {
46
+ fifu_db_delete_default_url();
47
+ }
48
+
49
+ function fifu_none_default_api(WP_REST_Request $request) {
50
+
51
+ }
52
+
53
  function fifu_test_execution_time() {
54
  for ($i = 0; $i <= 120; $i++) {
55
  error_log($i);
82
  'methods' => 'POST',
83
  'callback' => 'fifu_clean_dimensions_all_api'
84
  ));
85
+ register_rest_route('featured-image-from-url/v2', '/disable_default_api/', array(
86
+ 'methods' => 'POST',
87
+ 'callback' => 'fifu_disable_default_api'
88
+ ));
89
+ register_rest_route('featured-image-from-url/v2', '/none_default_api/', array(
90
+ 'methods' => 'POST',
91
+ 'callback' => 'fifu_none_default_api'
92
+ ));
93
  });
94
 
admin/db.php CHANGED
@@ -907,8 +907,11 @@ function fifu_db_clean_dimensions_all() {
907
 
908
  function fifu_db_missing_dimensions() {
909
  $db = new FifuDb();
910
- $aux = $db->get_count_posts_without_dimensions()[0];
911
- return $aux ? $aux->amount : -1;
 
 
 
912
  }
913
 
914
  /* count: metadata */
907
 
908
  function fifu_db_missing_dimensions() {
909
  $db = new FifuDb();
910
+ if (fifu_is_on('fifu_save_dimensions')) {
911
+ $aux = $db->get_count_posts_without_dimensions()[0];
912
+ return $aux ? $aux->amount : -1;
913
+ }
914
+ return null;
915
  }
916
 
917
  /* count: metadata */
admin/html/js/menu.js CHANGED
@@ -61,18 +61,37 @@ function save(formName, url) {
61
  });
62
  }
63
 
64
- jQuery(function () {
65
- jQuery("#dialog").dialog({
66
- autoOpen: false,
67
- modal: true,
68
- width: "630px",
69
- });
70
 
71
- jQuery("#opener").on("click", function () {
72
- jQuery("#dialog").load(location.href + " #dialog");
73
- jQuery("#dialog").dialog("open");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  });
75
- });
76
 
77
  function fifu_fake1_js() {
78
  if (jQuery('#fifu_toggle_fake').attr('class') == 'toggleon') {
61
  });
62
  }
63
 
64
+ function fifu_default_js() {
65
+ jQuery('.wrap').block({message: 'Please wait some seconds...', css: {backgroundColor: 'none', border: 'none', color: 'white'}});
 
 
 
 
66
 
67
+ toggle = jQuery("#fifu_toggle_enable_default_url").attr('class');
68
+ switch (toggle) {
69
+ case "toggleoff":
70
+ option = "disable_default_api";
71
+ break;
72
+ default:
73
+ url = jQuery("#fifu_input_default_url").val();
74
+ option = url ? "none_default_api" : "disable_default_api";
75
+ }
76
+ jQuery.ajax({
77
+ method: "POST",
78
+ url: homeUrl() + '?rest_route=/featured-image-from-url/v2/' + option + '/',
79
+ async: true,
80
+ success: function (data) {
81
+ },
82
+ error: function (jqXHR, textStatus, errorThrown) {
83
+ console.log(jqXHR);
84
+ console.log(textStatus);
85
+ console.log(errorThrown);
86
+ },
87
+ complete: function () {
88
+ setTimeout(function () {
89
+ jQuery('.wrap').unblock();
90
+ }, 1000);
91
+ },
92
+ timeout: 0
93
  });
94
+ }
95
 
96
  function fifu_fake1_js() {
97
  if (jQuery('#fifu_toggle_fake').attr('class') == 'toggleon') {
admin/html/menu.html CHANGED
@@ -1,7 +1,7 @@
1
  <div class="wrap" style="opacity:0">
2
 
3
  <div class="header-box" style="background-color:#23282d">
4
- <h1 style="color:white"><img src="<?php echo plugins_url()?>/featured-image-from-url/admin/images/favicon.png" alt=""> <b> featured image from url</b> 2</h1>
5
  </div>
6
 
7
  <div id="tabs-top">
@@ -612,7 +612,8 @@
612
  value="<?php echo $default_url; ?>">
613
 
614
  <input type="submit"
615
- value="Submit" >
 
616
  </form>
617
  </div>
618
 
@@ -627,7 +628,8 @@
627
  type="submit"
628
  href="javascript:void(0)"
629
  id="fifu_toggle_enable_default_url"
630
- onclick="invert('enable_default_url')"
 
631
  name="fifu_toggle_enable_default_url"
632
  class="<?php echo $enable_default_url; ?>"
633
  value=""
@@ -2654,7 +2656,7 @@
2654
  <div class="box">
2655
  <h2>Fast Support</h2>
2656
  <div class="greybox">
2657
- If you need any help, you can refer to <a href="https://wordpress.org/plugins/featured-image-from-url/screenshots/" target="_blank">screenshots</a> or send an email to <b>marcel@featuredimagefromurl.com</b> (send me this <button id="opener">data</button>, please).
2658
  </div>
2659
  </div>
2660
  </div>
@@ -2662,7 +2664,26 @@
2662
  <div class="box">
2663
  <h2>Troubleshooting</h2>
2664
  <div class="greybox">
2665
- From <b>September 2019</b>, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2666
  </div>
2667
  </div>
2668
  <div class="box">
@@ -2872,71 +2893,5 @@
2872
  </div>
2873
  </ul>
2874
  </div>
2875
-
2876
- <div id="dialog" title="About">
2877
- <textarea id="bar" style="width:600px;height:500px;resize:none;" readonly>
2878
- Version:<?php echo fifu_version() ?>;
2879
- Site:<?php echo get_home_url() ?>;
2880
- Theme:<?php echo wp_get_theme() ?><?php echo fifu_woo_theme() ? ' (WooCommerce)' : '' ?>;
2881
- PHP:<?php echo phpversion() ?>;
2882
- WooCommerce:<?php echo class_exists('WooCommerce') ? WC()->version : '' ?>;
2883
- WordPress:<?php echo get_bloginfo('version') ?>;
2884
- Pages:<?php echo wp_count_posts('page')->publish ?>;
2885
- Posts:<?php echo wp_count_posts('post')->publish ?>;
2886
- Products:<?php echo class_exists('WooCommerce') ? wp_count_posts('product')->publish : null ?>;
2887
- Images without Dimensions:<?php echo fifu_db_missing_dimensions() ?>;
2888
- URLs with Metadata:<?php echo fifu_db_count_urls_with_metadata() ?>;
2889
- URLs:<?php echo fifu_db_count_urls() ?>;
2890
- php-curl:<?php echo fifu_has_curl() ? 'yes' : 'no' ?>;
2891
- Plugins:<?php echo fifu_get_plugins_list() ?>;
2892
- Active Plugins:<?php echo fifu_get_active_plugins_list() ?>;
2893
- fifu_auto_alt:<?php echo $enable_auto_alt ?>;
2894
- fifu_class:<?php echo $enable_class ?>;
2895
- fifu_clean_dimensions_all:<?php echo $enable_clean_dimensions_all ?>;
2896
- fifu_column_height:<?php echo $column_height ?>;
2897
- fifu_content:<?php echo $enable_content ?>;
2898
- fifu_content_page:<?php echo $enable_content_page ?>;
2899
- fifu_css:<?php echo $css_style ?>;
2900
- fifu_data_clean:<?php echo $enable_data_clean ?>;
2901
- fifu_default_url:<?php echo $default_url ?>;
2902
- fifu_dynamic_alt:<?php echo $enable_dynamic_alt ?>;
2903
- fifu_enable_default_url:<?php echo $enable_default_url ?>;
2904
- fifu_fake:<?php echo $enable_fake ?>;
2905
- fifu_fake2:<?php echo $enable_fake2 ?>;
2906
- fifu_get_first:<?php echo $enable_get_first ?>;
2907
- fifu_grid_category:<?php echo $enable_grid_category ?>;
2908
- fifu_hide_page:<?php echo $enable_hide_page ?>;
2909
- fifu_hide_post:<?php echo $enable_hide_post ?>;
2910
- fifu_image_height_arch:<?php echo $max_image_height_arch ?>;
2911
- fifu_image_height_cart:<?php echo $max_image_height_cart ?>;
2912
- fifu_image_height_ctgr:<?php echo $max_image_height_ctgr ?>;
2913
- fifu_image_height_home:<?php echo $max_image_height_home ?>;
2914
- fifu_image_height_page:<?php echo $max_image_height_page ?>;
2915
- fifu_image_height_post:<?php echo $max_image_height_post ?>;
2916
- fifu_image_height_prod:<?php echo $max_image_height_prod ?>;
2917
- fifu_image_height_shop:<?php echo $max_image_height_shop ?>;
2918
- fifu_image_width_arch:<?php echo $max_image_width_arch ?>;
2919
- fifu_image_width_cart:<?php echo $max_image_width_cart ?>;
2920
- fifu_image_width_ctgr:<?php echo $max_image_width_ctgr ?>;
2921
- fifu_image_width_home:<?php echo $max_image_width_home ?>;
2922
- fifu_image_width_page:<?php echo $max_image_width_page ?>;
2923
- fifu_image_width_post:<?php echo $max_image_width_post ?>;
2924
- fifu_image_width_prod:<?php echo $max_image_width_prod ?>;
2925
- fifu_image_width_shop:<?php echo $max_image_width_shop ?>;
2926
- fifu_jquery:<?php echo $enable_jquery ?>;
2927
- fifu_lazy:<?php echo $enable_lazy ?>;
2928
- fifu_media_library:<?php echo $enable_media_library ?>;
2929
- fifu_original:<?php echo $enable_original ?>;
2930
- fifu_ovw_first:<?php echo $enable_ovw_first ?>;
2931
- fifu_pop_first:<?php echo $enable_pop_first ?>;
2932
- fifu_query_strings:<?php echo $enable_query_strings ?>;
2933
- fifu_save_dimensions:<?php echo $enable_save_dimensions ?>;
2934
- fifu_save_dimensions_all:<?php echo $enable_save_dimensions_all ?>;
2935
- fifu_save_dimensions_redirect:<?php echo $enable_save_dimensions_redirect ?>;
2936
- fifu_social:<?php echo $enable_social ?>;
2937
- fifu_wc_lbox:<?php echo $enable_wc_lbox ?>;
2938
- fifu_wc_zoom:<?php echo $enable_wc_zoom ?>;
2939
- </textarea>
2940
- </div>
2941
  </div>
2942
 
1
  <div class="wrap" style="opacity:0">
2
 
3
  <div class="header-box" style="background-color:#23282d">
4
+ <h1 style="color:white"><img src="<?php echo plugins_url()?>/featured-image-from-url/admin/images/favicon.png" alt=""> featured image from url 2</h1>
5
  </div>
6
 
7
  <div id="tabs-top">
612
  value="<?php echo $default_url; ?>">
613
 
614
  <input type="submit"
615
+ value="Submit"
616
+ onclick="fifu_default_js()">
617
  </form>
618
  </div>
619
 
628
  type="submit"
629
  href="javascript:void(0)"
630
  id="fifu_toggle_enable_default_url"
631
+ onclick="invert('enable_default_url');
632
+ fifu_default_js();"
633
  name="fifu_toggle_enable_default_url"
634
  class="<?php echo $enable_default_url; ?>"
635
  value=""
2656
  <div class="box">
2657
  <h2>Fast Support</h2>
2658
  <div class="greybox">
2659
+ If you need any help, you can refer to <a href="https://wordpress.org/plugins/featured-image-from-url/screenshots/" target="_blank">screenshots</a> or send an email to <b>marcel@featuredimagefromurl.com</b> (send me this <a href="admin.php?page=fifu-support-data"><button id="opener" onclick="jQuery('.wrap').block({message: 'Please wait some seconds...', css: {backgroundColor: 'none', border: 'none', color: 'white'}});">data</button></a>, please).
2660
  </div>
2661
  </div>
2662
  </div>
2664
  <div class="box">
2665
  <h2>Troubleshooting</h2>
2666
  <div class="greybox">
2667
+ From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
2668
+ </div>
2669
+ </div>
2670
+ <div class="box">
2671
+ <table>
2672
+ <tr>
2673
+ <td style="border-bottom:none">2019-12-12</td>
2674
+ <td style="border-bottom:none"><h3>PHP</h3></td>
2675
+ <td style="border-bottom:none">programming language</td>
2676
+ </tr>
2677
+ </table>
2678
+ <div class="greybox" style="position: relative; top: -10px">
2679
+ Fixing fatal error "Allowed memory size of [...] bytes exhausted (tried to allocate [...] bytes) in /var/www/html/wp-includes/wp-db.php":<br>
2680
+ 1) open /var/www/html/wp-config.php file;<br>
2681
+ 2) add this code before "Happy publishing" line: define('WP_MEMORY_LIMIT', '2048M');<br>
2682
+ </div>
2683
+ <div class="greybox" style="position: relative; top: -10px">
2684
+ Fixing fatal error "Maximum execution time of 30 seconds exceeded in /var/www/html/wp-includes/wp-db.php":<br>
2685
+ 1) open /var/www/html/wp-config.php file;<br>
2686
+ 2) add this code before "Happy publishing" line: set_time_limit(1800);<br>
2687
  </div>
2688
  </div>
2689
  <div class="box">
2893
  </div>
2894
  </ul>
2895
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2896
  </div>
2897
 
admin/html/support-data.html ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+
3
+ <div class="header-box" style="background-color:#23282d">
4
+ <h1 style="color:white"><img src="<?php echo plugins_url()?>/featured-image-from-url/admin/images/favicon.png" alt=""> featured image from url 2</h1>
5
+ </div>
6
+
7
+ <div id="tabs-top">
8
+ <textarea id="bar" style="width:1020px;height:800px;resize:none;background-color:white;" readonly>
9
+ Version:<?php echo fifu_version() ?>;
10
+ Site:<?php echo get_home_url() ?>;
11
+ Theme:<?php echo wp_get_theme() ?><?php echo fifu_woo_theme() ? ' (WooCommerce)' : '' ?>;
12
+ PHP:<?php echo phpversion() ?>;
13
+ WooCommerce:<?php echo class_exists('WooCommerce') ? WC()->version : '' ?>;
14
+ WordPress:<?php echo get_bloginfo('version') ?>;
15
+ Pages:<?php echo wp_count_posts('page')->publish ?>;
16
+ Posts:<?php echo wp_count_posts('post')->publish ?>;
17
+ Products:<?php echo class_exists('WooCommerce') ? wp_count_posts('product')->publish : null ?>;
18
+ Images without Dimensions:<?php echo fifu_db_missing_dimensions() ?>;
19
+ URLs with Metadata:<?php echo fifu_db_count_urls_with_metadata() ?>;
20
+ URLs:<?php echo fifu_db_count_urls() ?>;
21
+ php-curl:<?php echo fifu_has_curl() ? 'yes' : 'no' ?>;
22
+ Plugins:<?php echo fifu_get_plugins_list() ?>;
23
+ Active Plugins:<?php echo fifu_get_active_plugins_list() ?>;
24
+ fifu_auto_alt:<?php echo $enable_auto_alt ?>;
25
+ fifu_class:<?php echo $enable_class ?>;
26
+ fifu_clean_dimensions_all:<?php echo $enable_clean_dimensions_all ?>;
27
+ fifu_column_height:<?php echo $column_height ?>;
28
+ fifu_content:<?php echo $enable_content ?>;
29
+ fifu_content_page:<?php echo $enable_content_page ?>;
30
+ fifu_css:<?php echo $css_style ?>;
31
+ fifu_data_clean:<?php echo $enable_data_clean ?>;
32
+ fifu_default_url:<?php echo $default_url ?>;
33
+ fifu_dynamic_alt:<?php echo $enable_dynamic_alt ?>;
34
+ fifu_enable_default_url:<?php echo $enable_default_url ?>;
35
+ fifu_fake:<?php echo $enable_fake ?>;
36
+ fifu_fake2:<?php echo $enable_fake2 ?>;
37
+ fifu_get_first:<?php echo $enable_get_first ?>;
38
+ fifu_grid_category:<?php echo $enable_grid_category ?>;
39
+ fifu_hide_page:<?php echo $enable_hide_page ?>;
40
+ fifu_hide_post:<?php echo $enable_hide_post ?>;
41
+ fifu_image_height_arch:<?php echo $max_image_height_arch ?>;
42
+ fifu_image_height_cart:<?php echo $max_image_height_cart ?>;
43
+ fifu_image_height_ctgr:<?php echo $max_image_height_ctgr ?>;
44
+ fifu_image_height_home:<?php echo $max_image_height_home ?>;
45
+ fifu_image_height_page:<?php echo $max_image_height_page ?>;
46
+ fifu_image_height_post:<?php echo $max_image_height_post ?>;
47
+ fifu_image_height_prod:<?php echo $max_image_height_prod ?>;
48
+ fifu_image_height_shop:<?php echo $max_image_height_shop ?>;
49
+ fifu_image_width_arch:<?php echo $max_image_width_arch ?>;
50
+ fifu_image_width_cart:<?php echo $max_image_width_cart ?>;
51
+ fifu_image_width_ctgr:<?php echo $max_image_width_ctgr ?>;
52
+ fifu_image_width_home:<?php echo $max_image_width_home ?>;
53
+ fifu_image_width_page:<?php echo $max_image_width_page ?>;
54
+ fifu_image_width_post:<?php echo $max_image_width_post ?>;
55
+ fifu_image_width_prod:<?php echo $max_image_width_prod ?>;
56
+ fifu_image_width_shop:<?php echo $max_image_width_shop ?>;
57
+ fifu_jquery:<?php echo $enable_jquery ?>;
58
+ fifu_lazy:<?php echo $enable_lazy ?>;
59
+ fifu_media_library:<?php echo $enable_media_library ?>;
60
+ fifu_original:<?php echo $enable_original ?>;
61
+ fifu_ovw_first:<?php echo $enable_ovw_first ?>;
62
+ fifu_pop_first:<?php echo $enable_pop_first ?>;
63
+ fifu_query_strings:<?php echo $enable_query_strings ?>;
64
+ fifu_save_dimensions:<?php echo $enable_save_dimensions ?>;
65
+ fifu_save_dimensions_all:<?php echo $enable_save_dimensions_all ?>;
66
+ fifu_save_dimensions_redirect:<?php echo $enable_save_dimensions_redirect ?>;
67
+ fifu_social:<?php echo $enable_social ?>;
68
+ fifu_wc_lbox:<?php echo $enable_wc_lbox ?>;
69
+ fifu_wc_zoom:<?php echo $enable_wc_zoom ?>;
70
+ </textarea>
71
+ </div>
72
+ </div>
admin/menu.php CHANGED
@@ -13,11 +13,67 @@ function fifu_insert_menu() {
13
  wp_enqueue_script('jquery-block-ui', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js');
14
  }
15
 
16
- add_menu_page('Featured Image from URL', 'Featured Image from URL', 'administrator', 'featured-image-from-url', 'fifu_get_menu_html', plugins_url() . '/featured-image-from-url/admin/images/favicon.png', 57);
 
 
17
 
18
  add_action('admin_init', 'fifu_get_menu_settings');
19
  }
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  function fifu_get_menu_html() {
22
  flush();
23
 
@@ -91,8 +147,7 @@ function fifu_get_menu_html() {
91
  fifu_db_set_default_url();
92
  } else
93
  fifu_db_update_default_url($default_url);
94
- } else
95
- fifu_db_delete_default_url();
96
  }
97
 
98
  function fifu_get_menu_settings() {
@@ -201,6 +256,7 @@ function fifu_disable_fake2() {
201
  return;
202
  update_option('fifu_fake_created', false, 'no');
203
 
 
204
  fifu_db_delete_attachment();
205
  fifu_db_delete_attachment_category();
206
  }
13
  wp_enqueue_script('jquery-block-ui', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js');
14
  }
15
 
16
+ add_menu_page('Featured Image from URL', 'Featured Image from URL', 'manage_options', 'featured-image-from-url', 'fifu_get_menu_html', plugins_url() . '/featured-image-from-url/admin/images/favicon.png', 57);
17
+ add_submenu_page('featured-image-from-url', 'FIFU Settings', 'Settings', 'manage_options', 'featured-image-from-url');
18
+ add_submenu_page('featured-image-from-url', 'FIFU Support Data', 'Support Data', 'manage_options', 'fifu-support-data', 'fifu_support_data');
19
 
20
  add_action('admin_init', 'fifu_get_menu_settings');
21
  }
22
 
23
+ function fifu_support_data() {
24
+ // css
25
+ wp_enqueue_style('fifu-menu-css', plugins_url('/html/css/menu.css', __FILE__));
26
+
27
+ $enable_social = get_option('fifu_social');
28
+ $enable_original = get_option('fifu_original');
29
+ $enable_lazy = get_option('fifu_lazy');
30
+ $enable_jquery = get_option('fifu_jquery');
31
+ $enable_media_library = get_option('fifu_media_library');
32
+ $enable_content = get_option('fifu_content');
33
+ $enable_content_page = get_option('fifu_content_page');
34
+ $enable_fake = get_option('fifu_fake');
35
+ $enable_fake2 = get_option('fifu_fake2');
36
+ $css_style = get_option('fifu_css');
37
+ $default_url = get_option('fifu_default_url');
38
+ $enable_default_url = get_option('fifu_enable_default_url');
39
+ $enable_wc_lbox = get_option('fifu_wc_lbox');
40
+ $enable_wc_zoom = get_option('fifu_wc_zoom');
41
+ $enable_hide_page = get_option('fifu_hide_page');
42
+ $enable_hide_post = get_option('fifu_hide_post');
43
+ $enable_class = get_option('fifu_class');
44
+ $enable_get_first = get_option('fifu_get_first');
45
+ $enable_pop_first = get_option('fifu_pop_first');
46
+ $enable_ovw_first = get_option('fifu_ovw_first');
47
+ $enable_query_strings = get_option('fifu_query_strings');
48
+ $column_height = get_option('fifu_column_height');
49
+ $enable_grid_category = get_option('fifu_grid_category');
50
+ $enable_auto_alt = get_option('fifu_auto_alt');
51
+ $enable_dynamic_alt = get_option('fifu_dynamic_alt');
52
+ $enable_data_clean = 'toggleoff';
53
+ $max_image_height_shop = get_option('fifu_image_height_shop');
54
+ $max_image_width_shop = get_option('fifu_image_width_shop');
55
+ $max_image_height_prod = get_option('fifu_image_height_prod');
56
+ $max_image_width_prod = get_option('fifu_image_width_prod');
57
+ $max_image_height_cart = get_option('fifu_image_height_cart');
58
+ $max_image_width_cart = get_option('fifu_image_width_cart');
59
+ $max_image_height_ctgr = get_option('fifu_image_height_ctgr');
60
+ $max_image_width_ctgr = get_option('fifu_image_width_ctgr');
61
+ $max_image_height_arch = get_option('fifu_image_height_arch');
62
+ $max_image_width_arch = get_option('fifu_image_width_arch');
63
+ $max_image_height_home = get_option('fifu_image_height_home');
64
+ $max_image_width_home = get_option('fifu_image_width_home');
65
+ $max_image_height_page = get_option('fifu_image_height_page');
66
+ $max_image_width_page = get_option('fifu_image_width_page');
67
+ $max_image_height_post = get_option('fifu_image_height_post');
68
+ $max_image_width_post = get_option('fifu_image_width_post');
69
+ $enable_save_dimensions = get_option('fifu_save_dimensions');
70
+ $enable_save_dimensions_redirect = get_option('fifu_save_dimensions_redirect ');
71
+ $enable_save_dimensions_all = 'toggleoff';
72
+ $enable_clean_dimensions_all = 'toggleoff';
73
+
74
+ include 'html/support-data.html';
75
+ }
76
+
77
  function fifu_get_menu_html() {
78
  flush();
79
 
147
  fifu_db_set_default_url();
148
  } else
149
  fifu_db_update_default_url($default_url);
150
+ }
 
151
  }
152
 
153
  function fifu_get_menu_settings() {
256
  return;
257
  update_option('fifu_fake_created', false, 'no');
258
 
259
+ fifu_db_delete_default_url();
260
  fifu_db_delete_attachment();
261
  fifu_db_delete_attachment_category();
262
  }
admin/wai-addon.php CHANGED
@@ -11,10 +11,10 @@ $fifu_wai_addon->run();
11
  function fifu_wai_addon_save($post_id, $data, $import_options, $article) {
12
  $fields = array();
13
 
14
- if (!empty('fifu_image_url'))
15
  array_push($fields, 'fifu_image_url');
16
 
17
- if (!empty('fifu_image_alt'))
18
  array_push($fields, 'fifu_image_alt');
19
 
20
  if (empty($fields))
@@ -37,4 +37,4 @@ function fifu_wai_addon_save($post_id, $data, $import_options, $article) {
37
 
38
  /* metadata */
39
  add_action('pmxi_saved_post', 'fifu_update_fake_attach_id');
40
- }
11
  function fifu_wai_addon_save($post_id, $data, $import_options, $article) {
12
  $fields = array();
13
 
14
+ if (!empty($data['fifu_image_url']))
15
  array_push($fields, 'fifu_image_url');
16
 
17
+ if (!empty($data['fifu_image_alt']))
18
  array_push($fields, 'fifu_image_alt');
19
 
20
  if (empty($fields))
37
 
38
  /* metadata */
39
  add_action('pmxi_saved_post', 'fifu_update_fake_attach_id');
40
+ }
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.7.4
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.7.5
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/attachment.php CHANGED
@@ -24,13 +24,10 @@ function fifu_replace_attachment_url($att_url, $att_id) {
24
  if (sizeof($url) > 1)
25
  return strpos($url[1], fifu_get_internal_image_path()) !== false ? get_post($att_id)->guid : $url[1];
26
  else {
27
- // external wordpress images
28
- if (sizeof($url) > 0 && strpos($url[0], fifu_get_internal_image_path()) === false) {
29
- if (get_post($att_id)) {
30
- $url = get_post($att_id)->guid;
31
- if ($url)
32
- return $url;
33
- }
34
  }
35
  }
36
  }
24
  if (sizeof($url) > 1)
25
  return strpos($url[1], fifu_get_internal_image_path()) !== false ? get_post($att_id)->guid : $url[1];
26
  else {
27
+ if (get_post($att_id)) {
28
+ $url = get_post($att_id)->guid;
29
+ if ($url && strpos($url, 'http') === 0)
30
+ return $url;
 
 
 
31
  }
32
  }
33
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, 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, sirv, 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, instagram, 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, 9gag, wcfm, add-on
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
- Stable tag: 2.7.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -159,6 +159,9 @@ Features:
159
 
160
  == Changelog ==
161
 
 
 
 
162
  = 2.7.4 =
163
  * Bug fixes: conflict between Social Tags and Yoast plugin; conflict between Default External Featured Image and Classic Editor plugin; style issue on Safari browser; conflict with internal featured images in some sites.
164
 
@@ -651,6 +654,9 @@ was removed. To finish, a Premium version is now been presented.
651
 
652
  == Upgrade Notice ==
653
 
 
 
 
654
  = 2.7.4 =
655
  * Bug fixes: conflict between Social Tags and Yoast plugin; conflict between Default External Featured Image and Classic Editor plugin; style issue on Safari browser; conflict with internal featured images in some sites.
656
 
4
  Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, 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, sirv, 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, instagram, 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, 9gag, wcfm, add-on
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
+ Stable tag: 2.7.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
159
 
160
  == Changelog ==
161
 
162
+ = 2.7.5 =
163
+ * Improvement: menu settings is faster now; Bug fix: conflict with internal images in some sites.
164
+
165
  = 2.7.4 =
166
  * Bug fixes: conflict between Social Tags and Yoast plugin; conflict between Default External Featured Image and Classic Editor plugin; style issue on Safari browser; conflict with internal featured images in some sites.
167
 
654
 
655
  == Upgrade Notice ==
656
 
657
+ = 2.7.5 =
658
+ * Improvement: menu settings is faster now; Bug fix: conflict with internal images in some sites.
659
+
660
  = 2.7.4 =
661
  * Bug fixes: conflict between Social Tags and Yoast plugin; conflict between Default External Featured Image and Classic Editor plugin; style issue on Safari browser; conflict with internal featured images in some sites.
662