Version Description
- New option: Featured Image in Content > Custom post type; new option: CDN + Optimized Thumbnails > Shortpixel.
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 3.5.3 |
Comparing to | |
See all releases |
Code changes from version 3.5.2 to 3.5.3
- admin/cli-commands.php +11 -0
- admin/html/js/menu.js +1 -0
- admin/html/menu.html +99 -4
- admin/html/support-data.html +1 -0
- admin/menu.php +4 -1
- admin/strings.php +10 -1
- featured-image-from-url.php +2 -2
- includes/thumbnail.php +1 -1
- readme.txt +6 -6
admin/cli-commands.php
CHANGED
@@ -185,6 +185,17 @@ class fifu_cli extends WP_CLI_Command {
|
|
185 |
}
|
186 |
return;
|
187 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
}
|
189 |
|
190 |
// metadata
|
185 |
}
|
186 |
return;
|
187 |
}
|
188 |
+
if (!empty($assoc_args['content-cpt'])) {
|
189 |
+
switch ($args[0]) {
|
190 |
+
case 'on':
|
191 |
+
update_option('fifu_content_cpt', 'toggleon', 'no'); // toggle
|
192 |
+
break;
|
193 |
+
case 'off':
|
194 |
+
update_option('fifu_content_cpt', 'toggleoff', 'no'); // toggle
|
195 |
+
break;
|
196 |
+
}
|
197 |
+
return;
|
198 |
+
}
|
199 |
}
|
200 |
|
201 |
// metadata
|
admin/html/js/menu.js
CHANGED
@@ -46,6 +46,7 @@ jQuery(function () {
|
|
46 |
jQuery("#tabsPremium").tabs();
|
47 |
jQuery("#tabsWooImport").tabs();
|
48 |
jQuery("#tabsWpAllImport").tabs();
|
|
|
49 |
jQuery("#tabsShortcode").tabs();
|
50 |
jQuery("#tabsAutoSet").tabs();
|
51 |
jQuery("#tabsSlider").tabs();
|
46 |
jQuery("#tabsPremium").tabs();
|
47 |
jQuery("#tabsWooImport").tabs();
|
48 |
jQuery("#tabsWpAllImport").tabs();
|
49 |
+
jQuery("#tabsCDN").tabs();
|
50 |
jQuery("#tabsShortcode").tabs();
|
51 |
jQuery("#tabsAutoSet").tabs();
|
52 |
jQuery("#tabsSlider").tabs();
|
admin/html/menu.html
CHANGED
@@ -518,6 +518,23 @@
|
|
518 |
on, off
|
519 |
</th>
|
520 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
<tr class="color">
|
522 |
<th>
|
523 |
<?php $fifu['tab']['image']() ?>
|
@@ -1396,6 +1413,21 @@
|
|
1396 |
100, 1000, 5000...
|
1397 |
</th>
|
1398 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1399 |
<tr class="color">
|
1400 |
<th>
|
1401 |
<?php $fifu['tab']['performance']() ?>
|
@@ -2250,6 +2282,34 @@
|
|
2250 |
<?php $fifu['where']['post']() ?>
|
2251 |
</th>
|
2252 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2253 |
</table>
|
2254 |
</div>
|
2255 |
|
@@ -2262,6 +2322,10 @@
|
|
2262 |
|
2263 |
<?php $fifu['media']['desc']() ?>
|
2264 |
|
|
|
|
|
|
|
|
|
2265 |
</div>
|
2266 |
|
2267 |
<br>
|
@@ -3559,11 +3623,42 @@
|
|
3559 |
</div>
|
3560 |
<div id="tabs-i">
|
3561 |
<div class="box">
|
|
|
3562 |
<h2><?php $fifu['title']['jetpack']() ?></h2>
|
3563 |
-
|
3564 |
-
|
3565 |
-
<
|
3566 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3567 |
</div>
|
3568 |
</div>
|
3569 |
</div>
|
518 |
on, off
|
519 |
</th>
|
520 |
</tr>
|
521 |
+
<tr class="color">
|
522 |
+
<th>
|
523 |
+
<?php $fifu['tab']['image']() ?>
|
524 |
+
</th>
|
525 |
+
<th>
|
526 |
+
<?php $fifu['title']['content']() ?>
|
527 |
+
</th>
|
528 |
+
<th>
|
529 |
+
<?php $fifu['where']['cpt']() ?>
|
530 |
+
</th>
|
531 |
+
<th>
|
532 |
+
wp fifu image --content-cpt <toggle>
|
533 |
+
</th>
|
534 |
+
<th>
|
535 |
+
on, off
|
536 |
+
</th>
|
537 |
+
</tr>
|
538 |
<tr class="color">
|
539 |
<th>
|
540 |
<?php $fifu['tab']['image']() ?>
|
1413 |
100, 1000, 5000...
|
1414 |
</th>
|
1415 |
</tr>
|
1416 |
+
<tr class="color">
|
1417 |
+
<th>
|
1418 |
+
<?php $fifu['tab']['performance']() ?>
|
1419 |
+
</th>
|
1420 |
+
<th>
|
1421 |
+
<?php $fifu['title']['jetpack']() ?>
|
1422 |
+
</th>
|
1423 |
+
<th>Shortpixel</th>
|
1424 |
+
<th>
|
1425 |
+
wp fifu shortpixel <toggle>
|
1426 |
+
</th>
|
1427 |
+
<th>
|
1428 |
+
on, off
|
1429 |
+
</th>
|
1430 |
+
</tr>
|
1431 |
<tr class="color">
|
1432 |
<th>
|
1433 |
<?php $fifu['tab']['performance']() ?>
|
2282 |
<?php $fifu['where']['post']() ?>
|
2283 |
</th>
|
2284 |
</tr>
|
2285 |
+
<tr>
|
2286 |
+
<th>
|
2287 |
+
<form
|
2288 |
+
id="fifu_form_content_cpt"
|
2289 |
+
action="javascript:void(0)"
|
2290 |
+
method="post">
|
2291 |
+
|
2292 |
+
<input
|
2293 |
+
type="submit"
|
2294 |
+
href="javascript:void(0)"
|
2295 |
+
id="fifu_toggle_content_cpt"
|
2296 |
+
onclick="invert('content_cpt')"
|
2297 |
+
name="fifu_toggle_content_cpt"
|
2298 |
+
class="<?php echo $enable_content_cpt; ?>"
|
2299 |
+
value=""
|
2300 |
+
style="display:block;border:none">
|
2301 |
+
|
2302 |
+
<input
|
2303 |
+
type="hidden"
|
2304 |
+
id="fifu_input_content_cpt"
|
2305 |
+
name="fifu_input_content_cpt"
|
2306 |
+
value="" >
|
2307 |
+
</form>
|
2308 |
+
</th>
|
2309 |
+
<th>
|
2310 |
+
<?php $fifu['where']['cpt']() ?>
|
2311 |
+
</th>
|
2312 |
+
</tr>
|
2313 |
</table>
|
2314 |
</div>
|
2315 |
|
2322 |
|
2323 |
<?php $fifu['media']['desc']() ?>
|
2324 |
|
2325 |
+
<br>
|
2326 |
+
<br>
|
2327 |
+
|
2328 |
+
<b><?php $fifu['detail']['developers']() ?></b>: <?php $fifu['media']['dev']() ?>
|
2329 |
</div>
|
2330 |
|
2331 |
<br>
|
3623 |
</div>
|
3624 |
<div id="tabs-i">
|
3625 |
<div class="box">
|
3626 |
+
|
3627 |
<h2><?php $fifu['title']['jetpack']() ?></h2>
|
3628 |
+
|
3629 |
+
<div id="tabsCDN">
|
3630 |
+
<ul>
|
3631 |
+
<li><a href="#tabs-1">Jetpack</a></li>
|
3632 |
+
<li><a href="#tabs-2">ShortPixel (beta)</a></li>
|
3633 |
+
</ul>
|
3634 |
+
<div id="tabs-1">
|
3635 |
+
<div class="greybox">
|
3636 |
+
|
3637 |
+
<?php $fifu['jetpack']['desc']() ?><br><br>
|
3638 |
+
|
3639 |
+
<div class="polaroid">
|
3640 |
+
<img src="https://storage.googleapis.com/featuredimagefromurl/jetpack-219.jpg">
|
3641 |
+
</div>
|
3642 |
+
|
3643 |
+
</div>
|
3644 |
+
</div>
|
3645 |
+
<div id="tabs-2">
|
3646 |
+
<div class="fifu-pro"><a href="https://fifu.app" target="_blank" style="color:grey; position: relative; top: -40px">premium</a></div>
|
3647 |
+
<div class="greybox" id="grad2">
|
3648 |
+
|
3649 |
+
<?php $fifu['shortpixel']['desc']() ?><br><br>
|
3650 |
+
<b><?php $fifu['detail']['requirement']() ?></b>: <?php $fifu['flickr']['important']() ?>
|
3651 |
+
|
3652 |
+
</div>
|
3653 |
+
|
3654 |
+
<br>
|
3655 |
+
|
3656 |
+
<input
|
3657 |
+
type="submit"
|
3658 |
+
href="javascript:void(0)"
|
3659 |
+
class="toggleoff"
|
3660 |
+
value=""
|
3661 |
+
style="display:block;border:none">
|
3662 |
</div>
|
3663 |
</div>
|
3664 |
</div>
|
admin/html/support-data.html
CHANGED
@@ -26,6 +26,7 @@ fifu_column_height:<?php echo $column_height ?>;
|
|
26 |
fifu_confirm_delete_all:<?php echo $enable_confirm_delete_all ?>;
|
27 |
fifu_confirm_delete_all_time:<?php echo $enable_confirm_delete_all_time ?>;
|
28 |
fifu_content:<?php echo $enable_content ?>;
|
|
|
29 |
fifu_content_page:<?php echo $enable_content_page ?>;
|
30 |
fifu_data_clean:<?php echo $enable_data_clean ?>;
|
31 |
fifu_decode:<?php echo $enable_decode ?>;
|
26 |
fifu_confirm_delete_all:<?php echo $enable_confirm_delete_all ?>;
|
27 |
fifu_confirm_delete_all_time:<?php echo $enable_confirm_delete_all_time ?>;
|
28 |
fifu_content:<?php echo $enable_content ?>;
|
29 |
+
fifu_content_cpt:<?php echo $enable_content_cpt ?>;
|
30 |
fifu_content_page:<?php echo $enable_content_page ?>;
|
31 |
fifu_data_clean:<?php echo $enable_data_clean ?>;
|
32 |
fifu_decode:<?php echo $enable_decode ?>;
|
admin/menu.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_social_image_only', 'fifu_lazy', 'fifu_reset', 'fifu_content', 'fifu_content_page', 'fifu_enable_default_url', 'fifu_spinner_db', 'fifu_spinner_nth', 'fifu_fake', 'fifu_default_url', 'fifu_wc_lbox', 'fifu_wc_zoom', 'fifu_hide_page', 'fifu_hide_post', 'fifu_hide_cpt', 'fifu_get_first', 'fifu_pop_first', 'fifu_ovw_first', 'fifu_query_strings', 'fifu_confirm_delete_all', 'fifu_run_delete_all', 'fifu_column_height', 'fifu_decode', 'fifu_grid_category', 'fifu_auto_alt', 'fifu_dynamic_alt', 'fifu_data_clean')));
|
4 |
|
5 |
define('FIFU_SLUG', 'featured-image-from-url');
|
6 |
|
@@ -45,6 +45,7 @@ function fifu_support_data() {
|
|
45 |
$enable_reset = get_option('fifu_reset');
|
46 |
$enable_content = get_option('fifu_content');
|
47 |
$enable_content_page = get_option('fifu_content_page');
|
|
|
48 |
$enable_fake = get_option('fifu_fake');
|
49 |
$default_url = get_option('fifu_default_url');
|
50 |
$enable_default_url = get_option('fifu_enable_default_url');
|
@@ -97,6 +98,7 @@ function fifu_get_menu_html() {
|
|
97 |
$enable_reset = get_option('fifu_reset');
|
98 |
$enable_content = get_option('fifu_content');
|
99 |
$enable_content_page = get_option('fifu_content_page');
|
|
|
100 |
$enable_fake = get_option('fifu_fake');
|
101 |
$default_url = get_option('fifu_default_url');
|
102 |
$enable_default_url = get_option('fifu_enable_default_url');
|
@@ -194,6 +196,7 @@ function fifu_update_menu_options() {
|
|
194 |
fifu_update_option('fifu_input_reset', 'fifu_reset');
|
195 |
fifu_update_option('fifu_input_content', 'fifu_content');
|
196 |
fifu_update_option('fifu_input_content_page', 'fifu_content_page');
|
|
|
197 |
fifu_update_option('fifu_input_fake', 'fifu_fake');
|
198 |
fifu_update_option('fifu_input_default_url', 'fifu_default_url');
|
199 |
fifu_update_option('fifu_input_enable_default_url', 'fifu_enable_default_url');
|
1 |
<?php
|
2 |
|
3 |
+
define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_social_image_only', 'fifu_lazy', 'fifu_reset', 'fifu_content', 'fifu_content_page', 'fifu_content_cpt', 'fifu_enable_default_url', 'fifu_spinner_db', 'fifu_spinner_nth', 'fifu_fake', 'fifu_default_url', 'fifu_wc_lbox', 'fifu_wc_zoom', 'fifu_hide_page', 'fifu_hide_post', 'fifu_hide_cpt', 'fifu_get_first', 'fifu_pop_first', 'fifu_ovw_first', 'fifu_query_strings', 'fifu_confirm_delete_all', 'fifu_run_delete_all', 'fifu_column_height', 'fifu_decode', 'fifu_grid_category', 'fifu_auto_alt', 'fifu_dynamic_alt', 'fifu_data_clean')));
|
4 |
|
5 |
define('FIFU_SLUG', 'featured-image-from-url');
|
6 |
|
45 |
$enable_reset = get_option('fifu_reset');
|
46 |
$enable_content = get_option('fifu_content');
|
47 |
$enable_content_page = get_option('fifu_content_page');
|
48 |
+
$enable_content_cpt = get_option('fifu_content_cpt');
|
49 |
$enable_fake = get_option('fifu_fake');
|
50 |
$default_url = get_option('fifu_default_url');
|
51 |
$enable_default_url = get_option('fifu_enable_default_url');
|
98 |
$enable_reset = get_option('fifu_reset');
|
99 |
$enable_content = get_option('fifu_content');
|
100 |
$enable_content_page = get_option('fifu_content_page');
|
101 |
+
$enable_content_cpt = get_option('fifu_content_cpt');
|
102 |
$enable_fake = get_option('fifu_fake');
|
103 |
$default_url = get_option('fifu_default_url');
|
104 |
$enable_default_url = get_option('fifu_enable_default_url');
|
196 |
fifu_update_option('fifu_input_reset', 'fifu_reset');
|
197 |
fifu_update_option('fifu_input_content', 'fifu_content');
|
198 |
fifu_update_option('fifu_input_content_page', 'fifu_content_page');
|
199 |
+
fifu_update_option('fifu_input_content_cpt', 'fifu_content_cpt');
|
200 |
fifu_update_option('fifu_input_fake', 'fifu_fake');
|
201 |
fifu_update_option('fifu_input_default_url', 'fifu_default_url');
|
202 |
fifu_update_option('fifu_input_enable_default_url', 'fifu_enable_default_url');
|
admin/strings.php
CHANGED
@@ -41,6 +41,9 @@ function fifu_get_strings_settings() {
|
|
41 |
$fifu['detail']['notice'] = function() {
|
42 |
_e("Notice", FIFU_SLUG);
|
43 |
};
|
|
|
|
|
|
|
44 |
|
45 |
// words
|
46 |
$fifu['word']['attribute'] = function() {
|
@@ -513,7 +516,10 @@ function fifu_get_strings_settings() {
|
|
513 |
_e("show upload button on editor", FIFU_SLUG);
|
514 |
};
|
515 |
$fifu['media']['job'] = function() {
|
516 |
-
_e("run a cron job that searches for external images and saves them in the media library periodically", FIFU_SLUG);
|
|
|
|
|
|
|
517 |
};
|
518 |
|
519 |
// height
|
@@ -825,6 +831,9 @@ function fifu_get_strings_settings() {
|
|
825 |
$fifu['jetpack']['desc'] = function() {
|
826 |
_e("Just install Jetpack plugin and configure its performance settings as shown below. All your external images will be automatically stored and optimized in a free CDN. And to make things even faster FIFU will load the thumbnails in the exact size your site needs.", FIFU_SLUG);
|
827 |
};
|
|
|
|
|
|
|
828 |
|
829 |
// lazy
|
830 |
$fifu['lazy']['desc'] = function() {
|
41 |
$fifu['detail']['notice'] = function() {
|
42 |
_e("Notice", FIFU_SLUG);
|
43 |
};
|
44 |
+
$fifu['detail']['developers'] = function() {
|
45 |
+
_e("Developers", FIFU_SLUG);
|
46 |
+
};
|
47 |
|
48 |
// words
|
49 |
$fifu['word']['attribute'] = function() {
|
516 |
_e("show upload button on editor", FIFU_SLUG);
|
517 |
};
|
518 |
$fifu['media']['job'] = function() {
|
519 |
+
_e("run a cron job that searches for external images and saves them in the media library periodically.", FIFU_SLUG);
|
520 |
+
};
|
521 |
+
$fifu['media']['dev'] = function() {
|
522 |
+
_e("fifu_dev_upload_all_images() runs the process once and immediately.", FIFU_SLUG);
|
523 |
};
|
524 |
|
525 |
// height
|
831 |
$fifu['jetpack']['desc'] = function() {
|
832 |
_e("Just install Jetpack plugin and configure its performance settings as shown below. All your external images will be automatically stored and optimized in a free CDN. And to make things even faster FIFU will load the thumbnails in the exact size your site needs.", FIFU_SLUG);
|
833 |
};
|
834 |
+
$fifu['shortpixel']['desc'] = function() {
|
835 |
+
_e("ShortPixel CDN is being tested as an alternative to Jetpack. You don't need to install any plugins to use this CDN.", FIFU_SLUG);
|
836 |
+
};
|
837 |
|
838 |
// lazy
|
839 |
$fifu['lazy']['desc'] = function() {
|
featured-image-from-url.php
CHANGED
@@ -4,11 +4,11 @@
|
|
4 |
* Plugin Name: Featured Image from URL (FIFU)
|
5 |
* Plugin URI: https://fifu.app/
|
6 |
* Description: Use an external image as featured image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
|
7 |
-
* Version: 3.5.
|
8 |
* Author: fifu.app
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 4.0
|
11 |
-
* WC tested up to:
|
12 |
* Text Domain: featured-image-from-url
|
13 |
* License: GPLv3
|
14 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
4 |
* Plugin Name: Featured Image from URL (FIFU)
|
5 |
* Plugin URI: https://fifu.app/
|
6 |
* Description: Use an external image as featured image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
|
7 |
+
* Version: 3.5.3
|
8 |
* Author: fifu.app
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 4.0
|
11 |
+
* WC tested up to: 5.0
|
12 |
* Text Domain: featured-image-from-url
|
13 |
* License: GPLv3
|
14 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
includes/thumbnail.php
CHANGED
@@ -155,7 +155,7 @@ function fifu_get_html($url, $alt, $width, $height) {
|
|
155 |
add_filter('the_content', 'fifu_add_to_content');
|
156 |
|
157 |
function fifu_add_to_content($content) {
|
158 |
-
return is_singular() && has_post_thumbnail() && ((is_singular('post') && fifu_is_on('fifu_content'))
|
159 |
}
|
160 |
|
161 |
function fifu_should_hide() {
|
155 |
add_filter('the_content', 'fifu_add_to_content');
|
156 |
|
157 |
function fifu_add_to_content($content) {
|
158 |
+
return is_singular() && has_post_thumbnail() && ((is_singular('post') && fifu_is_on('fifu_content')) || (is_singular('page') && fifu_is_on('fifu_content_page')) || (fifu_is_cpt() && fifu_is_on('fifu_content_cpt'))) ? get_the_post_thumbnail() . $content : $content;
|
159 |
}
|
160 |
|
161 |
function fifu_should_hide() {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
|
|
4 |
Tags: featured, image, url, woocommerce, thumbnail
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 5.6
|
7 |
-
Stable tag: 3.5.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -200,20 +200,20 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr and Publiti
|
|
200 |
|
201 |
== Changelog ==
|
202 |
|
|
|
|
|
|
|
203 |
= 3.5.2 =
|
204 |
* New feature: FIFU Product Gallery (able to replace WooCommerce Additional Variation Images plugin).
|
205 |
|
206 |
= 3.5.1 =
|
207 |
* New premium feature: Save External Images in the Media Library; fix: WooCommerce category was keeping a few unnecessary metadata after deleting.
|
208 |
|
209 |
-
= 3.5.0 =
|
210 |
-
* Improvement: WP-CLI integration is complete (90 commands).
|
211 |
-
|
212 |
= others =
|
213 |
* [more](https://fifu.app/changelog/)
|
214 |
|
215 |
|
216 |
== Upgrade Notice ==
|
217 |
|
218 |
-
= 3.5.
|
219 |
-
* New
|
4 |
Tags: featured, image, url, woocommerce, thumbnail
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 3.5.3
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
200 |
|
201 |
== Changelog ==
|
202 |
|
203 |
+
= 3.5.3 =
|
204 |
+
* New option: Featured Image in Content > Custom post type; new option: CDN + Optimized Thumbnails > Shortpixel.
|
205 |
+
|
206 |
= 3.5.2 =
|
207 |
* New feature: FIFU Product Gallery (able to replace WooCommerce Additional Variation Images plugin).
|
208 |
|
209 |
= 3.5.1 =
|
210 |
* New premium feature: Save External Images in the Media Library; fix: WooCommerce category was keeping a few unnecessary metadata after deleting.
|
211 |
|
|
|
|
|
|
|
212 |
= others =
|
213 |
* [more](https://fifu.app/changelog/)
|
214 |
|
215 |
|
216 |
== Upgrade Notice ==
|
217 |
|
218 |
+
= 3.5.3 =
|
219 |
+
* New option: Featured Image in Content > Custom post type; new option: CDN + Optimized Thumbnails > Shortpixel.
|