Version Description
- Bug fix: metadata generation (route not found).
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 2.4.9 |
Comparing to | |
See all releases |
Code changes from version 2.4.8 to 2.4.9
- admin/api.php +3 -0
- admin/html/js/menu.js +12 -10
- admin/html/js/meta-box.js +12 -0
- admin/html/meta-box.html +12 -0
- admin/meta-box.php +5 -0
- featured-image-from-url.php +1 -1
- readme.txt +8 -2
admin/api.php
CHANGED
@@ -16,6 +16,9 @@ function fifu_none_fake_api(WP_REST_Request $request) {
|
|
16 |
function fifu_data_clean_api(WP_REST_Request $request) {
|
17 |
fifu_db_enable_clean();
|
18 |
update_option('fifu_data_clean', 'toggleoff', 'no');
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
function fifu_test_execution_time() {
|
16 |
function fifu_data_clean_api(WP_REST_Request $request) {
|
17 |
fifu_db_enable_clean();
|
18 |
update_option('fifu_data_clean', 'toggleoff', 'no');
|
19 |
+
|
20 |
+
fifu_disable_fake(); // fake1
|
21 |
+
update_option('fifu_data_generation', 'toggleoff', 'no');
|
22 |
}
|
23 |
|
24 |
function fifu_test_execution_time() {
|
admin/html/js/menu.js
CHANGED
@@ -88,17 +88,18 @@ function fifu_fake_js() {
|
|
88 |
}
|
89 |
jQuery.ajax({
|
90 |
method: "POST",
|
91 |
-
url: homeUrl() + '
|
92 |
async: true,
|
93 |
success: function (data) {
|
94 |
-
jQuery('.wrap').unblock();
|
95 |
},
|
96 |
error: function (jqXHR, textStatus, errorThrown) {
|
97 |
-
jQuery('.wrap').unblock();
|
98 |
console.log(jqXHR);
|
99 |
console.log(textStatus);
|
100 |
console.log(errorThrown);
|
101 |
},
|
|
|
|
|
|
|
102 |
timeout: 0
|
103 |
});
|
104 |
}
|
@@ -111,20 +112,21 @@ function fifu_clean_js() {
|
|
111 |
|
112 |
jQuery.ajax({
|
113 |
method: "POST",
|
114 |
-
url: homeUrl() + '
|
115 |
async: true,
|
116 |
success: function (data) {
|
117 |
-
window.location.href = '#tabs-j';
|
118 |
-
jQuery("#fifu_toggle_data_clean").attr('toggleoff');
|
119 |
-
location.reload();
|
120 |
},
|
121 |
error: function (jqXHR, textStatus, errorThrown) {
|
122 |
-
window.location.href = '#tabs-j';
|
123 |
-
jQuery("#fifu_toggle_data_clean").attr('toggleoff');
|
124 |
-
location.reload();
|
125 |
console.log(jqXHR);
|
126 |
console.log(textStatus);
|
127 |
console.log(errorThrown);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
});
|
130 |
}
|
88 |
}
|
89 |
jQuery.ajax({
|
90 |
method: "POST",
|
91 |
+
url: homeUrl() + '?rest_route=/featured-image-from-url/v2/' + option + '/',
|
92 |
async: true,
|
93 |
success: function (data) {
|
|
|
94 |
},
|
95 |
error: function (jqXHR, textStatus, errorThrown) {
|
|
|
96 |
console.log(jqXHR);
|
97 |
console.log(textStatus);
|
98 |
console.log(errorThrown);
|
99 |
},
|
100 |
+
complete: function () {
|
101 |
+
jQuery('.wrap').unblock();
|
102 |
+
},
|
103 |
timeout: 0
|
104 |
});
|
105 |
}
|
112 |
|
113 |
jQuery.ajax({
|
114 |
method: "POST",
|
115 |
+
url: homeUrl() + '?rest_route=/featured-image-from-url/v2/data_clean_api/',
|
116 |
async: true,
|
117 |
success: function (data) {
|
|
|
|
|
|
|
118 |
},
|
119 |
error: function (jqXHR, textStatus, errorThrown) {
|
|
|
|
|
|
|
120 |
console.log(jqXHR);
|
121 |
console.log(textStatus);
|
122 |
console.log(errorThrown);
|
123 |
+
},
|
124 |
+
complete: function () {
|
125 |
+
jQuery("#fifu_toggle_data_clean").attr('class', 'toggleoff');
|
126 |
+
jQuery("#fifu_toggle_fake").attr('class', 'toggleoff');
|
127 |
+
jQuery("#fifu_toggle_fake2").attr('class', 'toggleoff');
|
128 |
+
jQuery("#fifu_toggle_data_generation").attr('class', 'toggleoff');
|
129 |
+
jQuery('.wrap').unblock();
|
130 |
}
|
131 |
});
|
132 |
}
|
admin/html/js/meta-box.js
CHANGED
@@ -22,5 +22,17 @@ function previewImage() {
|
|
22 |
jQuery("#fifu_input_alt").show();
|
23 |
jQuery("#fifu_image").show();
|
24 |
jQuery("#fifu_link").show();
|
|
|
|
|
25 |
}
|
26 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
jQuery("#fifu_input_alt").show();
|
23 |
jQuery("#fifu_image").show();
|
24 |
jQuery("#fifu_link").show();
|
25 |
+
|
26 |
+
//getMeta($url);
|
27 |
}
|
28 |
}
|
29 |
+
|
30 |
+
function getMeta(url) {
|
31 |
+
jQuery("<img/>", {
|
32 |
+
load: function () {
|
33 |
+
jQuery("#fifu_input_image_width").val(this.width);
|
34 |
+
jQuery("#fifu_input_image_height").val(this.height);
|
35 |
+
},
|
36 |
+
src: url
|
37 |
+
});
|
38 |
+
}
|
admin/html/meta-box.html
CHANGED
@@ -30,6 +30,18 @@
|
|
30 |
style="<?php echo $show_link ?>" >remove external featured image</a>
|
31 |
</center>
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
<!-- show preview button if URL was not provided yet -->
|
34 |
|
35 |
<a id="fifu_button"
|
30 |
style="<?php echo $show_link ?>" >remove external featured image</a>
|
31 |
</center>
|
32 |
|
33 |
+
<input
|
34 |
+
type="hidden"
|
35 |
+
id="fifu_input_image_width"
|
36 |
+
name="fifu_input_image_width"
|
37 |
+
value="" >
|
38 |
+
|
39 |
+
<input
|
40 |
+
type="hidden"
|
41 |
+
id="fifu_input_image_height"
|
42 |
+
name="fifu_input_image_height"
|
43 |
+
value="" >
|
44 |
+
|
45 |
<!-- show preview button if URL was not provided yet -->
|
46 |
|
47 |
<a id="fifu_button"
|
admin/meta-box.php
CHANGED
@@ -67,6 +67,11 @@ function fifu_save_properties($post_id) {
|
|
67 |
if (!$_POST || get_post_type($post_id) == 'nav_menu_item')
|
68 |
return;
|
69 |
|
|
|
|
|
|
|
|
|
|
|
70 |
/* image url */
|
71 |
if (isset($_POST['fifu_input_url'])) {
|
72 |
$url = esc_url_raw($_POST['fifu_input_url']);
|
67 |
if (!$_POST || get_post_type($post_id) == 'nav_menu_item')
|
68 |
return;
|
69 |
|
70 |
+
//if (isset($_POST['fifu_input_image_width']))
|
71 |
+
//$width = $_POST['fifu_input_image_width'];
|
72 |
+
//if (isset($_POST['fifu_input_image_height']))
|
73 |
+
//$height = $_POST['fifu_input_image_height'];
|
74 |
+
|
75 |
/* image url */
|
76 |
if (isset($_POST['fifu_input_url'])) {
|
77 |
$url = esc_url_raw($_POST['fifu_input_url']);
|
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.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.4.9
|
8 |
* Author: Marcel Jacques Machado
|
9 |
* Author URI: https://www.linkedin.com/in/marceljm/
|
10 |
*/
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: marceljm
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8BLDLZ3HDBGQG
|
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, priority, seo, variable, tumblr, variation, product variation, shortcode
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.2
|
7 |
-
Stable tag: 5.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -157,6 +157,9 @@ Features:
|
|
157 |
|
158 |
== Changelog ==
|
159 |
|
|
|
|
|
|
|
160 |
= 2.4.8 =
|
161 |
* New premium feature: replace broken image.
|
162 |
|
@@ -571,6 +574,9 @@ was removed. To finish, a Premium version is now been presented.
|
|
571 |
|
572 |
== Upgrade Notice ==
|
573 |
|
|
|
|
|
|
|
574 |
= 2.4.8 =
|
575 |
* New premium feature: replace broken image.
|
576 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8BLDLZ3HDBGQG
|
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, priority, seo, variable, tumblr, variation, product variation, shortcode
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.2.1
|
7 |
+
Stable tag: 5.2.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
157 |
|
158 |
== Changelog ==
|
159 |
|
160 |
+
= 2.4.9 =
|
161 |
+
* Bug fix: metadata generation (route not found).
|
162 |
+
|
163 |
= 2.4.8 =
|
164 |
* New premium feature: replace broken image.
|
165 |
|
574 |
|
575 |
== Upgrade Notice ==
|
576 |
|
577 |
+
= 2.4.9 =
|
578 |
+
* Bug fix: metadata generation (route not found).
|
579 |
+
|
580 |
= 2.4.8 =
|
581 |
* New premium feature: replace broken image.
|
582 |
|