Version Description
- Enhancement: deactivate itself when the PRO version is activated; fix: Lazy Load (conflict with Oxygen plugin); deprecated: Metadata > Database.
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 4.1.7 |
Comparing to | |
See all releases |
Code changes from version 4.1.6 to 4.1.7
- admin/api.php +12 -2
- admin/cli-commands.php +0 -4
- admin/db.php +1 -1
- admin/html/js/menu.js +0 -1
- admin/html/menu.html +22 -67
- admin/html/support-data.html +0 -1
- admin/menu.php +2 -10
- admin/strings.php +111 -12
- featured-image-from-url.php +18 -1
- includes/attachment.php +4 -0
- includes/html/js/uninstall.js +45 -15
- includes/jetpack.php +1 -1
- readme.txt +7 -7
admin/api.php
CHANGED
@@ -858,7 +858,7 @@ function fifu_api_pre_deactivate(WP_REST_Request $request) {
|
|
858 |
$email = filter_var($request['email'], FILTER_SANITIZE_EMAIL);
|
859 |
$email = filter_var($email, FILTER_VALIDATE_EMAIL) ? $email : null;
|
860 |
$description = $request['description'];
|
861 |
-
$temporary = (
|
862 |
fifu_send_feedback($email, $description, $temporary);
|
863 |
fifu_db_enable_clean();
|
864 |
deactivate_plugins('featured-image-from-url/featured-image-from-url.php');
|
@@ -869,11 +869,16 @@ function fifu_api_feedback(WP_REST_Request $request) {
|
|
869 |
$email = filter_var($request['email'], FILTER_SANITIZE_EMAIL);
|
870 |
$email = filter_var($email, FILTER_VALIDATE_EMAIL) ? $email : null;
|
871 |
$description = $request['description'];
|
872 |
-
$temporary = (
|
873 |
fifu_send_feedback($email, $description, $temporary);
|
874 |
return json_encode(array());
|
875 |
}
|
876 |
|
|
|
|
|
|
|
|
|
|
|
877 |
function fifu_send_feedback($email, $description, $temporary) {
|
878 |
if (!$email && !$description)
|
879 |
return json_encode(array());
|
@@ -1003,6 +1008,11 @@ add_action('rest_api_init', function () {
|
|
1003 |
'callback' => 'fifu_api_feedback',
|
1004 |
'permission_callback' => 'fifu_get_private_data_permissions_check',
|
1005 |
));
|
|
|
|
|
|
|
|
|
|
|
1006 |
register_rest_route('featured-image-from-url/v2', '/rest_url_api/', array(
|
1007 |
'methods' => ['GET', 'POST'],
|
1008 |
'callback' => 'fifu_rest_url',
|
858 |
$email = filter_var($request['email'], FILTER_SANITIZE_EMAIL);
|
859 |
$email = filter_var($email, FILTER_VALIDATE_EMAIL) ? $email : null;
|
860 |
$description = $request['description'];
|
861 |
+
$temporary = filter_var($request['temporary'], FILTER_VALIDATE_BOOLEAN);
|
862 |
fifu_send_feedback($email, $description, $temporary);
|
863 |
fifu_db_enable_clean();
|
864 |
deactivate_plugins('featured-image-from-url/featured-image-from-url.php');
|
869 |
$email = filter_var($request['email'], FILTER_SANITIZE_EMAIL);
|
870 |
$email = filter_var($email, FILTER_VALIDATE_EMAIL) ? $email : null;
|
871 |
$description = $request['description'];
|
872 |
+
$temporary = filter_var($request['temporary'], FILTER_VALIDATE_BOOLEAN);
|
873 |
fifu_send_feedback($email, $description, $temporary);
|
874 |
return json_encode(array());
|
875 |
}
|
876 |
|
877 |
+
function fifu_api_deactivate_itself(WP_REST_Request $request) {
|
878 |
+
deactivate_plugins('featured-image-from-url/featured-image-from-url.php');
|
879 |
+
return json_encode(array());
|
880 |
+
}
|
881 |
+
|
882 |
function fifu_send_feedback($email, $description, $temporary) {
|
883 |
if (!$email && !$description)
|
884 |
return json_encode(array());
|
1008 |
'callback' => 'fifu_api_feedback',
|
1009 |
'permission_callback' => 'fifu_get_private_data_permissions_check',
|
1010 |
));
|
1011 |
+
register_rest_route('featured-image-from-url/v2', '/deactivate_itself/', array(
|
1012 |
+
'methods' => 'POST',
|
1013 |
+
'callback' => 'fifu_api_deactivate_itself',
|
1014 |
+
'permission_callback' => 'fifu_get_private_data_permissions_check',
|
1015 |
+
));
|
1016 |
register_rest_route('featured-image-from-url/v2', '/rest_url_api/', array(
|
1017 |
'methods' => ['GET', 'POST'],
|
1018 |
'callback' => 'fifu_rest_url',
|
admin/cli-commands.php
CHANGED
@@ -242,10 +242,6 @@ class fifu_cli extends WP_CLI_Command {
|
|
242 |
fifu_run_get_and_save_sizes_api(new WP_REST_Request());
|
243 |
}
|
244 |
|
245 |
-
function db($args) {
|
246 |
-
update_option('fifu_spinner_db', $args[0], 'no');
|
247 |
-
}
|
248 |
-
|
249 |
// performance
|
250 |
|
251 |
function cdn($args, $assoc_args) {
|
242 |
fifu_run_get_and_save_sizes_api(new WP_REST_Request());
|
243 |
}
|
244 |
|
|
|
|
|
|
|
|
|
245 |
// performance
|
246 |
|
247 |
function cdn($args, $assoc_args) {
|
admin/db.php
CHANGED
@@ -22,7 +22,7 @@ class FifuDb {
|
|
22 |
$this->term_taxonomy = $wpdb->prefix . 'term_taxonomy';
|
23 |
$this->term_relationships = $wpdb->prefix . 'term_relationships';
|
24 |
$this->author = 77777;
|
25 |
-
$this->MAX_INSERT =
|
26 |
$this->MAX_URL_LENGTH = 2048;
|
27 |
$this->types = $this->get_types();
|
28 |
}
|
22 |
$this->term_taxonomy = $wpdb->prefix . 'term_taxonomy';
|
23 |
$this->term_relationships = $wpdb->prefix . 'term_relationships';
|
24 |
$this->author = 77777;
|
25 |
+
$this->MAX_INSERT = 1000;
|
26 |
$this->MAX_URL_LENGTH = 2048;
|
27 |
$this->types = $this->get_types();
|
28 |
}
|
admin/html/js/menu.js
CHANGED
@@ -30,7 +30,6 @@ jQuery(function () {
|
|
30 |
|
31 |
jQuery("#tabs-top").tabs();
|
32 |
jQuery("#fifu_input_spinner_cron_metadata").spinner({min: 1, step: 1});
|
33 |
-
jQuery("#fifu_input_spinner_db").spinner({min: 100, step: 100});
|
34 |
jQuery("#fifu_input_spinner_nth").spinner({min: 1});
|
35 |
jQuery("#fifu_input_slider_speed").spinner({min: 0});
|
36 |
jQuery("#fifu_input_slider_pause").spinner({min: 0});
|
30 |
|
31 |
jQuery("#tabs-top").tabs();
|
32 |
jQuery("#fifu_input_spinner_cron_metadata").spinner({min: 1, step: 1});
|
|
|
33 |
jQuery("#fifu_input_spinner_nth").spinner({min: 1});
|
34 |
jQuery("#fifu_input_slider_speed").spinner({min: 0});
|
35 |
jQuery("#fifu_input_slider_pause").spinner({min: 0});
|
admin/html/menu.html
CHANGED
@@ -1754,21 +1754,6 @@
|
|
1754 |
1, 30, 60...
|
1755 |
</th>
|
1756 |
</tr>
|
1757 |
-
<tr class="color">
|
1758 |
-
<th>
|
1759 |
-
<?php $fifu['tab']['metadata']() ?>
|
1760 |
-
</th>
|
1761 |
-
<th>
|
1762 |
-
<?php $fifu['title']['database']() ?>
|
1763 |
-
</th>
|
1764 |
-
<th></th>
|
1765 |
-
<th>
|
1766 |
-
wp fifu db <integer>
|
1767 |
-
</th>
|
1768 |
-
<th>
|
1769 |
-
100, 1000, 5000...
|
1770 |
-
</th>
|
1771 |
-
</tr>
|
1772 |
<tr class="color">
|
1773 |
<th>
|
1774 |
<?php $fifu['tab']['performance']() ?>
|
@@ -3779,36 +3764,6 @@
|
|
3779 |
style="display:block;border:none">
|
3780 |
</div>
|
3781 |
|
3782 |
-
<div class="box">
|
3783 |
-
<h2><?php $fifu['title']['database']() ?></h2>
|
3784 |
-
<div class="greybox">
|
3785 |
-
<?php $fifu['database']['desc']() ?><br><br>
|
3786 |
-
<form
|
3787 |
-
id="fifu_form_db"
|
3788 |
-
action="javascript:void(0)"
|
3789 |
-
method="post">
|
3790 |
-
<?php wp_nonce_field(FIFU_ACTION_SETTINGS, 'nonce_fifu_form_db'); ?>
|
3791 |
-
<table style="text-align:left">
|
3792 |
-
<tr>
|
3793 |
-
<th>
|
3794 |
-
<label for="fifu_input_spinner_db"
|
3795 |
-
placehold><?php $fifu['database']['limit']() ?></label>
|
3796 |
-
</th>
|
3797 |
-
<th>
|
3798 |
-
<input id="fifu_input_spinner_db"
|
3799 |
-
name="fifu_input_spinner_db"
|
3800 |
-
value="<?php echo $max_db; ?>"
|
3801 |
-
size="4">
|
3802 |
-
</th>
|
3803 |
-
<th>
|
3804 |
-
<input type="submit" value="<?php $fifu['button']['submit']() ?>">
|
3805 |
-
</th>
|
3806 |
-
</tr>
|
3807 |
-
</table>
|
3808 |
-
</form>
|
3809 |
-
</div>
|
3810 |
-
</div>
|
3811 |
-
|
3812 |
<div class="box">
|
3813 |
|
3814 |
<h2><?php $fifu['title']['delete']() ?> <span class="dashicons dashicons-welcome-comments" style="font-size: 25px;" title="<?php $fifu['delete']['requirement']() ?>"></span></h2>
|
@@ -5789,14 +5744,14 @@
|
|
5789 |
</ul>
|
5790 |
|
5791 |
<div id="tabs-4">
|
5792 |
-
<h3
|
5793 |
<table style="width:100%;text-align:left">
|
5794 |
<tr class="color">
|
5795 |
<th>
|
5796 |
1
|
5797 |
</th>
|
5798 |
<th>
|
5799 |
-
<a href=
|
5800 |
</th>
|
5801 |
</tr>
|
5802 |
<tr class="color">
|
@@ -5811,67 +5766,67 @@
|
|
5811 |
</table>
|
5812 |
<br>
|
5813 |
<hr>
|
5814 |
-
<h3
|
5815 |
<table style="width:100%;text-align:left">
|
5816 |
<tr class="color">
|
5817 |
<th style="width:15%">
|
5818 |
-
<b
|
5819 |
</th>
|
5820 |
<th>
|
5821 |
-
<b
|
5822 |
</th>
|
5823 |
</tr>
|
5824 |
<tr class="color">
|
5825 |
<th>
|
5826 |
-
|
5827 |
</th>
|
5828 |
<th>
|
5829 |
-
|
5830 |
</th>
|
5831 |
</tr>
|
5832 |
<tr class="color">
|
5833 |
<th>
|
5834 |
-
|
5835 |
</th>
|
5836 |
<th>
|
5837 |
-
|
5838 |
</th>
|
5839 |
</tr>
|
5840 |
<tr class="color">
|
5841 |
<th>
|
5842 |
-
|
5843 |
</th>
|
5844 |
<th>
|
5845 |
-
|
5846 |
</th>
|
5847 |
</tr>
|
5848 |
<tr class="color">
|
5849 |
<th>
|
5850 |
-
|
5851 |
</th>
|
5852 |
<th>
|
5853 |
-
|
5854 |
</th>
|
5855 |
</tr>
|
5856 |
<tr class="color">
|
5857 |
<th>
|
5858 |
-
|
5859 |
</th>
|
5860 |
<th>
|
5861 |
-
|
5862 |
</th>
|
5863 |
</tr>
|
5864 |
</table>
|
5865 |
<br>
|
5866 |
<hr>
|
5867 |
-
<h3
|
5868 |
<table style="width:100%;text-align:left">
|
5869 |
<tr class="color">
|
5870 |
<th>
|
5871 |
-
<b
|
5872 |
</th>
|
5873 |
<th>
|
5874 |
-
<b
|
5875 |
</th>
|
5876 |
</tr>
|
5877 |
<tr class="color">
|
@@ -5879,20 +5834,20 @@
|
|
5879 |
WooCommerce
|
5880 |
</th>
|
5881 |
<th>
|
5882 |
-
|
5883 |
</th>
|
5884 |
</tr>
|
5885 |
<tr class="color">
|
5886 |
<th>
|
5887 |
-
|
5888 |
</th>
|
5889 |
<th>
|
5890 |
-
|
5891 |
</th>
|
5892 |
</tr>
|
5893 |
<tr class="color">
|
5894 |
<th>
|
5895 |
-
|
5896 |
</th>
|
5897 |
<th>
|
5898 |
{columnA[1]}|{columnB[1]}|{columnC[1]}|{columnD[1]}|...
|
1754 |
1, 30, 60...
|
1755 |
</th>
|
1756 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1757 |
<tr class="color">
|
1758 |
<th>
|
1759 |
<?php $fifu['tab']['performance']() ?>
|
3764 |
style="display:block;border:none">
|
3765 |
</div>
|
3766 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3767 |
<div class="box">
|
3768 |
|
3769 |
<h2><?php $fifu['title']['delete']() ?> <span class="dashicons dashicons-welcome-comments" style="font-size: 25px;" title="<?php $fifu['delete']['requirement']() ?>"></span></h2>
|
5744 |
</ul>
|
5745 |
|
5746 |
<div id="tabs-4">
|
5747 |
+
<h3><?php $fifu['addon']['faq']['how']['examples']() ?></h3>
|
5748 |
<table style="width:100%;text-align:left">
|
5749 |
<tr class="color">
|
5750 |
<th>
|
5751 |
1
|
5752 |
</th>
|
5753 |
<th>
|
5754 |
+
<a href='http://www.wpallimport.com/documentation/woocommerce/variable-products/'><?php $fifu['addon']['faq']['woocommerce']() ?></a>
|
5755 |
</th>
|
5756 |
</tr>
|
5757 |
<tr class="color">
|
5766 |
</table>
|
5767 |
<br>
|
5768 |
<hr>
|
5769 |
+
<h3><?php $fifu['addon']['faq']['how']['not']() ?></h3>
|
5770 |
<table style="width:100%;text-align:left">
|
5771 |
<tr class="color">
|
5772 |
<th style="width:15%">
|
5773 |
+
<b><?php $fifu['addon']['faq']['words']['section']() ?></b>
|
5774 |
</th>
|
5775 |
<th>
|
5776 |
+
<b><?php $fifu['addon']['faq']['words']['description']() ?></b>
|
5777 |
</th>
|
5778 |
</tr>
|
5779 |
<tr class="color">
|
5780 |
<th>
|
5781 |
+
<?php $fifu['addon']['faq']['section']['images']() ?>
|
5782 |
</th>
|
5783 |
<th>
|
5784 |
+
<?php $fifu['addon']['faq']['description']['empty']() ?>
|
5785 |
</th>
|
5786 |
</tr>
|
5787 |
<tr class="color">
|
5788 |
<th>
|
5789 |
+
<?php $fifu['addon']['faq']['section']['addon']() ?>
|
5790 |
</th>
|
5791 |
<th>
|
5792 |
+
<?php $fifu['addon']['faq']['description']['woocommerce']() ?>
|
5793 |
</th>
|
5794 |
</tr>
|
5795 |
<tr class="color">
|
5796 |
<th>
|
5797 |
+
<?php $fifu['addon']['faq']['section']['cf']() ?>
|
5798 |
</th>
|
5799 |
<th>
|
5800 |
+
<?php $fifu['addon']['faq']['description']['cf']() ?>
|
5801 |
</th>
|
5802 |
</tr>
|
5803 |
<tr class="color">
|
5804 |
<th>
|
5805 |
+
<?php $fifu['addon']['faq']['section']['record']() ?>
|
5806 |
</th>
|
5807 |
<th>
|
5808 |
+
<?php $fifu['addon']['faq']['description']['update']() ?>
|
5809 |
</th>
|
5810 |
</tr>
|
5811 |
<tr class="color">
|
5812 |
<th>
|
5813 |
+
<?php $fifu['addon']['faq']['section']['record']() ?>
|
5814 |
</th>
|
5815 |
<th>
|
5816 |
+
<?php $fifu['addon']['faq']['description']['choose']() ?>
|
5817 |
</th>
|
5818 |
</tr>
|
5819 |
</table>
|
5820 |
<br>
|
5821 |
<hr>
|
5822 |
+
<h3><?php $fifu['addon']['faq']['how']['to']() ?></h3>
|
5823 |
<table style="width:100%;text-align:left">
|
5824 |
<tr class="color">
|
5825 |
<th>
|
5826 |
+
<b><?php $fifu['addon']['faq']['words']['for']() ?></b>
|
5827 |
</th>
|
5828 |
<th>
|
5829 |
+
<b><?php $fifu['addon']['faq']['words']['description']() ?></b>
|
5830 |
</th>
|
5831 |
</tr>
|
5832 |
<tr class="color">
|
5834 |
WooCommerce
|
5835 |
</th>
|
5836 |
<th>
|
5837 |
+
<?php $fifu['addon']['faq']['description']['gallery']() ?>
|
5838 |
</th>
|
5839 |
</tr>
|
5840 |
<tr class="color">
|
5841 |
<th>
|
5842 |
+
<?php $fifu['addon']['faq']['for']['delimiter']() ?>
|
5843 |
</th>
|
5844 |
<th>
|
5845 |
+
<?php $fifu['addon']['faq']['description']['delimiter']() ?>
|
5846 |
</th>
|
5847 |
</tr>
|
5848 |
<tr class="color">
|
5849 |
<th>
|
5850 |
+
<?php $fifu['addon']['faq']['for']['columns']() ?>
|
5851 |
</th>
|
5852 |
<th>
|
5853 |
{columnA[1]}|{columnB[1]}|{columnC[1]}|{columnD[1]}|...
|
admin/html/support-data.html
CHANGED
@@ -57,7 +57,6 @@ fifu_run_delete_all_time:<?php echo $enable_run_delete_all_time ?>;
|
|
57 |
fifu_skip:<?php echo $skip ?>;
|
58 |
fifu_social:<?php echo $enable_social ?>;
|
59 |
fifu_social_image_only:<?php echo $enable_social_image_only ?>;
|
60 |
-
fifu_spinner_db:<?php echo $max_db ?>;
|
61 |
fifu_spinner_nth:<?php echo $nth_image ?>;
|
62 |
fifu_wc_lbox:<?php echo $enable_wc_lbox ?>;
|
63 |
fifu_wc_zoom:<?php echo $enable_wc_zoom ?>;
|
57 |
fifu_skip:<?php echo $skip ?>;
|
58 |
fifu_social:<?php echo $enable_social ?>;
|
59 |
fifu_social_image_only:<?php echo $enable_social_image_only ?>;
|
|
|
60 |
fifu_spinner_nth:<?php echo $nth_image ?>;
|
61 |
fifu_wc_lbox:<?php echo $enable_wc_lbox ?>;
|
62 |
fifu_wc_zoom:<?php echo $enable_wc_zoom ?>;
|
admin/menu.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_social_image_only', 'fifu_skip', 'fifu_lazy', 'fifu_photon', 'fifu_cdn_social', 'fifu_cdn_crop', 'fifu_cdn_content', 'fifu_reset', 'fifu_content', 'fifu_content_page', 'fifu_content_cpt', 'fifu_enable_default_url', '
|
4 |
define('FIFU_ACTION_SETTINGS', '/wp-admin/admin.php?page=featured-image-from-url');
|
5 |
|
6 |
define('FIFU_SLUG', 'featured-image-from-url');
|
@@ -115,7 +115,6 @@ function fifu_support_data() {
|
|
115 |
$default_url = esc_url(get_option('fifu_default_url'));
|
116 |
$default_cpt = esc_attr(get_option('fifu_default_cpt'));
|
117 |
$enable_default_url = get_option('fifu_enable_default_url');
|
118 |
-
$max_db = get_option('fifu_spinner_db');
|
119 |
$nth_image = get_option('fifu_spinner_nth');
|
120 |
$enable_wc_lbox = get_option('fifu_wc_lbox');
|
121 |
$enable_wc_zoom = get_option('fifu_wc_zoom');
|
@@ -174,7 +173,6 @@ function fifu_get_menu_html() {
|
|
174 |
$default_url = esc_url(get_option('fifu_default_url'));
|
175 |
$default_cpt = esc_attr(get_option('fifu_default_cpt'));
|
176 |
$enable_default_url = get_option('fifu_enable_default_url');
|
177 |
-
$max_db = get_option('fifu_spinner_db');
|
178 |
$nth_image = get_option('fifu_spinner_nth');
|
179 |
$enable_wc_lbox = get_option('fifu_wc_lbox');
|
180 |
$enable_wc_zoom = get_option('fifu_wc_zoom');
|
@@ -241,7 +239,6 @@ function fifu_get_setting($type) {
|
|
241 |
$arr1 = array('fifu_spinner_nth');
|
242 |
$arrEmpty = array('fifu_default_url', 'fifu_skip');
|
243 |
$arrDefaultType = array('fifu_default_cpt');
|
244 |
-
$arr1000 = array('fifu_spinner_db');
|
245 |
$arrOn = array('fifu_wc_zoom', 'fifu_wc_lbox');
|
246 |
$arrOnNo = array('fifu_fake', 'fifu_social');
|
247 |
$arrOffNo = array('fifu_data_clean', 'fifu_confirm_delete_all', 'fifu_run_delete_all', 'fifu_reset', 'fifu_social_image_only');
|
@@ -253,8 +250,6 @@ function fifu_get_setting($type) {
|
|
253 |
update_option($type, 1);
|
254 |
else if (in_array($type, $arrDefaultType))
|
255 |
update_option($type, "post,page,product", 'no');
|
256 |
-
else if (in_array($type, $arr1000))
|
257 |
-
update_option($type, 1000, 'no');
|
258 |
else if (in_array($type, $arrOn))
|
259 |
update_option($type, 'toggleon');
|
260 |
else if (in_array($type, $arrOnNo))
|
@@ -315,9 +310,6 @@ function fifu_update_menu_options() {
|
|
315 |
if (fifu_is_valid_nonce('nonce_fifu_form_enable_default_url'))
|
316 |
fifu_update_option('fifu_input_enable_default_url', 'fifu_enable_default_url');
|
317 |
|
318 |
-
if (fifu_is_valid_nonce('nonce_fifu_form_db'))
|
319 |
-
fifu_update_option('fifu_input_spinner_db', 'fifu_spinner_db');
|
320 |
-
|
321 |
if (fifu_is_valid_nonce('nonce_fifu_form_spinner_nth'))
|
322 |
fifu_update_option('fifu_input_spinner_nth', 'fifu_spinner_nth');
|
323 |
|
@@ -410,7 +402,7 @@ function fifu_update_option($input, $field) {
|
|
410 |
return;
|
411 |
}
|
412 |
|
413 |
-
$arr_int = array('fifu_fake_created', '
|
414 |
if (in_array($field, $arr_int)) {
|
415 |
if (filter_var($value, FILTER_VALIDATE_INT))
|
416 |
update_option($field, $value);
|
1 |
<?php
|
2 |
|
3 |
+
define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_social_image_only', 'fifu_skip', 'fifu_lazy', 'fifu_photon', 'fifu_cdn_social', 'fifu_cdn_crop', 'fifu_cdn_content', 'fifu_reset', 'fifu_content', 'fifu_content_page', 'fifu_content_cpt', 'fifu_enable_default_url', 'fifu_spinner_nth', 'fifu_fake', 'fifu_default_url', 'fifu_default_cpt', '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_decode', 'fifu_check', 'fifu_grid_category', 'fifu_auto_alt', 'fifu_dynamic_alt', 'fifu_data_clean')));
|
4 |
define('FIFU_ACTION_SETTINGS', '/wp-admin/admin.php?page=featured-image-from-url');
|
5 |
|
6 |
define('FIFU_SLUG', 'featured-image-from-url');
|
115 |
$default_url = esc_url(get_option('fifu_default_url'));
|
116 |
$default_cpt = esc_attr(get_option('fifu_default_cpt'));
|
117 |
$enable_default_url = get_option('fifu_enable_default_url');
|
|
|
118 |
$nth_image = get_option('fifu_spinner_nth');
|
119 |
$enable_wc_lbox = get_option('fifu_wc_lbox');
|
120 |
$enable_wc_zoom = get_option('fifu_wc_zoom');
|
173 |
$default_url = esc_url(get_option('fifu_default_url'));
|
174 |
$default_cpt = esc_attr(get_option('fifu_default_cpt'));
|
175 |
$enable_default_url = get_option('fifu_enable_default_url');
|
|
|
176 |
$nth_image = get_option('fifu_spinner_nth');
|
177 |
$enable_wc_lbox = get_option('fifu_wc_lbox');
|
178 |
$enable_wc_zoom = get_option('fifu_wc_zoom');
|
239 |
$arr1 = array('fifu_spinner_nth');
|
240 |
$arrEmpty = array('fifu_default_url', 'fifu_skip');
|
241 |
$arrDefaultType = array('fifu_default_cpt');
|
|
|
242 |
$arrOn = array('fifu_wc_zoom', 'fifu_wc_lbox');
|
243 |
$arrOnNo = array('fifu_fake', 'fifu_social');
|
244 |
$arrOffNo = array('fifu_data_clean', 'fifu_confirm_delete_all', 'fifu_run_delete_all', 'fifu_reset', 'fifu_social_image_only');
|
250 |
update_option($type, 1);
|
251 |
else if (in_array($type, $arrDefaultType))
|
252 |
update_option($type, "post,page,product", 'no');
|
|
|
|
|
253 |
else if (in_array($type, $arrOn))
|
254 |
update_option($type, 'toggleon');
|
255 |
else if (in_array($type, $arrOnNo))
|
310 |
if (fifu_is_valid_nonce('nonce_fifu_form_enable_default_url'))
|
311 |
fifu_update_option('fifu_input_enable_default_url', 'fifu_enable_default_url');
|
312 |
|
|
|
|
|
|
|
313 |
if (fifu_is_valid_nonce('nonce_fifu_form_spinner_nth'))
|
314 |
fifu_update_option('fifu_input_spinner_nth', 'fifu_spinner_nth');
|
315 |
|
402 |
return;
|
403 |
}
|
404 |
|
405 |
+
$arr_int = array('fifu_fake_created', 'fifu_spinner_nth');
|
406 |
if (in_array($field, $arr_int)) {
|
407 |
if (filter_var($value, FILTER_VALIDATE_INT))
|
408 |
update_option($field, $value);
|
admin/strings.php
CHANGED
@@ -273,9 +273,6 @@ function fifu_get_strings_settings() {
|
|
273 |
$fifu['title']['schedule'] = function () {
|
274 |
_e("Schedule Metadata Generation", FIFU_SLUG);
|
275 |
};
|
276 |
-
$fifu['title']['database'] = function () {
|
277 |
-
_e("Database", FIFU_SLUG);
|
278 |
-
};
|
279 |
$fifu['title']['delete'] = function () {
|
280 |
_e("Delete All URLs", FIFU_SLUG);
|
281 |
};
|
@@ -960,14 +957,6 @@ function fifu_get_strings_settings() {
|
|
960 |
_e("Interval (minutes)", FIFU_SLUG);
|
961 |
};
|
962 |
|
963 |
-
// database
|
964 |
-
$fifu['database']['desc'] = function () {
|
965 |
-
_e("Limit of rows to UPDATE, INSERT or DELETE by query. Higher this number, faster the features Content URL > All Posts, Image Metadata and Clean Metadata. However, if you have too limited resources, don't increase this value too much, otherwise your database can bring down.", FIFU_SLUG);
|
966 |
-
};
|
967 |
-
$fifu['database']['limit'] = function () {
|
968 |
-
_e("Rows limit", FIFU_SLUG);
|
969 |
-
};
|
970 |
-
|
971 |
// delete
|
972 |
$fifu['delete']['important'] = function () {
|
973 |
_e("this plugin doesn't save images in the media library. It means that enabling the two toggles below all post types that have an external featured image will no longer have any featured image. And you can't undo this action later. This also applies to FIFU galleries, videos, sliders and shortcodes.", FIFU_SLUG);
|
@@ -1495,7 +1484,7 @@ function fifu_get_strings_settings() {
|
|
1495 |
_e("CSV example", FIFU_SLUG);
|
1496 |
};
|
1497 |
$fifu['addon']['faq']['woocommerce'] = function () {
|
1498 |
-
_e("
|
1499 |
};
|
1500 |
$fifu['addon']['faq']['variation-child-xml'] = function () {
|
1501 |
_e('Examples for "Variations As Child XML Elements"', FIFU_SLUG);
|
@@ -1503,9 +1492,66 @@ function fifu_get_strings_settings() {
|
|
1503 |
$fifu['addon']['faq']['xml'] = function () {
|
1504 |
_e("XML", FIFU_SLUG);
|
1505 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1506 |
$fifu['addon']['faq']['template'] = function () {
|
1507 |
_e("import template", FIFU_SLUG);
|
1508 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1509 |
|
1510 |
// key
|
1511 |
$fifu['key']['desc'] = function () {
|
@@ -2109,3 +2155,56 @@ function fifu_get_strings_cloud() {
|
|
2109 |
|
2110 |
return $fifu;
|
2111 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
$fifu['title']['schedule'] = function () {
|
274 |
_e("Schedule Metadata Generation", FIFU_SLUG);
|
275 |
};
|
|
|
|
|
|
|
276 |
$fifu['title']['delete'] = function () {
|
277 |
_e("Delete All URLs", FIFU_SLUG);
|
278 |
};
|
957 |
_e("Interval (minutes)", FIFU_SLUG);
|
958 |
};
|
959 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
960 |
// delete
|
961 |
$fifu['delete']['important'] = function () {
|
962 |
_e("this plugin doesn't save images in the media library. It means that enabling the two toggles below all post types that have an external featured image will no longer have any featured image. And you can't undo this action later. This also applies to FIFU galleries, videos, sliders and shortcodes.", FIFU_SLUG);
|
1484 |
_e("CSV example", FIFU_SLUG);
|
1485 |
};
|
1486 |
$fifu['addon']['faq']['woocommerce'] = function () {
|
1487 |
+
_e("Importing variable products to WooCommerce", FIFU_SLUG);
|
1488 |
};
|
1489 |
$fifu['addon']['faq']['variation-child-xml'] = function () {
|
1490 |
_e('Examples for "Variations As Child XML Elements"', FIFU_SLUG);
|
1492 |
$fifu['addon']['faq']['xml'] = function () {
|
1493 |
_e("XML", FIFU_SLUG);
|
1494 |
};
|
1495 |
+
$fifu['addon']['faq']['words']['section'] = function () {
|
1496 |
+
_e("Section", FIFU_SLUG);
|
1497 |
+
};
|
1498 |
+
$fifu['addon']['faq']['words']['for'] = function () {
|
1499 |
+
_e("For", FIFU_SLUG);
|
1500 |
+
};
|
1501 |
+
$fifu['addon']['faq']['words']['description'] = function () {
|
1502 |
+
_e("Description", FIFU_SLUG);
|
1503 |
+
};
|
1504 |
$fifu['addon']['faq']['template'] = function () {
|
1505 |
_e("import template", FIFU_SLUG);
|
1506 |
};
|
1507 |
+
$fifu['addon']['faq']['how']['examples'] = function () {
|
1508 |
+
_e("Examples", FIFU_SLUG);
|
1509 |
+
};
|
1510 |
+
$fifu['addon']['faq']['how']['not'] = function () {
|
1511 |
+
_e("How NOT to configure WP All Import", FIFU_SLUG);
|
1512 |
+
};
|
1513 |
+
$fifu['addon']['faq']['how']['to'] = function () {
|
1514 |
+
_e("How to configure FIFU Add-On", FIFU_SLUG);
|
1515 |
+
};
|
1516 |
+
$fifu['addon']['faq']['section']['images'] = function () {
|
1517 |
+
_e("Images", FIFU_SLUG);
|
1518 |
+
};
|
1519 |
+
$fifu['addon']['faq']['section']['addon'] = function () {
|
1520 |
+
_e("FIFU Add-On", FIFU_SLUG);
|
1521 |
+
};
|
1522 |
+
$fifu['addon']['faq']['section']['cf'] = function () {
|
1523 |
+
_e("Custom Fields", FIFU_SLUG);
|
1524 |
+
};
|
1525 |
+
$fifu['addon']['faq']['section']['record'] = function () {
|
1526 |
+
_e("Record Matching", FIFU_SLUG);
|
1527 |
+
};
|
1528 |
+
$fifu['addon']['faq']['for']['delimiter'] = function () {
|
1529 |
+
_e("List of URLs delimited by comma", FIFU_SLUG);
|
1530 |
+
};
|
1531 |
+
$fifu['addon']['faq']['for']['columns'] = function () {
|
1532 |
+
_e("URLs in different columns", FIFU_SLUG);
|
1533 |
+
};
|
1534 |
+
$fifu['addon']['faq']['description']['empty'] = function () {
|
1535 |
+
_e("DON'T add filenames or URLs. Keep the text fields EMPTY", FIFU_SLUG);
|
1536 |
+
};
|
1537 |
+
$fifu['addon']['faq']['description']['woocommerce'] = function () {
|
1538 |
+
_e("For WooCommerce, DON'T use \"Featured image (URL)\" field", FIFU_SLUG);
|
1539 |
+
};
|
1540 |
+
$fifu['addon']['faq']['description']['cf'] = function () {
|
1541 |
+
_e("DON'T add FIFU custom fields", FIFU_SLUG);
|
1542 |
+
};
|
1543 |
+
$fifu['addon']['faq']['description']['update'] = function () {
|
1544 |
+
_e("DON'T check \"Update existing products with the data in your file > Update all data\"", FIFU_SLUG);
|
1545 |
+
};
|
1546 |
+
$fifu['addon']['faq']['description']['choose'] = function () {
|
1547 |
+
_e("DON'T check \"Update existing products with the data in your file > Choose which data to update > Images > Update all images\"", FIFU_SLUG);
|
1548 |
+
};
|
1549 |
+
$fifu['addon']['faq']['description']['gallery'] = function () {
|
1550 |
+
_e("Use \"Product image URL + gallery URLs\", even if you have 1 URL only", FIFU_SLUG);
|
1551 |
+
};
|
1552 |
+
$fifu['addon']['faq']['description']['delimiter'] = function () {
|
1553 |
+
_e("Enter a comma in the \"List delimiter\" field", FIFU_SLUG);
|
1554 |
+
};
|
1555 |
|
1556 |
// key
|
1557 |
$fifu['key']['desc'] = function () {
|
2155 |
|
2156 |
return $fifu;
|
2157 |
}
|
2158 |
+
|
2159 |
+
function fifu_get_strings_uninstall() {
|
2160 |
+
$fifu = array();
|
2161 |
+
|
2162 |
+
$fifu['button']['text']['clean'] = function () {
|
2163 |
+
return __("Clean metadata and deactivate", FIFU_SLUG);
|
2164 |
+
};
|
2165 |
+
$fifu['button']['text']['deactivate'] = function () {
|
2166 |
+
return __("Deactivate", FIFU_SLUG);
|
2167 |
+
};
|
2168 |
+
$fifu['button']['description']['clean'] = function () {
|
2169 |
+
return __("if you don't intend to use FIFU again", FIFU_SLUG);
|
2170 |
+
};
|
2171 |
+
$fifu['button']['description']['deactivate'] = function () {
|
2172 |
+
return __("if it's a temporary deactivation", FIFU_SLUG);
|
2173 |
+
};
|
2174 |
+
$fifu['text']['why'] = function () {
|
2175 |
+
return __("Why are you deactivating FIFU?", FIFU_SLUG);
|
2176 |
+
};
|
2177 |
+
$fifu['text']['description'] = function () {
|
2178 |
+
return __("Description", FIFU_SLUG);
|
2179 |
+
};
|
2180 |
+
$fifu['text']['optional'] = function () {
|
2181 |
+
return __("optional", FIFU_SLUG);
|
2182 |
+
};
|
2183 |
+
$fifu['text']['email'] = function () {
|
2184 |
+
return __("Email", FIFU_SLUG);
|
2185 |
+
};
|
2186 |
+
$fifu['text']['support'] = function () {
|
2187 |
+
return __("We'll reply you in a few hours. 90% of issues are solved with one or two messages.", FIFU_SLUG);
|
2188 |
+
};
|
2189 |
+
$fifu['text']['reason']['conflict'] = function () {
|
2190 |
+
return __("Doesn't work with a theme, plugin or URL...", FIFU_SLUG);
|
2191 |
+
};
|
2192 |
+
$fifu['text']['reason']['pro'] = function () {
|
2193 |
+
return __("Works well, but I would need a new or pro feature...", FIFU_SLUG);
|
2194 |
+
};
|
2195 |
+
$fifu['text']['reason']['seo'] = function () {
|
2196 |
+
return __("Worried about SEO, performance or copyright...", FIFU_SLUG);
|
2197 |
+
};
|
2198 |
+
$fifu['text']['reason']['local'] = function () {
|
2199 |
+
return __("I wished it worked with my local images...", FIFU_SLUG);
|
2200 |
+
};
|
2201 |
+
$fifu['text']['reason']['undestand'] = function () {
|
2202 |
+
return __("I didn't understand how it works...", FIFU_SLUG);
|
2203 |
+
};
|
2204 |
+
$fifu['text']['reason']['others'] = function () {
|
2205 |
+
return __("Others...", FIFU_SLUG);
|
2206 |
+
};
|
2207 |
+
|
2208 |
+
return $fifu;
|
2209 |
+
}
|
2210 |
+
|
featured-image-from-url.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Featured Image from URL (FIFU)
|
5 |
* Plugin URI: https://fifu.app/
|
6 |
* Description: Use an external image/video/audio as featured image/video/audio of a post or WooCommerce product.
|
7 |
-
* Version: 4.1.
|
8 |
* Author: fifu.app
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 4.0
|
@@ -124,6 +124,8 @@ function fifu_row_meta($plugin_meta, $plugin_file, $plugin_data, $status) {
|
|
124 |
}
|
125 |
|
126 |
function fifu_uninstall() {
|
|
|
|
|
127 |
wp_enqueue_script('jquery-block-ui', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js');
|
128 |
wp_enqueue_style('fancy-box-css', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.css');
|
129 |
wp_enqueue_script('fancy-box-js', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js');
|
@@ -132,6 +134,21 @@ function fifu_uninstall() {
|
|
132 |
wp_localize_script('fifu-uninstall-js', 'fifuUninstallVars', [
|
133 |
'restUrl' => esc_url_raw(rest_url()),
|
134 |
'nonce' => wp_create_nonce('wp_rest'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
]);
|
136 |
}
|
137 |
|
4 |
* Plugin Name: Featured Image from URL (FIFU)
|
5 |
* Plugin URI: https://fifu.app/
|
6 |
* Description: Use an external image/video/audio as featured image/video/audio of a post or WooCommerce product.
|
7 |
+
* Version: 4.1.7
|
8 |
* Author: fifu.app
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 4.0
|
124 |
}
|
125 |
|
126 |
function fifu_uninstall() {
|
127 |
+
$strings = fifu_get_strings_uninstall();
|
128 |
+
|
129 |
wp_enqueue_script('jquery-block-ui', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js');
|
130 |
wp_enqueue_style('fancy-box-css', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.css');
|
131 |
wp_enqueue_script('fancy-box-js', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js');
|
134 |
wp_localize_script('fifu-uninstall-js', 'fifuUninstallVars', [
|
135 |
'restUrl' => esc_url_raw(rest_url()),
|
136 |
'nonce' => wp_create_nonce('wp_rest'),
|
137 |
+
'buttonTextClean' => $strings['button']['text']['clean'](),
|
138 |
+
'buttonTextDeactivate' => $strings['button']['text']['deactivate'](),
|
139 |
+
'buttonDescriptionClean' => $strings['button']['description']['clean'](),
|
140 |
+
'buttonDescriptionDeactivate' => $strings['button']['description']['deactivate'](),
|
141 |
+
'textWhy' => $strings['text']['why'](),
|
142 |
+
'textDescription' => $strings['text']['description'](),
|
143 |
+
'textOptional' => $strings['text']['optional'](),
|
144 |
+
'textEmail' => $strings['text']['email'](),
|
145 |
+
'textSupport' => $strings['text']['support'](),
|
146 |
+
'textReasonConflict' => $strings['text']['reason']['conflict'](),
|
147 |
+
'textReasonPro' => $strings['text']['reason']['pro'](),
|
148 |
+
'textReasonSeo' => $strings['text']['reason']['seo'](),
|
149 |
+
'textReasonLocal' => $strings['text']['reason']['local'](),
|
150 |
+
'textReasonUndestand' => $strings['text']['reason']['undestand'](),
|
151 |
+
'textReasonOthers' => $strings['text']['reason']['others'](),
|
152 |
]);
|
153 |
}
|
154 |
|
includes/attachment.php
CHANGED
@@ -207,6 +207,10 @@ function fifu_callback($buffer) {
|
|
207 |
if (empty($buffer))
|
208 |
return;
|
209 |
|
|
|
|
|
|
|
|
|
210 |
/* fifu_save_query(); */
|
211 |
|
212 |
/* img */
|
207 |
if (empty($buffer))
|
208 |
return;
|
209 |
|
210 |
+
/* plugin: Oxygen */
|
211 |
+
if (isset($_REQUEST['ct_builder']))
|
212 |
+
return $buffer;
|
213 |
+
|
214 |
/* fifu_save_query(); */
|
215 |
|
216 |
/* img */
|
includes/html/js/uninstall.js
CHANGED
@@ -1,31 +1,32 @@
|
|
1 |
jQuery(document).ready(function ($) {
|
2 |
jQuery('a#deactivate-featured-image-from-url').click(function (e) {
|
3 |
e.preventDefault();
|
4 |
-
|
5 |
-
<h2
|
6 |
-
<b
|
7 |
<br>
|
8 |
-
<textarea id="fifu-description" style="width:100%;height:135px;padding:10px;font-size:13px" placeholder="
|
9 |
<br><br>
|
10 |
-
<b
|
11 |
<br>
|
12 |
-
<input id="fifu-email" style="width:100%;padding:10px;font-size:13px" placeholder="example@mail.com"></input
|
|
|
|
|
13 |
<center>
|
14 |
-
|
15 |
</center>
|
16 |
<br>
|
17 |
<table>
|
18 |
<tr>
|
19 |
-
<td><button class="uninstall" style="background-color:#f44336" id="pre-deactivate"
|
20 |
-
<td><button class="uninstall" style="width:100%;background-color:#008CBA" id="deactivate"
|
21 |
</tr>
|
22 |
<tr>
|
23 |
-
<td style="color:black;text-align:center"
|
24 |
-
<td style="color:black;text-align:center"
|
25 |
</tr>
|
26 |
</table>
|
27 |
-
|
28 |
-
jQuery.fancybox.open(box);
|
29 |
});
|
30 |
|
31 |
jQuery(document).on("click", "button#deactivate", function () {
|
@@ -34,7 +35,7 @@ jQuery(document).ready(function ($) {
|
|
34 |
let temporary = true;
|
35 |
|
36 |
if (description || email) {
|
37 |
-
jQuery('.fancybox-slide').block({message: '
|
38 |
setTimeout(function () {
|
39 |
send_feedback(description, email, temporary);
|
40 |
}, 250);
|
@@ -49,7 +50,7 @@ jQuery(document).ready(function ($) {
|
|
49 |
let email = jQuery('input#fifu-email').val();
|
50 |
let temporary = false;
|
51 |
|
52 |
-
jQuery('.fancybox-slide').block({message: '
|
53 |
setTimeout(function () {
|
54 |
jQuery.ajax({
|
55 |
method: "POST",
|
@@ -78,6 +79,35 @@ jQuery(document).ready(function ($) {
|
|
78 |
});
|
79 |
}, 250);
|
80 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
});
|
82 |
|
83 |
function send_feedback(description, email, temporary) {
|
1 |
jQuery(document).ready(function ($) {
|
2 |
jQuery('a#deactivate-featured-image-from-url').click(function (e) {
|
3 |
e.preventDefault();
|
4 |
+
jQuery.fancybox.open(`
|
5 |
+
<h2>${fifuUninstallVars.textWhy}</h2>
|
6 |
+
<b>${fifuUninstallVars.textDescription} (${fifuUninstallVars.textOptional})</b>
|
7 |
<br>
|
8 |
+
<textarea id="fifu-description" style="width:100%;height:135px;padding:10px;font-size:13px" placeholder="${fifuUninstallVars.textReasonConflict}
${fifuUninstallVars.textReasonPro}
${fifuUninstallVars.textReasonSeo}...
${fifuUninstallVars.textReasonLocal}
${fifuUninstallVars.textReasonUndestand}
${fifuUninstallVars.textReasonOthers}"></textarea>
|
9 |
<br><br>
|
10 |
+
<b>${fifuUninstallVars.textEmail} (${fifuUninstallVars.textOptional})</b>
|
11 |
<br>
|
12 |
+
<input id="fifu-email" style="width:100%;padding:10px;font-size:13px" placeholder="example@mail.com"></input>`
|
13 |
+
+
|
14 |
+
`
|
15 |
<center>
|
16 |
+
${fifuUninstallVars.textSupport}
|
17 |
</center>
|
18 |
<br>
|
19 |
<table>
|
20 |
<tr>
|
21 |
+
<td><button class="uninstall" style="background-color:#f44336" id="pre-deactivate">${fifuUninstallVars.buttonTextClean}</button></td>
|
22 |
+
<td><button class="uninstall" style="width:100%;background-color:#008CBA" id="deactivate">${fifuUninstallVars.buttonTextDeactivate}</button></td>
|
23 |
</tr>
|
24 |
<tr>
|
25 |
+
<td style="color:black;text-align:center">${fifuUninstallVars.buttonDescriptionClean}</td>
|
26 |
+
<td style="color:black;text-align:center">${fifuUninstallVars.buttonDescriptionDeactivate}</td>
|
27 |
</tr>
|
28 |
</table>
|
29 |
+
`);
|
|
|
30 |
});
|
31 |
|
32 |
jQuery(document).on("click", "button#deactivate", function () {
|
35 |
let temporary = true;
|
36 |
|
37 |
if (description || email) {
|
38 |
+
jQuery('.fancybox-slide').block({message: '', css: {backgroundColor: 'none', border: 'none', color: 'white'}});
|
39 |
setTimeout(function () {
|
40 |
send_feedback(description, email, temporary);
|
41 |
}, 250);
|
50 |
let email = jQuery('input#fifu-email').val();
|
51 |
let temporary = false;
|
52 |
|
53 |
+
jQuery('.fancybox-slide').block({message: '', css: {backgroundColor: 'none', border: 'none', color: 'white'}});
|
54 |
setTimeout(function () {
|
55 |
jQuery.ajax({
|
56 |
method: "POST",
|
79 |
});
|
80 |
}, 250);
|
81 |
});
|
82 |
+
|
83 |
+
// activating fifu pro
|
84 |
+
jQuery('a#activate-fifu-premium').click(function (e) {
|
85 |
+
e.preventDefault();
|
86 |
+
|
87 |
+
jQuery('div#wpwrap').block({message: '', css: {backgroundColor: 'none', border: 'none', color: 'white'}});
|
88 |
+
setTimeout(function () {
|
89 |
+
jQuery.ajax({
|
90 |
+
method: "POST",
|
91 |
+
url: fifuUninstallVars.restUrl + 'featured-image-from-url/v2/deactivate_itself/',
|
92 |
+
data: {},
|
93 |
+
async: false,
|
94 |
+
beforeSend: function (xhr) {
|
95 |
+
xhr.setRequestHeader('X-WP-Nonce', fifuUninstallVars.nonce);
|
96 |
+
},
|
97 |
+
success: function (data) {
|
98 |
+
href = jQuery('a#activate-fifu-premium').attr('href');
|
99 |
+
window.location.href = href;
|
100 |
+
},
|
101 |
+
error: function (jqXHR, textStatus, errorThrown) {
|
102 |
+
console.log(jqXHR);
|
103 |
+
console.log(textStatus);
|
104 |
+
console.log(errorThrown);
|
105 |
+
},
|
106 |
+
complete: function () {
|
107 |
+
}
|
108 |
+
});
|
109 |
+
}, 250);
|
110 |
+
});
|
111 |
});
|
112 |
|
113 |
function send_feedback(description, email, temporary) {
|
includes/jetpack.php
CHANGED
@@ -31,7 +31,7 @@ function fifu_jetpack_blocked($url) {
|
|
31 |
if (fifu_is_photon_url($url))
|
32 |
return true;
|
33 |
|
34 |
-
$blocklist = array('localhost', 'amazon-adsystem.com', 'sapo.io', 'i.guim.co.uk', 's.yimg.com', 's1.yimg.com', 'www.washingtonpost.com', 'pbs.twimg.com', 'www.aljazeera.com', 'image.influenster.com', 'api.screenshotmachine.com', 'rackcdn.com', 'googleusercontent.com', 'drive.google.com', 'img.brownsfashion.com', 'accounts.parrotproducts.biz', 'www.dropbox.com', 'fbcdn.net', 'cdn.fifu.app', 'cloud.fifu.app', 'images.placeholders.dev');
|
35 |
foreach ($blocklist as $domain) {
|
36 |
if (strpos($url, $domain) !== false)
|
37 |
return true;
|
31 |
if (fifu_is_photon_url($url))
|
32 |
return true;
|
33 |
|
34 |
+
$blocklist = array('localhost', 'amazon-adsystem.com', 'sapo.io', 'i.guim.co.uk', 's.yimg.com', 's1.yimg.com', 'www.washingtonpost.com', 'pbs.twimg.com', 'www.aljazeera.com', 'image.influenster.com', 'api.screenshotmachine.com', 'rackcdn.com', 'googleusercontent.com', 'drive.google.com', 'img.brownsfashion.com', 'accounts.parrotproducts.biz', 'www.dropbox.com', 'fbcdn.net', 'teespring.com', 'cdn.fifu.app', 'cloud.fifu.app', 'images.placeholders.dev');
|
35 |
foreach ($blocklist as $domain) {
|
36 |
if (strpos($url, $domain) !== false)
|
37 |
return true;
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: marceljm
|
|
3 |
Donate link: https://donorbox.org/fifu
|
4 |
Tags: featured, image, url, video, woocommerce
|
5 |
Requires at least: 5.3
|
6 |
-
Tested up to: 6.
|
7 |
-
Stable tag: 4.1.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -260,20 +260,20 @@ Featured Image, Figurë e Zgjedhur, Image mise en avant, Uitgelichte afbeelding,
|
|
260 |
|
261 |
== Changelog ==
|
262 |
|
|
|
|
|
|
|
263 |
= 4.1.6 =
|
264 |
* New: feedback form on plugin deactivation; enhancement: Clean Metadata (option added to the new deactivation lightbox); enhancement: WP All Import (more documentation added); fix: Auto set featured media from post content (unduly overwriting local featured images); fix: Social Tags (it was not getting the largest image size for local images); deprecated: Quick Edit Column > height.
|
265 |
|
266 |
= 4.1.5 =
|
267 |
* New: FIFU Shortcodes > Edition forms; enhancement: Auto set featured image using post title and search engine (can limit the search to a list of sites); deprecated: Image Validation; fix: Lazy Load (JS error).
|
268 |
|
269 |
-
= 4.1.4 =
|
270 |
-
* Enhancement: Status > Copy to Clipboard; fix: conflict with Web Stories plugin; deprecated: Product Gallery > Number of Fields.
|
271 |
-
|
272 |
= others =
|
273 |
* [more](https://fifu.app/changelog)
|
274 |
|
275 |
|
276 |
== Upgrade Notice ==
|
277 |
|
278 |
-
= 4.1.
|
279 |
-
*
|
3 |
Donate link: https://donorbox.org/fifu
|
4 |
Tags: featured, image, url, video, woocommerce
|
5 |
Requires at least: 5.3
|
6 |
+
Tested up to: 6.1
|
7 |
+
Stable tag: 4.1.7
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
260 |
|
261 |
== Changelog ==
|
262 |
|
263 |
+
= 4.1.7 =
|
264 |
+
* Enhancement: deactivate itself when the PRO version is activated; fix: Lazy Load (conflict with Oxygen plugin); deprecated: Metadata > Database.
|
265 |
+
|
266 |
= 4.1.6 =
|
267 |
* New: feedback form on plugin deactivation; enhancement: Clean Metadata (option added to the new deactivation lightbox); enhancement: WP All Import (more documentation added); fix: Auto set featured media from post content (unduly overwriting local featured images); fix: Social Tags (it was not getting the largest image size for local images); deprecated: Quick Edit Column > height.
|
268 |
|
269 |
= 4.1.5 =
|
270 |
* New: FIFU Shortcodes > Edition forms; enhancement: Auto set featured image using post title and search engine (can limit the search to a list of sites); deprecated: Image Validation; fix: Lazy Load (JS error).
|
271 |
|
|
|
|
|
|
|
272 |
= others =
|
273 |
* [more](https://fifu.app/changelog)
|
274 |
|
275 |
|
276 |
== Upgrade Notice ==
|
277 |
|
278 |
+
= 4.1.7 =
|
279 |
+
* Enhancement: deactivate itself when the PRO version is activated; fix: Lazy Load (conflict with Oxygen plugin); deprecated: Metadata > Database.
|