Featured Image From URL - Version 1.7.2

Version Description

  • Disable product lightbox and zoom.

=

Download this release

Release Info

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

Code changes from version 1.7.1 to 1.7.2

admin/html/menu.html CHANGED
@@ -413,6 +413,70 @@
413
  </div>
414
  </div>
415
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
  <div class="box">
417
  <h2>WP All Import</h2>
418
  <div class="greybox" id="grad1">
@@ -1074,20 +1138,6 @@
1074
  </form>
1075
  </div>
1076
 
1077
- <div class="box">
1078
- <h2>WooCommerce Lightbox</h2>
1079
- <div class="greybox" id="grad2">
1080
- <b>Premium feature</b><br><br>
1081
- You can enable/disable the WooCommerce lightbox here.<br>
1082
- </div>
1083
- <br>
1084
- <input
1085
- type="image"
1086
- href="javascript:void(0)"
1087
- class="toggleoff"
1088
- value=" " style="display:block">
1089
- </div>
1090
-
1091
  <div class="box">
1092
 
1093
  <h2>WP REST API</h2>
413
  </div>
414
  </div>
415
 
416
+ <div class="box">
417
+ <h2>WooCommerce</h2>
418
+ <div class="greybox" id="grad1">
419
+ You can disable the product lightbox and zoom here once these features are only compatible with the premium version.
420
+ </div>
421
+ <br>
422
+ <table style="text-align:left">
423
+ <tr>
424
+ <th>
425
+ <form
426
+ id="fifu_form_wc_lbox"
427
+ action="javascript:void(0)"
428
+ method="post">
429
+ <input
430
+ type="image"
431
+ href="javascript:void(0)"
432
+ id="fifu_toggle_wc_lbox"
433
+ onclick="invert('wc_lbox')"
434
+ name="fifu_toggle_wc_lbox"
435
+ class="<?php echo $enable_wc_lbox; ?>"
436
+ value=" "
437
+ style="display:block">
438
+
439
+ <input
440
+ type="hidden"
441
+ id="fifu_input_wc_lbox"
442
+ name="fifu_input_wc_lbox"
443
+ value="" >
444
+ </form>
445
+ </th>
446
+ <th>
447
+ lightbox
448
+ </th>
449
+ </tr>
450
+ <tr>
451
+ <th>
452
+ <form
453
+ id="fifu_form_wc_zoom"
454
+ action="javascript:void(0)"
455
+ method="post">
456
+ <input
457
+ type="image"
458
+ href="javascript:void(0)"
459
+ id="fifu_toggle_wc_zoom"
460
+ onclick="invert('wc_zoom')"
461
+ name="fifu_toggle_wc_zoom"
462
+ class="<?php echo $enable_wc_zoom; ?>"
463
+ value=" "
464
+ style="display:block">
465
+
466
+ <input
467
+ type="hidden"
468
+ id="fifu_input_wc_zoom"
469
+ name="fifu_input_wc_zoom"
470
+ value="" >
471
+ </form>
472
+ </th>
473
+ <th>
474
+ zoom
475
+ </th>
476
+ </tr>
477
+ </table>
478
+ </div>
479
+
480
  <div class="box">
481
  <h2>WP All Import</h2>
482
  <div class="greybox" id="grad1">
1138
  </form>
1139
  </div>
1140
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1141
  <div class="box">
1142
 
1143
  <h2>WP REST API</h2>
admin/html/meta-box.html CHANGED
@@ -50,6 +50,8 @@
50
  <div style="<?php echo $show_news?>">
51
  <br>
52
  <hr>
 
 
53
  <p style="font-size: 12px; padding: 5px; border-left: 6px solid #e8c814; color: black;
54
  background-color: #eee; border-radius: 25px 5px;">New: crop all external featured images on home/shop to the same size.</p>
55
  <p style="font-size: 12px; padding: 5px; border-left: 6px solid #d83ed2; color: black;
50
  <div style="<?php echo $show_news?>">
51
  <br>
52
  <hr>
53
+ <p style="font-size: 12px; padding: 5px; border-left: 6px solid #6a04c9; color: black;
54
+ background-color: #eee; border-radius: 25px 5px;">New: disable product zoom/lightbox.</p>
55
  <p style="font-size: 12px; padding: 5px; border-left: 6px solid #e8c814; color: black;
56
  background-color: #eee; border-radius: 25px 5px;">New: crop all external featured images on home/shop to the same size.</p>
57
  <p style="font-size: 12px; padding: 5px; border-left: 6px solid #d83ed2; color: black;
admin/menu.php CHANGED
@@ -18,6 +18,8 @@ function fifu_get_menu_html() {
18
  $enable_lazy = get_option('fifu_lazy');
19
  $enable_content = get_option('fifu_content');
20
  $enable_fake = get_option('fifu_fake');
 
 
21
  $enable_hide_page = get_option('fifu_hide_page');
22
  $enable_hide_post = get_option('fifu_hide_post');
23
  $enable_get_first = get_option('fifu_get_first');
@@ -47,6 +49,8 @@ function fifu_get_menu_settings() {
47
  fifu_get_setting('fifu_lazy');
48
  fifu_get_setting('fifu_content');
49
  fifu_get_setting('fifu_fake');
 
 
50
  fifu_get_setting('fifu_hide_page');
51
  fifu_get_setting('fifu_hide_post');
52
  fifu_get_setting('fifu_get_first');
@@ -66,6 +70,8 @@ function fifu_get_setting($type) {
66
  update_option($type, '');
67
  else if (strpos($type, "fifu_column_height") !== false)
68
  update_option($type, "64");
 
 
69
  else
70
  update_option($type, 'toggleoff');
71
  }
@@ -77,6 +83,8 @@ function fifu_update_menu_options() {
77
  fifu_update_option('fifu_input_lazy', 'fifu_lazy');
78
  fifu_update_option('fifu_input_content', 'fifu_content');
79
  fifu_update_option('fifu_input_fake', 'fifu_fake');
 
 
80
  fifu_update_option('fifu_input_hide_page', 'fifu_hide_page');
81
  fifu_update_option('fifu_input_hide_post', 'fifu_hide_post');
82
  fifu_update_option('fifu_input_get_first', 'fifu_get_first');
18
  $enable_lazy = get_option('fifu_lazy');
19
  $enable_content = get_option('fifu_content');
20
  $enable_fake = get_option('fifu_fake');
21
+ $enable_wc_lbox = get_option('fifu_wc_lbox');
22
+ $enable_wc_zoom = get_option('fifu_wc_zoom');
23
  $enable_hide_page = get_option('fifu_hide_page');
24
  $enable_hide_post = get_option('fifu_hide_post');
25
  $enable_get_first = get_option('fifu_get_first');
49
  fifu_get_setting('fifu_lazy');
50
  fifu_get_setting('fifu_content');
51
  fifu_get_setting('fifu_fake');
52
+ fifu_get_setting('fifu_wc_lbox');
53
+ fifu_get_setting('fifu_wc_zoom');
54
  fifu_get_setting('fifu_hide_page');
55
  fifu_get_setting('fifu_hide_post');
56
  fifu_get_setting('fifu_get_first');
70
  update_option($type, '');
71
  else if (strpos($type, "fifu_column_height") !== false)
72
  update_option($type, "64");
73
+ else if (strpos($type, "wc") !== false)
74
+ update_option($type, 'toggleon');
75
  else
76
  update_option($type, 'toggleoff');
77
  }
83
  fifu_update_option('fifu_input_lazy', 'fifu_lazy');
84
  fifu_update_option('fifu_input_content', 'fifu_content');
85
  fifu_update_option('fifu_input_fake', 'fifu_fake');
86
+ fifu_update_option('fifu_input_wc_lbox', 'fifu_wc_lbox');
87
+ fifu_update_option('fifu_input_wc_zoom', 'fifu_wc_zoom');
88
  fifu_update_option('fifu_input_hide_page', 'fifu_hide_page');
89
  fifu_update_option('fifu_input_hide_post', 'fifu_hide_post');
90
  fifu_update_option('fifu_input_get_first', 'fifu_get_first');
featured-image-from-url.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
6
- * Version: 1.7.1
7
  * Author: Marcel Jacques Machado
8
  * Author URI: http://featuredimagefromurl.com/
9
  */
@@ -16,6 +16,7 @@ require_once( FIFU_INCLUDES_DIR . '/thumbnail.php' );
16
  require_once( FIFU_INCLUDES_DIR . '/thumbnail-category.php' );
17
  require_once( FIFU_INCLUDES_DIR . '/external-post.php' );
18
  require_once( FIFU_INCLUDES_DIR . '/convert-url.php' );
 
19
 
20
  if (is_admin()) {
21
  require_once( FIFU_ADMIN_DIR . '/meta-box.php' );
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
6
+ * Version: 1.7.2
7
  * Author: Marcel Jacques Machado
8
  * Author URI: http://featuredimagefromurl.com/
9
  */
16
  require_once( FIFU_INCLUDES_DIR . '/thumbnail-category.php' );
17
  require_once( FIFU_INCLUDES_DIR . '/external-post.php' );
18
  require_once( FIFU_INCLUDES_DIR . '/convert-url.php' );
19
+ require_once (FIFU_INCLUDES_DIR . '/woo.php');
20
 
21
  if (is_admin()) {
22
  require_once( FIFU_ADMIN_DIR . '/meta-box.php' );
includes/html/css/woo.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ img.zoomImg {
2
+ display:<?php echo fifu_woo_zoom(); ?> !important;
3
+ }
includes/html/js/image.js CHANGED
@@ -1,7 +1,19 @@
1
  jQuery(document).ready(function ($) {
 
2
  setTimeout(function () {
3
  jQuery('div.flex-viewport').each(function (index) {
4
  jQuery(this).css('height', '');
5
  });
6
  }, 500);
7
  });
 
 
 
 
 
 
 
 
 
 
 
1
  jQuery(document).ready(function ($) {
2
+ disableClick($);
3
  setTimeout(function () {
4
  jQuery('div.flex-viewport').each(function (index) {
5
  jQuery(this).css('height', '');
6
  });
7
  }, 500);
8
  });
9
+
10
+ function disableClick($) {
11
+ if ('<?php echo !fifu_woo_lbox(); ?>') {
12
+ jQuery('.woocommerce-product-gallery__image').each(function (index) {
13
+ jQuery(this).children().click(function () {
14
+ return false;
15
+ });
16
+ jQuery(this).children().children().css("cursor", "default");
17
+ });
18
+ }
19
+ }
includes/html/script.html CHANGED
@@ -1,2 +1,4 @@
 
 
1
  <script><?php include 'js/image.js' ?></script>
2
- <script><?php include 'js/jquery.lazyloadxt.extra.js' ?></script>
1
+ <style><?php include 'css/woo.css' ?></style>
2
+
3
  <script><?php include 'js/image.js' ?></script>
4
+ <script><?php include 'js/jquery.lazyloadxt.extra.js' ?></script>
includes/thumbnail.php CHANGED
@@ -3,6 +3,7 @@
3
  add_filter('wp_head', 'fifu_add_js');
4
  add_filter('wp_head', 'fifu_add_social_tags');
5
  add_filter('wp_head', 'fifu_add_sirv_js');
 
6
 
7
  function fifu_add_js() {
8
  include 'html/script.html';
@@ -25,6 +26,11 @@ function fifu_add_sirv_js() {
25
  }
26
  }
27
 
 
 
 
 
 
28
  add_action('the_post', 'fifu_choose');
29
 
30
  function fifu_choose($post) {
3
  add_filter('wp_head', 'fifu_add_js');
4
  add_filter('wp_head', 'fifu_add_social_tags');
5
  add_filter('wp_head', 'fifu_add_sirv_js');
6
+ add_filter('wp_head', 'fifu_apply_css');
7
 
8
  function fifu_add_js() {
9
  include 'html/script.html';
26
  }
27
  }
28
 
29
+ function fifu_apply_css() {
30
+ if (get_option('fifu_wc_lbox') == 'toggleoff')
31
+ echo '<style>[class$="woocommerce-product-gallery__trigger"] {display:none !important;}</style>';
32
+ }
33
+
34
  add_action('the_post', 'fifu_choose');
35
 
36
  function fifu_choose($post) {
includes/woo.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function fifu_woo_zoom() {
4
+ return get_option('fifu_wc_zoom') == 'toggleon' ? 'inline' : 'none';
5
+ }
6
+
7
+ function fifu_woo_lbox() {
8
+ return get_option('fifu_wc_lbox') == 'toggleon';
9
+ }
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Plugin Name ===
2
  Contributors: marceljm
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8BLDLZ3HDBGQG
4
- Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, flickr, s3, picasa, woocommerce, product image, product gallery, product, gallery, column, list, page, post, all, content, custom, type, custom post type, category, video, external video, youtube, vimeo, featured video, hover, effects, hover effects, sirv, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, instagram, validation, jetpack, visual composer, play, pause, crop, resize
5
  Requires at least: 4.0
6
  Tested up to: 4.9.1
7
  Stable tag: 4.9.1
@@ -32,6 +32,8 @@ Features:
32
 
33
  * some nonstandard image URLs, such as Instagram and Google Drive's, will work as well;
34
 
 
 
35
  * supports WP REST API (**premium feature**);
36
 
37
  * all features created for external images are available for external videos from YouTube and Vimeo. For YouTube videos, it's possible to set player parameters. And you can define the video size for each screen type (**premium feature**);
@@ -48,8 +50,6 @@ Features:
48
 
49
  * you can apply your own CSS style or 18 hover effects to the images (**premium feature**);
50
 
51
- * you can enable/disable the WooCommerce lightbox (**premium feature**);
52
-
53
  * auto play/pause videos on mouse over/out (**premium feature**);
54
 
55
  **<a href="http://featuredimagefromurl.com/">Official Site</a>**
@@ -322,6 +322,9 @@ was removed. To finish, a Premium version is now been presented.
322
  = 1.7.1 =
323
  * Crop all external featured images to the same size.
324
 
 
 
 
325
  == Upgrade Notice ==
326
 
327
  = 1.0 =
@@ -491,4 +494,7 @@ was removed. To finish, a Premium version is now been presented.
491
  * Video thumbnail as featured image and Update All button.
492
 
493
  = 1.7.1 =
494
- * Crop all external featured images to the same size.
 
 
 
1
  === Plugin Name ===
2
  Contributors: marceljm
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8BLDLZ3HDBGQG
4
+ Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, flickr, s3, picasa, woocommerce, product image, product gallery, product, gallery, column, list, page, post, all, content, custom, type, custom post type, category, video, external video, youtube, vimeo, featured video, hover, effects, hover effects, sirv, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, instagram, validation, jetpack, visual composer, play, pause, crop, resize, zoom, enable, disable
5
  Requires at least: 4.0
6
  Tested up to: 4.9.1
7
  Stable tag: 4.9.1
32
 
33
  * some nonstandard image URLs, such as Instagram and Google Drive's, will work as well;
34
 
35
+ * you can disable the product lightbox and zoom;
36
+
37
  * supports WP REST API (**premium feature**);
38
 
39
  * all features created for external images are available for external videos from YouTube and Vimeo. For YouTube videos, it's possible to set player parameters. And you can define the video size for each screen type (**premium feature**);
50
 
51
  * you can apply your own CSS style or 18 hover effects to the images (**premium feature**);
52
 
 
 
53
  * auto play/pause videos on mouse over/out (**premium feature**);
54
 
55
  **<a href="http://featuredimagefromurl.com/">Official Site</a>**
322
  = 1.7.1 =
323
  * Crop all external featured images to the same size.
324
 
325
+ = 1.7.2 =
326
+ * Disable product lightbox and zoom.
327
+
328
  == Upgrade Notice ==
329
 
330
  = 1.0 =
494
  * Video thumbnail as featured image and Update All button.
495
 
496
  = 1.7.1 =
497
+ * Crop all external featured images to the same size.
498
+
499
+ = 1.7.2 =
500
+ * Disable product lightbox and zoom.