Featured Image From URL - Version 3.6.3

Version Description

  • New feature: Quick Edit (for featured images and videos); new feature: FIFU Shortcodes; new widget: Product gallery; new integration functions: fifu_dev_set_video(), fifu_dev_set_category_image() and fifu_dev_set_category_video(); new option: Auto set featured image using post title and search engine > Post types.
Download this release

Release Info

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

Code changes from version 3.6.2 to 3.6.3

admin/column.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
 
3
  add_action('admin_init', 'fifu_column');
 
4
 
5
  function fifu_column() {
6
  add_filter('manage_posts_columns', 'fifu_column_head');
@@ -12,36 +13,62 @@ function fifu_column() {
12
  add_action('manage_product_cat_custom_column', 'fifu_ctgr_column_content', 10, 3);
13
  }
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  function fifu_column_head($default) {
16
- $default['featured_image'] = '<span class="dashicons dashicons-camera" style="font-size:20px" title="Featured Image from URL"></span> FIFU';
17
  return $default;
18
  }
19
 
20
  function fifu_ctgr_column_content($internal_image, $column, $term_id) {
21
- $border = '';
22
- $height = get_option('fifu_column_height');
23
  if ($column == 'featured_image') {
 
 
 
 
 
 
24
  $url = get_term_meta($term_id, 'fifu_image_url', true);
25
  if ($url == '') {
26
  $thumb_id = get_term_meta($term_id, 'thumbnail_id', true);
27
  $url = wp_get_attachment_url($thumb_id);
28
- $border = 'border-color: #ca4a1f !important; border: 1px; border-style: solid;';
29
  }
30
- echo sprintf('<div style="height:%spx; width:%spx; background:url(\'%s\') no-repeat center center; background-size:cover; %s"/>', $height, $height * 1.5, $url, $border);
31
  } else
32
  echo $internal_image;
33
  }
34
 
35
  function fifu_column_content($column, $post_id) {
36
- $border = '';
37
- $height = get_option('fifu_column_height');
38
  if ($column == 'featured_image') {
 
 
 
 
 
39
  $url = fifu_main_image_url($post_id);
40
  if ($url == '') {
41
  $url = wp_get_attachment_url(get_post_thumbnail_id());
42
- $border = 'border-color: #ca4a1f !important; border: 1px; border-style: solid;';
43
  }
44
- echo sprintf('<div style="height:%spx; width:%spx; background:url(\'%s\') no-repeat center center; background-size:cover; %s"/>', $height, $height * 1.5, $url, $border);
45
  }
46
  }
47
 
1
  <?php
2
 
3
  add_action('admin_init', 'fifu_column');
4
+ add_filter('admin_head', 'fifu_admin_add_css_js');
5
 
6
  function fifu_column() {
7
  add_filter('manage_posts_columns', 'fifu_column_head');
13
  add_action('manage_product_cat_custom_column', 'fifu_ctgr_column_content', 10, 3);
14
  }
15
 
16
+ function fifu_admin_add_css_js() {
17
+ wp_enqueue_style('fifu-pro-css', plugins_url('/html/css/pro.css', __FILE__), array(), fifu_version_number());
18
+ wp_enqueue_style('fancy-box-css', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.css');
19
+ wp_enqueue_script('fancy-box-js', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js');
20
+ wp_enqueue_style('fifu-column-css', plugins_url('/html/css/column.css', __FILE__), array(), fifu_version_number());
21
+ wp_enqueue_script('fifu-column-js', plugins_url('/html/js/column.js', __FILE__), array('jquery'), fifu_version_number());
22
+
23
+ $fifu = fifu_get_strings_quick_edit();
24
+
25
+ wp_localize_script('fifu-column-js', 'fifuColumnVars', [
26
+ 'labelImage' => $fifu['title']['image'](),
27
+ 'labelVideo' => $fifu['title']['video'](),
28
+ 'tipImage' => $fifu['tip']['image'](),
29
+ 'tipVideo' => $fifu['tip']['video'](),
30
+ 'urlImage' => $fifu['url']['image'](),
31
+ 'urlVideo' => $fifu['url']['video'](),
32
+ ]);
33
+ }
34
+
35
  function fifu_column_head($default) {
36
+ $default['featured_image'] = '<span class="dashicons dashicons-camera" style="font-size:20px" title="Edit fast and saves in less than 1 second"></span> Quick edit';
37
  return $default;
38
  }
39
 
40
  function fifu_ctgr_column_content($internal_image, $column, $term_id) {
 
 
41
  if ($column == 'featured_image') {
42
+ $border = '';
43
+ $height = get_option('fifu_column_height');
44
+ $width = $height * 1.5;
45
+
46
+ $is_ctgr = true;
47
+ $post_id = $term_id;
48
  $url = get_term_meta($term_id, 'fifu_image_url', true);
49
  if ($url == '') {
50
  $thumb_id = get_term_meta($term_id, 'thumbnail_id', true);
51
  $url = wp_get_attachment_url($thumb_id);
52
+ $border = 'border-color: #ca4a1f !important; border: 2px; border-style: dashed;';
53
  }
54
+ include 'html/column.html';
55
  } else
56
  echo $internal_image;
57
  }
58
 
59
  function fifu_column_content($column, $post_id) {
 
 
60
  if ($column == 'featured_image') {
61
+ $border = '';
62
+ $height = get_option('fifu_column_height');
63
+ $width = $height * 1.5;
64
+
65
+ $is_ctgr = false;
66
  $url = fifu_main_image_url($post_id);
67
  if ($url == '') {
68
  $url = wp_get_attachment_url(get_post_thumbnail_id());
69
+ $border = 'border-color: #ca4a1f !important; border: 2px; border-style: dashed;';
70
  }
71
+ include 'html/column.html';
72
  }
73
  }
74
 
admin/html/column.html ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <div
2
+ class="fifu-quick"
3
+ post-id="<?php echo $post_id ?>"
4
+ is-ctgr="<?php echo $is_ctgr ?>"
5
+ style="height: <?php echo $height ?>px; width: <?php echo $width ?>px; background:url('<?php echo $url ?>') no-repeat center center; background-size:cover; <?php echo $border ?>; cursor:pointer;">
6
+ </div>
admin/html/css/column.css ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .fancybox-content {
2
+ border-radius: 10px;
3
+ }
4
+
5
+ .fifu-quick-button {
6
+ background-color: #2271b1; /* Green */
7
+ border: none;
8
+ color: white;
9
+ padding: 8px 16px;
10
+ text-align: center;
11
+ text-decoration: none;
12
+ display: inline-block;
13
+ font-size: 16px;
14
+ width: 48%;
15
+ cursor: pointer;
16
+ }
admin/html/css/menu.css CHANGED
@@ -163,7 +163,7 @@ tr.color:nth-child(even) {
163
  content: '';
164
  position: absolute;
165
  left: 0;
166
- top: 50%;
167
  width: 0;
168
  height: 0;
169
  border: 12px solid transparent;
163
  content: '';
164
  position: absolute;
165
  left: 0;
166
+ top: 30%;
167
  width: 0;
168
  height: 0;
169
  border: 12px solid transparent;
admin/html/js/column.js ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function () {
2
+ fifu_open_quick_lightbox();
3
+ });
4
+
5
+ function fifu_open_quick_lightbox() {
6
+ jQuery("div.fifu-quick").on('click', function (evt) {
7
+ evt.stopImmediatePropagation();
8
+ post_id = jQuery(this).attr('post-id');
9
+ is_ctgr = jQuery(this).attr('is-ctgr');
10
+ background = jQuery(this).css('background-image');
11
+ url = (background ? background.split('"')[1] : null);
12
+ url = (url == 'about:invalid' ? '' : url);
13
+ media = `<img id="fifu-quick-preview" src="${url}" post-id="${post_id}" style="max-height:600px; width:100%;">`;
14
+ box = `
15
+ <table>
16
+ <tr>
17
+ <td id="fifu-left-column" style="min-width:170px; background-color:#f6f7f7">${media}</td>
18
+ <td style="vertical-align:top; padding: 10px; background-color:#f6f7f7">
19
+ <div class="fifu-pro"><div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div></div>
20
+ <div>
21
+ <div style="padding-bottom:5px">
22
+ <span class="dashicons dashicons-camera" style="font-size:20px" title="${fifuColumnVars.tipImage}"></span>
23
+ <b>${fifuColumnVars.labelImage}</b>
24
+ </div>
25
+ <input id="fifu-quick-input-url" type="text" placeholder="${fifuColumnVars.urlImage}" value="${url}"/>
26
+ <br><br>
27
+
28
+ <div style="padding-bottom:5px">
29
+ <span class="dashicons dashicons-video-alt3" style="font-size:20px" title="${fifuColumnVars.tipVideo}"></span>
30
+ <b>${fifuColumnVars.labelVideo}</b>
31
+ </div>
32
+ <input id="fifu-quick-video-input-url" type="text" placeholder="${fifuColumnVars.urlVideo}" value=""/>
33
+ <br><br>
34
+ </div>
35
+ <div style="width:100%">
36
+ <button id="fifu-clean-button" class="fifu-quick-button" type="button" style="background-color: #e7e7e7; color: black;">Clean</button>
37
+ <button id="fifu-save-button" post-id="${post_id}" is-ctgr="${is_ctgr}" class="fifu-quick-button" type="button">Save</button>
38
+ </div>
39
+ </td>
40
+ </tr>
41
+ </table>
42
+ `;
43
+ jQuery.fancybox.open(box);
44
+ jQuery('#fifu-left-column').css('display', url ? 'table-cell' : 'none');
45
+ jQuery('#fifu-quick-input-url').select();
46
+ fifu_keypress_event();
47
+ });
48
+ }
49
+
50
+ function fifu_keypress_event() {
51
+ jQuery('div.fancybox-container.fancybox-is-open').keyup(function (e) {
52
+ switch (e.which) {
53
+ case 27:
54
+ // esc
55
+ jQuery.fancybox.close();
56
+ break;
57
+ default:
58
+ break;
59
+ }
60
+ });
61
+ }
admin/html/js/menu.js CHANGED
@@ -49,12 +49,14 @@ jQuery(function () {
49
  jQuery("#tabsWpAllImport").tabs();
50
  jQuery("#tabsCDN").tabs();
51
  jQuery("#tabsShortcode").tabs();
 
52
  jQuery("#tabsAutoSet").tabs();
53
  jQuery("#tabsScreenshot").tabs();
54
  jQuery("#tabsSlider").tabs();
55
  jQuery("#tabsContent").tabs();
56
  jQuery("#tabsContentAll").tabs();
57
  jQuery("#tabsCli").tabs();
 
58
 
59
  // show settings
60
  window.scrollTo(0, 0);
49
  jQuery("#tabsWpAllImport").tabs();
50
  jQuery("#tabsCDN").tabs();
51
  jQuery("#tabsShortcode").tabs();
52
+ jQuery("#tabsFifuShortcode").tabs();
53
  jQuery("#tabsAutoSet").tabs();
54
  jQuery("#tabsScreenshot").tabs();
55
  jQuery("#tabsSlider").tabs();
56
  jQuery("#tabsContent").tabs();
57
  jQuery("#tabsContentAll").tabs();
58
  jQuery("#tabsCli").tabs();
59
+ jQuery("#tabsRSS").tabs();
60
 
61
  // show settings
62
  window.scrollTo(0, 0);
admin/html/menu.html CHANGED
@@ -352,6 +352,21 @@
352
  </th>
353
  <th>fb.com|yt.com|...</th>
354
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  <tr class="color">
356
  <th>
357
  <?php $fifu['tab']['auto']() ?>
@@ -2064,6 +2079,7 @@
2064
  <li><a href="#tabsAutoSet-a"><?php $fifu['auto']['tab']['auto']() ?></a></li>
2065
  <li><a href="#tabsAutoSet-b"><?php $fifu['auto']['tab']['filters']() ?></a></li>
2066
  <li><a href="#tabsAutoSet-c"><?php $fifu['auto']['tab']['blocklist']() ?></a></li>
 
2067
  <br>
2068
  <br>
2069
  <div id="tabsAutoSet-a">
@@ -2129,6 +2145,25 @@
2129
  <input style="float: right;" type="submit" value="<?php $fifu['button']['submit']() ?>" disabled>
2130
  </form>
2131
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2132
  </ul>
2133
  </div>
2134
  </div>
@@ -3179,6 +3214,65 @@
3179
 
3180
  </div>
3181
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3182
  </div>
3183
 
3184
  <div id="tabs-c">
@@ -3854,31 +3948,51 @@
3854
  <?php $fifu['rss']['desc']() ?>
3855
  </div>
3856
  <br>
3857
- <table style="text-align:left">
3858
- <tr>
3859
- <th>
3860
- <input
3861
- type="submit"
3862
- href="javascript:void(0)"
3863
- class="toggleoff"
3864
- value=""
3865
- style="display:block;border:none">
3866
- </th>
3867
- <th>
3868
- <?php $fifu['word']['width']() ?>
3869
- <br>
3870
- <input
3871
- id="fifu_input_rss_width"
3872
- type="text"
3873
- name="fifu_input_rss_width"
3874
- value=""
3875
- placeholder="<?php $fifu['detail']['eg']() ?> 600"
3876
- style="width:85px">
3877
- <br>
3878
- <input type="submit" value="<?php $fifu['button']['ok']() ?>" style="width:85px" disabled>
3879
- </th>
3880
- </tr>
3881
- </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3882
  </div>
3883
  <div class="box">
3884
  <div class="fifu-pro"><div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div></div>
@@ -4707,7 +4821,7 @@
4707
  <i class="fab fa-facebook" style="font-size:30px"></i>
4708
  </td>
4709
  <td style="width:33%;text-align:center;border-bottom: 1px solid #ddd !important">
4710
- <i class="fab fa-instagram" style="font-size:30px"></i>
4711
  </td>
4712
  <td style="width:33%;text-align:center;border-bottom: 1px solid #ddd !important">
4713
  <i class="fas fa-tachometer-alt" style="font-size:30px"></i>
@@ -4784,9 +4898,9 @@
4784
  <table style="width:100%">
4785
  <tr>
4786
  <td style="width:14%;vertical-align:unset;">
4787
- <i class="fab fa-dev" style="font-size:110px; color: #76496d"></i>
4788
  </td>
4789
- <td style="width:85%">
4790
  <hgroup style="float:right;opacity:0.85" class="speech-bubble3">
4791
  <table style="text-align:left; width:100%; background-color: #000; color: white; padding:15px; border-radius:13px; font-weight:bold;">
4792
  <tr>
@@ -4805,7 +4919,7 @@
4805
  </tr>
4806
  <tr>
4807
  <th>
4808
- Featured image
4809
  </th>
4810
  <th>
4811
  fifu_dev_set_image($post_id, $image_url)
@@ -4819,7 +4933,21 @@
4819
  </tr>
4820
  <tr>
4821
  <th>
4822
- Product image + Image gallery
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4823
  </th>
4824
  <th>
4825
  fifu_dev_set_image_list($post_id, $image_url_list)
@@ -4831,6 +4959,34 @@
4831
  yes
4832
  </th>
4833
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4834
  </table>
4835
  </hgroup>
4836
  </td>
@@ -4840,6 +4996,19 @@
4840
  </div>
4841
  </div>
4842
  <div id="tabs-t">
 
 
 
 
 
 
 
 
 
 
 
 
 
4843
  <div class="box">
4844
  <table>
4845
  <tr>
352
  </th>
353
  <th>fb.com|yt.com|...</th>
354
  </tr>
355
+ <tr class="color">
356
+ <th>
357
+ <?php $fifu['tab']['auto']() ?>
358
+ </th>
359
+ <th>
360
+ <?php $fifu['title']['auto']() ?>
361
+ </th>
362
+ <th>
363
+ <?php $fifu['auto']['tab']['cpt']() ?>
364
+ </th>
365
+ <th>
366
+ wp fifu search --cpt &lt;string&gt;
367
+ </th>
368
+ <th>post,product,...</th>
369
+ </tr>
370
  <tr class="color">
371
  <th>
372
  <?php $fifu['tab']['auto']() ?>
2079
  <li><a href="#tabsAutoSet-a"><?php $fifu['auto']['tab']['auto']() ?></a></li>
2080
  <li><a href="#tabsAutoSet-b"><?php $fifu['auto']['tab']['filters']() ?></a></li>
2081
  <li><a href="#tabsAutoSet-c"><?php $fifu['auto']['tab']['blocklist']() ?></a></li>
2082
+ <li><a href="#tabsAutoSet-d"><?php $fifu['auto']['tab']['cpt']() ?></a></li>
2083
  <br>
2084
  <br>
2085
  <div id="tabsAutoSet-a">
2145
  <input style="float: right;" type="submit" value="<?php $fifu['button']['submit']() ?>" disabled>
2146
  </form>
2147
  </div>
2148
+ <div id="tabsAutoSet-d">
2149
+ <?php $fifu['auto']['cpt']['desc']() ?>
2150
+ <br>
2151
+ <br>
2152
+ <table style="text-align:left">
2153
+ <tr>
2154
+ <th>
2155
+ <input type="text"
2156
+ style="width:800px"
2157
+ value="">
2158
+ <input type="submit"
2159
+ value="<?php $fifu['button']['submit']() ?>" disabled>
2160
+ </th>
2161
+ </tr>
2162
+ <tr>
2163
+ <th><?php $fifu['auto']['cpt']['found']() ?> <i><?php echo fifu_get_post_types_str() ?></i></th>
2164
+ </tr>
2165
+ </table>
2166
+ </div>
2167
  </ul>
2168
  </div>
2169
  </div>
3214
 
3215
  </div>
3216
  </div>
3217
+
3218
+ <div class="box">
3219
+
3220
+ <div class="fifu-pro"><div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div></div>
3221
+ <h2><?php $fifu['title']['shortcodes']() ?></h2>
3222
+
3223
+ <div class="greybox" id="grad2">
3224
+
3225
+ <?php $fifu['shortcodes']['desc']() ?>
3226
+
3227
+ <br><br>
3228
+
3229
+ <div id="tabsFifuShortcode">
3230
+ <ul>
3231
+ <li><a href="#tabs-1"><?php $fifu['shortcodes']['tab']['shortcodes']() ?></a></li>
3232
+ </ul>
3233
+ <div id="tabs-1">
3234
+ <table style="text-align:left; width:100%">
3235
+ <tr class="color">
3236
+ <th>
3237
+ <b><?php $fifu['shortcodes']['column']['shortcode']() ?></b>
3238
+ </th>
3239
+ <th>
3240
+ <b><?php $fifu['shortcodes']['column']['description']() ?></b>
3241
+ </th>
3242
+ <th>
3243
+ <b><?php $fifu['shortcodes']['column']['optional']() ?></b>
3244
+ </th>
3245
+ </tr>
3246
+ <tr class="color">
3247
+ <th>
3248
+ [fifu]
3249
+ </th>
3250
+ <th>
3251
+ <?php $fifu['shortcodes']['description']['fifu']() ?>
3252
+ </th>
3253
+ <th>
3254
+ post_id
3255
+ </th>
3256
+ </tr>
3257
+ <tr class="color">
3258
+ <th>
3259
+ [fifu_gallery]
3260
+ </th>
3261
+ <th>
3262
+ <?php $fifu['shortcodes']['description']['gallery']() ?>
3263
+ </th>
3264
+ <th>
3265
+ post_id
3266
+ </th>
3267
+ </tr>
3268
+ </table>
3269
+ </div>
3270
+ </div>
3271
+
3272
+ </div>
3273
+
3274
+ <br>
3275
+ </div>
3276
  </div>
3277
 
3278
  <div id="tabs-c">
3948
  <?php $fifu['rss']['desc']() ?>
3949
  </div>
3950
  <br>
3951
+ <div id="tabsRSS">
3952
+ <ul>
3953
+ <li><a href="#tabs-1"><?php $fifu['word']['tags']() ?></a></li>
3954
+ <li><a href="#tabs-2"><?php $fifu['word']['documentation']() ?></a></li>
3955
+ </ul>
3956
+ <div id="tabs-1">
3957
+ <table style="text-align:left">
3958
+ <tr>
3959
+ <th>
3960
+ <input
3961
+ type="submit"
3962
+ href="javascript:void(0)"
3963
+ class="toggleoff"
3964
+ value=""
3965
+ style="display:block;border:none">
3966
+ </th>
3967
+ <th>
3968
+ <?php $fifu['word']['width']() ?>
3969
+ <br>
3970
+ <input
3971
+ id="fifu_input_rss_width"
3972
+ type="text"
3973
+ name="fifu_input_rss_width"
3974
+ value=""
3975
+ placeholder="<?php $fifu['detail']['eg']() ?> 600"
3976
+ style="width:85px">
3977
+ <br>
3978
+ <input type="submit" value="<?php $fifu['button']['ok']() ?>" style="width:85px" disabled>
3979
+ </th>
3980
+ </tr>
3981
+ </table>
3982
+ </div>
3983
+ <div id="tabs-2">
3984
+ <table style="text-align:left">
3985
+ <tr>
3986
+ <th>
3987
+ 1)
3988
+ </th>
3989
+ <th>
3990
+ <?php $fifu['rss']['documentation']['publisher']() ?>
3991
+ </th>
3992
+ </tr>
3993
+ </table>
3994
+ </div>
3995
+ </div>
3996
  </div>
3997
  <div class="box">
3998
  <div class="fifu-pro"><div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div></div>
4821
  <i class="fab fa-facebook" style="font-size:30px"></i>
4822
  </td>
4823
  <td style="width:33%;text-align:center;border-bottom: 1px solid #ddd !important">
4824
+ <i class="fab fa-instagram-square" style="font-size:30px"></i>
4825
  </td>
4826
  <td style="width:33%;text-align:center;border-bottom: 1px solid #ddd !important">
4827
  <i class="fas fa-tachometer-alt" style="font-size:30px"></i>
4898
  <table style="width:100%">
4899
  <tr>
4900
  <td style="width:14%;vertical-align:unset;">
4901
+ <i class="fab fa-dev" style="font-size:125px; color: #76496d"></i>
4902
  </td>
4903
+ <td style="width:80%">
4904
  <hgroup style="float:right;opacity:0.85" class="speech-bubble3">
4905
  <table style="text-align:left; width:100%; background-color: #000; color: white; padding:15px; border-radius:13px; font-weight:bold;">
4906
  <tr>
4919
  </tr>
4920
  <tr>
4921
  <th>
4922
+ <?php $fifu['dev']['field']['image']() ?>
4923
  </th>
4924
  <th>
4925
  fifu_dev_set_image($post_id, $image_url)
4933
  </tr>
4934
  <tr>
4935
  <th>
4936
+ <?php $fifu['dev']['field']['video']() ?>
4937
+ </th>
4938
+ <th>
4939
+ fifu_dev_set_video($post_id, $video_url)
4940
+ </th>
4941
+ <th>
4942
+ <b></b>
4943
+ </th>
4944
+ <th>
4945
+ yes
4946
+ </th>
4947
+ </tr>
4948
+ <tr>
4949
+ <th>
4950
+ <?php $fifu['dev']['field']['product']() ?> + <?php $fifu['dev']['field']['gallery']() ?>
4951
  </th>
4952
  <th>
4953
  fifu_dev_set_image_list($post_id, $image_url_list)
4959
  yes
4960
  </th>
4961
  </tr>
4962
+ <tr>
4963
+ <th>
4964
+ <?php $fifu['dev']['field']['category']['image']() ?>
4965
+ </th>
4966
+ <th>
4967
+ fifu_dev_set_category_image($term_id, $image_url)
4968
+ </th>
4969
+ <th>
4970
+ <b></b>
4971
+ </th>
4972
+ <th>
4973
+ yes
4974
+ </th>
4975
+ </tr>
4976
+ <tr>
4977
+ <th>
4978
+ <?php $fifu['dev']['field']['category']['video']() ?>
4979
+ </th>
4980
+ <th>
4981
+ fifu_dev_set_category_video($term_id, $video_url)
4982
+ </th>
4983
+ <th>
4984
+ <b></b>
4985
+ </th>
4986
+ <th>
4987
+ yes
4988
+ </th>
4989
+ </tr>
4990
  </table>
4991
  </hgroup>
4992
  </td>
4996
  </div>
4997
  </div>
4998
  <div id="tabs-t">
4999
+ <div class="box">
5000
+ <table>
5001
+ <tr>
5002
+ <td style="border-bottom:none">2021-06-15</td>
5003
+ <td style="border-bottom:none"><h3> Feed</h3></td>
5004
+ <td style="border-bottom:none">XML</td>
5005
+ </tr>
5006
+ </table>
5007
+ <div class="greybox" style="position: relative; top: -10px">
5008
+ XML parsing error: duplicate attribute xmlns:media="http://search.yahoo.com/mrss/". <br>
5009
+ 1) the first attribute is added by FIFU (Media RSS Tags) and the duplicated one by another component you have installed on your site, such as Rank Math SEO plugin. Find and disable the option that is adding the duplicated attribute, otherwise services like Google News may not find your images.<br>
5010
+ </div>
5011
+ </div>
5012
  <div class="box">
5013
  <table>
5014
  <tr>
admin/html/meta-box.html CHANGED
@@ -96,19 +96,19 @@
96
  </div>
97
 
98
  <div id="fifu_premium" style="<?php echo $show_button ?>">
99
- <table style="position: relative; top: 12px; background-color: #444444; color:white; width: 100%; border-radius: 15px">
100
  <tr style="text-align: center;">
101
- <td style="width: 90px; font-size: 12px; background-color: #1da867; border-radius: 15px"><a style="color:white; text-decoration: none" target="_blank" href="https://fifu.app/" title="Unlock all features"><b>PRO</b> fields</a></td>
102
- <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured video" class="dashicons dashicons-video-alt3" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
103
- <td style="padding: 0px 0px" class="fifu-hover"><span title="Woocommerce image gallery" class="dashicons dashicons-format-gallery" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
104
- <td style="padding: 0px 0px" class="fifu-hover"><span title="Woocommerce video gallery" class="dashicons dashicons-format-video" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
105
- <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured slider" class="dashicons dashicons-images-alt2" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
106
- <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured shortcode" class="dashicons dashicons-shortcode" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
107
- <td style="padding: 0px 0px" class="fifu-hover"><span title="Title (Auto set featured image using post title and search engine)" class="dashicons dashicons-google" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
108
- <td style="padding: 0px 0px" class="fifu-hover"><span title="ISBN (Auto set featured image using ISBN and books API)" class="dashicons dashicons-book-alt" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
109
- <td style="padding: 0px 0px" class="fifu-hover"><span title="Screenshot (Auto set screenshot as featured image)" class="dashicons dashicons-cover-image" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
110
- <td style="padding: 0px 0px" class="fifu-hover"><span title="Image finder (Auto set featured image using web page address)" class="dashicons dashicons-code-standards" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
111
- <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured image/video (for bbPress forms)" class="dashicons dashicons-buddicons-bbpress-logo" style="font-size:16px; display: unset; vertical-align:sub;"></span></td>
112
  </tr>
113
  </table>
114
  </div>
96
  </div>
97
 
98
  <div id="fifu_premium" style="<?php echo $show_button ?>">
99
+ <table style="position: relative; top: 11px; background-color: #444444; color:white; width: 100%; border-radius: 15px">
100
  <tr style="text-align: center;">
101
+ <td style="width: 90px; font-size: 11px; background-color: #1da867; border-radius: 15px"><a style="color:white; text-decoration: none" target="_blank" href="https://fifu.app/" title="Unlock all features"><b>PRO</b> fields</a></td>
102
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured video" class="dashicons dashicons-video-alt3" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
103
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Woocommerce image gallery" class="dashicons dashicons-format-gallery" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
104
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Woocommerce video gallery" class="dashicons dashicons-format-video" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
105
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured slider" class="dashicons dashicons-images-alt2" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
106
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured shortcode" class="dashicons dashicons-shortcode" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
107
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Title (Auto set featured image using post title and search engine)" class="dashicons dashicons-google" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
108
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="ISBN (Auto set featured image using ISBN and books API)" class="dashicons dashicons-book-alt" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
109
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Screenshot (Auto set screenshot as featured image)" class="dashicons dashicons-cover-image" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
110
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Image finder (Auto set featured image using web page address)" class="dashicons dashicons-code-standards" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
111
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured image/video (for bbPress forms)" class="dashicons dashicons-buddicons-bbpress-logo" style="font-size:15px; display: unset; vertical-align:sub;"></span></td>
112
  </tr>
113
  </table>
114
  </div>
admin/html/widget-gallery.html ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <p>
2
+ <label>Product gallery settings: <b>FIFU Settings > Featured slider</b></label>
3
+ </p>
admin/html/widget-image.html ADDED
@@ -0,0 +1 @@
 
1
+ <p></p>
admin/menu.php CHANGED
@@ -168,7 +168,7 @@ function fifu_get_setting($type) {
168
  $arrEmpty = array('fifu_default_url');
169
  $arr64 = array('fifu_column_height');
170
  $arr1000 = array('fifu_spinner_db');
171
- $arrOn = array('fifu_auto_alt', 'fifu_wc_zoom', 'fifu_wc_lbox');
172
  $arrOnNo = array('fifu_fake', 'fifu_social');
173
  $arrOffNo = array('fifu_data_clean', 'fifu_confirm_delete_all', 'fifu_run_delete_all', 'fifu_reset', 'fifu_social_image_only');
174
 
168
  $arrEmpty = array('fifu_default_url');
169
  $arr64 = array('fifu_column_height');
170
  $arr1000 = array('fifu_spinner_db');
171
+ $arrOn = array('fifu_wc_zoom', 'fifu_wc_lbox');
172
  $arrOnNo = array('fifu_fake', 'fifu_social');
173
  $arrOffNo = array('fifu_data_clean', 'fifu_confirm_delete_all', 'fifu_run_delete_all', 'fifu_reset', 'fifu_social_image_only');
174
 
admin/strings.php CHANGED
@@ -97,6 +97,12 @@ function fifu_get_strings_settings() {
97
  $fifu['word']['effect'] = function() {
98
  _e("Effect", FIFU_SLUG);
99
  };
 
 
 
 
 
 
100
 
101
  // where
102
  $fifu['where']['page'] = function() {
@@ -153,7 +159,7 @@ function fifu_get_strings_settings() {
153
  _e("REST API", FIFU_SLUG);
154
  };
155
  $fifu['tab']['shortcode'] = function() {
156
- _e("Featured shortcode", FIFU_SLUG);
157
  };
158
  $fifu['tab']['slider'] = function() {
159
  _e("Featured slider", FIFU_SLUG);
@@ -188,7 +194,7 @@ function fifu_get_strings_settings() {
188
  _e("Integrate your plugin with FIFU", FIFU_SLUG);
189
  };
190
  $fifu['title']['column'] = function() {
191
- _e("FIFU Column", FIFU_SLUG);
192
  };
193
  $fifu['title']['fields'] = function() {
194
  _e("Product Gallery", FIFU_SLUG);
@@ -277,6 +283,9 @@ function fifu_get_strings_settings() {
277
  $fifu['title']['shortcode'] = function() {
278
  _e("Featured Shortcode", FIFU_SLUG);
279
  };
 
 
 
280
  $fifu['title']['slider'] = function() {
281
  _e("Featured Slider", FIFU_SLUG);
282
  };
@@ -367,7 +376,7 @@ function fifu_get_strings_settings() {
367
  _e("All my images disappeared", FIFU_SLUG);
368
  };
369
  $fifu['support']['plugin'] = function() {
370
- _e("A famous plugin doesn't work with FIFU ", FIFU_SLUG);
371
  };
372
  $fifu['support']['style'] = function() {
373
  _e("I'm having style issues ", FIFU_SLUG);
@@ -388,7 +397,7 @@ function fifu_get_strings_settings() {
388
  _e("You were probably using a deprecated feature. Just do it: 1) access Metadata tab; 2) run Clean Metadata; 3) enable Image Metadata (~50,000 URLs/min); 4) clean your cache (optional).", FIFU_SLUG);
389
  };
390
  $fifu['support']['plugin-desc'] = function() {
391
- _e("Just send us an email. If you are available to discuss the details and the plugin is free and has more than 10,000 active installs, we should provide an integration very soon.", FIFU_SLUG);
392
  };
393
  $fifu['support']['style-desc'] = function() {
394
  _e("Some themes and plugins aren't responsive enough to work with external images. You may solve that running Metadata > Save Image Dimensions (~150 URLs/min).", FIFU_SLUG);
@@ -397,7 +406,7 @@ function fifu_get_strings_settings() {
397
  _e("You probably have a plugin or theme that sets a default image as the Facebook image (og:image tag). Just find and disable the option.", FIFU_SLUG);
398
  };
399
  $fifu['support']['null-desc'] = function() {
400
- _e("This plugin has NO nulled versions, but pirate versions. Don't install that. It's illegal and should ruin your site. Moreover, sales of the original premium version keep this project alive.", FIFU_SLUG);
401
  };
402
  $fifu['support']['money-desc'] = function() {
403
  _e("Because Instagram is invalidating its URLs once a month. FIFU can renew the URLs automatically via API, however due to the costs involved, it is only available in the Premium version.", FIFU_SLUG);
@@ -460,10 +469,28 @@ function fifu_get_strings_settings() {
460
  $fifu['dev']['args'] = function() {
461
  _e("All you need is to inform the post id and the image url(s). And FIFU will set the custom fields and create the metadata.", FIFU_SLUG);
462
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
 
464
  // column
465
  $fifu['column']['desc'] = function() {
466
- _e("The plugin adds a new column to your post list. Below you can choose the height (px) of the image in the column. To disable that, just uncheck \"FIFU\" in the Screen Options.", FIFU_SLUG);
467
  };
468
 
469
  // cli
@@ -606,6 +633,9 @@ function fifu_get_strings_settings() {
606
  $fifu['auto']['tab']['blocklist'] = function() {
607
  _e("Blocklist", FIFU_SLUG);
608
  };
 
 
 
609
  $fifu['auto']['filter']['width'] = function() {
610
  _e("minimum width (px)", FIFU_SLUG);
611
  };
@@ -615,6 +645,12 @@ function fifu_get_strings_settings() {
615
  $fifu['auto']['filter']['blocklist'] = function() {
616
  _e("List of strings that shouldn't be in the image URL:", FIFU_SLUG);
617
  };
 
 
 
 
 
 
618
 
619
  // isbn
620
  $fifu['isbn']['desc'] = function() {
@@ -1000,6 +1036,29 @@ function fifu_get_strings_settings() {
1000
  _e("Getting started", FIFU_SLUG);
1001
  };
1002
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1003
  // slider
1004
  $fifu['slider']['desc'] = function() {
1005
  _e("This feature allows you to have a slider of images instead of a regular featured image. It's often quite useful on some types of websites, such as real estate. It can run fast even with a huge amount of big images (just follow the performance tips below).", FIFU_SLUG);
@@ -1071,6 +1130,9 @@ function fifu_get_strings_settings() {
1071
  $fifu['rss']['desc'] = function() {
1072
  _e("Add media RSS tags in the RSS feed. This way, services that make use of RSS, such as Google News, can show the featured images.", FIFU_SLUG);
1073
  };
 
 
 
1074
 
1075
  // bbpress
1076
  $fifu['bbpress']['desc'] = function() {
@@ -1519,6 +1581,9 @@ function fifu_get_strings_widget() {
1519
  $fifu['title']['grid'] = function() {
1520
  return __("Featured grid", FIFU_SLUG);
1521
  };
 
 
 
1522
 
1523
  // description
1524
  $fifu['description']['media'] = function() {
@@ -1527,6 +1592,39 @@ function fifu_get_strings_widget() {
1527
  $fifu['description']['grid'] = function() {
1528
  return __("Displays the images from featured slider in a grid format.", FIFU_SLUG);
1529
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1530
 
1531
  return $fifu;
1532
  }
97
  $fifu['word']['effect'] = function() {
98
  _e("Effect", FIFU_SLUG);
99
  };
100
+ $fifu['word']['documentation'] = function() {
101
+ _e("Documentation", FIFU_SLUG);
102
+ };
103
+ $fifu['word']['tags'] = function() {
104
+ _e("Tags", FIFU_SLUG);
105
+ };
106
 
107
  // where
108
  $fifu['where']['page'] = function() {
159
  _e("REST API", FIFU_SLUG);
160
  };
161
  $fifu['tab']['shortcode'] = function() {
162
+ _e("Shortcode", FIFU_SLUG);
163
  };
164
  $fifu['tab']['slider'] = function() {
165
  _e("Featured slider", FIFU_SLUG);
194
  _e("Integrate your plugin with FIFU", FIFU_SLUG);
195
  };
196
  $fifu['title']['column'] = function() {
197
+ _e("Quick Edit Column", FIFU_SLUG);
198
  };
199
  $fifu['title']['fields'] = function() {
200
  _e("Product Gallery", FIFU_SLUG);
283
  $fifu['title']['shortcode'] = function() {
284
  _e("Featured Shortcode", FIFU_SLUG);
285
  };
286
+ $fifu['title']['shortcodes'] = function() {
287
+ _e("FIFU Shortcodes", FIFU_SLUG);
288
+ };
289
  $fifu['title']['slider'] = function() {
290
  _e("Featured Slider", FIFU_SLUG);
291
  };
376
  _e("All my images disappeared", FIFU_SLUG);
377
  };
378
  $fifu['support']['plugin'] = function() {
379
+ _e("A plugin doesn't work with FIFU ", FIFU_SLUG);
380
  };
381
  $fifu['support']['style'] = function() {
382
  _e("I'm having style issues ", FIFU_SLUG);
397
  _e("You were probably using a deprecated feature. Just do it: 1) access Metadata tab; 2) run Clean Metadata; 3) enable Image Metadata (~50,000 URLs/min); 4) clean your cache (optional).", FIFU_SLUG);
398
  };
399
  $fifu['support']['plugin-desc'] = function() {
400
+ _e("Contact us. If you are available to discuss the details and the plugin is free, we should provide an integration. Or contact its developer and ask him to use the FIFU integration functions below.", FIFU_SLUG);
401
  };
402
  $fifu['support']['style-desc'] = function() {
403
  _e("Some themes and plugins aren't responsive enough to work with external images. You may solve that running Metadata > Save Image Dimensions (~150 URLs/min).", FIFU_SLUG);
406
  _e("You probably have a plugin or theme that sets a default image as the Facebook image (og:image tag). Just find and disable the option.", FIFU_SLUG);
407
  };
408
  $fifu['support']['null-desc'] = function() {
409
+ _e("This plugin has NO nulled versions, but modified versions. Don't install that. It's illegal and may ruin your site. Moreover, sales of the original premium version keep this project alive.", FIFU_SLUG);
410
  };
411
  $fifu['support']['money-desc'] = function() {
412
  _e("Because Instagram is invalidating its URLs once a month. FIFU can renew the URLs automatically via API, however due to the costs involved, it is only available in the Premium version.", FIFU_SLUG);
469
  $fifu['dev']['args'] = function() {
470
  _e("All you need is to inform the post id and the image url(s). And FIFU will set the custom fields and create the metadata.", FIFU_SLUG);
471
  };
472
+ $fifu['dev']['field']['image'] = function() {
473
+ _e("Featured image", FIFU_SLUG);
474
+ };
475
+ $fifu['dev']['field']['video'] = function() {
476
+ _e("Featured video", FIFU_SLUG);
477
+ };
478
+ $fifu['dev']['field']['product'] = function() {
479
+ _e("Product image", FIFU_SLUG);
480
+ };
481
+ $fifu['dev']['field']['gallery'] = function() {
482
+ _e("Image gallery", FIFU_SLUG);
483
+ };
484
+ $fifu['dev']['field']['category']['image'] = function() {
485
+ _e("Category image", FIFU_SLUG);
486
+ };
487
+ $fifu['dev']['field']['category']['video'] = function() {
488
+ _e("Category video", FIFU_SLUG);
489
+ };
490
 
491
  // column
492
  $fifu['column']['desc'] = function() {
493
+ _e("The plugin adds a \"Quick Edit\" column to \"Posts > All Posts\". Below you can choose the height (px) of the images in the column. To disable that, just uncheck \"Quick Edit\" in the Screen Options.", FIFU_SLUG);
494
  };
495
 
496
  // cli
633
  $fifu['auto']['tab']['blocklist'] = function() {
634
  _e("Blocklist", FIFU_SLUG);
635
  };
636
+ $fifu['auto']['tab']['cpt'] = function() {
637
+ _e("Post types", FIFU_SLUG);
638
+ };
639
  $fifu['auto']['filter']['width'] = function() {
640
  _e("minimum width (px)", FIFU_SLUG);
641
  };
645
  $fifu['auto']['filter']['blocklist'] = function() {
646
  _e("List of strings that shouldn't be in the image URL:", FIFU_SLUG);
647
  };
648
+ $fifu['auto']['cpt']['desc'] = function() {
649
+ _e("This feature is pre configured to work only with the post type \"post\". But you can include more post types below (delimited by \",\").", FIFU_SLUG);
650
+ };
651
+ $fifu['auto']['cpt']['found'] = function() {
652
+ _e("Post types found on your site: ", FIFU_SLUG);
653
+ };
654
 
655
  // isbn
656
  $fifu['isbn']['desc'] = function() {
1036
  _e("Getting started", FIFU_SLUG);
1037
  };
1038
 
1039
+ // FIFU shortcodes
1040
+ $fifu['shortcodes']['desc'] = function() {
1041
+ _e("Add FIFU elements anywhere with a shortcode.", FIFU_SLUG);
1042
+ };
1043
+ $fifu['shortcodes']['tab']['shortcodes'] = function() {
1044
+ _e("Shortcodes", FIFU_SLUG);
1045
+ };
1046
+ $fifu['shortcodes']['column']['shortcode'] = function() {
1047
+ _e("Shortcode", FIFU_SLUG);
1048
+ };
1049
+ $fifu['shortcodes']['column']['description'] = function() {
1050
+ _e("Description", FIFU_SLUG);
1051
+ };
1052
+ $fifu['shortcodes']['column']['optional'] = function() {
1053
+ _e("Optional parameters", FIFU_SLUG);
1054
+ };
1055
+ $fifu['shortcodes']['description']['fifu'] = function() {
1056
+ _e("Displays the featured image, video or slider of the current post.", FIFU_SLUG);
1057
+ };
1058
+ $fifu['shortcodes']['description']['gallery'] = function() {
1059
+ _e("Displays the product gallery of the current product.", FIFU_SLUG);
1060
+ };
1061
+
1062
  // slider
1063
  $fifu['slider']['desc'] = function() {
1064
  _e("This feature allows you to have a slider of images instead of a regular featured image. It's often quite useful on some types of websites, such as real estate. It can run fast even with a huge amount of big images (just follow the performance tips below).", FIFU_SLUG);
1130
  $fifu['rss']['desc'] = function() {
1131
  _e("Add media RSS tags in the RSS feed. This way, services that make use of RSS, such as Google News, can show the featured images.", FIFU_SLUG);
1132
  };
1133
+ $fifu['rss']['documentation']['publisher'] = function() {
1134
+ _e("<a href='https://support.google.com/news/publisher-center/answer/9545245?hl=en' target='_blank'>Google News: Feed content guidelines</a>", FIFU_SLUG);
1135
+ };
1136
 
1137
  // bbpress
1138
  $fifu['bbpress']['desc'] = function() {
1581
  $fifu['title']['grid'] = function() {
1582
  return __("Featured grid", FIFU_SLUG);
1583
  };
1584
+ $fifu['title']['gallery'] = function() {
1585
+ return __("Product gallery", FIFU_SLUG);
1586
+ };
1587
 
1588
  // description
1589
  $fifu['description']['media'] = function() {
1592
  $fifu['description']['grid'] = function() {
1593
  return __("Displays the images from featured slider in a grid format.", FIFU_SLUG);
1594
  };
1595
+ $fifu['description']['gallery'] = function() {
1596
+ return __("Displays the product gallery.", FIFU_SLUG);
1597
+ };
1598
+
1599
+ return $fifu;
1600
+ }
1601
+
1602
+ function fifu_get_strings_quick_edit() {
1603
+ $fifu = array();
1604
+
1605
+ // titles
1606
+ $fifu['title']['image'] = function() {
1607
+ return __("Featured image", FIFU_SLUG);
1608
+ };
1609
+ $fifu['title']['video'] = function() {
1610
+ return __("Featured video", FIFU_SLUG);
1611
+ };
1612
+
1613
+ // tips
1614
+ $fifu['tip']['image'] = function() {
1615
+ return __("Set the featured image using an image URL", FIFU_SLUG);
1616
+ };
1617
+ $fifu['tip']['video'] = function() {
1618
+ return __("Set the featured video using a video URL", FIFU_SLUG);
1619
+ };
1620
+
1621
+ // placeholder
1622
+ $fifu['url']['image'] = function() {
1623
+ return __("Image URL", FIFU_SLUG);
1624
+ };
1625
+ $fifu['url']['video'] = function() {
1626
+ return __("Video URL", FIFU_SLUG);
1627
+ };
1628
 
1629
  return $fifu;
1630
  }
admin/widgets.php CHANGED
@@ -19,6 +19,7 @@ class Fifu_Widget_Image extends WP_Widget {
19
  public function form($instance) {
20
  wp_enqueue_style('fifu-pro-css', plugins_url('/html/css/pro.css', __FILE__), array(), fifu_version_number());
21
  echo '<div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div>';
 
22
  }
23
 
24
  public function update($new_instance, $old_instance) {
@@ -59,11 +60,41 @@ class Fifu_Widget_Grid extends WP_Widget {
59
 
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  add_action('widgets_init', 'fifu_register_widgets');
63
 
64
  function fifu_register_widgets() {
65
  register_widget('Fifu_Widget_Image');
66
  register_widget('Fifu_Widget_Grid');
 
67
  }
68
 
69
  add_action('admin_head-widgets.php', 'fifu_add_icon_to_custom_widget');
19
  public function form($instance) {
20
  wp_enqueue_style('fifu-pro-css', plugins_url('/html/css/pro.css', __FILE__), array(), fifu_version_number());
21
  echo '<div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div>';
22
+ include 'html/widget-image.html';
23
  }
24
 
25
  public function update($new_instance, $old_instance) {
60
 
61
  }
62
 
63
+ class Fifu_Widget_Gallery extends WP_Widget {
64
+
65
+ public function __construct() {
66
+ $fifu = fifu_get_strings_widget();
67
+ parent::__construct(
68
+ 'fifu_widget_gallery', // Base ID
69
+ '(FIFU) ' . $fifu['title']['gallery'](), // Name
70
+ array('description' => $fifu['description']['gallery'](),) // Args
71
+ );
72
+ }
73
+
74
+ public function widget($args, $instance) {
75
+ echo $args['before_widget'];
76
+ echo $args['after_widget'];
77
+ }
78
+
79
+ public function form($instance) {
80
+ wp_enqueue_style('fifu-pro-css', plugins_url('/html/css/pro.css', __FILE__), array(), fifu_version_number());
81
+ echo '<div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div>';
82
+ include 'html/widget-gallery.html';
83
+ }
84
+
85
+ public function update($new_instance, $old_instance) {
86
+ $instance = array();
87
+ return $instance;
88
+ }
89
+
90
+ }
91
+
92
  add_action('widgets_init', 'fifu_register_widgets');
93
 
94
  function fifu_register_widgets() {
95
  register_widget('Fifu_Widget_Image');
96
  register_widget('Fifu_Widget_Grid');
97
+ register_widget('Fifu_Widget_Gallery');
98
  }
99
 
100
  add_action('admin_head-widgets.php', 'fifu_add_icon_to_custom_widget');
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 as featured image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
- * Version: 3.6.2
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
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.6.3
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
includes/util.php CHANGED
@@ -43,6 +43,14 @@ function fifu_get_post_types() {
43
  return $arr;
44
  }
45
 
 
 
 
 
 
 
 
 
46
  function fifu_get_delimiter($property, $html) {
47
  $delimiter = explode($property . '=', $html);
48
  return $delimiter ? substr($delimiter[1], 0, 1) : null;
43
  return $arr;
44
  }
45
 
46
+ function fifu_get_post_types_str() {
47
+ $str = '';
48
+ $i = 0;
49
+ foreach (fifu_get_post_types() as $type)
50
+ $str = ($i++ == 0) ? $type : $str . ', ' . $type;
51
+ return $str;
52
+ }
53
+
54
  function fifu_get_delimiter($property, $html) {
55
  $delimiter = explode($property . '=', $html);
56
  return $delimiter ? substr($delimiter[1], 0, 1) : null;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
  Tested up to: 5.7
7
- Stable tag: 3.6.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -100,17 +100,23 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio,
100
  #### WIDGETS
101
 
102
  * **[PRO]** Featured media
103
- * **[PRO]** Featured grid
 
104
 
105
  #### OTHERS
106
 
 
107
  * **[PRO]** Featured slider
108
- * **[PRO]** Featured shortcode
 
109
 
110
  #### INTEGRATION FUNCTION FOR DEVELOPERS
111
 
112
  * fifu_dev_set_image(post_id, image_url)
113
  * **[PRO]** fifu_dev_set_image_list(post_id, image_url_list)
 
 
 
114
 
115
  #### LINKS
116
 
@@ -162,6 +168,10 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio,
162
 
163
  * You save money on storage, processing and copyright. And you can have extremely fast import processes.
164
 
 
 
 
 
165
 
166
  == Screenshots ==
167
 
@@ -208,23 +218,20 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio,
208
 
209
  == Changelog ==
210
 
 
 
 
211
  = 3.6.2 =
212
  * Improvement: query optimizations (for sites with hundreds of thousands of URLs); improvement: CDN + Optimized Thumbnails (perfect image croppig for less style issues); improvement: Save Image Dimensions (150% faster, CLI integration); deprecated: CDN + Optimized Thumbnails > Shortpixel; fix: Lazy Load (conflict with AMP plugin).
213
 
214
  = 3.6.1 =
215
  * New: FIFU widgets for WordPress and Elementor.
216
 
217
- = 3.6.0 =
218
- * New features: for bbPress (Settings > Social > bbPress); improvement: Auto set featured image using post title and search engine (faster and unlimited now); improvement: Auto set featured image using ISBN and books API (faster and unlimited now); improvement: added FIFU fields to bbPress custom post types (Forum, Topic and Reply).
219
-
220
- = 3.5.9 =
221
- * New option: Featured slider > display images in the same height; new file: attached XML example for WP All Import plugin (Variations As Child XML Elements); new site: https://featuredimagefromurl.com/.
222
-
223
  = others =
224
  * [more](https://fifu.app/changelog)
225
 
226
 
227
  == Upgrade Notice ==
228
 
229
- = 3.6.2 =
230
- * Improvement: query optimizations (for sites with hundreds of thousands of URLs); improvement: CDN + Optimized Thumbnails (perfect image croppig for less style issues); improvement: Save Image Dimensions (150% faster, CLI integration); deprecated: CDN + Optimized Thumbnails > Shortpixel; fix: Lazy Load (conflict with AMP plugin).
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
  Tested up to: 5.7
7
+ Stable tag: 3.6.3
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
100
  #### WIDGETS
101
 
102
  * **[PRO]** Featured media
103
+ * **[PRO]** Featured grid
104
+ * **[PRO]** Product gallery
105
 
106
  #### OTHERS
107
 
108
+ * **[PRO]** Quick edit
109
  * **[PRO]** Featured slider
110
+ * **[PRO]** Featured shortcode
111
+ * **[PRO]** FIFU shortcodes
112
 
113
  #### INTEGRATION FUNCTION FOR DEVELOPERS
114
 
115
  * fifu_dev_set_image(post_id, image_url)
116
  * **[PRO]** fifu_dev_set_image_list(post_id, image_url_list)
117
+ * **[PRO]** fifu_dev_set_video($post_id, $video_url)
118
+ * **[PRO]** fifu_dev_set_category_image($term_id, $image_url)
119
+ * **[PRO]** fifu_dev_set_category_video($term_id, $video_url)
120
 
121
  #### LINKS
122
 
168
 
169
  * You save money on storage, processing and copyright. And you can have extremely fast import processes.
170
 
171
+ = Is it legal to embed images without permission?
172
+
173
+ * Yes, it is. Click here to know [more](https://www.globalbankingandfinance.com/embedding-images-the-legal-way-to-steal/).
174
+
175
 
176
  == Screenshots ==
177
 
218
 
219
  == Changelog ==
220
 
221
+ = 3.6.3 =
222
+ * New feature: Quick Edit (for featured images and videos); new feature: FIFU Shortcodes; new widget: Product gallery; new integration functions: fifu_dev_set_video(), fifu_dev_set_category_image() and fifu_dev_set_category_video(); new option: Auto set featured image using post title and search engine > Post types.
223
+
224
  = 3.6.2 =
225
  * Improvement: query optimizations (for sites with hundreds of thousands of URLs); improvement: CDN + Optimized Thumbnails (perfect image croppig for less style issues); improvement: Save Image Dimensions (150% faster, CLI integration); deprecated: CDN + Optimized Thumbnails > Shortpixel; fix: Lazy Load (conflict with AMP plugin).
226
 
227
  = 3.6.1 =
228
  * New: FIFU widgets for WordPress and Elementor.
229
 
 
 
 
 
 
 
230
  = others =
231
  * [more](https://fifu.app/changelog)
232
 
233
 
234
  == Upgrade Notice ==
235
 
236
+ = 3.6.3 =
237
+ * New feature: Quick Edit (for featured images and videos); new feature: FIFU Shortcodes; new widget: Product gallery; new integration functions: fifu_dev_set_video(), fifu_dev_set_category_image() and fifu_dev_set_category_video(); new option: Auto set featured image using post title and search engine > Post types.