Version Description
- Support to Instagram images
=
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 1.6.7 |
Comparing to | |
See all releases |
Code changes from version 1.6.6 to 1.6.7
- admin/html/js/convert-url.js +19 -0
- admin/html/menu.html +7 -4
- admin/html/meta-box.html +6 -4
- featured-image-from-url.php +1 -1
- includes/convert-url.php +18 -0
- readme.txt +9 -3
admin/html/js/convert-url.js
CHANGED
@@ -2,9 +2,14 @@ function fifu_convert($url) {
|
|
2 |
if (fifu_from_google_drive($url))
|
3 |
return fifu_google_drive_url($url);
|
4 |
|
|
|
|
|
|
|
5 |
return $url;
|
6 |
}
|
7 |
|
|
|
|
|
8 |
function fifu_from_google_drive($url) {
|
9 |
return $url.includes('drive.google.com');
|
10 |
}
|
@@ -16,3 +21,17 @@ function fifu_google_drive_id($url) {
|
|
16 |
function fifu_google_drive_url($url) {
|
17 |
return 'https://drive.google.com/uc?id=' + fifu_google_drive_id($url);
|
18 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
if (fifu_from_google_drive($url))
|
3 |
return fifu_google_drive_url($url);
|
4 |
|
5 |
+
if (fifu_from_instagram($url))
|
6 |
+
return fifu_instagram_url($url);
|
7 |
+
|
8 |
return $url;
|
9 |
}
|
10 |
|
11 |
+
//Google Drive
|
12 |
+
|
13 |
function fifu_from_google_drive($url) {
|
14 |
return $url.includes('drive.google.com');
|
15 |
}
|
21 |
function fifu_google_drive_url($url) {
|
22 |
return 'https://drive.google.com/uc?id=' + fifu_google_drive_id($url);
|
23 |
}
|
24 |
+
|
25 |
+
//Instagram
|
26 |
+
|
27 |
+
function fifu_from_instagram($url) {
|
28 |
+
return $url.includes('instagram.com');
|
29 |
+
}
|
30 |
+
|
31 |
+
function fifu_instagram_id($url) {
|
32 |
+
return $url.match(/[-\w]{11,}/);
|
33 |
+
}
|
34 |
+
|
35 |
+
function fifu_instagram_url($url) {
|
36 |
+
return 'https://www.instagram.com/p/' + fifu_instagram_id($url) + '/media/?size=l';
|
37 |
+
}
|
admin/html/menu.html
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
</div>
|
10 |
|
11 |
<div class="box">
|
12 |
-
|
13 |
</div>
|
14 |
|
15 |
<div class="box">
|
@@ -1103,10 +1103,13 @@
|
|
1103 |
<h3>1) "How to get support?"</h3>
|
1104 |
You can inform any problem related to the Premium version in the email above. It will be solved as soon as possible and without any cost.<br><br>
|
1105 |
<h3>2) "Which plugins are compatible with Premium version?"</h3>
|
1106 |
-
WooCommerce, WP All Import, Monarch, Frontend Publishing and others. If you intend to use the Premium version with a specific plugin, you can ask me if they are compatible.<br><br>
|
1107 |
-
<h3>3) "
|
|
|
|
|
|
|
1108 |
With the exception of rare situations, no. But don't worry about that. You will still have the best support and if, after your complete cooperation, I'm not able to solve your issue, I may refund you.<br><br>
|
1109 |
-
<h3>
|
1110 |
<div style="display:inline-block;">
|
1111 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
1112 |
<input type="hidden" name="cmd" value="_s-xclick">
|
9 |
</div>
|
10 |
|
11 |
<div class="box">
|
12 |
+
<h2>Value my work: give this plugin a <a href="https://wordpress.org/support/view/plugin-reviews/featured-image-from-url?filter=5" target="_blank">5-star</a> rating =)</h2>
|
13 |
</div>
|
14 |
|
15 |
<div class="box">
|
1103 |
<h3>1) "How to get support?"</h3>
|
1104 |
You can inform any problem related to the Premium version in the email above. It will be solved as soon as possible and without any cost.<br><br>
|
1105 |
<h3>2) "Which plugins are compatible with Premium version?"</h3>
|
1106 |
+
WooCommerce, WP All Import, Monarch, Frontend Publishing and others. If you intend to use the Premium version with a specific plugin, try to test with the free version first. Or you can ask me if they are compatible.<br><br>
|
1107 |
+
<h3>3) "Are there the known incompatibility issues?"</h3>
|
1108 |
+
- Flatsome: this theme apply your own style on the product gallery, overwriting the WooCommerce code. Then it’s not able to handle external images there;<br>
|
1109 |
+
- Variable Product: this WooCommerce feature can be found at Product Data dropdown and allows to create variations of a same product, including images. FIFU doesn’t support that for now.<br><br>
|
1110 |
+
<h3>4) "Can I get my money back later?"</h3>
|
1111 |
With the exception of rare situations, no. But don't worry about that. You will still have the best support and if, after your complete cooperation, I'm not able to solve your issue, I may refund you.<br><br>
|
1112 |
+
<h3>5) "How to get the Premium version?"</h3>
|
1113 |
<div style="display:inline-block;">
|
1114 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
1115 |
<input type="hidden" name="cmd" value="_s-xclick">
|
admin/html/meta-box.html
CHANGED
@@ -50,12 +50,14 @@
|
|
50 |
<div style="<?php echo $show_news?>">
|
51 |
<br>
|
52 |
<hr>
|
53 |
-
<p style="font-size: 12px; padding: 5px; border-left: 6px solid
|
54 |
-
background-color: #eee; border-radius: 15px 50px;">New
|
|
|
|
|
55 |
<p style="font-size: 12px; padding: 5px; border-left: 6px solid green; color: black;
|
56 |
-
background-color: #eee; border-radius: 15px 50px;">New
|
57 |
<p style="font-size: 12px; padding: 5px; border-left: 6px solid #ff5400; color: black;
|
58 |
-
background-color: #eee; border-radius: 15px 50px;">New premium
|
59 |
<center>
|
60 |
<table>
|
61 |
<tbody>
|
50 |
<div style="<?php echo $show_news?>">
|
51 |
<br>
|
52 |
<hr>
|
53 |
+
<p style="font-size: 12px; padding: 5px; border-left: 6px solid #c61fa5; color: black;
|
54 |
+
background-color: #eee; border-radius: 15px 50px;">New: support to Instagram images (17% <a href="https://goo.gl/forms/TxLdhwXTqsuO5BHg2">votes</a>)</p>
|
55 |
+
<p style="font-size: 12px; padding: 5px; border-left: 6px solid #66a0fd; color: black;
|
56 |
+
background-color: #eee; border-radius: 15px 50px;">New: support to Google Drive images</p>
|
57 |
<p style="font-size: 12px; padding: 5px; border-left: 6px solid green; color: black;
|
58 |
+
background-color: #eee; border-radius: 15px 50px;">New: Lazy Load</p>
|
59 |
<p style="font-size: 12px; padding: 5px; border-left: 6px solid #ff5400; color: black;
|
60 |
+
background-color: #eee; border-radius: 15px 50px;">New (premium): WP REST API integration</p>
|
61 |
<center>
|
62 |
<table>
|
63 |
<tbody>
|
featured-image-from-url.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
* Plugin Name: Featured Image From URL
|
5 |
* 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.
|
6 |
-
* Version: 1.6.
|
7 |
* Author: Marcel Jacques Machado
|
8 |
* Author URI: http://featuredimagefromurl.com/
|
9 |
*/
|
3 |
/*
|
4 |
* Plugin Name: Featured Image From URL
|
5 |
* 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.
|
6 |
+
* Version: 1.6.7
|
7 |
* Author: Marcel Jacques Machado
|
8 |
* Author URI: http://featuredimagefromurl.com/
|
9 |
*/
|
includes/convert-url.php
CHANGED
@@ -4,6 +4,9 @@ function fifu_convert($url) {
|
|
4 |
if (fifu_from_google_drive($url))
|
5 |
return fifu_google_drive_url($url);
|
6 |
|
|
|
|
|
|
|
7 |
return $url;
|
8 |
}
|
9 |
|
@@ -21,3 +24,18 @@ function fifu_google_drive_id($url) {
|
|
21 |
function fifu_google_drive_url($url) {
|
22 |
return 'https://drive.google.com/uc?id=' . fifu_google_drive_id($url);
|
23 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
if (fifu_from_google_drive($url))
|
5 |
return fifu_google_drive_url($url);
|
6 |
|
7 |
+
if (fifu_from_instagram($url))
|
8 |
+
return fifu_instagram_url($url);
|
9 |
+
|
10 |
return $url;
|
11 |
}
|
12 |
|
24 |
function fifu_google_drive_url($url) {
|
25 |
return 'https://drive.google.com/uc?id=' . fifu_google_drive_id($url);
|
26 |
}
|
27 |
+
|
28 |
+
//Instagram
|
29 |
+
|
30 |
+
function fifu_from_instagram($url) {
|
31 |
+
return strpos($url, 'instagram.com') !== false;
|
32 |
+
}
|
33 |
+
|
34 |
+
function fifu_instagram_id($url) {
|
35 |
+
preg_match("/[-\w]{11,}/", $url, $matches);
|
36 |
+
return $matches[0];
|
37 |
+
}
|
38 |
+
|
39 |
+
function fifu_instagram_url($url) {
|
40 |
+
return 'https://www.instagram.com/p/' . fifu_instagram_id($url) . '/media/?size=l';
|
41 |
+
}
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== Plugin Name ===
|
2 |
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
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.8
|
7 |
Stable tag: 4.8
|
@@ -30,7 +30,7 @@ Features:
|
|
30 |
|
31 |
* compatible with WP All Import plugin;
|
32 |
|
33 |
-
* some nonstandard image URLs, such as Google Drive's, will work as well;
|
34 |
|
35 |
* supports WP REST API (**premium feature**);
|
36 |
|
@@ -301,6 +301,9 @@ was removed. To finish, a Premium version is now been presented.
|
|
301 |
= 1.6.6 =
|
302 |
* Support to Google Drive images.
|
303 |
|
|
|
|
|
|
|
304 |
== Upgrade Notice ==
|
305 |
|
306 |
= 1.0 =
|
@@ -455,4 +458,7 @@ was removed. To finish, a Premium version is now been presented.
|
|
455 |
* Bug fix.
|
456 |
|
457 |
= 1.6.6 =
|
458 |
-
* Support to Google Drive images.
|
|
|
|
|
|
1 |
=== Plugin Name ===
|
2 |
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
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.8
|
7 |
Stable tag: 4.8
|
30 |
|
31 |
* compatible with WP All Import plugin;
|
32 |
|
33 |
+
* some nonstandard image URLs, such as Instagram and Google Drive's, will work as well;
|
34 |
|
35 |
* supports WP REST API (**premium feature**);
|
36 |
|
301 |
= 1.6.6 =
|
302 |
* Support to Google Drive images.
|
303 |
|
304 |
+
= 1.6.7 =
|
305 |
+
* Support to Instagram images
|
306 |
+
|
307 |
== Upgrade Notice ==
|
308 |
|
309 |
= 1.0 =
|
458 |
* Bug fix.
|
459 |
|
460 |
= 1.6.6 =
|
461 |
+
* Support to Google Drive images.
|
462 |
+
|
463 |
+
= 1.6.7 =
|
464 |
+
* Support to Instagram images
|