Version Description
- Compatibility with Sirv CDN & Image Manager plugin.
=
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.9 to 1.4.0
- admin/html/js/meta-box.js +22 -18
- admin/html/menu.html +7 -5
- admin/html/meta-box.html +8 -0
- admin/meta-box.php +22 -20
- featured-image-from-url.php +11 -10
- readme.txt +12 -2
admin/html/js/meta-box.js
CHANGED
@@ -1,28 +1,32 @@
|
|
1 |
function removeImage() {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
|
9 |
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
12 |
}
|
13 |
|
14 |
function previewImage() {
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
}
|
1 |
function removeImage() {
|
2 |
+
jQuery("#fifu_input_alt").hide();
|
3 |
+
jQuery("#fifu_image").hide();
|
4 |
+
jQuery("#fifu_link").hide();
|
5 |
+
jQuery("#fifu_hover").hide();
|
6 |
|
7 |
+
jQuery("#fifu_input_alt").val("");
|
8 |
+
jQuery("#fifu_input_url").val("");
|
9 |
|
10 |
+
jQuery("#fifu_input_url").show();
|
11 |
+
jQuery("#fifu_button").show();
|
12 |
+
|
13 |
+
if (jQuery("#sirv-add-featured-image").attr("active"))
|
14 |
+
jQuery("#sirv-add-featured-image").show();
|
15 |
}
|
16 |
|
17 |
function previewImage() {
|
18 |
+
var $url = jQuery("#fifu_input_url").val();
|
19 |
|
20 |
+
if ($url) {
|
21 |
+
jQuery("#fifu_input_url").hide();
|
22 |
+
jQuery("#fifu_button").hide();
|
23 |
+
jQuery("#sirv-add-featured-image").hide();
|
24 |
|
25 |
+
jQuery("#fifu_image").css('background-image', "url('" + $url + "')");
|
26 |
|
27 |
+
jQuery("#fifu_input_alt").show();
|
28 |
+
jQuery("#fifu_image").show();
|
29 |
+
jQuery("#fifu_link").show();
|
30 |
+
jQuery("#fifu_hover").show();
|
31 |
+
}
|
32 |
}
|
admin/html/menu.html
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
|
11 |
<div class="greybox">
|
12 |
|
13 |
-
<p>Featured Image From URL plugin allows you to use an external image (from anywhere) as Featured Image of your Post, Page or Custom Post Type, such as WooCommerce Product. For WooCommerce users, it's also possible to use external images in the Product Category and Product Gallery
|
14 |
|
15 |
</div>
|
16 |
|
@@ -45,7 +45,7 @@
|
|
45 |
</div>
|
46 |
|
47 |
<div style="display:inline-block;top:-20px;position:relative">
|
48 |
-
<p>(US$
|
49 |
</div>
|
50 |
</div>
|
51 |
|
@@ -57,14 +57,16 @@
|
|
57 |
|
58 |
<div class="greybox">
|
59 |
|
60 |
-
<p>This free version supports WooCommerce 2.4.X and 2.5.X. If you use 2.6.X and later, you will need <b>Premium version</b>.</p>
|
61 |
-
|
62 |
<p>Would you like to integrate WooCommerce to Featured Image From URL? For that, a script will be executed to overwrite some lines of code from WooCommerce plugin. It's safe and reversible but it will only work if your site is hosted on a Linux server. So let me check...</p>
|
63 |
|
64 |
<p/>
|
65 |
|
66 |
<?php echo $compatible; ?>
|
67 |
|
|
|
|
|
|
|
|
|
68 |
</div>
|
69 |
|
70 |
<p/>
|
@@ -223,7 +225,7 @@
|
|
223 |
|
224 |
<div class="greybox">
|
225 |
|
226 |
-
<p>Bug reports and
|
227 |
|
228 |
</div>
|
229 |
|
10 |
|
11 |
<div class="greybox">
|
12 |
|
13 |
+
<p>Featured Image From URL plugin allows you to use an external image (from anywhere) as Featured Image of your Post, Page or Custom Post Type, such as WooCommerce Product. For WooCommerce users, it's also possible to use external images in the Product Category and Product Gallery. All included content still has social tags to facilitate sharing on social networks. And it's compatible with WP All Import and Sirv plugins. For more information, refer to <a href="https://wordpress.org/plugins/featured-image-from-url/faq/" target="_blank">FAQ</a> and <a href="https://wordpress.org/plugins/featured-image-from-url/screenshots/" target="_blank">screenshots</a>. </p>
|
14 |
|
15 |
</div>
|
16 |
|
45 |
</div>
|
46 |
|
47 |
<div style="display:inline-block;top:-20px;position:relative">
|
48 |
+
<p>(US$ 15 or more, please) and receive the Premium Version by email within 12 hours.<p/>
|
49 |
</div>
|
50 |
</div>
|
51 |
|
57 |
|
58 |
<div class="greybox">
|
59 |
|
|
|
|
|
60 |
<p>Would you like to integrate WooCommerce to Featured Image From URL? For that, a script will be executed to overwrite some lines of code from WooCommerce plugin. It's safe and reversible but it will only work if your site is hosted on a Linux server. So let me check...</p>
|
61 |
|
62 |
<p/>
|
63 |
|
64 |
<?php echo $compatible; ?>
|
65 |
|
66 |
+
<p/>
|
67 |
+
|
68 |
+
<p>This free version supports WooCommerce 2.4.X and 2.5.X. If you use 2.6.X and later, you will need <b>Premium version</b>.</p>
|
69 |
+
|
70 |
</div>
|
71 |
|
72 |
<p/>
|
225 |
|
226 |
<div class="greybox">
|
227 |
|
228 |
+
<p>Bug reports and suggestions for improvement are always welcome. Just send an email to <a href="mailto:marceljmachado@gmail.com">marceljmachado@gmail.com</a> and your request can be available in the next release.</p>
|
229 |
|
230 |
</div>
|
231 |
|
admin/html/meta-box.html
CHANGED
@@ -35,3 +35,11 @@
|
|
35 |
class="button"
|
36 |
onClick="previewImage();"
|
37 |
style="<?php echo $align, $margin, $show_button ?>" >Preview</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
class="button"
|
36 |
onClick="previewImage();"
|
37 |
style="<?php echo $align, $margin, $show_button ?>" >Preview</a>
|
38 |
+
|
39 |
+
<a id="sirv-add-featured-image"
|
40 |
+
active="<?php echo $is_sirv_active; ?>"
|
41 |
+
data-input-anchor="#fifu_input_url"
|
42 |
+
href="#"
|
43 |
+
class="button sirv-add-image-modal-click"
|
44 |
+
title="Add image from Sirv"
|
45 |
+
style="<?php echo $show_sirv?>">Choose Sirv image</a>
|
admin/meta-box.php
CHANGED
@@ -51,26 +51,28 @@ function fifu_insert_meta_box() {
|
|
51 |
}
|
52 |
|
53 |
function fifu_show_elements($post) {
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
|
|
74 |
}
|
75 |
|
76 |
function fifu_show_advertisement($post) {
|
51 |
}
|
52 |
|
53 |
function fifu_show_elements($post) {
|
54 |
+
$margin = 'margin-top:10px;';
|
55 |
+
$width = 'width:100%;';
|
56 |
+
$height = 'height:266px;';
|
57 |
+
$align = 'text-align:left;';
|
58 |
+
$is_sirv_active = is_plugin_active('sirv/sirv.php');
|
59 |
+
|
60 |
+
$url = get_post_meta($post->ID, 'fifu_image_url', true);
|
61 |
+
$alt = get_post_meta($post->ID, 'fifu_image_alt', true);
|
62 |
+
|
63 |
+
if ($url) {
|
64 |
+
$show_url = $show_button = $show_sirv = 'display:none;';
|
65 |
+
$show_alt = $show_image = $show_link = $show_hover = '';
|
66 |
+
} else {
|
67 |
+
$show_alt = $show_image = $show_link = $show_hover = 'display:none;';
|
68 |
+
$show_url = $show_button = '';
|
69 |
+
$show_sirv = ($is_sirv_active ? '' : 'display:none;');
|
70 |
+
}
|
71 |
+
|
72 |
+
include 'html/meta-box.html';
|
73 |
+
|
74 |
+
if (get_post_type(get_the_ID()) == 'post')
|
75 |
+
include 'html/hover.html';
|
76 |
}
|
77 |
|
78 |
function fifu_show_advertisement($post) {
|
featured-image-from-url.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
* Plugin Name: Featured Image From URL
|
5 |
* Description: Allows to use an external image as Featured Image of your post, page or Custom Post Type, such as WooCommerce Product (supports Product Gallery also).
|
6 |
-
* Version: 1.
|
7 |
* Author: Marcel Jacques Machado
|
8 |
* Author URI: http://marceljm.com/wordpress/featured-image-from-url-premium/
|
9 |
*/
|
@@ -16,17 +16,18 @@ require_once( FIFU_INCLUDES_DIR . '/thumbnail.php' );
|
|
16 |
require_once( FIFU_INCLUDES_DIR . '/thumbnail-category.php' );
|
17 |
|
18 |
if (is_admin()) {
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
}
|
24 |
|
25 |
-
register_deactivation_hook(
|
26 |
|
27 |
function fifu_desactivate() {
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
}
|
|
3 |
/*
|
4 |
* Plugin Name: Featured Image From URL
|
5 |
* Description: Allows to use an external image as Featured Image of your post, page or Custom Post Type, such as WooCommerce Product (supports Product Gallery also).
|
6 |
+
* Version: 1.4.0
|
7 |
* Author: Marcel Jacques Machado
|
8 |
* Author URI: http://marceljm.com/wordpress/featured-image-from-url-premium/
|
9 |
*/
|
16 |
require_once( FIFU_INCLUDES_DIR . '/thumbnail-category.php' );
|
17 |
|
18 |
if (is_admin()) {
|
19 |
+
require_once( FIFU_ADMIN_DIR . '/meta-box.php' );
|
20 |
+
require_once( FIFU_ADMIN_DIR . '/menu.php' );
|
21 |
+
require_once( FIFU_ADMIN_DIR . '/column.php' );
|
22 |
+
require_once( FIFU_ADMIN_DIR . '/category.php' );
|
23 |
}
|
24 |
|
25 |
+
register_deactivation_hook(__FILE__, 'fifu_desactivate');
|
26 |
|
27 |
function fifu_desactivate() {
|
28 |
+
update_option('fifu_woocommerce', 'toggleoff');
|
29 |
+
update_option('fifu_hope', 'toggleoff');
|
30 |
+
shell_exec('sh ../wp-content/plugins/featured-image-from-url/scripts/disableWoocommerce.sh');
|
31 |
+
fifu_disable_nonstandard_compatibility();
|
32 |
}
|
33 |
+
|
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, featured video, hover, effects, hover effects
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.6.1
|
7 |
Stable tag: 4.6.1
|
@@ -22,7 +22,11 @@ Features:
|
|
22 |
|
23 |
* if your theme didn't show Featured Image (internal or external) in Posts, Pages or Products, it's possible to include that at the beginning of the content automatically;
|
24 |
|
25 |
-
* all included content still has social tags to facilitate sharing on social networks
|
|
|
|
|
|
|
|
|
26 |
|
27 |
*WooCommerce compatibility: 2.4.X and 2.5.X.*
|
28 |
|
@@ -237,6 +241,9 @@ was removed. To finish, a Premium version is now been presented.
|
|
237 |
= 1.3.9 =
|
238 |
* The last toggle wasn't shown in Firefox. Fixed.
|
239 |
|
|
|
|
|
|
|
240 |
== Upgrade Notice ==
|
241 |
|
242 |
= 1.0 =
|
@@ -314,3 +321,6 @@ was removed. To finish, a Premium version is now been presented.
|
|
314 |
|
315 |
= 1.3.9 =
|
316 |
* The last toggle wasn't shown in Firefox. Fixed.
|
|
|
|
|
|
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, featured video, hover, effects, hover effects, sirv, wp all import
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.6.1
|
7 |
Stable tag: 4.6.1
|
22 |
|
23 |
* if your theme didn't show Featured Image (internal or external) in Posts, Pages or Products, it's possible to include that at the beginning of the content automatically;
|
24 |
|
25 |
+
* all included content still has social tags to facilitate sharing on social networks;
|
26 |
+
|
27 |
+
* compatible with WP All Import plugin ("Import Products from any XML or CSV to WooCommerce");
|
28 |
+
|
29 |
+
* compatible with Sirv CDN & Image Manager plugin ("Instantly resize and deliver perfectly optimized images to your website").
|
30 |
|
31 |
*WooCommerce compatibility: 2.4.X and 2.5.X.*
|
32 |
|
241 |
= 1.3.9 =
|
242 |
* The last toggle wasn't shown in Firefox. Fixed.
|
243 |
|
244 |
+
= 1.4.0 =
|
245 |
+
* Compatibility with Sirv CDN & Image Manager plugin.
|
246 |
+
|
247 |
== Upgrade Notice ==
|
248 |
|
249 |
= 1.0 =
|
321 |
|
322 |
= 1.3.9 =
|
323 |
* The last toggle wasn't shown in Firefox. Fixed.
|
324 |
+
|
325 |
+
= 1.4.0 =
|
326 |
+
* Compatibility with Sirv CDN & Image Manager plugin.
|