Featured Image From URL - Version 3.9.2

Version Description

  • News: FIFU Cloud (Smart Crop, Hotlink Protection and Pricing).
Download this release

Release Info

Developer marceljm
Plugin Icon 128x128 Featured Image From URL
Version 3.9.2
Comparing to
See all releases

Code changes from version 3.9.1 to 3.9.2

admin/api.php CHANGED
@@ -84,89 +84,6 @@ function fifu_api_query($dataset) {
84
  }
85
  }
86
 
87
- function fifu_api_suggest_value(WP_REST_Request $request) {
88
- $site = fifu_get_home_url();
89
- $value = $request['value'];
90
- $images = $request['images'];
91
- $array = array(
92
- 'headers' => array('Content-Type' => 'application/json; charset=utf-8'),
93
- 'body' => json_encode(
94
- array(
95
- 'site' => $site,
96
- 'value' => $value,
97
- 'images' => $images
98
- )
99
- ),
100
- 'method' => 'POST',
101
- 'data_format' => 'body',
102
- 'blocking' => true,
103
- 'timeout' => 30,
104
- );
105
- $response = fifu_remote_post(FIFU_SURVEY_ADDRESS . '/pricing/', $array);
106
- if (is_wp_error($response))
107
- return array('code' => 0);
108
-
109
- // offline
110
- if ($response['http_response']->get_response_object()->status_code == 404)
111
- return array('code' => 0, 'message' => 'web service is down', 'color' => '#dd4c40');
112
-
113
- return json_decode($response['http_response']->get_response_object()->body);
114
- }
115
-
116
- function fifu_api_waiting_list(WP_REST_Request $request) {
117
- $site = fifu_get_home_url();
118
- $email = $request['email'];
119
- $images = $request['images'];
120
- $array = array(
121
- 'headers' => array('Content-Type' => 'application/json; charset=utf-8'),
122
- 'body' => json_encode(
123
- array(
124
- 'site' => $site,
125
- 'email' => $email,
126
- 'images' => $images
127
- )
128
- ),
129
- 'method' => 'POST',
130
- 'data_format' => 'body',
131
- 'blocking' => true,
132
- 'timeout' => 30,
133
- );
134
- $response = fifu_remote_post(FIFU_SURVEY_ADDRESS . '/waiting-list/', $array);
135
- if (is_wp_error($response))
136
- return array('code' => 0);
137
-
138
- // offline
139
- if ($response['http_response']->get_response_object()->status_code == 404)
140
- return array('code' => 0, 'message' => 'web service is down', 'color' => '#dd4c40');
141
-
142
- return json_decode($response['http_response']->get_response_object()->body);
143
- }
144
-
145
- function fifu_api_beta_tester(WP_REST_Request $request) {
146
- $email = $request['email'];
147
- $array = array(
148
- 'headers' => array('Content-Type' => 'application/json; charset=utf-8'),
149
- 'body' => json_encode(
150
- array(
151
- 'email' => $email
152
- )
153
- ),
154
- 'method' => 'POST',
155
- 'data_format' => 'body',
156
- 'blocking' => true,
157
- 'timeout' => 30,
158
- );
159
- $response = fifu_remote_post(FIFU_SU_ADDRESS . '/beta-tester/', $array);
160
- if (is_wp_error($response))
161
- return array('code' => 0);
162
-
163
- // offline
164
- if ($response['http_response']->get_response_object()->status_code == 404)
165
- return array('code' => 0, 'message' => 'web service is down', 'color' => '#dd4c40');
166
-
167
- return json_decode($response['http_response']->get_response_object()->body);
168
- }
169
-
170
  function fifu_enable_fake_api(WP_REST_Request $request) {
171
  update_option('fifu_fake_stop', false, 'no');
172
  fifu_enable_fake();
@@ -383,21 +300,6 @@ add_action('rest_api_init', function () {
383
  'callback' => 'fifu_rest_url',
384
  'permission_callback' => 'fifu_public_permission',
385
  ));
386
- register_rest_route('featured-image-from-url/v2', '/suggest_value/', array(
387
- 'methods' => 'POST',
388
- 'callback' => 'fifu_api_suggest_value',
389
- 'permission_callback' => 'fifu_get_private_data_permissions_check',
390
- ));
391
- register_rest_route('featured-image-from-url/v2', '/waiting_list/', array(
392
- 'methods' => 'POST',
393
- 'callback' => 'fifu_api_waiting_list',
394
- 'permission_callback' => 'fifu_get_private_data_permissions_check',
395
- ));
396
- register_rest_route('featured-image-from-url/v2', '/beta_tester/', array(
397
- 'methods' => 'POST',
398
- 'callback' => 'fifu_api_beta_tester',
399
- 'permission_callback' => 'fifu_get_private_data_permissions_check',
400
- ));
401
  });
402
 
403
  function fifu_get_private_data_permissions_check() {
84
  }
85
  }
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  function fifu_enable_fake_api(WP_REST_Request $request) {
88
  update_option('fifu_fake_stop', false, 'no');
89
  fifu_enable_fake();
300
  'callback' => 'fifu_rest_url',
301
  'permission_callback' => 'fifu_public_permission',
302
  ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  });
304
 
305
  function fifu_get_private_data_permissions_check() {
admin/html/cloud.html CHANGED
@@ -13,7 +13,7 @@
13
  </ul>
14
  <div id="tabs-a" class="cloud-tab">
15
  <div class="first-cloud-box">
16
- <h2><i class="fas fa-cloud"></i> FIFU Cloud (beta)</h2>
17
  <div class="greybox">
18
  <?php $fifucloud['support']['whats']() ?>
19
  <br>
@@ -73,44 +73,203 @@
73
  </td>
74
  </tr>
75
  </table>
76
- </div>
77
- </div>
78
 
79
- <div class="box">
80
- <h2>
81
- <i class="fas fa-money-bill-alt"></i> <?php $fifucloud['title']['price']() ?>
82
- <output id="pricing_response_message" class="response_message"></output>
83
- </h2>
84
- <div class="greybox">
85
- <b><div id="availableImages"><?php $fifucloud['pricing']['suggestion']['total']() ?>: </div></b>
86
- <?php $fifucloud['pricing']['suggestion']['question']() ?> US$
87
- <input id="cloud_suggestion_pricing" type="number" min="1" step="1" placeholder="15">/<?php _e('month') ?>
88
- <button style="height:28px;float:right;" onclick="suggestValue()"><i class="fas fa-comment"></i> <?php $fifucloud['pricing']['suggestion']['button']() ?></button>
89
- </div>
90
- </div>
91
 
92
- <div class="box">
93
- <h2>
94
- <i class="far fa-list-alt"></i> <?php $fifucloud['title']['waiting']() ?>
95
- <output id="waiting_response_message" class="response_message"></output>
96
- </h2>
97
- <div class="greybox">
98
- <?php $fifucloud['waiting']['desc']() ?>
99
- <input id="cloud_waiting_list" type="email" placeholder="mail@example.com">
100
- <button style="height:28px;float:right" onclick="waitingList()"><i class="fas fa-bell"></i> <?php $fifucloud['waiting']['button']() ?></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  </div>
102
  </div>
103
 
104
  <div class="box">
105
  <h2>
106
- <i class="fas fa-bug"></i> <?php $fifucloud['title']['tester']() ?>
107
- <output id="tester_response_message" class="response_message"></output>
108
  </h2>
109
  <div class="greybox">
110
- <?php $fifucloud['tester']['desc']() ?>
111
- <input id="cloud_beta_tester" type="email" placeholder="mail@example.com">
112
- <button style="height:28px;float:right" onclick="betaTester()"><i class="fas fa-user-check"></i> <?php $fifucloud['tester']['button']() ?></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  </div>
 
 
114
  </div>
115
  </div>
116
  </div>
13
  </ul>
14
  <div id="tabs-a" class="cloud-tab">
15
  <div class="first-cloud-box">
16
+ <h2><i class="fas fa-cloud"></i> FIFU Cloud</h2>
17
  <div class="greybox">
18
  <?php $fifucloud['support']['whats']() ?>
19
  <br>
73
  </td>
74
  </tr>
75
  </table>
 
 
76
 
77
+ <br>
 
 
 
 
 
 
 
 
 
 
 
78
 
79
+ <table style="background-color: #fff; border-radius: 13px;">
80
+ <tr>
81
+ <td style="width:50%;text-align:center;border-bottom: 1px solid #ddd !important">
82
+ <i class="fa-solid fa-users-viewfinder" style="font-size:30px"></i>
83
+ </td>
84
+ <td style="width:50%;text-align:center;border-bottom: 1px solid #ddd !important">
85
+ <i class="fa-solid fa-shield-halved" style="font-size:30px"></i>
86
+ </td>
87
+ </tr>
88
+ <tr>
89
+ <td style="width:50%;text-align:center;border-bottom: 1px solid #ddd !important">
90
+ <i><?php $fifucloud['support']['smart']() ?></i>
91
+ </td>
92
+ <td style="width:50%;text-align:center;border-bottom: 1px solid #ddd !important">
93
+ <i><?php $fifucloud['support']['hotlink']() ?></i>
94
+ </td>
95
+ </tr>
96
+ <tr>
97
+ <td style="vertical-align: top;">
98
+ <?php $fifucloud['support']['smart-desc']() ?>
99
+ </td>
100
+ <td style="vertical-align: top;">
101
+ <?php $fifucloud['support']['hotlink-desc']() ?>
102
+ </td>
103
+ </tr>
104
+ </table>
105
  </div>
106
  </div>
107
 
108
  <div class="box">
109
  <h2>
110
+ <i class="fas fa-money-bill-alt"></i> <?php $fifucloud['title']['price']() ?> ¹
 
111
  </h2>
112
  <div class="greybox">
113
+ <?php $fifucloud['pricing']['desc']() ?>
114
+ <br>
115
+ <br>
116
+ <table style="text-align:left; width:100%; background-color:white;">
117
+ <tr class="color">
118
+ <th style="font-weight:bold;">
119
+ <?php $fifucloud['pricing']['table']['quantity']() ?>
120
+ </th>
121
+ <th style="font-weight:bold;">
122
+ <?php $fifucloud['pricing']['table']['price']() ?>
123
+ </th>
124
+ </tr>
125
+ <tr class="color">
126
+ <td>
127
+ 1 to 1,000
128
+ </td>
129
+ <td>
130
+ $0.005
131
+ </td>
132
+ </tr>
133
+ <tr class="color">
134
+ <td>
135
+ 1,001 to 5,000
136
+ </td>
137
+ <td>
138
+ $0.004
139
+ </td>
140
+ </tr>
141
+ <tr class="color">
142
+ <td>
143
+ 5,001 to 10,000
144
+ </td>
145
+ <td>
146
+ $0.003
147
+ </td>
148
+ </tr>
149
+ <tr class="color">
150
+ <td>
151
+ 10,001 to 25,000
152
+ </td>
153
+ <td>
154
+ $0.002
155
+ </td>
156
+ </tr>
157
+ <tr class="color">
158
+ <td>
159
+ 25,001 or more
160
+ </td>
161
+ <td>
162
+ $0.001
163
+ </td>
164
+ </tr>
165
+ </table>
166
+ <br>
167
+ <?php $fifucloud['pricing']['thumbnails']() ?>
168
+ <br>
169
+ <br>
170
+ <hr size="8" width="100%" color="red" style="border:2px solid #1d2327;border-radius:5px;">
171
+ <br>
172
+ <?php $fifucloud['pricing']['example']() ?>:
173
+ <br>
174
+ <br>
175
+ <table style="text-align:left; width:100%; background-color:white;">
176
+ <tr class="color">
177
+ <th style="font-weight:bold;">
178
+ <?php $fifucloud['pricing']['table']['interval']() ?>
179
+ </th>
180
+ <th style="font-weight:bold;">
181
+ <?php $fifucloud['pricing']['table']['days']() ?>
182
+ </th>
183
+ <th style="font-weight:bold;">
184
+ <?php $fifucloud['pricing']['table']['stored']() ?>
185
+ </th>
186
+ </tr>
187
+ <tr class="color">
188
+ <td>
189
+ 01-02
190
+ </td>
191
+ <td>
192
+ 2
193
+ </td>
194
+ <td>
195
+ 352
196
+ </td>
197
+ </tr>
198
+ <tr class="color">
199
+ <td>
200
+ 03-11
201
+ </td>
202
+ <td>
203
+ 9
204
+ </td>
205
+ <td>
206
+ 1263
207
+ </td>
208
+ </tr>
209
+ <tr class="color">
210
+ <td>
211
+ 12-18
212
+ </td>
213
+ <td>
214
+ 7
215
+ </td>
216
+ <td>
217
+ 1104
218
+ </td>
219
+ </tr>
220
+ <tr class="color">
221
+ <td>
222
+ 19-26
223
+ </td>
224
+ <td>
225
+ 8
226
+ </td>
227
+ <td>
228
+ 901
229
+ </td>
230
+ </tr>
231
+ <tr class="color">
232
+ <td>
233
+ 27-30
234
+ </td>
235
+ <td>
236
+ 4
237
+ </td>
238
+ <td>
239
+ 1229
240
+ </td>
241
+ </tr>
242
+ </table>
243
+ <br>
244
+ <table style="text-align:left; width:100%; background-color:white;">
245
+ <tr class="color">
246
+ <th style="font-weight:bold">
247
+ <?php $fifucloud['pricing']['table']['average']() ?>
248
+ </th>
249
+ <th>
250
+ (2 x 352 + 9 x 1263 + 7 x 1104 + 8 x 901 + 4 x 1229) / 30 = 1064
251
+ </th>
252
+ </tr>
253
+ <tr class="color">
254
+ <td style="font-weight:bold">
255
+ <?php $fifucloud['pricing']['table']['price']() ?>
256
+ </td>
257
+ <td>
258
+ $0.004
259
+ </td>
260
+ </tr>
261
+ <tr class="color">
262
+ <td style="font-weight:bold">
263
+ <?php $fifucloud['pricing']['table']['total']() ?>
264
+ </td>
265
+ <td>
266
+ 1064 x $0.004 = $4.25
267
+ </td>
268
+ </tr>
269
+ </table>
270
  </div>
271
+ <br>
272
+ ¹ <?php $fifucloud['pricing']['table']['ps']() ?>
273
  </div>
274
  </div>
275
  </div>
admin/html/js/cloud.js CHANGED
@@ -23,116 +23,4 @@ jQuery(function () {
23
 
24
  window.scrollTo(0, 0);
25
  jQuery('.wrap').css('opacity', 1);
26
- });
27
-
28
- function suggestValue() {
29
- var images = fifuScriptCloudVars.availableImages;
30
- var value = jQuery('#cloud_suggestion_pricing').val();
31
-
32
- if (!images || !value)
33
- return;
34
-
35
- var code = null;
36
-
37
- fifu_block();
38
-
39
- jQuery.ajax({
40
- method: "POST",
41
- url: restUrl + 'featured-image-from-url/v2/suggest_value/',
42
- data: {
43
- "images": images,
44
- "value": value
45
- },
46
- async: true,
47
- beforeSend: function (xhr) {
48
- xhr.setRequestHeader('X-WP-Nonce', fifuScriptVars.nonce);
49
- },
50
- success: function (data) {
51
- code = data['code'];
52
- message(data, 'pricing');
53
- },
54
- error: function (jqXHR, textStatus, errorThrown) {
55
- console.log(jqXHR);
56
- console.log(textStatus);
57
- console.log(errorThrown);
58
- },
59
- complete: function (data) {
60
- fifu_unblock();
61
- }
62
- });
63
- return code;
64
- }
65
-
66
- function waitingList() {
67
- var images = fifuScriptCloudVars.availableImages;
68
- var email = jQuery('#cloud_waiting_list').val();
69
-
70
- if (!images || !email)
71
- return;
72
-
73
- var code = null;
74
-
75
- fifu_block();
76
-
77
- jQuery.ajax({
78
- method: "POST",
79
- url: restUrl + 'featured-image-from-url/v2/waiting_list/',
80
- data: {
81
- "images": images,
82
- "email": email
83
- },
84
- async: true,
85
- beforeSend: function (xhr) {
86
- xhr.setRequestHeader('X-WP-Nonce', fifuScriptVars.nonce);
87
- },
88
- success: function (data) {
89
- code = data['code'];
90
- message(data, 'waiting');
91
- },
92
- error: function (jqXHR, textStatus, errorThrown) {
93
- console.log(jqXHR);
94
- console.log(textStatus);
95
- console.log(errorThrown);
96
- },
97
- complete: function (data) {
98
- fifu_unblock();
99
- }
100
- });
101
- return code;
102
- }
103
-
104
- function betaTester() {
105
- var email = jQuery('#cloud_beta_tester').val();
106
-
107
- if (!email)
108
- return;
109
-
110
- var code = null;
111
-
112
- fifu_block();
113
-
114
- jQuery.ajax({
115
- method: "POST",
116
- url: restUrl + 'featured-image-from-url/v2/beta_tester/',
117
- data: {
118
- "email": email
119
- },
120
- async: true,
121
- beforeSend: function (xhr) {
122
- xhr.setRequestHeader('X-WP-Nonce', fifuScriptVars.nonce);
123
- },
124
- success: function (data) {
125
- code = data['code'];
126
- message(data, 'tester');
127
- },
128
- error: function (jqXHR, textStatus, errorThrown) {
129
- console.log(jqXHR);
130
- console.log(textStatus);
131
- console.log(errorThrown);
132
- },
133
- complete: function (data) {
134
- fifu_unblock();
135
- }
136
- });
137
- return code;
138
- }
23
 
24
  window.scrollTo(0, 0);
25
  jQuery('.wrap').css('opacity', 1);
26
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/menu.php CHANGED
@@ -8,7 +8,7 @@ add_action('admin_menu', 'fifu_insert_menu');
8
 
9
  function fifu_insert_menu() {
10
  if (strpos($_SERVER['REQUEST_URI'], 'featured-image-from-url') !== false || strpos($_SERVER['REQUEST_URI'], 'fifu') !== false) {
11
- wp_enqueue_script('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/js/all.min.js');
12
  wp_enqueue_style('jquery-ui-style1', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css');
13
  wp_enqueue_style('jquery-ui-style2', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.structure.min.css');
14
  wp_enqueue_style('jquery-ui-style3', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.theme.min.css');
8
 
9
  function fifu_insert_menu() {
10
  if (strpos($_SERVER['REQUEST_URI'], 'featured-image-from-url') !== false || strpos($_SERVER['REQUEST_URI'], 'fifu') !== false) {
11
+ wp_enqueue_script('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/js/all.min.js');
12
  wp_enqueue_style('jquery-ui-style1', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css');
13
  wp_enqueue_style('jquery-ui-style2', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.structure.min.css');
14
  wp_enqueue_style('jquery-ui-style3', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.theme.min.css');
admin/strings.php CHANGED
@@ -1876,6 +1876,12 @@ function fifu_get_strings_cloud() {
1876
  $fifu['title']['logout'] = function() {
1877
  return _e("Log out", FIFU_SLUG);
1878
  };
 
 
 
 
 
 
1879
  $fifu['title']['add'] = function() {
1880
  return _e("Upload to Cloud", FIFU_SLUG);
1881
  };
@@ -1888,12 +1894,6 @@ function fifu_get_strings_cloud() {
1888
  $fifu['title']['billing'] = function() {
1889
  return _e("Billing", FIFU_SLUG);
1890
  };
1891
- $fifu['title']['waiting'] = function() {
1892
- return _e("Waiting list", FIFU_SLUG);
1893
- };
1894
- $fifu['title']['tester'] = function() {
1895
- return _e("Beta tester", FIFU_SLUG);
1896
- };
1897
 
1898
  // tabs
1899
  $fifu['tabs']['welcome'] = function() {
@@ -1920,7 +1920,7 @@ function fifu_get_strings_cloud() {
1920
 
1921
  // support
1922
  $fifu['support']['whats'] = function() {
1923
- _e("FIFU Cloud is a cloud service that stores your images in the Google Cloud infrastructure. The images are not only saved, but optimized and quickly served from the global Google Cloud Storage network. Thumbnails are automatically created for each image and all are served in webp format.", FIFU_SLUG);
1924
  };
1925
  $fifu['support']['save'] = function() {
1926
  _e("Never lose an image again");
@@ -1934,6 +1934,12 @@ function fifu_get_strings_cloud() {
1934
  $fifu['support']['price'] = function() {
1935
  _e("Pay per stored image");
1936
  };
 
 
 
 
 
 
1937
  $fifu['support']['save-desc'] = function() {
1938
  _e("Image sources may remove their images or change their image URLs periodically due to an internal restructuring or even in order to prevent their images from being embedded on other websites. When images are deleted or their URLs change, websites that were embedding those images are seriously impacted because the images are lost and cannot be restored. FIFU Cloud solves that by saving your embedded images to the cloud and providing fixed image URLs to access them. Current URLs will be replaced by FIFU Cloud URLs, in a process that can be reverted.");
1939
  };
@@ -1949,6 +1955,12 @@ function fifu_get_strings_cloud() {
1949
  $fifu['support']['price-desc2'] = function() {
1950
  _e("Similar cloud services often charge for the amount of hits to the images. Or they sell static plans where you pay for the amount of storage available, even if unused. But FIFU Cloud will charge only for the daily average of stored images, every 30-day period. You don't pay for thumbnails. Example: on the first day, you stored 1000 images; ten days later, you deleted them all; ten days later, you added 1100, which were stored for ten days. So, on average, you used 700 images per day in a 30-day period and you only pay for that. If there are no changes in the next period, the average will be 1100 and the paid value increases. And if in the following period you remove all the images, there will be no cost.");
1951
  };
 
 
 
 
 
 
1952
 
1953
  // pricing
1954
  $fifu['pricing']['table']['quantity'] = function() {
@@ -1981,14 +1993,8 @@ function fifu_get_strings_cloud() {
1981
  $fifu['pricing']['table']['total'] = function() {
1982
  _e("Total price");
1983
  };
1984
- $fifu['pricing']['suggestion']['total'] = function() {
1985
- _e("Images found on your website");
1986
- };
1987
- $fifu['pricing']['suggestion']['question'] = function() {
1988
- _e("What would be a fair price to FIFU Cloud optimize, store and serve all your images?");
1989
- };
1990
- $fifu['pricing']['suggestion']['button'] = function() {
1991
- _e("suggest");
1992
  };
1993
 
1994
  // upload
@@ -2006,22 +2012,6 @@ function fifu_get_strings_cloud() {
2006
  _e("Before uploading local images to the cloud, the URLs need to be copied to FIFU custom fields, clicking on \"link\" button. It is highly recommended to have a backup of the database, because some post metadata will be replaced, making FIFU responsible for displaying the images. Also, you shouldn't delete images from the media library before making sure they're saved in the cloud, otherwise you will lose the images.");
2007
  };
2008
 
2009
- // waiting list
2010
- $fifu['waiting']['desc'] = function() {
2011
- _e("For now FIFU Cloud has a short waiting list. We will contact you when your turn comes.");
2012
- };
2013
- $fifu['waiting']['button'] = function() {
2014
- _e("notify me");
2015
- };
2016
-
2017
- // tester
2018
- $fifu['tester']['desc'] = function() {
2019
- _e("Start using FIFU Cloud today and without costs to report bugs and suggest improvements.");
2020
- };
2021
- $fifu['tester']['button'] = function() {
2022
- _e("let's go");
2023
- };
2024
-
2025
  // billing
2026
  $fifu['billing']['desc'] = function() {
2027
  _e("FIFU Cloud will charge you for the daily average of stored images, every 30-day period. The following data is updated hourly.");
@@ -2061,4 +2051,3 @@ function fifu_get_strings_cloud() {
2061
 
2062
  return $fifu;
2063
  }
2064
-
1876
  $fifu['title']['logout'] = function() {
1877
  return _e("Log out", FIFU_SLUG);
1878
  };
1879
+ $fifu['title']['cancel'] = function() {
1880
+ return _e("Account", FIFU_SLUG);
1881
+ };
1882
+ $fifu['title']['payment'] = function() {
1883
+ return _e("Payment method and billing information", FIFU_SLUG);
1884
+ };
1885
  $fifu['title']['add'] = function() {
1886
  return _e("Upload to Cloud", FIFU_SLUG);
1887
  };
1894
  $fifu['title']['billing'] = function() {
1895
  return _e("Billing", FIFU_SLUG);
1896
  };
 
 
 
 
 
 
1897
 
1898
  // tabs
1899
  $fifu['tabs']['welcome'] = function() {
1920
 
1921
  // support
1922
  $fifu['support']['whats'] = function() {
1923
+ _e("FIFU Cloud is a cloud service that stores your images in the Google Cloud infrastructure. The images are not only saved, but optimized and quickly served from the global Google's Edge Network. Thumbnails are automatically created for each image and all are served in webp format.", FIFU_SLUG);
1924
  };
1925
  $fifu['support']['save'] = function() {
1926
  _e("Never lose an image again");
1934
  $fifu['support']['price'] = function() {
1935
  _e("Pay per stored image");
1936
  };
1937
+ $fifu['support']['smart'] = function() {
1938
+ _e("Smart crop");
1939
+ };
1940
+ $fifu['support']['hotlink'] = function() {
1941
+ _e("Hotlink protection");
1942
+ };
1943
  $fifu['support']['save-desc'] = function() {
1944
  _e("Image sources may remove their images or change their image URLs periodically due to an internal restructuring or even in order to prevent their images from being embedded on other websites. When images are deleted or their URLs change, websites that were embedding those images are seriously impacted because the images are lost and cannot be restored. FIFU Cloud solves that by saving your embedded images to the cloud and providing fixed image URLs to access them. Current URLs will be replaced by FIFU Cloud URLs, in a process that can be reverted.");
1945
  };
1955
  $fifu['support']['price-desc2'] = function() {
1956
  _e("Similar cloud services often charge for the amount of hits to the images. Or they sell static plans where you pay for the amount of storage available, even if unused. But FIFU Cloud will charge only for the daily average of stored images, every 30-day period. You don't pay for thumbnails. Example: on the first day, you stored 1000 images; ten days later, you deleted them all; ten days later, you added 1100, which were stored for ten days. So, on average, you used 700 images per day in a 30-day period and you only pay for that. If there are no changes in the next period, the average will be 1100 and the paid value increases. And if in the following period you remove all the images, there will be no cost.");
1957
  };
1958
+ $fifu['support']['smart-desc'] = function() {
1959
+ _e("WordPress themes and social media platforms work with predefined sizes of images and, when they receive an image with non-standard dimensions, they crop the central area of the image, which is not very smart, as often the main object is not located in the center. Facebook, Twitter and LinkedIn, for example, display the featured image at ~1200×630 pixels (landscape orientation), and when you try to share a full body photo (portrait), the cropped person will likely lose its head and feet. But FIFU Cloud detects faces and objects so its cropped images can show what really matters, without compromising style or information.");
1960
+ };
1961
+ $fifu['support']['hotlink-desc'] = function() {
1962
+ _e("You cannot prevent bots from accessing and extracting content from your website, including text and image URLs. And unfortunately, after being stored, the data set can be used to replicate your entire website elsewhere, which will receive visitors that should be yours by right. However, FIFU Cloud offers hotlink protection, which means that other websites, with the exception of social media, will not be able to display your images. And while this doesn't completely solve the problem, it will certainly inhibit web scraping on your website, because posts with broken images become much less attractive.");
1963
+ };
1964
 
1965
  // pricing
1966
  $fifu['pricing']['table']['quantity'] = function() {
1993
  $fifu['pricing']['table']['total'] = function() {
1994
  _e("Total price");
1995
  };
1996
+ $fifu['pricing']['table']['ps'] = function() {
1997
+ _e("FIFU Cloud cannot be a free service as it uses several paid cloud services, such as storage, processing, caching, delivery, etc. However, its architecture was designed to optimize the use of these resources and, consequently, offer the lowest price (which is possibly not the current price). Our service is being launched now, in May 2022, and only after a few months of operation will we have a real understanding of operating costs, being able to offer fairer prices, especially for those who have more images. With enough monetization, it is possible that pro features of this plugin can become free. Who knows?=)");
 
 
 
 
 
 
1998
  };
1999
 
2000
  // upload
2012
  _e("Before uploading local images to the cloud, the URLs need to be copied to FIFU custom fields, clicking on \"link\" button. It is highly recommended to have a backup of the database, because some post metadata will be replaced, making FIFU responsible for displaying the images. Also, you shouldn't delete images from the media library before making sure they're saved in the cloud, otherwise you will lose the images.");
2013
  };
2014
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2015
  // billing
2016
  $fifu['billing']['desc'] = function() {
2017
  _e("FIFU Cloud will charge you for the daily average of stored images, every 30-day period. The following data is updated hourly.");
2051
 
2052
  return $fifu;
2053
  }
 
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/video as featured image/video of a post or WooCommerce product.
7
- * Version: 3.9.1
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
11
- * WC tested up to: 6.3.1
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/video as featured image/video of a post or WooCommerce product.
7
+ * Version: 3.9.2
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
11
+ * WC tested up to: 6.4.1
12
  * Text Domain: featured-image-from-url
13
  * License: GPLv3
14
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
includes/external-post.php CHANGED
@@ -34,12 +34,12 @@ function fifu_save_properties_ext($post_id) {
34
 
35
  if ($url && fifu_is_on('fifu_get_first')) {
36
  update_post_meta($post_id, 'fifu_image_url', fifu_convert($url));
37
- fifu_update_fake_attach_id($post_id);
38
  return;
39
  }
40
 
41
  if (!$url && get_option('fifu_default_url') && fifu_is_on('fifu_enable_default_url'))
42
- fifu_update_fake_attach_id($post_id);
43
  }
44
 
45
  function fifu_first_img_in_content($content) {
34
 
35
  if ($url && fifu_is_on('fifu_get_first')) {
36
  update_post_meta($post_id, 'fifu_image_url', fifu_convert($url));
37
+ fifu_db_update_fake_attach_id($post_id);
38
  return;
39
  }
40
 
41
  if (!$url && get_option('fifu_default_url') && fifu_is_on('fifu_enable_default_url'))
42
+ fifu_db_update_fake_attach_id($post_id);
43
  }
44
 
45
  function fifu_first_img_in_content($content) {
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: 5.9.2
7
- Stable tag: 3.9.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -227,20 +227,20 @@ Featured Image, Figurë e Zgjedhur, Image mise en avant, Uitgelichte afbeelding,
227
 
228
  == Changelog ==
229
 
 
 
 
230
  = 3.9.1 =
231
  * New option: Auto set featured media from post content > skip URLs with.
232
 
233
  = 3.9.0 =
234
  * Enhancement: Autoplay, Loop and Mute (integration with local featured videos); fix: Undefined variable warning.
235
 
236
- = 3.8.9 =
237
- * New option: Auto set screenshot as featured image > High resolution.
238
-
239
  = others =
240
  * [more](https://fifu.app/changelog)
241
 
242
 
243
  == Upgrade Notice ==
244
 
245
- = 3.9.1 =
246
- * New option: Auto set featured media from post content > skip URLs with.
3
  Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
+ Tested up to: 5.9.3
7
+ Stable tag: 3.9.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
227
 
228
  == Changelog ==
229
 
230
+ = 3.9.2 =
231
+ * News: FIFU Cloud (Smart Crop, Hotlink Protection and Pricing).
232
+
233
  = 3.9.1 =
234
  * New option: Auto set featured media from post content > skip URLs with.
235
 
236
  = 3.9.0 =
237
  * Enhancement: Autoplay, Loop and Mute (integration with local featured videos); fix: Undefined variable warning.
238
 
 
 
 
239
  = others =
240
  * [more](https://fifu.app/changelog)
241
 
242
 
243
  == Upgrade Notice ==
244
 
245
+ = 3.9.2 =
246
+ * News: FIFU Cloud (Smart Crop, Hotlink Protection and Pricing).