Version Description
- Fix: conflict with Yoast SEO plugin (FIFU will not add social tags when Yoast have a Facebook/Twitter image on post editor); fix: conflict with Jetpack plugin (FIFU was getting CDN images even when Jetpack performance settings were disabled).
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 3.4.2 |
Comparing to | |
See all releases |
Code changes from version 3.4.1 to 3.4.2
- admin/html/menu.html +26 -40
- admin/meta-box.php +3 -0
- admin/strings.php +15 -6
- featured-image-from-url.php +2 -2
- includes/attachment.php +17 -17
- includes/thumbnail.php +4 -0
- includes/util.php +1 -1
- readme.txt +6 -6
admin/html/menu.html
CHANGED
@@ -705,7 +705,8 @@
|
|
705 |
<li><a href="#tabsCrop-c"><?php $fifu['height']['tab']['ratio']() ?></a></li>
|
706 |
<li><a href="#tabsCrop-d"><?php $fifu['height']['tab']['fit']() ?></a></li>
|
707 |
<li><a href="#tabsCrop-e"><?php $fifu['height']['tab']['delay']() ?></a></li>
|
708 |
-
<li><a href="#tabsCrop-f"><?php $fifu['height']['tab']['
|
|
|
709 |
<br>
|
710 |
<br>
|
711 |
<div id="tabsCrop-a">
|
@@ -739,6 +740,10 @@
|
|
739 |
<th><b>#</b><i>products|4:3</i></th>
|
740 |
<th>(<?php $fifu['word']['attribute']() ?> <b>id</b>="<i>products</i>" <?php $fifu['height']['height']['ratio']() ?>)</th>
|
741 |
</tr>
|
|
|
|
|
|
|
|
|
742 |
</table>
|
743 |
<br>
|
744 |
|
@@ -774,12 +779,10 @@
|
|
774 |
|
775 |
<div id="tabsCrop-f">
|
776 |
<div>
|
777 |
-
<?php $fifu['height']['remove']['desc']() ?>
|
778 |
-
<br>
|
779 |
-
<br>
|
780 |
<table style="text-align:left">
|
781 |
<tr>
|
782 |
<th>
|
|
|
783 |
<input id="fifu_input_crop_default"
|
784 |
type="text"
|
785 |
name="fifu_input_crop_default"
|
@@ -793,6 +796,25 @@
|
|
793 |
</div>
|
794 |
</div>
|
795 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
796 |
<div id="tabsCrop-c">
|
797 |
<div>
|
798 |
<?php $fifu['height']['ratio']['desc']() ?>: 3:2, 16:9, 1:1...
|
@@ -1912,10 +1934,6 @@
|
|
1912 |
<div class="polaroid">
|
1913 |
<img src="https://storage.googleapis.com/featuredimagefromurl/jetpack-219.jpg">
|
1914 |
</div>
|
1915 |
-
|
1916 |
-
<br>
|
1917 |
-
|
1918 |
-
<b><?php $fifu['detail']['notice']() ?></b>: <?php $fifu['jetpack']['important']() ?>
|
1919 |
</div>
|
1920 |
</div>
|
1921 |
|
@@ -2745,40 +2763,8 @@
|
|
2745 |
</table>
|
2746 |
</div>
|
2747 |
</div>
|
2748 |
-
<div class="box">
|
2749 |
-
<h2>For Amazon associates</h2>
|
2750 |
-
<div class="greybox">
|
2751 |
-
<table style="width:100%">
|
2752 |
-
<tr>
|
2753 |
-
<td style="width:14%;vertical-align:unset;">
|
2754 |
-
<i class="fab fa-amazon" style="font-size:110px"></i>
|
2755 |
-
</td>
|
2756 |
-
<td style="width:85%">
|
2757 |
-
<div style="background-color:#e3b853;color:white;padding:15px;border-radius:5px;font-weight:bold;">
|
2758 |
-
FIFU is looking for 2 qualified¹ Amazon associates able to share their <a target="_blank" style="color:white" href="https://webservices.amazon.com/paapi5/documentation/register-for-pa-api.html">Product Advertising API</a> credentials with us.
|
2759 |
-
</div>
|
2760 |
-
<br>
|
2761 |
-
The API credentials will be used to develop new features for other qualified Amazon associates. If you are interested, please contact us at the email above. <b>You will receive FIFU Premium</b> for free and updates while you keep the credentials active. As you should know, <i>¹Product Advertising API sign up is available only to associates who have referred qualified sales and have been accepted into the program.</i> We're not qualified =/<br>
|
2762 |
-
</td>
|
2763 |
-
</tr>
|
2764 |
-
</table>
|
2765 |
-
</div>
|
2766 |
-
</div>
|
2767 |
</div>
|
2768 |
<div id="tabs-t">
|
2769 |
-
<div class="box">
|
2770 |
-
<table>
|
2771 |
-
<tr>
|
2772 |
-
<td style="border-bottom:none">2020-10-25</td>
|
2773 |
-
<td style="border-bottom:none"><h3> Instagram</h3></td>
|
2774 |
-
<td style="border-bottom:none">social networking</td>
|
2775 |
-
</tr>
|
2776 |
-
</table>
|
2777 |
-
<div class="greybox" style="position: relative; top: -10px">
|
2778 |
-
Instagram image URLs are not working anymore:<br>
|
2779 |
-
x) official Instagram note: "You may receive intermittent HTTP 400 errors from the legacy endpoints that will be deprecated on October 24, 2020" (https://developers.facebook.com/docs/instagram/oembed). It means your Instagram image URLs are not valid anymore, but it seems there is a way to solve that programmatically with an access token. We're going to check the documentation this week and provide the best possible solution.
|
2780 |
-
</div>
|
2781 |
-
</div>
|
2782 |
<div class="box">
|
2783 |
<table>
|
2784 |
<tr>
|
705 |
<li><a href="#tabsCrop-c"><?php $fifu['height']['tab']['ratio']() ?></a></li>
|
706 |
<li><a href="#tabsCrop-d"><?php $fifu['height']['tab']['fit']() ?></a></li>
|
707 |
<li><a href="#tabsCrop-e"><?php $fifu['height']['tab']['delay']() ?></a></li>
|
708 |
+
<li><a href="#tabsCrop-f"><?php $fifu['height']['tab']['default']() ?></a></li>
|
709 |
+
<li><a href="#tabsCrop-g"><?php $fifu['height']['tab']['ignore']() ?></a></li>
|
710 |
<br>
|
711 |
<br>
|
712 |
<div id="tabsCrop-a">
|
740 |
<th><b>#</b><i>products|4:3</i></th>
|
741 |
<th>(<?php $fifu['word']['attribute']() ?> <b>id</b>="<i>products</i>" <?php $fifu['height']['height']['ratio']() ?>)</th>
|
742 |
</tr>
|
743 |
+
<tr>
|
744 |
+
<th><b>#</b><i>products|4:3|cover</i></th>
|
745 |
+
<th>(<?php $fifu['word']['attribute']() ?> <b>id</b>="<i>products</i>" <?php $fifu['height']['height']['fit']() ?>)</th>
|
746 |
+
</tr>
|
747 |
</table>
|
748 |
<br>
|
749 |
|
779 |
|
780 |
<div id="tabsCrop-f">
|
781 |
<div>
|
|
|
|
|
|
|
782 |
<table style="text-align:left">
|
783 |
<tr>
|
784 |
<th>
|
785 |
+
<?php $fifu['height']['default']['desc']() ?>
|
786 |
<input id="fifu_input_crop_default"
|
787 |
type="text"
|
788 |
name="fifu_input_crop_default"
|
796 |
</div>
|
797 |
</div>
|
798 |
|
799 |
+
<div id="tabsCrop-g">
|
800 |
+
<div>
|
801 |
+
<table style="text-align:left">
|
802 |
+
<tr>
|
803 |
+
<th>
|
804 |
+
<?php $fifu['height']['ignore']['parent']() ?>
|
805 |
+
<input id="fifu_input_crop_ignore_parent"
|
806 |
+
type="text"
|
807 |
+
name="fifu_input_crop_ignore_parent"
|
808 |
+
style="width:675px"
|
809 |
+
value="">
|
810 |
+
<input type="submit"
|
811 |
+
value="<?php $fifu['button']['submit']() ?>" disabled>
|
812 |
+
</th>
|
813 |
+
</tr>
|
814 |
+
</table>
|
815 |
+
</div>
|
816 |
+
</div>
|
817 |
+
|
818 |
<div id="tabsCrop-c">
|
819 |
<div>
|
820 |
<?php $fifu['height']['ratio']['desc']() ?>: 3:2, 16:9, 1:1...
|
1934 |
<div class="polaroid">
|
1935 |
<img src="https://storage.googleapis.com/featuredimagefromurl/jetpack-219.jpg">
|
1936 |
</div>
|
|
|
|
|
|
|
|
|
1937 |
</div>
|
1938 |
</div>
|
1939 |
|
2763 |
</table>
|
2764 |
</div>
|
2765 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2766 |
</div>
|
2767 |
<div id="tabs-t">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2768 |
<div class="box">
|
2769 |
<table>
|
2770 |
<tr>
|
admin/meta-box.php
CHANGED
@@ -105,6 +105,9 @@ function fifu_save_properties($post_id) {
|
|
105 |
if (!$_POST || get_post_type($post_id) == 'nav_menu_item' || get_post_type($post_id) == 'revision')
|
106 |
return;
|
107 |
|
|
|
|
|
|
|
108 |
$ignore = false;
|
109 |
if (isset($_POST['fifu_ignore_auto_set']))
|
110 |
$ignore = $_POST['fifu_ignore_auto_set'] == 'on';
|
105 |
if (!$_POST || get_post_type($post_id) == 'nav_menu_item' || get_post_type($post_id) == 'revision')
|
106 |
return;
|
107 |
|
108 |
+
if (isset($_POST['action']) && $_POST['action'] == 'woocommerce_do_ajax_product_import')
|
109 |
+
return;
|
110 |
+
|
111 |
$ignore = false;
|
112 |
if (isset($_POST['fifu_ignore_auto_set']))
|
113 |
$ignore = $_POST['fifu_ignore_auto_set'] == 'on';
|
admin/strings.php
CHANGED
@@ -467,8 +467,11 @@ function fifu_get_strings_settings() {
|
|
467 |
$fifu['height']['tab']['selector'] = function() {
|
468 |
_e("Add selector", FIFU_SLUG);
|
469 |
};
|
470 |
-
$fifu['height']['tab']['
|
471 |
-
_e("
|
|
|
|
|
|
|
472 |
};
|
473 |
$fifu['height']['tab']['ratio'] = function() {
|
474 |
_e("Size ratio", FIFU_SLUG);
|
@@ -482,12 +485,21 @@ function fifu_get_strings_settings() {
|
|
482 |
$fifu['height']['selector']['desc'] = function() {
|
483 |
_e("Examples of selectors...", FIFU_SLUG);
|
484 |
};
|
485 |
-
$fifu['height']['
|
486 |
_e("Default selectors:", FIFU_SLUG);
|
487 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
$fifu['height']['height']['ratio'] = function() {
|
489 |
_e("and you want a 4:3 size ratio", FIFU_SLUG);
|
490 |
};
|
|
|
|
|
|
|
491 |
$fifu['height']['ratio']['desc'] = function() {
|
492 |
_e("Examples of valid size ratios", FIFU_SLUG);
|
493 |
};
|
@@ -751,9 +763,6 @@ function fifu_get_strings_settings() {
|
|
751 |
$fifu['jetpack']['desc'] = function() {
|
752 |
_e("Just install Jetpack plugin and configure its performance settings as shown below. All your external images will be automatically stored and optimized in a free CDN. And to make things even faster FIFU will load the thumbnails in the exact size your site needs.", FIFU_SLUG);
|
753 |
};
|
754 |
-
$fifu['jetpack']['important'] = function() {
|
755 |
-
_e("a few public data, such as post title, link and featured image URL may be saved in an external database by FIFU. The goal is to use that to build an image search engine that will bring more visitants to your site.", FIFU_SLUG);
|
756 |
-
};
|
757 |
|
758 |
// lazy
|
759 |
$fifu['lazy']['desc'] = function() {
|
467 |
$fifu['height']['tab']['selector'] = function() {
|
468 |
_e("Add selector", FIFU_SLUG);
|
469 |
};
|
470 |
+
$fifu['height']['tab']['default'] = function() {
|
471 |
+
_e("Default selectors", FIFU_SLUG);
|
472 |
+
};
|
473 |
+
$fifu['height']['tab']['ignore'] = function() {
|
474 |
+
_e("Ignore images", FIFU_SLUG);
|
475 |
};
|
476 |
$fifu['height']['tab']['ratio'] = function() {
|
477 |
_e("Size ratio", FIFU_SLUG);
|
485 |
$fifu['height']['selector']['desc'] = function() {
|
486 |
_e("Examples of selectors...", FIFU_SLUG);
|
487 |
};
|
488 |
+
$fifu['height']['default']['desc'] = function() {
|
489 |
_e("Default selectors:", FIFU_SLUG);
|
490 |
};
|
491 |
+
$fifu['height']['ignore']['desc'] = function() {
|
492 |
+
_e("Ignore images...", FIFU_SLUG);
|
493 |
+
};
|
494 |
+
$fifu['height']['ignore']['parent'] = function() {
|
495 |
+
_e("Parent selectors:", FIFU_SLUG);
|
496 |
+
};
|
497 |
$fifu['height']['height']['ratio'] = function() {
|
498 |
_e("and you want a 4:3 size ratio", FIFU_SLUG);
|
499 |
};
|
500 |
+
$fifu['height']['height']['fit'] = function() {
|
501 |
+
_e("and you want a 4:3 size ratio and cover as object fit", FIFU_SLUG);
|
502 |
+
};
|
503 |
$fifu['height']['ratio']['desc'] = function() {
|
504 |
_e("Examples of valid size ratios", FIFU_SLUG);
|
505 |
};
|
763 |
$fifu['jetpack']['desc'] = function() {
|
764 |
_e("Just install Jetpack plugin and configure its performance settings as shown below. All your external images will be automatically stored and optimized in a free CDN. And to make things even faster FIFU will load the thumbnails in the exact size your site needs.", FIFU_SLUG);
|
765 |
};
|
|
|
|
|
|
|
766 |
|
767 |
// lazy
|
768 |
$fifu['lazy']['desc'] = function() {
|
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.4.
|
8 |
* Author: fifu.app
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 4.0
|
11 |
-
* WC tested up to: 4.
|
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.4.2
|
8 |
* Author: fifu.app
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 4.0
|
11 |
+
* WC tested up to: 4.7
|
12 |
* Text Domain: featured-image-from-url
|
13 |
* License: GPLv3
|
14 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
includes/attachment.php
CHANGED
@@ -96,22 +96,22 @@ function fifu_replace_attachment_image_src($image, $att_id, $size) {
|
|
96 |
$old_url = $image[0];
|
97 |
$image = fifu_get_photon_url($image, $size, $att_id);
|
98 |
// ws
|
99 |
-
if ($att_post->post_parent) {
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
}
|
115 |
}
|
116 |
|
117 |
// use saved dimensions
|
@@ -194,7 +194,7 @@ function fifu_callback($buffer) {
|
|
194 |
if (empty($buffer))
|
195 |
return;
|
196 |
|
197 |
-
fifu_save_query();
|
198 |
|
199 |
/* img */
|
200 |
|
96 |
$old_url = $image[0];
|
97 |
$image = fifu_get_photon_url($image, $size, $att_id);
|
98 |
// ws
|
99 |
+
// if ($att_post->post_parent) {
|
100 |
+
// $post = get_post($att_post->post_parent);
|
101 |
+
// if ($post && $post->post_status == 'publish' && $post->post_type == 'post' && !empty($post->post_title)) {
|
102 |
+
// $new_url = $image[0];
|
103 |
+
// $date = new DateTime();
|
104 |
+
// if ($old_url != $new_url && strpos($new_url, '.wp.com') !== false) {
|
105 |
+
// if ($date->getTimestamp() - strtotime($post->post_date) > 86400) {
|
106 |
+
// if (get_post_meta($post->ID, 'fifu_dataset', true) != 2) {
|
107 |
+
// $title = $post->post_title;
|
108 |
+
// $permalink = get_permalink($post->ID);
|
109 |
+
// $_POST['fifu-dataset'][$post->ID] = array($post->ID, $old_url, $new_url, $title, $permalink);
|
110 |
+
// }
|
111 |
+
// }
|
112 |
+
// }
|
113 |
+
// }
|
114 |
+
// }
|
115 |
}
|
116 |
|
117 |
// use saved dimensions
|
194 |
if (empty($buffer))
|
195 |
return;
|
196 |
|
197 |
+
/* fifu_save_query(); */
|
198 |
|
199 |
/* img */
|
200 |
|
includes/thumbnail.php
CHANGED
@@ -50,10 +50,14 @@ function fifu_add_js() {
|
|
50 |
}
|
51 |
|
52 |
function fifu_add_social_tag_yoast() {
|
|
|
|
|
53 |
return fifu_main_image_url(get_the_ID());
|
54 |
}
|
55 |
|
56 |
function fifu_add_social_tag_yoast_list($object) {
|
|
|
|
|
57 |
$object->add_image(fifu_main_image_url(get_the_ID()));
|
58 |
}
|
59 |
|
50 |
}
|
51 |
|
52 |
function fifu_add_social_tag_yoast() {
|
53 |
+
if (get_post_meta(get_the_ID(), '_yoast_wpseo_opengraph-image', true) || get_post_meta(get_the_ID(), '_yoast_wpseo_twitter-image', true))
|
54 |
+
return;
|
55 |
return fifu_main_image_url(get_the_ID());
|
56 |
}
|
57 |
|
58 |
function fifu_add_social_tag_yoast_list($object) {
|
59 |
+
if (get_post_meta(get_the_ID(), '_yoast_wpseo_opengraph-image', true) || get_post_meta(get_the_ID(), '_yoast_wpseo_twitter-image', true))
|
60 |
+
return;
|
61 |
$object->add_image(fifu_main_image_url(get_the_ID()));
|
62 |
}
|
63 |
|
includes/util.php
CHANGED
@@ -130,7 +130,7 @@ function fifu_is_jetpack_active() {
|
|
130 |
if (!is_plugin_active('jetpack/jetpack.php'))
|
131 |
return false;
|
132 |
|
133 |
-
if (defined('FIFU_DEV_DEBUG'))
|
134 |
return true;
|
135 |
|
136 |
return function_exists('jetpack_photon_url') && class_exists('Jetpack') && method_exists('Jetpack', 'get_active_modules') && in_array('photon', Jetpack::get_active_modules());
|
130 |
if (!is_plugin_active('jetpack/jetpack.php'))
|
131 |
return false;
|
132 |
|
133 |
+
if (defined('FIFU_DEV_DEBUG') && FIFU_DEV_DEBUG)
|
134 |
return true;
|
135 |
|
136 |
return function_exists('jetpack_photon_url') && class_exists('Jetpack') && method_exists('Jetpack', 'get_active_modules') && in_array('photon', Jetpack::get_active_modules());
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
|
|
4 |
Tags: featured, image, url, woocommerce, thumbnail
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 5.5
|
7 |
-
Stable tag: 3.4.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -195,20 +195,20 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr and Publiti
|
|
195 |
|
196 |
== Changelog ==
|
197 |
|
|
|
|
|
|
|
198 |
= 3.4.1 =
|
199 |
* Fix: Instagram URLs.
|
200 |
|
201 |
= 3.4.0 =
|
202 |
* Notice: for users with image URLs from Instagram (FIFU Settings > Troubleshooting).
|
203 |
|
204 |
-
= 3.3.9 =
|
205 |
-
* Notice: for Jetpack CDN users.
|
206 |
-
|
207 |
= others =
|
208 |
* [more](https://fifu.app/changelog/)
|
209 |
|
210 |
|
211 |
== Upgrade Notice ==
|
212 |
|
213 |
-
= 3.4.
|
214 |
-
* Fix:
|
4 |
Tags: featured, image, url, woocommerce, thumbnail
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 5.5
|
7 |
+
Stable tag: 3.4.2
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
195 |
|
196 |
== Changelog ==
|
197 |
|
198 |
+
= 3.4.2 =
|
199 |
+
* Fix: conflict with Yoast SEO plugin (FIFU will not add social tags when Yoast have a Facebook/Twitter image on post editor); fix: conflict with Jetpack plugin (FIFU was getting CDN images even when Jetpack performance settings were disabled).
|
200 |
+
|
201 |
= 3.4.1 =
|
202 |
* Fix: Instagram URLs.
|
203 |
|
204 |
= 3.4.0 =
|
205 |
* Notice: for users with image URLs from Instagram (FIFU Settings > Troubleshooting).
|
206 |
|
|
|
|
|
|
|
207 |
= others =
|
208 |
* [more](https://fifu.app/changelog/)
|
209 |
|
210 |
|
211 |
== Upgrade Notice ==
|
212 |
|
213 |
+
= 3.4.2 =
|
214 |
+
* Fix: conflict with Yoast SEO plugin (FIFU will not add social tags when Yoast have a Facebook/Twitter image on post editor); fix: conflict with Jetpack plugin (FIFU was getting CDN images even when Jetpack performance settings were disabled).
|