Version Description
- Bug fix: Clean Metadata, Fake Internal Featured Image, Default External Featured Image and Save Image Dimensions were not being called from menu settings in some sites due wrong rest routes.
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 2.7.7 |
Comparing to | |
See all releases |
Code changes from version 2.7.6 to 2.7.7
- admin/api.php +8 -0
- admin/html/css/menu.css +3 -2
- admin/html/js/menu.js +34 -5
- admin/html/menu.html +33 -31
- featured-image-from-url.php +1 -1
- includes/attachment.php +0 -2
- readme.txt +7 -1
admin/api.php
CHANGED
@@ -44,6 +44,10 @@ function fifu_none_default_api(WP_REST_Request $request) {
|
|
44 |
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
47 |
function fifu_test_execution_time() {
|
48 |
for ($i = 0; $i <= 120; $i++) {
|
49 |
error_log($i);
|
@@ -84,5 +88,9 @@ add_action('rest_api_init', function () {
|
|
84 |
'methods' => 'POST',
|
85 |
'callback' => 'fifu_none_default_api'
|
86 |
));
|
|
|
|
|
|
|
|
|
87 |
});
|
88 |
|
44 |
|
45 |
}
|
46 |
|
47 |
+
function fifu_rest_url(WP_REST_Request $request) {
|
48 |
+
return get_rest_url();
|
49 |
+
}
|
50 |
+
|
51 |
function fifu_test_execution_time() {
|
52 |
for ($i = 0; $i <= 120; $i++) {
|
53 |
error_log($i);
|
88 |
'methods' => 'POST',
|
89 |
'callback' => 'fifu_none_default_api'
|
90 |
));
|
91 |
+
register_rest_route('featured-image-from-url/v2', '/rest_url_api/', array(
|
92 |
+
'methods' => 'POST',
|
93 |
+
'callback' => 'fifu_rest_url'
|
94 |
+
));
|
95 |
});
|
96 |
|
admin/html/css/menu.css
CHANGED
@@ -104,7 +104,7 @@ th {
|
|
104 |
position: relative;
|
105 |
background: #799d60;
|
106 |
border-radius: 1em;
|
107 |
-
width:
|
108 |
}
|
109 |
|
110 |
.speech-bubble:after {
|
@@ -126,6 +126,7 @@ th {
|
|
126 |
background: #4193aa;
|
127 |
border-radius: 1em;
|
128 |
width: 100%;
|
|
|
129 |
}
|
130 |
|
131 |
.speech-bubble2:after {
|
@@ -139,5 +140,5 @@ th {
|
|
139 |
border-bottom-color: #4193aa;
|
140 |
border-top: 0;
|
141 |
margin-left: -12px;
|
142 |
-
margin-top: -12px;
|
143 |
}
|
104 |
position: relative;
|
105 |
background: #799d60;
|
106 |
border-radius: 1em;
|
107 |
+
width: 74%;
|
108 |
}
|
109 |
|
110 |
.speech-bubble:after {
|
126 |
background: #4193aa;
|
127 |
border-radius: 1em;
|
128 |
width: 100%;
|
129 |
+
top:20px;
|
130 |
}
|
131 |
|
132 |
.speech-bubble2:after {
|
140 |
border-bottom-color: #4193aa;
|
141 |
border-top: 0;
|
142 |
margin-left: -12px;
|
143 |
+
margin-top: -12px;
|
144 |
}
|
admin/html/js/menu.js
CHANGED
@@ -74,7 +74,7 @@ function fifu_default_js() {
|
|
74 |
}
|
75 |
jQuery.ajax({
|
76 |
method: "POST",
|
77 |
-
url:
|
78 |
async: true,
|
79 |
success: function (data) {
|
80 |
},
|
@@ -108,7 +108,7 @@ function fifu_fake_js() {
|
|
108 |
}
|
109 |
jQuery.ajax({
|
110 |
method: "POST",
|
111 |
-
url:
|
112 |
async: true,
|
113 |
success: function (data) {
|
114 |
},
|
@@ -134,7 +134,7 @@ function fifu_clean_js() {
|
|
134 |
|
135 |
jQuery.ajax({
|
136 |
method: "POST",
|
137 |
-
url:
|
138 |
async: true,
|
139 |
success: function (data) {
|
140 |
},
|
@@ -165,7 +165,7 @@ function fifu_save_dimensions_all_js() {
|
|
165 |
|
166 |
jQuery.ajax({
|
167 |
method: "POST",
|
168 |
-
url:
|
169 |
async: true,
|
170 |
success: function (data) {
|
171 |
},
|
@@ -193,7 +193,7 @@ function fifu_clean_dimensions_all_js() {
|
|
193 |
|
194 |
jQuery.ajax({
|
195 |
method: "POST",
|
196 |
-
url:
|
197 |
async: true,
|
198 |
success: function (data) {
|
199 |
},
|
@@ -211,3 +211,32 @@ function fifu_clean_dimensions_all_js() {
|
|
211 |
}
|
212 |
});
|
213 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
jQuery.ajax({
|
76 |
method: "POST",
|
77 |
+
url: fifu_get_rest_url() + 'featured-image-from-url/v2/' + option + '/',
|
78 |
async: true,
|
79 |
success: function (data) {
|
80 |
},
|
108 |
}
|
109 |
jQuery.ajax({
|
110 |
method: "POST",
|
111 |
+
url: fifu_get_rest_url() + 'featured-image-from-url/v2/' + option + '/',
|
112 |
async: true,
|
113 |
success: function (data) {
|
114 |
},
|
134 |
|
135 |
jQuery.ajax({
|
136 |
method: "POST",
|
137 |
+
url: fifu_get_rest_url() + 'featured-image-from-url/v2/data_clean_api/',
|
138 |
async: true,
|
139 |
success: function (data) {
|
140 |
},
|
165 |
|
166 |
jQuery.ajax({
|
167 |
method: "POST",
|
168 |
+
url: fifu_get_rest_url() + 'featured-image-from-url/v2/save_dimensions_all_api/',
|
169 |
async: true,
|
170 |
success: function (data) {
|
171 |
},
|
193 |
|
194 |
jQuery.ajax({
|
195 |
method: "POST",
|
196 |
+
url: fifu_get_rest_url() + 'featured-image-from-url/v2/clean_dimensions_all_api/',
|
197 |
async: true,
|
198 |
success: function (data) {
|
199 |
},
|
211 |
}
|
212 |
});
|
213 |
}
|
214 |
+
|
215 |
+
function fifu_get_rest_url() {
|
216 |
+
var out = null;
|
217 |
+
error = false;
|
218 |
+
jQuery.ajax({
|
219 |
+
method: "POST",
|
220 |
+
url: homeUrl() + '?rest_route=/featured-image-from-url/v2/rest_url_api/',
|
221 |
+
async: false,
|
222 |
+
success: function (data) {
|
223 |
+
out = data;
|
224 |
+
},
|
225 |
+
error: function (jqXHR, textStatus, errorThrown) {
|
226 |
+
error = true;
|
227 |
+
}
|
228 |
+
});
|
229 |
+
if (error) {
|
230 |
+
jQuery.ajax({
|
231 |
+
method: "POST",
|
232 |
+
url: homeUrl() + '/wp-json/featured-image-from-url/v2/rest_url_api/',
|
233 |
+
async: false,
|
234 |
+
success: function (data) {
|
235 |
+
out = data;
|
236 |
+
},
|
237 |
+
error: function (jqXHR, textStatus, errorThrown) {
|
238 |
+
}
|
239 |
+
});
|
240 |
+
}
|
241 |
+
return out;
|
242 |
+
}
|
admin/html/menu.html
CHANGED
@@ -2615,23 +2615,25 @@
|
|
2615 |
</div>
|
2616 |
<div class="box">
|
2617 |
<h2>Getting Started (external Featured Images)</h2>
|
2618 |
-
<div class="greybox" style="height:480px">
|
2619 |
-
<
|
2620 |
-
<
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
|
|
|
|
2635 |
<div style="font-style:italic;font-size:14px;color:white;padding-left:25px;padding-top:10px;">Since now you have my address (also known as URL), how about making me famous?</div>
|
2636 |
<br>
|
2637 |
<div style="font-style:italic;font-size:14px;color:white;padding-left:25px">You just need to create a post and use me as the Featured Image:</div>
|
@@ -2655,6 +2657,20 @@
|
|
2655 |
From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
|
2656 |
</div>
|
2657 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2658 |
<div class="box">
|
2659 |
<table>
|
2660 |
<tr>
|
@@ -2674,20 +2690,6 @@
|
|
2674 |
2) add this code before "Happy publishing" line: set_time_limit(1800);<br>
|
2675 |
</div>
|
2676 |
</div>
|
2677 |
-
<div class="box">
|
2678 |
-
<table>
|
2679 |
-
<tr>
|
2680 |
-
<td style="border-bottom:none">2019-12-07</td>
|
2681 |
-
<td style="border-bottom:none"><h3>Bimber | Techwise</h3></td>
|
2682 |
-
<td style="border-bottom:none">themes</td>
|
2683 |
-
</tr>
|
2684 |
-
</table>
|
2685 |
-
<div class="greybox" style="position: relative; top: -10px">
|
2686 |
-
Avoiding external featured images overlay:<br>
|
2687 |
-
1) enable "FIFU settings > Featured Image > Save Image Dimensions > save and use image dimensions";<br>
|
2688 |
-
2) enable "save the image dimensions of all external featured images now" (it will be automatically disabled when finished).<br>
|
2689 |
-
</div>
|
2690 |
-
</div>
|
2691 |
<div class="box">
|
2692 |
<table>
|
2693 |
<tr>
|
2615 |
</div>
|
2616 |
<div class="box">
|
2617 |
<h2>Getting Started (external Featured Images)</h2>
|
2618 |
+
<div class="greybox" style="min-height:480px">
|
2619 |
+
<div style="width:100%">
|
2620 |
+
<hgroup style="float:left;opacity:0.75;" class="speech-bubble">
|
2621 |
+
<div style="font-style:italic;font-size:14px;color:white;padding-left:25px;padding-top:10px;">Hi, I'm an EXTERNAL image!</div>
|
2622 |
+
<br>
|
2623 |
+
<div style="font-style:italic;font-size:14px;color:white;padding-left:25px">It means I'm NOT in your media library and I'm NOT an attached plugin file too.</div>
|
2624 |
+
<br>
|
2625 |
+
<div style="font-style:italic;font-size:14px;color:white;padding-left:25px">Don't you believe me? So why don't you check my Internet address (also known as URL)?</div>
|
2626 |
+
<br>
|
2627 |
+
<div style="font-style:italic;font-size:14px;color:white;padding-left:40px">1) <b>right click</b> me now;</div>
|
2628 |
+
<br>
|
2629 |
+
<div style="font-style:italic;font-size:14px;color:white;padding-left:40px">2) select "<b>Copy image address</b>";</div>
|
2630 |
+
<br>
|
2631 |
+
<div style="font-style:italic;font-size:14px;color:white;padding-left:40px">3) <b>paste</b> it here: <input type="text" style="width:80%;background-color:#f3f3f3;font-style:italic;" placeholder="or just drag and drop me here"></div>
|
2632 |
+
<br>
|
2633 |
+
</hgroup>
|
2634 |
+
<img style="float:right;padding-left:1%;width:22%;position:relative;top:25px;filter:grayscale(25%);" src="https://ps.w.org/featured-image-from-url/assets/icon-256x256.png" title="Right click me!">
|
2635 |
+
</div>
|
2636 |
+
<hgroup style="float:right;opacity:0.75" class="speech-bubble2">
|
2637 |
<div style="font-style:italic;font-size:14px;color:white;padding-left:25px;padding-top:10px;">Since now you have my address (also known as URL), how about making me famous?</div>
|
2638 |
<br>
|
2639 |
<div style="font-style:italic;font-size:14px;color:white;padding-left:25px">You just need to create a post and use me as the Featured Image:</div>
|
2657 |
From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
|
2658 |
</div>
|
2659 |
</div>
|
2660 |
+
<div class="box">
|
2661 |
+
<table>
|
2662 |
+
<tr>
|
2663 |
+
<td style="border-bottom:none">2019-12-21</td>
|
2664 |
+
<td style="border-bottom:none"><h3> thePLRstore | Bimber | Techwise</h3></td>
|
2665 |
+
<td style="border-bottom:none">themes</td>
|
2666 |
+
</tr>
|
2667 |
+
</table>
|
2668 |
+
<div class="greybox" style="position: relative; top: -10px">
|
2669 |
+
Avoiding external featured images overlay:<br>
|
2670 |
+
1) enable "FIFU settings > Featured Image > Save Image Dimensions > save and use image dimensions";<br>
|
2671 |
+
2) enable "save the image dimensions of all external featured images now" (it will be automatically disabled when finished).<br>
|
2672 |
+
</div>
|
2673 |
+
</div>
|
2674 |
<div class="box">
|
2675 |
<table>
|
2676 |
<tr>
|
2690 |
2) add this code before "Happy publishing" line: set_time_limit(1800);<br>
|
2691 |
</div>
|
2692 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2693 |
<div class="box">
|
2694 |
<table>
|
2695 |
<tr>
|
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.
|
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.7
|
8 |
* Author: Marcel Jacques Machado
|
9 |
* Author URI: https://www.linkedin.com/in/marceljm/
|
10 |
*/
|
includes/attachment.php
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
define("FIFU_URL", "/localhost/fifu/");
|
4 |
-
|
5 |
add_filter('get_attached_file', 'fifu_replace_attached_file', 10, 2);
|
6 |
|
7 |
function fifu_replace_attached_file($att_url, $att_id) {
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
add_filter('get_attached_file', 'fifu_replace_attached_file', 10, 2);
|
4 |
|
5 |
function fifu_replace_attached_file($att_url, $att_id) {
|
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.
|
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.6 =
|
163 |
* New: Getting Started; New FREE Feature: Admin Area > Database; Bug Fix: WooCommerce zoom; Deprecated: Fake Internal Featured Image (1 attachment for all); Improvement: faster menu settings.
|
164 |
|
@@ -657,6 +660,9 @@ was removed. To finish, a Premium version is now been presented.
|
|
657 |
|
658 |
== Upgrade Notice ==
|
659 |
|
|
|
|
|
|
|
660 |
= 2.7.6 =
|
661 |
* New: Getting Started; New FREE Feature: Admin Area > Database; Bug Fix: WooCommerce zoom; Deprecated: Fake Internal Featured Image (1 attachment for all); Improvement: faster menu settings.
|
662 |
|
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.7
|
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.7 =
|
163 |
+
* Bug fix: Clean Metadata, Fake Internal Featured Image, Default External Featured Image and Save Image Dimensions were not being called from menu settings in some sites due wrong rest routes.
|
164 |
+
|
165 |
= 2.7.6 =
|
166 |
* New: Getting Started; New FREE Feature: Admin Area > Database; Bug Fix: WooCommerce zoom; Deprecated: Fake Internal Featured Image (1 attachment for all); Improvement: faster menu settings.
|
167 |
|
660 |
|
661 |
== Upgrade Notice ==
|
662 |
|
663 |
+
= 2.7.7 =
|
664 |
+
* Bug fix: Clean Metadata, Fake Internal Featured Image, Default External Featured Image and Save Image Dimensions were not being called from menu settings in some sites due wrong rest routes.
|
665 |
+
|
666 |
= 2.7.6 =
|
667 |
* New: Getting Started; New FREE Feature: Admin Area > Database; Bug Fix: WooCommerce zoom; Deprecated: Fake Internal Featured Image (1 attachment for all); Improvement: faster menu settings.
|
668 |
|