Version Description
- Improvement: ignore Auto Set First Image checkbox added to post editor.
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 2.5.2 |
Comparing to | |
See all releases |
Code changes from version 2.5.1 to 2.5.2
- admin/html/menu.html +1 -1
- admin/html/meta-box.html +11 -6
- admin/meta-box.php +41 -6
- featured-image-from-url.php +1 -1
- includes/external-post.php +2 -1
- readme.txt +8 -2
admin/html/menu.html
CHANGED
@@ -67,7 +67,7 @@
|
|
67 |
<h3>3) "Which plugins are compatible with Premium version?"</h3>
|
68 |
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 this free version first. Or you can ask me if they are compatible.<br><br>
|
69 |
<h3>4) "Are there known incompatibility issues?"</h3>
|
70 |
-
Some WooCommerce themes aren’t flexible enough to work with Videos, Sliders and Shortcodes. To know if your theme is compatible with those features, please take a look below.<br><br>
|
71 |
<h3>5) "Can I get my money back later?"</h3>
|
72 |
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 can refund you.<br><br>
|
73 |
</div>
|
67 |
<h3>3) "Which plugins are compatible with Premium version?"</h3>
|
68 |
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 this free version first. Or you can ask me if they are compatible.<br><br>
|
69 |
<h3>4) "Are there known incompatibility issues?"</h3>
|
70 |
+
Some WooCommerce themes aren’t flexible enough to work with Videos, Sliders and Shortcodes. To know if your theme is compatible with those features, please take a look below. Moreover, there is a conflict with Jetpack plugin.<br><br>
|
71 |
<h3>5) "Can I get my money back later?"</h3>
|
72 |
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 can refund you.<br><br>
|
73 |
</div>
|
admin/html/meta-box.html
CHANGED
@@ -3,6 +3,12 @@
|
|
3 |
|
4 |
<!-- show alt field, image and link if URL was already provided -->
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
<input id="fifu_input_alt"
|
7 |
type="text"
|
8 |
name="fifu_input_alt"
|
@@ -49,12 +55,11 @@
|
|
49 |
onClick="previewImage();"
|
50 |
style="<?php echo $align, $margin, $show_button ?>" >Preview</a>
|
51 |
|
52 |
-
<div id="fifu_news" style="top:10px; <?php echo $
|
53 |
-
<
|
54 |
-
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid red; border-top: 2px solid red; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
|
55 |
background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Please report any problem to <b>marcel@featuredimagefromurl.com</b></p>
|
56 |
-
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #00b0ff; border-top: 2px solid #00b0ff; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
|
57 |
-
background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Product Gallery, Video and Slider fields are only available in <a href="wp-admin/admin.php?page=featured-image-from-url#tabs-a"><b>premium</b></a> version.</p>
|
58 |
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid orange; border-top: 2px solid orange; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
|
59 |
-
background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">
|
|
|
|
|
60 |
</div>
|
3 |
|
4 |
<!-- show alt field, image and link if URL was already provided -->
|
5 |
|
6 |
+
<div style="<?php echo $show_ignore ?>">
|
7 |
+
<input type="checkbox" name="fifu_ignore_auto_set" id="fifu_ignore_auto_set">
|
8 |
+
<label for="fifu_ignore_auto_set">ignore Auto Set First Image</label>
|
9 |
+
<br>
|
10 |
+
</div>
|
11 |
+
|
12 |
<input id="fifu_input_alt"
|
13 |
type="text"
|
14 |
name="fifu_input_alt"
|
55 |
onClick="previewImage();"
|
56 |
style="<?php echo $align, $margin, $show_button ?>" >Preview</a>
|
57 |
|
58 |
+
<div id="fifu_news" style="position: relative; top:10px; <?php echo $show_button ?>">
|
59 |
+
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #ee4394; border-top: 2px solid #ee4394; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
|
|
|
60 |
background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Please report any problem to <b>marcel@featuredimagefromurl.com</b></p>
|
|
|
|
|
61 |
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid orange; border-top: 2px solid orange; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
|
62 |
+
background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Product Gallery, Video and Slider fields are only available in <a href="wp-admin/admin.php?page=featured-image-from-url#tabs-a"><b>premium</b></a> version.</p>
|
63 |
+
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #34ba1c; border-top: 2px solid #34ba1c; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
|
64 |
+
background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: "ignore Auto Set First Image" checkbox added to post editor</p>
|
65 |
</div>
|
admin/meta-box.php
CHANGED
@@ -38,12 +38,18 @@ function fifu_show_elements($post) {
|
|
38 |
$show_button = '';
|
39 |
}
|
40 |
|
|
|
|
|
41 |
include 'html/meta-box.html';
|
42 |
}
|
43 |
|
44 |
add_filter('wp_insert_post_data', 'fifu_remove_first_image', 10, 2);
|
45 |
|
46 |
function fifu_remove_first_image($data, $postarr) {
|
|
|
|
|
|
|
|
|
47 |
$content = $postarr['post_content'];
|
48 |
if (!$content)
|
49 |
return $data;
|
@@ -67,15 +73,27 @@ 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']);
|
73 |
-
|
74 |
-
|
75 |
-
$url
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
80 |
|
81 |
/* alt */
|
@@ -88,6 +106,12 @@ function fifu_save_properties($post_id) {
|
|
88 |
fifu_save($post_id);
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
function fifu_save($post_id) {
|
92 |
fifu_update_fake_attach_id($post_id);
|
93 |
}
|
@@ -136,3 +160,14 @@ function fifu_woocommerce_import($object) {
|
|
136 |
fifu_update_fake_attach_id($post_id);
|
137 |
}
|
138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
$show_button = '';
|
39 |
}
|
40 |
|
41 |
+
$show_ignore = fifu_is_on('fifu_get_first') || fifu_is_on('fifu_pop_first') || fifu_is_on('fifu_ovw_first') ? '' : 'display:none;';
|
42 |
+
|
43 |
include 'html/meta-box.html';
|
44 |
}
|
45 |
|
46 |
add_filter('wp_insert_post_data', 'fifu_remove_first_image', 10, 2);
|
47 |
|
48 |
function fifu_remove_first_image($data, $postarr) {
|
49 |
+
/* invalid or external or ignore */
|
50 |
+
if (!$_POST || !isset($_POST['fifu_input_url']) || isset($_POST['fifu_ignore_auto_set']))
|
51 |
+
return $data;
|
52 |
+
|
53 |
$content = $postarr['post_content'];
|
54 |
if (!$content)
|
55 |
return $data;
|
73 |
if (!$_POST || get_post_type($post_id) == 'nav_menu_item')
|
74 |
return;
|
75 |
|
76 |
+
$ignore = false;
|
77 |
+
if (isset($_POST['fifu_ignore_auto_set']))
|
78 |
+
$ignore = $_POST['fifu_ignore_auto_set'] == 'on';
|
79 |
+
|
80 |
/* image url */
|
81 |
+
$url = null;
|
82 |
if (isset($_POST['fifu_input_url'])) {
|
83 |
$url = esc_url_raw($_POST['fifu_input_url']);
|
84 |
+
if (!$ignore) {
|
85 |
+
$first = fifu_first_url_in_content($post_id);
|
86 |
+
if ($first && fifu_is_on('fifu_get_first') && (!$url || fifu_is_on('fifu_ovw_first')))
|
87 |
+
$url = $first;
|
88 |
+
}
|
89 |
+
fifu_save_url_and_dimensions($post_id, $url);
|
90 |
+
}
|
91 |
+
|
92 |
+
/* image url from wcfm */
|
93 |
+
if (!$url && fifu_is_wcfm_activate() && isset($_POST['wcfm_products_manage_form'])) {
|
94 |
+
$url = esc_url_raw(fifu_get_wcfm_url($_POST['wcfm_products_manage_form']));
|
95 |
+
if ($url)
|
96 |
+
fifu_save_url_and_dimensions($post_id, $url);
|
97 |
}
|
98 |
|
99 |
/* alt */
|
106 |
fifu_save($post_id);
|
107 |
}
|
108 |
|
109 |
+
function fifu_save_url_and_dimensions($post_id, $url) {
|
110 |
+
fifu_update_or_delete($post_id, 'fifu_image_url', $url);
|
111 |
+
if (fifu_is_on('fifu_save_dimensions'))
|
112 |
+
fifu_save_dimensions($post_id, $url);
|
113 |
+
}
|
114 |
+
|
115 |
function fifu_save($post_id) {
|
116 |
fifu_update_fake_attach_id($post_id);
|
117 |
}
|
160 |
fifu_update_fake_attach_id($post_id);
|
161 |
}
|
162 |
|
163 |
+
/* wcfm */
|
164 |
+
|
165 |
+
function fifu_is_wcfm_activate() {
|
166 |
+
return is_plugin_active('wc-frontend-manager/wc_frontend_manager.php');
|
167 |
+
}
|
168 |
+
|
169 |
+
function fifu_get_wcfm_url($content) {
|
170 |
+
$url = explode('fifu_image_url=', $content)[1];
|
171 |
+
return $url ? urldecode(explode('&', $url)[0]) : null;
|
172 |
+
}
|
173 |
+
|
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.5.
|
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.5.2
|
8 |
* Author: Marcel Jacques Machado
|
9 |
* Author URI: https://www.linkedin.com/in/marceljm/
|
10 |
*/
|
includes/external-post.php
CHANGED
@@ -3,7 +3,8 @@
|
|
3 |
add_filter('wp_insert_post_data', 'fifu_remove_first_image_ext', 10, 2);
|
4 |
|
5 |
function fifu_remove_first_image_ext($data, $postarr) {
|
6 |
-
|
|
|
7 |
return $data;
|
8 |
|
9 |
$content = $postarr['post_content'];
|
3 |
add_filter('wp_insert_post_data', 'fifu_remove_first_image_ext', 10, 2);
|
4 |
|
5 |
function fifu_remove_first_image_ext($data, $postarr) {
|
6 |
+
/* invalid or internal or ignore */
|
7 |
+
if (!$_POST || isset($_POST['fifu_input_url']) || isset($_POST['fifu_ignore_auto_set']))
|
8 |
return $data;
|
9 |
|
10 |
$content = $postarr['post_content'];
|
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 |
|
@@ -159,6 +159,9 @@ Features:
|
|
159 |
|
160 |
== Changelog ==
|
161 |
|
|
|
|
|
|
|
162 |
= 2.5.1 =
|
163 |
* New feature: save image dimensions.
|
164 |
|
@@ -582,6 +585,9 @@ was removed. To finish, a Premium version is now been presented.
|
|
582 |
|
583 |
== Upgrade Notice ==
|
584 |
|
|
|
|
|
|
|
585 |
= 2.5.1 =
|
586 |
* New feature: save image dimensions.
|
587 |
|
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.2
|
7 |
+
Stable tag: 5.2.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
159 |
|
160 |
== Changelog ==
|
161 |
|
162 |
+
= 2.5.2 =
|
163 |
+
* Improvement: ignore Auto Set First Image checkbox added to post editor.
|
164 |
+
|
165 |
= 2.5.1 =
|
166 |
* New feature: save image dimensions.
|
167 |
|
585 |
|
586 |
== Upgrade Notice ==
|
587 |
|
588 |
+
= 2.5.2 =
|
589 |
+
* Improvement: ignore Auto Set First Image checkbox added to post editor.
|
590 |
+
|
591 |
= 2.5.1 =
|
592 |
* New feature: save image dimensions.
|
593 |
|