Version Description
- Bug fix: use the first image as featured image.
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 1.8.2 |
Comparing to | |
See all releases |
Code changes from version 1.8.1 to 1.8.2
- admin/html/meta-box.html +0 -6
- featured-image-from-url.php +1 -1
- includes/external-post.php +13 -2
- readme.txt +9 -3
admin/html/meta-box.html
CHANGED
@@ -54,12 +54,6 @@
|
|
54 |
background-color: #eee; border-radius: 25px 5px;">New: the <i>alt</i> attribute above will also be used as the image <i>title</i>, normally shown on mouseover. (16% of <a href="https://goo.gl/forms/TxLdhwXTqsuO5BHg2">votes</a>)</p>
|
55 |
<p style="font-size: 12px; padding: 5px; border-left: 6px solid #7e7c82; color: black;
|
56 |
background-color: #eee; border-radius: 25px 5px;">New: <a href="admin.php?page=featured-image-from-url#all">schedule</a> an event to set all first images as featured images. So it can run hourly, daily etc.</p>
|
57 |
-
<p style="font-size: 12px; padding: 5px; border-left: 6px solid #c53c3c; color: black;
|
58 |
-
background-color: #eee; border-radius: 25px 5px;">New: supports Cloudinary videos now.</p>
|
59 |
-
<p style="font-size: 12px; padding: 5px; border-left: 6px solid #edb12e; color: black;
|
60 |
-
background-color: #eee; border-radius: 25px 5px;">New: <a href="admin.php?page=featured-image-from-url#category">auto set product category images</a>. Each image will be chosen among the external product images from that category.</p>
|
61 |
-
<p style="font-size: 12px; padding: 5px; border-left: 6px solid #248709; color: black;
|
62 |
-
background-color: #eee; border-radius: 25px 5px;">New: define a <a href="admin.php?page=featured-image-from-url#default">default external featured image</a> to be shown when there is no featured image. (15% of <a href="https://goo.gl/forms/TxLdhwXTqsuO5BHg2">votes</a>)</p>
|
63 |
<center>
|
64 |
<table>
|
65 |
<tbody>
|
54 |
background-color: #eee; border-radius: 25px 5px;">New: the <i>alt</i> attribute above will also be used as the image <i>title</i>, normally shown on mouseover. (16% of <a href="https://goo.gl/forms/TxLdhwXTqsuO5BHg2">votes</a>)</p>
|
55 |
<p style="font-size: 12px; padding: 5px; border-left: 6px solid #7e7c82; color: black;
|
56 |
background-color: #eee; border-radius: 25px 5px;">New: <a href="admin.php?page=featured-image-from-url#all">schedule</a> an event to set all first images as featured images. So it can run hourly, daily etc.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
<center>
|
58 |
<table>
|
59 |
<tbody>
|
featured-image-from-url.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Featured Image From URL
|
5 |
* Plugin URI: http://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: 1.8.
|
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: http://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: 1.8.2
|
8 |
* Author: Marcel Jacques Machado
|
9 |
* Author URI: https://www.linkedin.com/in/marceljm/
|
10 |
*/
|
includes/external-post.php
CHANGED
@@ -70,8 +70,19 @@ function fifu_first_url_in_content($post_id) {
|
|
70 |
preg_match_all('/<img[^>]*>/', $content, $matches);
|
71 |
if (!$matches[0])
|
72 |
return;
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
return $matches && $matches[0] ? $aux2[0] : null;
|
76 |
}
|
77 |
|
70 |
preg_match_all('/<img[^>]*>/', $content, $matches);
|
71 |
if (!$matches[0])
|
72 |
return;
|
73 |
+
|
74 |
+
if (strpos('src="', $matches[0][0]) !== false) {
|
75 |
+
//double quotes
|
76 |
+
$aux1 = explode('src="', $matches[0][0]);
|
77 |
+
if ($aux1)
|
78 |
+
$aux2 = explode('"', $aux1[1]);
|
79 |
+
}
|
80 |
+
else {
|
81 |
+
//single quotes
|
82 |
+
$aux1 = explode("src='", $matches[0][0]);
|
83 |
+
if ($aux1)
|
84 |
+
$aux2 = explode("'", $aux1[1]);
|
85 |
+
}
|
86 |
return $matches && $matches[0] ? $aux2[0] : null;
|
87 |
}
|
88 |
|
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
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 4.9.
|
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 |
= 1.8.1 =
|
163 |
* Alt attribute used as image title as well.
|
164 |
|
@@ -360,6 +363,9 @@ was removed. To finish, a Premium version is now been presented.
|
|
360 |
|
361 |
== Upgrade Notice ==
|
362 |
|
|
|
|
|
|
|
363 |
= 1.8.1 =
|
364 |
* Alt attribute used as image title as well.
|
365 |
|
@@ -557,4 +563,4 @@ was removed. To finish, a Premium version is now been presented.
|
|
557 |
* The help link in admin menu was wrong. It's fixed now.
|
558 |
|
559 |
= 1.0 =
|
560 |
-
* It's the first and only version so far.
|
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
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.9.5
|
7 |
+
Stable tag: 4.9.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
159 |
|
160 |
== Changelog ==
|
161 |
|
162 |
+
= 1.8.2 =
|
163 |
+
* Bug fix: use the first image as featured image.
|
164 |
+
|
165 |
= 1.8.1 =
|
166 |
* Alt attribute used as image title as well.
|
167 |
|
363 |
|
364 |
== Upgrade Notice ==
|
365 |
|
366 |
+
= 1.8.2 =
|
367 |
+
* Bug fix: use the first image as featured image.
|
368 |
+
|
369 |
= 1.8.1 =
|
370 |
* Alt attribute used as image title as well.
|
371 |
|
563 |
* The help link in admin menu was wrong. It's fixed now.
|
564 |
|
565 |
= 1.0 =
|
566 |
+
* It's the first and only version so far.
|